Skip to content

Add support for more timeouts to Nexus operations#1276

Open
Quinn-With-Two-Ns wants to merge 5 commits intotemporalio:mainfrom
Quinn-With-Two-Ns:NEXUS-21
Open

Add support for more timeouts to Nexus operations#1276
Quinn-With-Two-Ns wants to merge 5 commits intotemporalio:mainfrom
Quinn-With-Two-Ns:NEXUS-21

Conversation

@Quinn-With-Two-Ns
Copy link
Contributor

@Quinn-With-Two-Ns Quinn-With-Two-Ns commented Jan 14, 2026

Add schedule-to-start and start-to-close for Nexus operations

NOTE, before this can be merged the API still needs to be tagged, core changes need to be merged and tests need to be added


Note

Medium Risk
Touches Nexus operation invocation plumbing and protobuf command fields, which can affect runtime scheduling/timeout behavior across workflows. Changes are scoped and covered by new timeout-focused tests.

Overview
Adds support for passing schedule_to_start_timeout and start_to_close_timeout when starting/executing Nexus operations, threading these options from the public NexusClient.start_operation/execute_operation API through worker runtime wiring into the ScheduleNexusOperation command.

Extends error coverage with new tests asserting Nexus operations surface TimeoutError with TimeoutType.SCHEDULE_TO_START and TimeoutType.START_TO_CLOSE when these timeouts elapse.

Written by Cursor Bugbot for commit c76138c. This will update automatically on new commits. Configure here.

@CLAassistant
Copy link

CLAassistant commented Jan 14, 2026

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@Quinn-With-Two-Ns Quinn-With-Two-Ns marked this pull request as ready for review February 17, 2026 22:39
@Quinn-With-Two-Ns Quinn-With-Two-Ns requested a review from a team as a code owner February 17, 2026 22:39
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2554cee0e9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +306 to +307
schedule_to_start_timeout: timedelta | None
start_to_close_timeout: timedelta | None

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep new interceptor timeout fields optional

StartNexusOperationInput is part of the public interceptor API, but these newly added fields are required constructor args, which is a backwards-incompatible break for existing interceptors that instantiate this dataclass (or pass positional args) using the prior signature. After this change, older code will either raise TypeError for missing args or mis-bind positional values, so adding defaults (e.g., None) is needed to preserve compatibility while introducing the new timeouts.

Useful? React with 👍 / 👎.

nexus_task_executor=concurrent.futures.ThreadPoolExecutor(),
):
await create_nexus_endpoint(task_queue, client)
try:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer pytest.raises, but no big deal.

@workflow.defn
class StartToCloseTimeoutTestCallerWorkflow:
@workflow.init
def __init__(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any particular reason to create the nexus client as a member? Not that it matters too much in the test, but if we're viewing all code as AI consumed, is this a good pattern to suggest?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's actually what all the tests in this file do so i just copied them for consistency.

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.

3 participants

Comments