Refactor to add conda-standalone hash and remove flat keys in info.json - #1329
Merged
Conversation
marcoesters
reviewed
Aug 19, 2026
marcoesters
left a comment
Contributor
There was a problem hiding this comment.
Thanks! There are two items missing:
- A news file.
- The
_conda_exe_payloads*keys inshar.pyare still flat.
| info["_conda_exe_version"] = exe_version | ||
| info["_conda_exe"]["type"] = exe_type | ||
| info["_conda_exe"]["version"] = exe_version | ||
| info["_conda_exe"]["SHA256"] = (hash_files([Path(exe_path)], "sha256")["sha256"],) |
Contributor
There was a problem hiding this comment.
Suggested change
| info["_conda_exe"]["SHA256"] = (hash_files([Path(exe_path)], "sha256")["sha256"],) | |
| info["_conda_exe"]["sha256"] = (hash_files([Path(exe_path)], "sha256")["sha256"],) |
We should probably stay consistent with the notation in constructor. The hash also just needs to be calculated if info.json is used as an output since we're not verifying the hash anywhere else.
And why is this a tuple instead of a string?
| # Test that info.json contains serialized objects | ||
| info_json = json.loads((root_path / "info.json").read_text()) | ||
| assert isinstance(info_json.get("_conda_exe_version"), str) | ||
| assert isinstance(info_json.get("_conda_exe").get("version"), str) |
Contributor
There was a problem hiding this comment.
We should also check that the hash and the path are non-empty strings.
Jrice1317
force-pushed
the
condastandalone-hash
branch
from
August 21, 2026 19:15
fc9c7eb to
1539025
Compare
Jrice1317
marked this pull request as ready for review
August 21, 2026 21:49
Contributor
Author
|
@marcoesters My slack is not working atm, but this is ready for review. TIA! |
marcoesters
reviewed
Aug 21, 2026
marcoesters
left a comment
Contributor
There was a problem hiding this comment.
The current hashes are stored in a dictionary, which makes the output look like:
{
"_conda_exe": {
"sha256": {
"sha256": "71f39e1dba13d5ea14a63b835467f19d9873791a7bb5ab6151425d367b74e0d8"
},
}
}I made suggestions that should fix this.
Co-authored-by: Marco Esters <mesters@anaconda.com>
marcoesters
approved these changes
Aug 21, 2026
This file contains hidden or 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
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.
Description
Checklist - did you ...
newsdirectory (using the template) for the next release's release notes?