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 image pull policy validation error #586

Merged
merged 3 commits into from
Apr 20, 2023

Conversation

sergiynesterenko90
Copy link
Contributor

Fixes #582

Basically, the ScriptTemplate model expects a str for the imagePullPolicy definition, but hera is returning the ImagePullPolicy enum - hence pydantic rejects it and throws an error. The fix is just to return the .value of the enum instead of the enum itself.

Signed-off-by: Sergiy Nesterenko <sergiy@quilter.ai>
@sambhav sambhav added semver:patch A change requiring a patch version bump type:bug A general bug labels Apr 19, 2023
@sambhav
Copy link
Collaborator

sambhav commented Apr 19, 2023

@sergiynesterenko90 Thanks for this. Could you please add an example (which will also serve as a regression test)? You can see our contribution guidelines https://github.com/argoproj-labs/hera/blob/7f6bec0eb81449e6d47c0182f20608aeb7171841/CONTRIBUTING.md for more details.

@sergiynesterenko90
Copy link
Contributor Author

@samj1912 thanks for the quick response! I've added an example, and auto-generated the golden copy + docs. Let me know if there's anything else needed!

@sambhav sambhav merged commit 48a57a5 into argoproj-labs:main Apr 20, 2023
@sergiynesterenko90 sergiynesterenko90 deleted the fix/image-pull-policy branch April 20, 2023 12:11
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.

ValidationError when using imagePullPolicy
2 participants