Skip to content

feat: add Nexus integration#768

Draft
xepozz wants to merge 1 commit into
masterfrom
nexus-new
Draft

feat: add Nexus integration#768
xepozz wants to merge 1 commit into
masterfrom
nexus-new

Conversation

@xepozz

@xepozz xepozz commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

What was changed

Samples: temporalio/samples-php#75

Why?

Checklist

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

* Overall timeout for the Nexus operation.
*/
#[Marshal(name: 'scheduleToCloseTimeout', type: DateIntervalType::class)]
public \DateInterval $scheduleToCloseTimeout;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

There should also be scheduleToStart and startToCloseTimeout

/**
* Description of the workflow that backs a Nexus operation.
*/
final class WorkflowHandle

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I was a little confused by the naming here as it felt a bit like this was a reference to a running workflow, but it's actually the input to a start workflow call.

Comment on lines +69 to +70
$value = NexusHeader::get($lowerHeaders, NexusHeader::OPERATION_TIMEOUT)
?? NexusHeader::get($lowerHeaders, NexusHeader::REQUEST_TIMEOUT);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

These timeouts are separate and shouldn't be combined in this way. The request timeout is used to indicate how long the Nexus handler has to act. The operation timeout is how long the entire thing has to complete including any async activity started by the handler.

We should parse request timeout only here and leave operation timeout in the headers that are passed to the handler.

Comment on lines +187 to +192
$context = new OperationContext(
service: $cancelRequest->getService(),
operation: $cancelRequest->getOperation(),
headers: $headers,
env: $this->env,
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The context here also needs the request timeout parsed as the deadline.

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