CH-55 CH-61 add retry policy and customization to tasks#799
Merged
CH-55 CH-61 add retry policy and customization to tasks#799
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements a retry policy and template customization for tasks in the workflows module. Key changes include:
- Adding new parameters (retry_limit and template_overrides) to tasks for retry behavior and customization
- Updating tests, documentation, and operations to use the new argo_service instead of the legacy argo module
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| libraries/cloudharness-common/tests/test_workflow.py | Updated tests to enforce the new retry limit and template overrides in custom tasks |
| libraries/cloudharness-common/tests/test_env.py | Minor clean-up in environment setup |
| libraries/cloudharness-common/tests/test_applications.py | Updated test environment configuration |
| libraries/cloudharness-common/cloudharness/workflows/tasks.py | Added retry_limit and template_overrides parameters; adjusted PythonTask to accept extra kwargs |
| libraries/cloudharness-common/cloudharness/workflows/operations.py | Replaced legacy argo module calls with argo_service |
| libraries/cloudharness-common/cloudharness/workflows/argo_service.py | Enhanced namespace handling with error fallback |
| libraries/cloudharness-common/cloudharness/utils/init.py | Updated dict_merge to optionally merge None values |
| docs/applications/development/workflows-api.md | Added documentation for the new retry strategy and free template customization |
| applications/workflows/server/workflows_api/service/workflow_service.py | Updated to use argo_service for workflow operations |
aranega
approved these changes
Apr 18, 2025
Member
aranega
left a comment
There was a problem hiding this comment.
It looks perfect! 🙏 Thanks @filippomc
…into feature/CH-55-61
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes CH-55 CH-61
Implemented solution
Added a parameter to operation tasks that allows us to set a retry policy (defaulted to 10 times), and another parameter that allows to override anything within the task template.
How to test this PR
Run a failing task and verify it retries 10 times
Sanity checks:
Breaking changes (select one):
breaking-changeand the migration procedure is well described abovePossible deployment updates issues (select one):
alert:deploymentTest coverage (select one):
Documentation (select one):
Nice to have (if relevant):