Repository navigation
fix: avoid metrics for migrating NAR during an already in-progress [backport #1079] - #1080
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refines the handling of concurrent NAR (Nix Archive) migrations to chunks. Previously, if a migration was already in progress by another instance, the system would silently exit, potentially leading to misleading metrics and logs indicating a successful migration. The changes introduce a specific error to signal this condition, ensuring that subsequent attempts to migrate the same NAR correctly identify the ongoing process and avoid recording inaccurate success metrics or logs. This improves the accuracy of monitoring and prevents false positives regarding migration completion. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly addresses an issue where a NAR migration already in progress was treated as a successful migration, leading to incorrect metrics and logs. By introducing a specific ErrMigrationInProgress error and handling it at the call sites, the changes ensure that such scenarios are correctly identified and skipped without being logged as successes or failures. The implementation is clean, targeted, and appears to be correct. I have no further suggestions.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release-0.9 #1080 +/- ##
===========================================
Coverage 5.04% 5.04%
===========================================
Files 6 6
Lines 436 436
===========================================
Hits 22 22
Misses 410 410
Partials 4 4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Bot-based backport to
release-0.9, triggered by a label in #1079.When a NAR migration is already in-progress, do not log metrics and logs
as if the migration has succeeded.