Repository navigation
Execution context from Maestro on tasks and in handlers (4.5.0) — step 1 - #231
Draft
andrejsimic wants to merge 1 commit into
Draft
andrejsimic wants to merge 1 commit into
andrejsimic wants to merge 1 commit into
Conversation
Maestro can start a workflow run with an execution context: key/value pairs such as the tenant and user the run is for. It keeps them unchanged for the life of the run, gives them to sub-workflows, and sends them with every polled task. - Task, Workflow and StartWorkflowRequest get an optional Context, in a partial outside the generated models. It is left out of a start request when null, so a start against Conductor is unchanged. - ConductorSharpExecutionContext.Context gives a handler the polled task's context, as a read-only copy. It is empty against Conductor. - Both execution managers treat a null poll response as "no task". Maestro's in-process transport answers an empty poll with null rather than a 204, which surfaced as an unobserved NullReferenceException in the poll.
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.
Step 1 only. Part of moving CxReports Jobs onto a shared Maestro over NATS. This adds what ConductorSharp needs on its side; Maestro does not send a
contextyet (that is step 2).Task,WorkflowandStartWorkflowRequestget an optionalcontextmap, in a partial outside the generated models. It is left out of a start request when null, so a start against Conductor is unchanged.ConductorSharpExecutionContext.Contextgives a handler the polled task's context, read-only. Empty against Conductor.NullReferenceException.4.5.0: new public API. Not published; the CxReports draft consumes it as
4.5.0-maestro-nats.1from a local feed.Tests: 79 pass, 6 new in
ExecutionContextTests. The null-poll test pins the behaviour but cannot catch its loss, because the old failure was silent.Related: codaxy/cx-maestro#185 (the NATS API and the ConductorSharp NATS transport), codaxy/cx-reports#1279 (Jobs on Maestro over NATS, the consumer).