Closed mrakitin closed 3 years ago
Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe
) and found it was in an excellent condition.
Thanks for accepting the fix, @isuruf!
@isuruf, what's the procedure for releasing this fix? Just bumping a version or build number in meta.yaml
?
Bumping the version (should be a patch version bump). Can you please send a PR and link it here?
@jakirkham, sure, done via https://github.com/conda-forge/conda-forge-ci-setup-feedstock/pull/150. I should have added that commit to this PR. It's a bit unusual to have the code and feedstock infra in the same repo 🙂. Will do it next time.
I'm confirming that the fix did its job, and now there is no exception raised: https://dev.azure.com/nsls2forge/nsls2forge/_build/results?buildId=8010&view=logs&j=9c5ef928-2cd6-52e5-dbe6-9d173a7d951b&t=20c71c51-4b27-578b-485d-06ade2de1d00&l=316 (it's the build log for https://github.com/nsls-ii-forge/hunter-feedstock/pull/8). There is only this output (which is OK):
CondaKeyError: 'channels': 'defaults' is not in the 'channels' key of the config file
This is a proposed fix for the case when
~/.condarc
does not have thedefaults
channel and only has theconda-forge
one (or any other). The problem was originally observed on the OSX build for https://github.com/nsls-ii-forge/hunter-feedstock/pull/8:That exception breaks the execution flow, and the channels list is not propagated to the
~/.condarc
file.For OSX builds the default configuration contains only the
conda-forge
channel, which comes from https://github.com/conda-forge/miniforge/blob/ab5909ba786461b79a8e57c227da51d1e8155e54/Miniforge3/construct.yaml#L12 I believe.It does not happen on Linux builds as it's done via a different code path: https://github.com/nsls-ii-forge/hunter-feedstock/blob/bb6d2285eecbdc6c358e9a9cff2926515e29124c/.scripts/build_steps.sh#L21-L32. That code block generates the
~/.condarc
file without channels at all, so the step passes. I haven't looked at how it's done for Windows, but I guess the corresponding.condarc
file does not contain the channel list in it.Steps to reproduce:
Try to remove the
defaults
channel from it (expect a failure with the return code 1):defaults
channel from it (expect a success with the return code 0):I tested the implemented fix with the locally installed version of
conda-forge-ci-setup
: