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

Add support for templatable exit handlers and V4 examples #613

Closed
wants to merge 18 commits into from

Conversation

flaviuvadan
Copy link
Collaborator

Pull Request Checklist

Description of PR

Currently, the Hera v4 examples are mostly missing. This PR adds numerous examples from V4 and also fixes a few tiny bugs that were identified:

  • add source to callable kwargs for otherwise the correct parameters are not generated
  • add support for templates to the on_exit field of workflows

Signed-off-by: Flaviu Vadan <[email protected]>
Signed-off-by: Flaviu Vadan <[email protected]>
@flaviuvadan flaviuvadan added semver:patch A change requiring a patch version bump type:enhancement A general enhancement labels May 4, 2023
@flaviuvadan flaviuvadan changed the title Fv/v4 examples Add support for templatable exit handlers and V4 examples May 4, 2023
flaviuvadan added 13 commits May 4, 2023 11:17
Signed-off-by: Flaviu Vadan <[email protected]>
Signed-off-by: Flaviu Vadan <[email protected]>
Signed-off-by: Flaviu Vadan <[email protected]>
Signed-off-by: Flaviu Vadan <[email protected]>
Signed-off-by: Flaviu Vadan <[email protected]>
Signed-off-by: Flaviu Vadan <[email protected]>
Signed-off-by: Flaviu Vadan <[email protected]>
Signed-off-by: Flaviu Vadan <[email protected]>
Signed-off-by: Flaviu Vadan <[email protected]>
Signed-off-by: Flaviu Vadan <[email protected]>
Signed-off-by: Flaviu Vadan <[email protected]>
@flaviuvadan flaviuvadan linked an issue May 6, 2023 that may be closed by this pull request
@codecov
Copy link

codecov bot commented May 9, 2023

Codecov Report

Merging #613 (37c7875) into main (f545bef) will decrease coverage by 7.6%.
The diff coverage is 19.9%.

❗ Current head 37c7875 differs from pull request most recent head f4168bc. Consider uploading reports for the commit f4168bc to get more accurate results

@@           Coverage Diff           @@
##            main    #613     +/-   ##
=======================================
- Coverage   72.4%   64.9%   -7.6%     
=======================================
  Files         42      42             
  Lines       2916    2968     +52     
  Branches     572     563      -9     
=======================================
- Hits        2113    1928    -185     
- Misses       649     914    +265     
+ Partials     154     126     -28     
Impacted Files Coverage Δ
src/hera/workflows/workflow_template.py 60.6% <ø> (ø)
src/hera/workflows/steps.py 58.1% <15.7%> (-7.9%) ⬇️
src/hera/workflows/_unparse.py 15.0% <16.3%> (-33.3%) ⬇️
src/hera/workflows/artifact.py 89.5% <37.5%> (-4.8%) ⬇️
src/hera/workflows/task.py 69.6% <38.8%> (+2.5%) ⬆️
src/hera/workflows/workflow.py 81.0% <62.5%> (-1.8%) ⬇️
src/hera/workflows/_mixins.py 76.2% <100.0%> (+4.1%) ⬆️
src/hera/workflows/dag.py 90.9% <100.0%> (ø)

... and 2 files with indirect coverage changes

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

# Conflicts:
#	src/hera/workflows/_mixins.py
flaviuvadan added a commit that referenced this pull request May 26, 2023
<!-- Thank you for submitting a PR to Hera! 🚀 -->

**Pull Request Checklist**
- [x] Fixes #595 
- [ ] Tests added
- [x] Documentation/examples added
- [x] [Good commit messages](https://cbea.ms/git-commit/) and/or PR
title
<!-- Also remember to sign off commits or the DCO check will fail on
your PR! -->

**Description of PR**
<!-- If not linked to an issue, please describe your changes here -->

@elliotgunton and I bounced some thoughts on improving access to
parameters/artifact via #595 and #613. This PR adds the implementation
@elliotgunton suggested to the template invokator class. Open to having
these on a different mixin!

<!-- Piece of cake! ✨🍰✨ -->

---------

Signed-off-by: Flaviu Vadan <[email protected]>
Signed-off-by: Elliot Gunton <[email protected]>
Co-authored-by: Sambhav Kothari <[email protected]>
Co-authored-by: Elliot Gunton <[email protected]>
@flaviuvadan
Copy link
Collaborator Author

closing in favor of #650

@flaviuvadan flaviuvadan deleted the fv/v4-examples branch May 29, 2023 22:00
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:enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add missing metrics and sidecar example to hera 5 f-strings break the workflow generator
2 participants