-
Notifications
You must be signed in to change notification settings - Fork 926
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
Cargo implementation must support Cargo sparse index file format #9783
Merged
honeyankit
merged 11 commits into
main
from
honeyankit/fix-cargo-private-registy-response
May 20, 2024
Merged
Cargo implementation must support Cargo sparse index file format #9783
honeyankit
merged 11 commits into
main
from
honeyankit/fix-cargo-private-registy-response
May 20, 2024
+280
−45
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
honeyankit
force-pushed
the
honeyankit/fix-cargo-private-registy-response
branch
from
May 20, 2024 21:28
2b15ba0
to
bfa47ed
Compare
pavera
approved these changes
May 20, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
honeyankit
commented
May 20, 2024
@@ -67,7 +67,12 @@ def crates_listing | |||
**SharedHelpers.excon_defaults(headers: hdrs) | |||
) | |||
|
|||
@crates_listing = JSON.parse(response.body) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Output after fixing metadata changes:
Calling https://cargo.cloudsmith.io/honeyankit/test/he/ll/hello-world to fetch metadata for hello-world from sparse+https://cargo.cloudsmith.io/honeyankit/test/
Fetched metadata for hello-world from sparse+https://cargo.cloudsmith.io/honeyankit/test/ successfully
{"name": "hello-world", "vers": "1.0.0", "deps": [], "cksum": "b2c263921f1114820f4acc6b542d72bbc859ce7023c5b235346b157074dcccc7", "features": {}, "yanked": false, "links": null}
{"name": "hello-world", "vers": "1.0.1", "deps": [], "cksum": "8a55b58def1ecc7aa8590c7078f379ec9a85328363ffb81d4354314b132b95c4", "features": {}, "yanked": false, "links": null}
{"name": "hello-world", "vers": "1.0.2", "deps": [], "cksum": "9e21213589c10d30973283629bb27520ddf46141882e26ea10b70959c7bafc2c", "features": {}, "yanked": false, "links": null}
2024/05/20 22:53:57 INFO Latest version is 1.0.2
Setting CARGO_REGISTRIES_HONEYANKIT_TEST_TOKEN to 'placeholder_token' because dependabot-cli proxy will override it anyway
2024/05/20 22:53:58 INFO Requirements to unlock own
2024/05/20 22:53:58 INFO Requirements update strategy bump_versions
2024/05/20 22:53:58 INFO Updating hello-world from 1.0.1 to 1.0.2
Setting CARGO_REGISTRIES_HONEYANKIT_TEST_TOKEN to 'placeholder_token' because dependabot-cli proxy will override it anyway
2024/05/20 22:53:58 INFO Submitting hello-world pull request for creation
2024/05/20 22:53:59 INFO Finished job processing
2024/05/20 22:53:59 INFO Results:
+-----------------------------------------------+
| Changes to Dependabot Pull Requests |
+---------+-------------------------------------+
| created | hello-world ( from 1.0.1 to 1.0.2 ) |
+---------+-------------------------------------+
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
The Cargo implementation for private registries should support the sparse index file format. In sparse registries, the response consists of multiple JSON objects instead of a single JSON object when checking available versions. This PR addresses and handles that response format.
Fixes: #9764