Repository navigation
Conversation
…fest version
A host starts each top-level workflow with VarManifestVersion
("_manifest_version") set to the current artifact manifest version. The
engine carries it to every child workflow and reports it to the host on
every task activation and definition fetch, and each task records it,
so a deploy never changes the templates of a flow already running.
- The engine passes the version on ActivationRef (and so
TaskPayload.ManifestVersion) and as a second argument to
FetchWorkflowDefinitionActivity. Dynamic-split children get it
explicitly; batch and parallel children already copy the engine's
underscore variables. A whole number that came back through JSON as a
float64 is read as the integer.
- RegisterDefinitionHandler takes a DefinitionHandler, which receives
the manifest version with the template ID. AdminParkPayload carries
the version too, so a park handler can show the parked node's
template from the flow's own manifest.
- TaskManager takes an *artifact.Set. StartTask resolves the task
template, its workflow and render config through the payload's
version, stores it on the task record and seeds it into the task's
own workflow. StartTaskStep and CompleteTaskStep resolve the step
template through the record's version, and put it on the context so
plugins, extensions and the renderer's template provider can resolve
through it too (artifact.ManifestVersionFrom).
- A task without a version fails with a non-retryable error before
anything is written: falling back to the current version would change
templates under it. A version this replica has not loaded stays
retryable, since Set.Registry loads newer manifests on demand.
- TaskRecord gains ManifestVersion, stored in column manifest_version.
BREAKING CHANGE: NewTaskManager takes an *artifact.Set instead of an
*artifact.Registry, RegisterDefinitionHandler takes a DefinitionHandler,
and FetchWorkflowDefinitionActivity takes the manifest version. Hosts
must set VarManifestVersion when starting a top-level workflow and add
a manifest_version INTEGER NOT NULL DEFAULT 0 column to the task
records table. Workflows already running fail their next task.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ZoneViewAssembler.Assemble, which a host's GET /api/v1/tasks/{id}
serves, rendered on the caller's context. A host template provider that
resolves through the task's manifest version found none there, so every
template-backed section failed. Assemble puts record.ManifestVersion on
the context, as GetTaskRenderInfo does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lokewate
added a commit
to OpenNSW/nsw-srilanka
that referenced
this pull request
Oct 12, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
A host starts each top-level workflow with
VarManifestVersion(_manifest_version) set to the current artifact manifest version. The engine carries it to every child workflow and reports it on every task activation, definition fetch and admin park. Each task records it, so a task's steps, submissions and renders all resolve their templates through the version the flow started on.Stacked on #305: this PR targets
feat/manifest-set, so its diff is this change alone. Review #305 first.Type of Change
Changes Made
ActivationRefandTaskPayloadcarryManifestVersion.FetchWorkflowDefinitionActivitytakes the version as a second argument, andRegisterDefinitionHandlertakes aDefinitionHandler(manifestVersion, templateID).AdminParkPayloadcarries the version, so a park handler can show the parked node's template from the flow's own manifest.float64is read as the integer. Anything that is not a positive whole number counts as no version.NewTaskManagertakes an*artifact.Set.StartTaskresolves the task template, its workflow and render config through the payload's version. It stores the version on the task record and seeds it into the task's own workflow.StartTaskStepandCompleteTaskStepresolve the step template through the record's version, not the payload's. They put the version on the context, so plugins, extensions and the renderer's template provider can resolve through it too.GetTaskRenderInfoandZoneViewAssembler.Assemble(a host's task view) do the same for rendering.ApplicationError, returned unwrapped because Temporal reads retryability off the top-level error only. A version this replica has not loaded stays retryable, sinceSet.Registryloads newer manifests on demand.TaskRecord.ManifestVersionis stored in columnmanifest_version.VarManifestVersionwhen they start a top-level workflow;manifest_version INTEGER NOT NULL DEFAULT 0to the task records table;Testing
Run with
go test -race ./workflow/ ./taskflow/... ./artifact/.... The tests cover:manifestVersion()value forms: int, float64, json.Number, negative, fractional and string;Checklist
Related Issues
Related to #305
Screenshots/Demo
N/A
Additional Notes
The host side is OpenNSW/nsw-srilanka#660. It records the version on each flow row, passes it at start, and adds the migration. The artifacts side is OpenNSW/one-trade-artifacts#156.
🤖 Generated with Claude Code