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

Propagate WorkflowsService instance from WorkflowTemplate to the created Workflow #1066

Closed AchilleAsh closed 5 months ago

AchilleAsh commented 5 months ago

Pull Request Checklist

Description of PR

Currently, when creating a workflow from a workflow template, it implicitly relies on the global config for the WorkflowsService, as it is not copying the service from the template. Thus, the simple example in the doc would fail, useless the Argo host is defined in the global config.

This PR binds the WorkflowsService instance of the WorkflowTemplate to the created Workflow to propagate non-global configuration, and changes 2 tests to make sure the config is actually propagated.

Thanks!

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 80.3%. Comparing base (d553546) to head (f01d270). Report is 133 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1066 +/- ## ======================================= - Coverage 81.7% 80.3% -1.4% ======================================= Files 54 59 +5 Lines 4208 4384 +176 Branches 889 923 +34 ======================================= + Hits 3439 3523 +84 - Misses 574 653 +79 - Partials 195 208 +13 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.