Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Nexus-Operation-Id and Nexus-Link headers to callback definition #12

Merged
merged 6 commits into from
Nov 19, 2024

Conversation

pdoerner
Copy link
Contributor

Added Nexus-Operation-Id and Nexus-Link headers to callback description. These are needed to support completing async operations before the start operation response is received.

@pdoerner pdoerner requested a review from bergundy November 15, 2024 07:01
SPEC.md Outdated
Comment on lines 310 to 311
- Include the `Nexus-Operation-Id` header and any `Nexus-Link` headers for resources associated with this operation to
support completing asynchronous operations before the response to StartOperation is received.
Copy link

Choose a reason for hiding this comment

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

I assume when we allow users to have external callbacks this won't expose any security risks by giving the callback internal information like a workflow that may be backing an operation? Or at that time we will have some way to hide the workflow link if a Nexus endpoint doesn't want to expose it?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, there needs to be a knob for users to decide if they want to expose caller and handler information in Temporal. For now, we're limited to same account traffic and the consensus seems to be to always expose.

Copy link
Contributor

Choose a reason for hiding this comment

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

We should also include the Nexus-Operation-Start-Time header to be able to recreate the full started event.

Copy link
Contributor

@bergundy bergundy left a comment

Choose a reason for hiding this comment

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

Approved with a comment.

@pdoerner pdoerner requested a review from bergundy November 15, 2024 19:17
SPEC.md Outdated
@@ -306,6 +306,10 @@ For invoking a callback URL:
- Issue a POST request to the caller-provided URL.
- Include any callback headers supplied in the originating StartOperation request, stripping away the `Nexus-Callback-`
prefix.
- Include the `Nexus-Operation-Id` header, `Nexus-Operation-Start-Time` and any `Nexus-Link` headers for resources
associated with this operation to support completing asynchronous operations before the response to StartOperation is
received. `Nexus-Operation-Start-Time` should be in a valid HTTP/1.1 format. If is omitted, the time the completion is
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you clarify and possibly link here? https://www.rfc-editor.org/rfc/rfc5322.html#section-3.3

Copy link
Contributor

@bergundy bergundy left a comment

Choose a reason for hiding this comment

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

Approved with a comment.

@pdoerner pdoerner merged commit 6df7e59 into nexus-rpc:main Nov 19, 2024
1 check passed
@pdoerner pdoerner deleted the complete-before-start-headers branch November 19, 2024 18:24
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