fix: code references count returns 0 after unchanged rescan#7599
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
Docker builds report
|
There was a problem hiding this comment.
Code Review
This pull request updates the code reference recording logic in record_scan to update conflicts on duplicate records instead of ignoring them. Specifically, it configures update_conflicts=True with unique fields ["feature", "repository", "code_references_hash"] and updates ["created_at", "revision"]. Additionally, the unit tests have been updated to verify that code references remain retrievable after handling duplicate payloads. I have no feedback to provide as there are no review comments.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7599 +/- ##
=======================================
Coverage 98.51% 98.51%
=======================================
Files 1436 1436
Lines 54363 54382 +19
=======================================
+ Hits 53553 53572 +19
Misses 810 810 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
|
Visual Regression19 screenshots compared. See report for details. |
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
ignore_conflicts=Truewas skipping creating a new code reference record when scanning an unchanged code referencecreated_at=F("repository__last_scanned_at")so whilelast_scanned_atadvanced, there was no relatedcode_referenceon this dateupdate_conflicts=Truewith unique_fields andupdate_fieldsbeingcreated_atandrevision(only ones updated on conflict)Impact appeared starting from second scanning.
How did you test this code?