Skip to content
New issue

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

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

Already on GitHub? # to your account

Don't use CARGO_REGISTRIES_* configuration in hash keys #2308

Merged
merged 1 commit into from
Jan 4, 2025

Conversation

kornelski
Copy link
Member

Private registry configuration in Cargo can be specified using CARGO_REGISTRIES_$name_* env vars. That it includes CARGO_REGISTRIES_$name_TOKEN, which is an auth secret. The tokens have high entropy and change often, so inclusion of such env vars in the hash key completely ruins caching in sccache.

I don't think any of the CARGO_REGISTRIES_ env vars need to be tracked, because Cargo identifies dependencies by their package IDs, which already includes a normalized registry URL. Only the resolved package ID affects the result, not the mechanics of how Cargo discovered it.

Copy link
Collaborator

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

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

Makes sense. Thank you @kornelski for this!

@Xuanwo Xuanwo merged commit 84f3737 into mozilla:main Jan 4, 2025
59 checks passed
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (0cc0c62) to head (8642030).
Report is 128 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #2308       +/-   ##
==========================================
- Coverage   30.91%       0   -30.92%     
==========================================
  Files          53       0       -53     
  Lines       20112       0    -20112     
  Branches     9755       0     -9755     
==========================================
- Hits         6217       0     -6217     
+ Misses       7922       0     -7922     
+ Partials     5973       0     -5973     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kornelski kornelski deleted the registry-tokens branch January 4, 2025 14:51
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants