Conversation
Summary of ChangesHello @kalbasit, 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 resolves issues in distributed tests by refining the generation and consumption of test data. It ensures that generated narinfo entries are correctly formatted, specifically the 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 fixes test data generation for narinfo files by removing invalid signatures and correcting the References format. It also updates the distributed tests to skip signature verification, which is a necessary change.
My review includes one suggestion:
In testdata/generator.go, I've noted an inconsistency in the generated References field and suggested a change to make it align with the StorePath basename for a proper self-reference.
Overall, the changes are good and address the issue described. Addressing the feedback will further improve the code quality.
| narInfoText := fmt.Sprintf(`StorePath: %s | ||
| URL: %s | ||
| Compression: none | ||
| FileHash: sha256:%s | ||
| FileSize: %d | ||
| NarHash: sha256:%s | ||
| NarSize: %d | ||
| References: %s | ||
| Sig: test-cache:1:fakesignature==`, | ||
| References: %s-generated-test`, |
There was a problem hiding this comment.
The generated References field seems inconsistent with the StorePath. The comment mentions using a self-reference, which typically means using the basename of the package's own store path.
The StorePath is .../<narInfoHash>-generated-test-package, so its basename is <narInfoHash>-generated-test-package.
However, the References field is being set to <narInfoHash>-generated-test.
To make this consistent, the References field should probably be <narInfoHash>-generated-test-package. This would make it a true self-reference to the store path's basename.
| narInfoText := fmt.Sprintf(`StorePath: %s | |
| URL: %s | |
| Compression: none | |
| FileHash: sha256:%s | |
| FileSize: %d | |
| NarHash: sha256:%s | |
| NarSize: %d | |
| References: %s | |
| Sig: test-cache:1:fakesignature==`, | |
| References: %s-generated-test`, | |
| narInfoText := fmt.Sprintf(`StorePath: %s | |
| URL: %s | |
| Compression: none | |
| FileHash: sha256:%s | |
| FileSize: %d | |
| NarHash: sha256:%s | |
| NarSize: %d | |
| References: %s-generated-test-package`, |
372be8b to
3d6c7ca
Compare
10922cb to
3d1a78d
Compare
3d6c7ca to
6b35b08
Compare
3d1a78d to
6cde063
Compare
6b35b08 to
4a589ea
Compare
6ffbcd0 to
b226ff0
Compare
4a589ea to
44963b2
Compare
Update GenerateEntry to create valid narinfo with proper References format.
Remove invalid fake signature since generated test entries cannot be signed
without the private key. Update distributed tests to skip public key
verification when using generated test entries.
Changes:
- testdata/generator.go:
- Remove invalid fake signature (test-cache:1:fakesignature==)
- Update References field to format: narInfoHash-generated-test
- Add comment explaining why signatures are not included
- pkg/cache/cache_distributed_test.go:
- Update all 4 distributed test functions to pass nil for upstream options
- Tests affected: testDistributedDownloadDeduplication, testDistributedConcurrentReads,
testLargeNARConcurrentDownloadScenario, testCDCProgressiveStreamingDuringChunking
- Add comments explaining why public key verification is skipped
This fixes narinfo parsing failures in distributed tests where GetNar was unable
to fetch narinfo for generated test entries due to invalid format.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
b226ff0 to
ebe277b
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #839 +/- ##
=======================================
Coverage 85.41% 85.41%
=======================================
Files 2 2
Lines 480 480
=======================================
Hits 410 410
Misses 65 65
Partials 5 5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Update GenerateEntry to create valid narinfo with proper References format.
Remove invalid fake signature since generated test entries cannot be signed
without the private key. Update distributed tests to skip public key
verification when using generated test entries.
Changes:
- testdata/generator.go:
- Remove invalid fake signature (test-cache:1:fakesignature==)
- Update References field to format: narInfoHash-generated-test
- Add comment explaining why signatures are not included
- pkg/cache/cache_distributed_test.go:
- Update all 4 distributed test functions to pass nil for upstream options
- Tests affected: testDistributedDownloadDeduplication, testDistributedConcurrentReads,
testLargeNARConcurrentDownloadScenario, testCDCProgressiveStreamingDuringChunking
- Add comments explaining why public key verification is skipped
This fixes narinfo parsing failures in distributed tests where GetNar was unable
to fetch narinfo for generated test entries due to invalid format.
Part of #806
---------
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
(cherry picked from commit 6bca857)
Update GenerateEntry to create valid narinfo with proper References format.
Remove invalid fake signature since generated test entries cannot be signed
without the private key. Update distributed tests to skip public key
verification when using generated test entries.
Changes:
- testdata/generator.go:
- Remove invalid fake signature (test-cache:1:fakesignature==)
- Update References field to format: narInfoHash-generated-test
- Add comment explaining why signatures are not included
- pkg/cache/cache_distributed_test.go:
- Update all 4 distributed test functions to pass nil for upstream options
- Tests affected: testDistributedDownloadDeduplication, testDistributedConcurrentReads,
testLargeNARConcurrentDownloadScenario, testCDCProgressiveStreamingDuringChunking
- Add comments explaining why public key verification is skipped
This fixes narinfo parsing failures in distributed tests where GetNar was unable
to fetch narinfo for generated test entries due to invalid format.
Part of #806
---------
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
(cherry picked from commit 6bca857)

Update GenerateEntry to create valid narinfo with proper References format.
Remove invalid fake signature since generated test entries cannot be signed
without the private key. Update distributed tests to skip public key
verification when using generated test entries.
Changes:
testdata/generator.go:
pkg/cache/cache_distributed_test.go:
testLargeNARConcurrentDownloadScenario, testCDCProgressiveStreamingDuringChunking
This fixes narinfo parsing failures in distributed tests where GetNar was unable
to fetch narinfo for generated test entries due to invalid format.
Part of #806
Co-Authored-By: Claude Haiku 4.5 noreply@anthropic.com