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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could use a comment explaining why 5 mins, or pointing to this PR.
Seems we could adjust this to be the normal build time length, but that would add some queries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on the comment.
I thought about this, but using the build time of the project, you end up waiting 15 or more before being able to trigger a new build when there is a staled build. In the end, it's not too much different than our task
finish_inactive_builds
.Oh, looking at that task it seems we changed the max time for a build to be considered stale to 2hs! It was
DOCKER_LIMIT['time'] * 1.2
originally. I think we can revert this changes now that we have the right docker limits in the dictionary: #7029There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
finish_inactive_builds
doesn't stop the builds from happening on the builders, it just updates the status of the Build object. They are solving different problems.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, but
finish_inactive_builds
is the task that "unblocks" the DEDUPLICATE_BUILDS feature flag to start working again (not marking all of them as duplicated) by updating the state to something different thantriggered
. Now, it's unblocking these builds after more than 2hs of stale.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see. That makes sense.