Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

argo-workflows create --only-json doesn't export sensor configuration #1940

Open
kmrnag opened this issue Aug 3, 2024 · 0 comments · May be fixed by #1947
Open

argo-workflows create --only-json doesn't export sensor configuration #1940

kmrnag opened this issue Aug 3, 2024 · 0 comments · May be fixed by #1947

Comments

@kmrnag
Copy link

kmrnag commented Aug 3, 2024

The code only exports the workflow template and does not export sensor configuration. There is a clear TODO for this

if only_json: obj.echo_always(str(flow), err=False, no_bold=True) # TODO: Support echo-ing Argo Events Sensor template

in the argo_workflows_cli

It is not hard to also call str on flow._sensor that has the compiled sensor, but outputting two json objects (one for flow and another for sensor) together as a valid json seems to be more problematic, without breaking the interface. Perhaps we can add a new option to only export json for the sensor "--only-sensor-json"?

There is a related open issue about only-json not exporting cron workflow. Introducing two new parameters "--only-cron-schedule-json" and "--only-sensor-json" (only one of these options can be true at a time) can help address these issues.

Will be happy to submit a PR as the fix will be relatively small.

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 a pull request may close this issue.

1 participant