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: ensure task in error or retry children are properly cancelled #790

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

aneojgurhem
Copy link
Contributor

@aneojgurhem aneojgurhem commented Oct 30, 2024

Motivation

When tasks postprocessing is not executed, children tasks and results are not aborted. It lets a lot of tasks and results in Creating, adding lot of noise when debugging and misleading remnants of failed tasks as tasks that could potentially complete.

Description

Move children (tasks and results) cancellation from Agent.CancelChild to Submitter.CompleteAsync ensuring that children cancellation is called everytime a task is set to Error or Retry. It uses the new CreatedBy field to find all related tasks and results.

Testing

  • Unit test were added to make sure children were properly cancelled when tasks return an Error.
  • Validated using integration tests: HtcMock is able to produce exception during task execution, generating retries. All children tasks were cancelled.

Impact

  • Improved debugging
  • Clearer end of session

Checklist

  • My code adheres to the coding and style guidelines of the project.
  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • I have thoroughly tested my modifications and added tests when necessary.
  • Tests pass locally and in the CI.
  • I have assessed the performance impact of my modifications.

@aneojgurhem aneojgurhem merged commit a6e9a4c into main Nov 4, 2024
95 checks passed
@aneojgurhem aneojgurhem deleted the jg/cancelchildren branch November 4, 2024 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants