You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] With the in-memory context on, Commit still patches a ConfigMap that was never created #335
area/data-passingInputs, outputs, parameterKey and the workflow context store (pkg/hooks, pkg/context)priority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next release.type/bugSomething isn't working
WorkflowContext.sync() (pkg/context/context.go) updates the in-memory store when EnableInMemoryContext
is set, then falls through to cli.Patch(ctx, wf.store, ...). In that mode the ConfigMap is never created
in the API server, so the patch returns NotFound and Commit fails.
TestWorkflowContextInMemory stubs MockPatch to return nil, so the test passes over it.
Expected behavior
With the in-memory context on, sync() returns after updating the store and never calls the API server;
the test asserts that Patch is not called.
Additional context
Found reviewing #262 and reproduced against a real API server (envtest, k8s 1.37) on main at 599b593: newContext with the flag on, one SetVar, then Commit returns save context to configMap(default/workflow-g2app-context): configmaps "workflow-g2app-context" not found.
The flag is off by default; KubeVela exposes it as --optimize-enable-in-memory-workflow-context.
Hey @briankane, I'd like to pick this up since it came out of #262. Plan is to return from sync() right after updating the in-memory store, and change TestWorkflowContextInMemory so it fails if Patch gets called. Could you assign it to me?
area/data-passingInputs, outputs, parameterKey and the workflow context store (pkg/hooks, pkg/context)priority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next release.type/bugSomething isn't working
Activity
NachiketPatil26 commentedon Nov 24, 2026
Hey @briankane, I'd like to pick this up since it came out of #262. Plan is to return from
sync()right after updating the in-memory store, and changeTestWorkflowContextInMemoryso it fails if Patch gets called. Could you assign it to me?