Skip to content

Conversation

@VegetarianOrc
Copy link
Contributor

@VegetarianOrc VegetarianOrc commented Dec 3, 2025

What was changed

  • Add support for acquiring and using a MetricMeter inside Nexus operation handlers.
  • Narrow the accepted type of executor for sync Nexus operations from concurrent.futures.Executor to concurrent.futures.ThreadPoolExecutor. This is a breaking change.

Why?

To enable users to create metrics in Nexus operations in the same way as Activities.

The type of executor was narrowed to prevent users from running into known issues around pickleability. Additionally, handling Nexus operation start/cancel requests are intended to be short and aren't a great fit for something like a ProcessPoolExecutor.

Checklist

How was this tested:

New tests were added to include execution of Nexus operations via the async event loop and a ThreadPoolExecutor and verify that metrics are sent. The new tests mirror the existing workflow metrics tests, but are skipped in the time skipping environment due to lack of Nexus support.

@VegetarianOrc VegetarianOrc marked this pull request as ready for review December 3, 2025 23:11
@VegetarianOrc VegetarianOrc requested a review from a team as a code owner December 3, 2025 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants