-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
autoupdater: fix: pull request with failed CI status is not suspended
This fixes that a pull request that is uptodate with it's base branch and has a failed CI status for a build that has not been triggered by directorius is not suspended. The failed status is wrongly evaluated as insignificant because no triggered build for the job is found in PullRequest.LastStartedCIBuilds. - make the PullRequest.LastStartedCIBuilds map private and hold the lock in it's getter and setter, this makes it easy to use it concurrency-safe and prevent issues in the future. The map was always accessed serialized and no issues are known. - replace PullRequest.FailedCIStatusIsForNewestBuild with queue.failedRequiredCIStatusesAreObsolete. The functions returns true if a status is exist that is required, failed and no build with a higher ID has been triggered. - add a testcase for the bug
- Loading branch information
Showing
5 changed files
with
235 additions
and
72 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.