Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed?
This PR serves
ExecuteSyncNexusOperationin the frontend.service/frontend/nexus_sync.go. It's off by default behindfrontend.enableExecuteSyncNexusOperation, a namespace setting. Off answersUnimplemented.WorkflowServicecall.metadata.gohas it as namespace scope with write access, andquotas.gohas it at priority 1 besideStartNexusOperationExecution.nexusoperation.ValidateAndNormalizeSyncRequest.EndpointRegistry.GetByNamewith the caller namespace ID, the seam that the other paths use for the allowlist. Only worker targets work.DispatchByEndpointAPI name, as on the HTTP route. A target that isn't active in this cluster answersNamespaceNotActive.nexusoperation.request.timeout. It answers the result or the failure. An async answer givesFailedPrecondition, and no answer givesDeadlineExceeded.go.modmoves to the api-go of dr10.Why?
A Bridge reader that opts in to direct reads calls the owner's stream service from a Local Activity and on replay (DD-153, DD-154 in the direct reads design). This RPC does that with the caller's own credential and the endpoint allowlist, and it leaves no state (DD-163). A standalone operation per read would keep each result and make each read an execution.
Please note that a handler that answers async has started its operation before the frontend refuses the answer. The stream service answers only sync, so this does not happen on the read path.
How did you test it?
Link to a test plan if any -
Unit tests in
service/frontend/nexus_sync_test.gofor each outcome, and for input above the blob size limit. Functional tests intests/nexus_sync_test.gofor a sync result across two namespaces, a handler error, an operation failure, an async answer, an unknown endpoint, no poller, the setting off, an authorizer that sees only the caller namespace, a denied caller namespace, and the caller and target rate limits. The Nexus and stream functional suites pass.