Skip to content
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

Fixes denylist_channels channel bug 🐛 #14405

Merged
merged 27 commits into from
Dec 2, 2024

Conversation

travishathaway
Copy link
Contributor

@travishathaway travishathaway commented Nov 22, 2024

Description

Fixes: #14403

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Nov 22, 2024
@travishathaway
Copy link
Contributor Author

Still needs tests.

@travishathaway
Copy link
Contributor Author

I'm still not sure I like the error message because it's not as informative as it could be. It says what's wrong but does not suggest what the user could do differently. I'd like to add some more information here.

I think the message should read something more like:

You have encountered this error because you are currently attempting to use a 
channel defined in your "denylist_channels" setting. To see a complete list of these 
channels, run `conda config --show denylist_channels` and make sure you are not 
using these channels either by specifying them at the command line or in your 
`.condarc` file

That is a little long though 😅. I'm open to suggestions for make it more concise.

Copy link

codspeed-hq bot commented Nov 22, 2024

CodSpeed Performance Report

Merging #14405 will not alter performance

Comparing travishathaway:bugfix-14403 (75e0627) with main (dc1013e)

Summary

✅ 21 untouched benchmarks

conda/base/context.py Outdated Show resolved Hide resolved
@travishathaway travishathaway marked this pull request as ready for review November 25, 2024 12:49
@travishathaway travishathaway requested a review from a team as a code owner November 25, 2024 12:49
tests/cli/test_all_commands.py Outdated Show resolved Hide resolved
conda/base/context.py Outdated Show resolved Hide resolved
conda/base/context.py Outdated Show resolved Hide resolved
conda/cli/helpers.py Outdated Show resolved Hide resolved
conda/cli/helpers.py Outdated Show resolved Hide resolved
conda/cli/helpers.py Outdated Show resolved Hide resolved
conda/base/context.py Outdated Show resolved Hide resolved
conda/core/index.py Show resolved Hide resolved
conda/base/context.py Outdated Show resolved Hide resolved
conda/cli/helpers.py Outdated Show resolved Hide resolved
conda/core/index.py Show resolved Hide resolved
@travishathaway
Copy link
Contributor Author

@jezdez,

Renamed the function and now have the deprecation warnings in place.

conda/core/index.py Outdated Show resolved Hide resolved
jezdez added a commit to travishathaway/conda that referenced this pull request Nov 28, 2024
* Rename check_channel_allowlist to validate_channels to better reflect its
  purpose of validating both allowlist and denylist configurations
* Update function to return the validated channels tuple
* Update all references in code to use the new name
* Update deprecation notice in check_allowlist to reference new name
* Fix news entry formatting for consistency

Fixes conda#14405
* Rename check_channel_allowlist to validate_channels to better reflect its
  purpose of validating both allowlist and denylist configurations
* Update function to return the validated channels tuple
* Update all references in code to use the new name
* Update deprecation notice in check_allowlist to reference new name
* Fix news entry formatting for consistency

Fixes conda#14405
jezdez
jezdez previously approved these changes Nov 29, 2024
@jezdez jezdez requested a review from kenodegard November 29, 2024 11:18
@travishathaway travishathaway enabled auto-merge (squash) December 2, 2024 11:20
Copy link
Contributor

@kenodegard kenodegard left a comment

Choose a reason for hiding this comment

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

Looks great! Minor suggestions but otherwise this is ready to merge!

conda/cli/helpers.py Outdated Show resolved Hide resolved
conda/base/context.py Outdated Show resolved Hide resolved
conda/base/context.py Outdated Show resolved Hide resolved
@jezdez
Copy link
Member

jezdez commented Dec 2, 2024

@travishathaway this also needs removing the IndexSet calls throughout the code, after moving it inline

@travishathaway travishathaway merged commit 290bc18 into conda:main Dec 2, 2024
62 checks passed
@jezdez
Copy link
Member

jezdez commented Dec 2, 2024

Huzzah!

jezdez added a commit that referenced this pull request Dec 9, 2024
* initial attempt at fixing denylist_channels bug; still needs tests

* adding a news file

* making sure the validation is applied for each return statement

* fixing broken test

* adding a new testing module to handle the tests and future tests which must test multiple commands under similar circumstances

* suggestions for changes from pull request review

* suggestions from pull request review

* Apply suggestions from code review

Co-authored-by: Jannis Leidel <[email protected]>

* more suggestions from pull request review

* Update conda/core/index.py

Co-authored-by: Ken Odegard <[email protected]>

* Move tuple into check_channel_allowlist.

* Rename check_channel_allowlist to validate_channels

* Rename check_channel_allowlist to validate_channels to better reflect its
  purpose of validating both allowlist and denylist configurations
* Update function to return the validated channels tuple
* Update all references in code to use the new name
* Update deprecation notice in check_allowlist to reference new name
* Fix news entry formatting for consistency

Fixes #14405

* Fix lint.

* Fix tests.

* Minor fix.

* The argparse args are an AttrDict and need converting first.

---------

Co-authored-by: Jannis Leidel <[email protected]>
Co-authored-by: Ken Odegard <[email protected]>
ForgottenProgramme pushed a commit to ForgottenProgramme/conda that referenced this pull request Dec 10, 2024
* initial attempt at fixing denylist_channels bug; still needs tests

* adding a news file

* making sure the validation is applied for each return statement

* fixing broken test

* adding a new testing module to handle the tests and future tests which must test multiple commands under similar circumstances

* suggestions for changes from pull request review

* suggestions from pull request review

* Apply suggestions from code review

Co-authored-by: Jannis Leidel <[email protected]>

* more suggestions from pull request review

* Update conda/core/index.py

Co-authored-by: Ken Odegard <[email protected]>

* Move tuple into check_channel_allowlist.

* Rename check_channel_allowlist to validate_channels

* Rename check_channel_allowlist to validate_channels to better reflect its
  purpose of validating both allowlist and denylist configurations
* Update function to return the validated channels tuple
* Update all references in code to use the new name
* Update deprecation notice in check_allowlist to reference new name
* Fix news entry formatting for consistency

Fixes conda#14405

* Fix lint.

* Fix tests.

* Minor fix.

* The argparse args are an AttrDict and need converting first.

---------

Co-authored-by: Jannis Leidel <[email protected]>
Co-authored-by: Ken Odegard <[email protected]>
jezdez added a commit that referenced this pull request Dec 10, 2024
* Fixes `denylist_channels` channel bug 🐛  (#14405)

* initial attempt at fixing denylist_channels bug; still needs tests

* adding a news file

* making sure the validation is applied for each return statement

* fixing broken test

* adding a new testing module to handle the tests and future tests which must test multiple commands under similar circumstances

* suggestions for changes from pull request review

* suggestions from pull request review

* Apply suggestions from code review

Co-authored-by: Jannis Leidel <[email protected]>

* more suggestions from pull request review

* Update conda/core/index.py

Co-authored-by: Ken Odegard <[email protected]>

* Move tuple into check_channel_allowlist.

* Rename check_channel_allowlist to validate_channels

* Rename check_channel_allowlist to validate_channels to better reflect its
  purpose of validating both allowlist and denylist configurations
* Update function to return the validated channels tuple
* Update all references in code to use the new name
* Update deprecation notice in check_allowlist to reference new name
* Fix news entry formatting for consistency

Fixes #14405

* Fix lint.

* Fix tests.

* Minor fix.

* The argparse args are an AttrDict and need converting first.

---------

Co-authored-by: Jannis Leidel <[email protected]>
Co-authored-by: Ken Odegard <[email protected]>

* changing dependencies in integration test

---------

Co-authored-by: Travis Hathaway <[email protected]>
Co-authored-by: Ken Odegard <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed [bot] added once the contributor has signed the CLA
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

denylist_channels does not seem to work
4 participants