fix(cli): pass namespace to archived workflow get - #16823
Conversation
Signed-off-by: Grzegorz Pomykala <gpomykala@splunk.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe archive get command now passes the selected namespace to archived workflow retrieval. Unit and end-to-end tests verify namespace handling for UID-based and name-based retrieval. ChangesArchive get namespace handling
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This restores namespace propagation for archived workflow retrieval without changing the public interface; the change is localized and covered by regression tests, so no actionable merge-blocking risk remains. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Joibel
left a comment
There was a problem hiding this comment.
Neither unit nor e2e test fails without the code change, so they don't guard it.
Please could you apply the same fix to Delete whilst you're in here, it's also missing the namespace passthrough.
See the pull request guide for details on each item.
make pre-commit -BFixes #16822
Motivation
argo archive get WORKFLOW --namespace NAMESPACEdid not include the namespace in the finalGetArchivedWorkflowRequest. With SSO RBAC namespace delegation enabled, Argo Server could not select the namespace service account and instead evaluated the request using the login service account, resulting inPermissionDenied.The request type already includes a namespace field, and the command already resolves the namespace for name-to-UID lookup. The namespace was only dropped from the final direct GET.
Modifications
GetArchivedWorkflowRequest.--namespacearguments for UID- and name-based archive GETs in the existing CLI E2E suite.Verification
Passed:
A manual A/B regression test reproduced the failure with the released CLI and confirmed that the CLI built from this branch returns the archived workflow when an explicit namespace is supplied.
Documentation
No documentation change is needed. This restores the existing
--namespaceflag behavior forarchive getand does not introduce a new user-facing option.AI
OpenAI Codex assisted with investigating the request path, implementing the fix, adding tests, and preparing this PR description. I reviewed and validated the resulting changes, including a manual A/B regression test.
Backport
This is a small, backward-compatible bug fix using an existing request field. Please consider adding the
cherry-pick/4.1andcherry-pick/4.0labels.Summary by CodeRabbit
Bug Fixes
Tests