Conversation
Signed-off-by: Adrian Edwards <17362949+MoralCode@users.noreply.github.com>
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.
Description
This removes the
repo_idfrom the list of natural keys passed toinsert_datawhen processing pull requests.This prevents augur from trying to insert duplicate PRs from github on older instances where PRs may have been manually merged following the resolution of duplicate repos (i.e. two different repo_ids pointed to the same repo because that repo renamed itself). If repo_ids are not updated EVERYWHERE, this may cause augur to try and insert under the new, merged repo ID, and not detect that a duplicate value exists in the DB already. Therefore this would cause postgres to yell at augur because of an attempt to insert a PR with a duplicate URL.
Because we have strong reason to assume the
pr_src_idfrom github is unique, we can rely solely on this as the check for duplicate information.This PR fixes #93
I notice the same issue exists in the gitlab code too.
This PR is arguably technically incomplete without also updating the unique constraints on the pull_requests table to also enforce uniqueness based ONLY on the
pr_src_id. However, if a DB isn't perfectly deduplicated, the migration to this could cause some issues.Notes for Reviewers
Signed commits