This repository was archived by the owner on Sep 30, 2024. It is now read-only.
fix: Correctly filter uploads with commit and path existence checks#62415
Merged
Conversation
811977c to
f5ec27c
Compare
The upload filtering code previously did a check whether: - The commit corresponding to the upload actually existing on gitserver - The path of interest had an associated SCIP document in that upload. However, the second code path incorrectly only handled the case when the first operation was a no-op. In case some uploads were filtered out due to the path existing (or not) in the wrong upload, and the final result could still have uploads for which the commit no longer existed on gitserver.
f5ec27c to
f060d6e
Compare
f060d6e to
7447ea8
Compare
keynmol
reviewed
May 7, 2024
Contributor
There was a problem hiding this comment.
Can you please clarify (in GH comment) what was the copying for and why you no longer need it?
Contributor
Author
There was a problem hiding this comment.
The copying was purely defensive. The earlier filtering function modified the slice in-place, so presumably this was to allow looking at the before/after while debugging the code.
Contributor
Author
There was a problem hiding this comment.
Similar defensive copying seen elsewhere:
(we can remove that in a separate PR)
keynmol
reviewed
May 7, 2024
7447ea8 to
61a9565
Compare
61a9565 to
afe0070
Compare
keynmol
approved these changes
May 8, 2024
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes GRAPH-563
The upload filtering code previously did checks whether:
However, the second code path incorrectly only handled the case when
the first operation was a no-op. Consequently, it was possible to have
the following:
wrong upload (not itself)
wrong upload (not itself)
This PR is broken up into three commits.
reason with the code and better understand the bug.
the aliasing comments, fixes the bug, and updates the test.
Test plan