Skip to content

CH-55 CH-61 add retry policy and customization to tasks#799

Merged
filippomc merged 10 commits intodevelopfrom
feature/CH-55-61
Apr 23, 2025
Merged

CH-55 CH-61 add retry policy and customization to tasks#799
filippomc merged 10 commits intodevelopfrom
feature/CH-55-61

Conversation

@filippomc
Copy link
Collaborator

@filippomc filippomc commented Apr 18, 2025

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:

  • The pull request is explicitly linked to the relevant issue(s)
  • The issue is well described: clearly states the problem and the general proposed solution(s)
  • In this PR it is explicitly stated how to test the current change
  • The labels in the issue set the scope and the type of issue (bug, feature, etc.)
  • The relevant components are indicated in the issue (if any)
  • All the automated test checks are passing
  • All the linked issues are included in one Sprint
  • All the linked issues are in the Review state
  • All the linked issues are assigned

Breaking changes (select one):

  • The present changes do not change the preexisting api in any way
  • This PR and the issue are tagged as a breaking-change and the migration procedure is well described above

Possible deployment updates issues (select one):

  • There is no reason why deployments based on CloudHarness may break after the current update
  • This PR and the issue are tagged as alert:deployment

Test coverage (select one):

  • Tests for the relevant cases are included in this pr
  • The changes included in this pr are out of the current test coverage scope

Documentation (select one):

  • The documentation has been updated to match the current changes
  • The changes included in this PR are out of the current documentation scope

Nice to have (if relevant):

  • Screenshots of the changes
  • Explanatory video/animated gif

@filippomc filippomc requested review from aranega and Copilot April 18, 2025 16:09
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member

@aranega aranega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks perfect! 🙏 Thanks @filippomc

@filippomc filippomc merged commit a7d4354 into develop Apr 23, 2025
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants