Skip to content

feat: add --dump-manifests flag to argo-workflows create#3099

Open
npow wants to merge 3 commits into
npow/fix-argo-only-json-exportfrom
npow/argo-dump-manifests-clean
Open

feat: add --dump-manifests flag to argo-workflows create#3099
npow wants to merge 3 commits into
npow/fix-argo-only-json-exportfrom
npow/argo-dump-manifests-clean

Conversation

@npow

@npow npow commented Apr 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add `--dump-manifests` flag to `argo-workflows create` that outputs all Kubernetes manifests as JSON without connecting to the cluster or uploading a code package
  • Skips datastore validation and code package upload, using placeholders instead
  • Suitable for GitOps workflows with `kubectl apply`, kustomize, or ArgoCD

Depends on #3095.

Changes (post-review)

  • Register `--dump-manifests` as a Click option on the `create` command (was missing)
  • Add `elif dump_manifests:` token branch to skip cluster access (alongside `only_json` path)
  • Pass `dump_manifests=dump_manifests` through to `make_flow()`
  • Add output branch: `if dump_manifests: obj.echo_always(flow.export_all_json(), ...)`
  • Rebased on master

Test plan

  • Run `python myflow.py argo-workflows create --dump-manifests` and verify JSON output with placeholder code package values
  • Verify `--only-json` still works as before (requires datastore)
  • Verify normal `create` (deploy) still works

🤖 Generated with Claude Code

@greptile-apps

greptile-apps Bot commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a manifest-dump mode to Argo Workflows creation. The main changes are:

  • New --dump-manifests option on argo-workflows create.
  • Cluster access and code package upload bypass for manifest generation.
  • Placeholder code package values in generated manifests.
  • JSON output for all generated Kubernetes manifests.
  • Integration tests for basic and scheduled manifest output.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
metaflow/plugins/argo/argo_workflows_cli.py Adds and wires the --dump-manifests path through create, manifest generation, and package placeholder handling.
test/ux/core/test_argo_manifests.py Adds subprocess coverage for manifest dumping, placeholder values, and scheduled workflow output.

Reviews (5): Last reviewed commit: "test: add --dump-manifests integration t..." | Re-trigger Greptile

Comment thread metaflow/plugins/argo/argo_workflows_cli.py
Comment thread metaflow/plugins/argo/argo_workflows_cli.py
@npow npow force-pushed the npow/argo-dump-manifests-clean branch from fc37072 to 09416f4 Compare April 13, 2026 22:10
@dallinstevens

Copy link
Copy Markdown

@npow This is exactly what my team needs with our implementation of metaflow/argocd. Anything we can do to help get this over the line? Happy to carry it forward: rebase on master, get CI green, add tests while keeping your authorship to this and #3095 , if you're open to it.

@npow

npow commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator Author

@saikonen can you review?

@npow npow force-pushed the npow/argo-dump-manifests-clean branch from 09416f4 to c1cc018 Compare July 14, 2026 21:17
@npow npow force-pushed the npow/fix-argo-only-json-export branch from 8a1f532 to c416489 Compare July 14, 2026 21:19
@npow npow force-pushed the npow/argo-dump-manifests-clean branch from c1cc018 to 598bed0 Compare July 14, 2026 21:20
Nissan Pow and others added 3 commits July 15, 2026 01:37
Output all Kubernetes manifests as JSON without connecting to the
cluster or uploading a code package. Reuses export_all_json() to
produce a dict with workflow_template, cron_workflow, and sensor
keys. Suitable for GitOps workflows with kubectl apply, kustomize,
or ArgoCD.
- Register @click.option("--dump-manifests") on the create command
- Add dump_manifests param to create() and skip deployer attributes / cluster access
- Pass dump_manifests=dump_manifests to make_flow()
- Output manifests via export_all_json() when --dump-manifests is set

Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
Adds _compile_flow_to_dump_manifests() helper and TestArgoCliDumpManifests
covering: valid JSON output, workflow_template presence, no cron/sensor for
plain flows, placeholder package values in manifest, and scheduled flow
cron_workflow export.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
@npow npow force-pushed the npow/argo-dump-manifests-clean branch from 24ec874 to da16b9a Compare July 15, 2026 01:37
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.

2 participants