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

Fix frozendict usage #5345

Merged
merged 16 commits into from
May 23, 2024
Merged

Fix frozendict usage #5345

merged 16 commits into from
May 23, 2024

Conversation

kenodegard
Copy link
Contributor

@kenodegard kenodegard commented May 18, 2024

Description

A very specific use case results in the code trying to modify a frozendict version of the output dict.

Fix #5342

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 May 18, 2024
@kenodegard kenodegard added the build::review trigger a build for this PR label May 18, 2024
@conda-bot conda-bot removed the build::review trigger a build for this PR label May 18, 2024
@conda-bot
Copy link
Contributor

conda-bot commented May 18, 2024

Review build status

The workflow for building and uploading a canary release for conda-build with the label conda-conda-build-pr-5345 in channel conda-canary was started by @kenodegard!

Once it's done, use this command to try it out in a new conda environment:

conda install -c conda-canary/label/conda-conda-build-pr-5345 conda-build

Copy link

codspeed-hq bot commented May 18, 2024

CodSpeed Performance Report

Merging #5345 will not alter performance

Comparing frozendict-bug (c28c391) with 24.5.x (515aa8f)

Summary

✅ 3 untouched benchmarks

@kenodegard kenodegard changed the base branch from main to 24.5.x May 18, 2024 21:46
@kenodegard kenodegard added the build::review trigger a build for this PR label May 18, 2024
@conda-bot conda-bot removed the build::review trigger a build for this PR label May 18, 2024
@kenodegard kenodegard added the build::review trigger a build for this PR label May 19, 2024
@conda-bot conda-bot removed the build::review trigger a build for this PR label May 19, 2024
@kenodegard kenodegard marked this pull request as ready for review May 19, 2024 11:42
@kenodegard kenodegard requested a review from a team as a code owner May 19, 2024 11:42
@kenodegard
Copy link
Contributor Author

@jakirkham can you review this PR/test the canary build and confirm this fixes the frozendict issue in #5342?

@kenodegard kenodegard added this to the 24.5.x milestone May 19, 2024
conda_build/metadata.py Outdated Show resolved Hide resolved
conda_build/metadata.py Outdated Show resolved Hide resolved
conda_build/metadata.py Outdated Show resolved Hide resolved
conda_build/metadata.py Outdated Show resolved Hide resolved
conda_build/metadata.py Outdated Show resolved Hide resolved
Rename
beeankha
beeankha previously approved these changes May 22, 2024
Copy link
Contributor

@beeankha beeankha left a comment

Choose a reason for hiding this comment

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

Aside from the question posed by @mbargull , this looks good to me!

@kenodegard
Copy link
Contributor Author

@jakirkham will you be able to review/test this? we'd like to get a patch release ready to go for next week

beeankha
beeankha previously approved these changes May 22, 2024
conda_build/metadata.py Outdated Show resolved Hide resolved
@deprecated(
"24.5.1",
"24.7.0",
addendum="Use `conda_build.metadata._check_circular_dependencies` instead.",
Copy link
Contributor

Choose a reason for hiding this comment

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

Underscored?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -907,6 +953,59 @@ def toposort(output_metadata_map):
return result


def _toposort_outputs(output_tuples: list[OutputTuple]) -> list[OutputTuple]:
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this code mostly copied from elsewhere?

Copy link
Contributor Author

@kenodegard kenodegard May 23, 2024

Choose a reason for hiding this comment

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

Yes, this is a copy of the now deprecated toposort function in the same module, we added these new functions since the function signatures themselves changes, see #5345 (comment)

mbargull
mbargull previously approved these changes May 23, 2024
beeankha
beeankha previously approved these changes May 23, 2024
news/5345-fix-frozendict Outdated Show resolved Hide resolved
@kenodegard kenodegard dismissed stale reviews from beeankha and mbargull via c28c391 May 23, 2024 19:11
@kenodegard kenodegard enabled auto-merge (squash) May 23, 2024 19:13
@kenodegard kenodegard merged commit 7733043 into 24.5.x May 23, 2024
28 checks passed
@kenodegard kenodegard deleted the frozendict-bug branch May 23, 2024 21:00
@jakirkham
Copy link
Member

Thanks all! 🙏

The fix worked great 😄

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 version 24.5.0 assigns values to frozendict keys: results in internal errors
6 participants