Skip to content

fix(tasks): fix failed task injection rollback - #1105

Draft
francescobrivio wants to merge 1 commit into
DIRACGrid:mainfrom
francescobrivio:issue_1101
Draft

francescobrivio wants to merge 1 commit into
DIRACGrid:mainfrom
francescobrivio:issue_1101

Conversation

@francescobrivio

Copy link
Copy Markdown
Contributor

PR Description

Related to #1101.

In this PR I'm fixing the issue where a failing-task injection isn't rolled back correctly in all cases.
The changes include the fix suggested in the original issue, plus an additional protection against cases in which the the task is cancelled again while the cleaning up is still ongoing.

PR Validation

As usual, implementing the tests is taking me longer than the rest 😄 work in progress

# Cancelled again while cleaning up: let it propagate
logger.debug("Cancelled while closing exit stack", exc_info=True)
raise
except BaseException:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why BaseException here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I took it from the suggested-fix code snippet, but it's indeed probably not needed, I'll revert it back to Exception.

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.

2 participants