argoproj-labs / hera

Hera makes Python code easy to orchestrate on Argo Workflows through native Python integrations. It lets you construct and submit your Workflows entirely in Python. ⭐️ Remember to star!
https://hera.rtfd.io
Apache License 2.0
601 stars 106 forks source link

Arguments do not build correctly when using a dict #1169

Open elliotgunton opened 2 months ago

elliotgunton commented 2 months ago

Pre-bug-report checklist

1. This bug can be reproduced using pure Argo YAML

If yes, it is more likely to be an Argo bug unrelated to Hera. Please double check before submitting an issue to Hera.

2. This bug occurs in Hera when...

Bug report

Describe the bug A clear and concise description of what the bug is:

TODO - basically using w.arguments = {"param_name": "value"} before doing w.create() doesn't get the argument correctly because we don't check if self.arguments is itself a dict here https://github.com/argoproj-labs/hera/blob/523a9b91d5af34a6f797907d5d02ac4a89240d6a/src/hera/workflows/_mixins.py#L562

Error log if applicable:

error: something broke!

To Reproduce Full Hera code to reproduce the bug:

from hera.workflows import Workflow

with Workflow(name="my-workflow") as w:
    # Add your code here

Expected behavior A clear and concise description of what you expected to happen:

Environment

Additional context Add any other context about the problem here.