Do not skip a commit because an earlier commit's marker was restored - #137
Closed
CedricConday wants to merge 1 commit into
Closed
CedricConday wants to merge 1 commit into
CedricConday wants to merge 1 commit into
Conversation
The dedup marker is cached under a key that includes github.sha, but the restore step also carries a restore-keys prefix with no SHA in it. On a brand new commit there is no exact-key entry, so the prefix matches and the marker written by an earlier commit on the same PR is restored. The enablement check only tests that the marker file exists, so the scan is disabled for a commit that has never been analyzed and the check goes green in seconds without looking at the code. That is the mechanism behind gh-42 as well: push a fix for a finding and the fix commit is never scanned. The marker already records the commit it was written for. Compare it with the current SHA and discard a marker belonging to a different commit. A marker for this commit still suppresses the run, so the reservation that guards against concurrent runs on the same commit is unaffected. Closes #120
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The dedup marker is cached under a key that includes
github.sha, but the restore step also carries arestore-keysprefix with no SHA in it. On a brand new commit there is no exact-key entry, so the prefix matches and the marker written by an earlier commit on the same PR is restored. The enablement check only tests that the marker file exists, so the scan is disabled for a commit that has never been analyzed and the check goes green in seconds without looking at the code.That is also the mechanism behind #42: push a fix for a finding and the fix commit is never scanned.
The marker already records the commit it was written for. This compares it with the current SHA and discards a marker belonging to a different commit. A marker for this commit still suppresses the run, so the reservation that guards against concurrent runs on the same commit is unaffected.
Closes #120