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

Properly initialize context with parsed arguments #5271

Merged
merged 8 commits into from
Apr 18, 2024

Conversation

kenodegard
Copy link
Contributor

@kenodegard kenodegard commented Apr 5, 2024

Description

None of the conda-build commands are correctly initializing the conda.base.context.context object with the parsed arguments. This means --override-channels (and other arguments) aren't properly detected.

Another side effect of not setting the context object with the parsed arguments is conda-build's need to manually parse and handle the channels (search for channel_urls in the source code). It appears we can ignore this for the time being but this will need to be revisited soon.

We also bump the minimum conda to 23.7.0 (to benefit from conda/conda#12696).

Resolves #3693

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 Apr 5, 2024
Copy link

codspeed-hq bot commented Apr 5, 2024

CodSpeed Performance Report

Merging #5271 will not alter performance

Comparing kenodegard:initialize-context (b7d303b) with main (f2c3f3b)

Summary

✅ 3 untouched benchmarks

@kenodegard kenodegard force-pushed the initialize-context branch from c087f9a to cc60222 Compare April 5, 2024 16:54
conda_build/config.py Outdated Show resolved Hide resolved
news/5271-context Outdated Show resolved Hide resolved
@kenodegard kenodegard marked this pull request as ready for review April 5, 2024 18:35
@kenodegard kenodegard requested a review from a team as a code owner April 5, 2024 18:35
beeankha
beeankha previously approved these changes Apr 18, 2024
jezdez
jezdez previously approved these changes Apr 18, 2024
@@ -525,13 +525,14 @@ def check_action(recipe, config):

def execute(args: Sequence[str] | None = None) -> int:
_, parsed = parse_args(args)
context.__init__(argparse_args=parsed)
Copy link
Member

Choose a reason for hiding this comment

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

🔥

@kenodegard kenodegard dismissed stale reviews from jezdez and beeankha via b7d303b April 18, 2024 16:22
@jezdez jezdez enabled auto-merge (squash) April 18, 2024 16:49
@jezdez jezdez merged commit a6d53af into conda:main Apr 18, 2024
28 checks passed
@kenodegard kenodegard deleted the initialize-context branch April 18, 2024 22:46
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.

conda-build doesn't respect --override-channels ?
4 participants