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

Fix get_parameter for Step #624

Merged
merged 1 commit into from
May 9, 2023
Merged

Fix get_parameter for Step #624

merged 1 commit into from
May 9, 2023

Conversation

elliotgunton
Copy link
Collaborator

@elliotgunton elliotgunton commented May 9, 2023

Pull Request Checklist

Description of PR

Currently, using get_parameter on a step fails due to the validator as value/value_from are mutually exclusive, e.g.

            Step(
                name="do-retry",
                template=...
                when=f"{retry_step.get_parameter('retry-param')}==retry",
            )

This PR copies the fix for Task from #565 for Step.

Only doing a small fix as the duplicated function code should be addressed in #595

Needed to match fix in #565

Signed-off-by: Elliot Gunton <egunton@bloomberg.net>
@codecov
Copy link

codecov bot commented May 9, 2023

Codecov Report

Merging #624 (72d6ae8) into main (a1d704e) will increase coverage by 0.0%.
The diff coverage is n/a.

@@          Coverage Diff          @@
##            main    #624   +/-   ##
=====================================
  Coverage   72.3%   72.4%           
=====================================
  Files         42      42           
  Lines       2898    2897    -1     
  Branches     571     571           
=====================================
  Hits        2098    2098           
+ Misses       645     644    -1     
  Partials     155     155           
Impacted Files Coverage Δ
src/hera/workflows/steps.py 66.0% <ø> (+0.6%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@elliotgunton elliotgunton added semver:patch A change requiring a patch version bump type:bug A general bug labels May 9, 2023
@elliotgunton elliotgunton merged commit b439863 into main May 9, 2023
@elliotgunton elliotgunton deleted the step-get-param-fix branch May 9, 2023 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:patch A change requiring a patch version bump type:bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parameter Validation Error when using get_parameter with a parameter set using ValueFrom
2 participants