Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Handle duplicate key violation in voter contributions | NPG-000 #662

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

saibatizoku
Copy link
Contributor

@saibatizoku saibatizoku commented Jan 23, 2024

Description

Changes how voter contribution is uploaded to DB by keeping track of the unique key constraint tuple, and processing the network with the highest priority first.

Duplicate records are ignored and an error is logged.

break: CLI option for network_ids help docs updated to specify the valid network names.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@saibatizoku saibatizoku changed the title fix: error when duplicate key violation in voter contributions fix: Handle duplicate key violation in voter contributions | NPG-000 Jan 23, 2024
@saibatizoku saibatizoku self-assigned this Jan 23, 2024
@saibatizoku saibatizoku added the review me PR is ready for review label Jan 23, 2024
@saibatizoku saibatizoku added this to the F11-Launch milestone Jan 23, 2024
@saibatizoku saibatizoku marked this pull request as ready for review January 23, 2024 15:57
Copy link
Contributor

@kukkok3 kukkok3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Changes how voter contribution is uploaded to DB by keeping
track of the unique key constraint tuple, and processing
the network with the highest priority first.

Duplicate records are ignored and an error is logged.
@saibatizoku saibatizoku force-pushed the fix/duplicate-unique-key-violation branch from 1edf643 to 7c1aedf Compare January 23, 2024 16:19
@saibatizoku saibatizoku enabled auto-merge (squash) January 23, 2024 16:48
@saibatizoku saibatizoku merged commit adb2c1c into main Jan 23, 2024
59 of 60 checks passed
@saibatizoku saibatizoku deleted the fix/duplicate-unique-key-violation branch January 23, 2024 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review me PR is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants