Skip to content

fix: added error tolerant list/watch#16140

Draft
isubasinghe wants to merge 3 commits into
argoproj:mainfrom
pipekit:worktree-fix-list-tolerant-decode
Draft

fix: added error tolerant list/watch#16140
isubasinghe wants to merge 3 commits into
argoproj:mainfrom
pipekit:worktree-fix-list-tolerant-decode

Conversation

@isubasinghe
Copy link
Copy Markdown
Member

Fixes #TODO

Motivation

Modifications

Verification

Documentation

AI

Signed-off-by: isubasinghe <isitha@pipekit.io>
…nmarshalers

runtime.DefaultUnstructuredConverter.FromUnstructured uses reflection
and silently bypasses json.Unmarshaler implementations. ParallelSteps
(an anonymous list) and several other workflow types depend on custom
UnmarshalJSON, so reflection-based conversion dropped every workflow
with `steps` and E2E list APIs returned empty.

Route per-item decoding through json.Marshal/Unmarshal of the
unstructured payload so custom unmarshalers run. Added regression test
covering a workflow with ParallelSteps.

Signed-off-by: isubasinghe <isitha@pipekit.io>
The previous Bookmark short-circuit forwarded events from the dynamic
client as-is, so the reflector saw *unstructured.Unstructured where it
expects *wfv1.Workflow. The reflector rejected the bookmark, treated
initial-list sync as incomplete, and the SQLite-backed lister stayed
empty for ~60s after argo-server start — making list APIs return
{"items":null} for any workflow created in that window.

Drop the Bookmark skip and run bookmark events through the same JSON
decode path as other events. Bookmark payloads only carry metadata, so
decoding into a fresh *T yields a typed object the reflector accepts.
If a bookmark ever fails to decode, fall back to the zero-value typed
object rather than dropping it (a missed bookmark stalls watch-list
sync entirely).

Signed-off-by: isubasinghe <isitha@pipekit.io>
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.

1 participant