Fix channels_remap handling in extra_envs configuration#808
Merged
jaimergp merged 15 commits intoconda:mainfrom Jun 22, 2024
Merged
Fix channels_remap handling in extra_envs configuration#808jaimergp merged 15 commits intoconda:mainfrom
channels_remap handling in extra_envs configuration#808jaimergp merged 15 commits intoconda:mainfrom
Conversation
marcoesters
reviewed
Jun 21, 2024
constructor/main.py
Outdated
| env_config[config_key] = abspath(join(dir_path, value)) | ||
| elif config_key == "channels_remap": | ||
| env_config[config_key] = [ | ||
| {"src": item["src"].strip(), "dest": "dest".strip()} for item in value |
Contributor
There was a problem hiding this comment.
Suggested change
| {"src": item["src"].strip(), "dest": "dest".strip()} for item in value | |
| {"src": item["src"].strip(), "dest": item["dest"].strip()} for item in value |
The way this code is written, it looks like the dest will always be "dest". I'm surprised the tests pass - sounds like the example is maybe not as representative as they should be?
Contributor
Author
There was a problem hiding this comment.
Oops, good catch. This would only be caught if we try to update the resulting installation or run conda list on them because that's where the remapped channels would show up.
marcoesters
approved these changes
Jun 21, 2024
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
An oversight in the strip logic does not handle
channel_remapscorrectly (it assumed list of str, but we have list of dict[str, str] there).This input file:
results in the following error:
Checklist - did you ...
newsdirectory (using the template) for the next release's release notes?