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

Refactor lookup._LookupLoader #364

Merged
merged 1 commit into from
Mar 3, 2023
Merged

Refactor lookup._LookupLoader #364

merged 1 commit into from
Mar 3, 2023

Conversation

maresb
Copy link
Contributor

@maresb maresb commented Feb 25, 2023

Locally I see test failures in test_choose_wheel due to the assertion in conda_lookup() failing. It seems to result from flaky caching logic. Using python>=3.8's functools, we can get rid of most of the boilerplate. In a subsequent PR we could also remove the module-level boilerplate.

In short, _LookupLoader was implementing a bunch of caching functionality by hand. This simply uses modern Python and functools to eliminate all that boilerplate.

@maresb maresb requested a review from a team as a code owner February 25, 2023 13:11
@netlify
Copy link

netlify bot commented Feb 25, 2023

Deploy Preview for conda-lock ready!

Name Link
🔨 Latest commit b73f1a5
🔍 Latest deploy log https://app.netlify.com/sites/conda-lock/deploys/6400b79b73a03b00087274a8
😎 Deploy Preview https://deploy-preview-364--conda-lock.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@maresb
Copy link
Contributor Author

maresb commented Feb 25, 2023

Here is an instance in the CI of the failure I was seeing:
https://github.com/conda/conda-lock/actions/runs/4271730580/jobs/7436402534

Locally I see test failures in test_choose_wheel due to the assertion in
conda_lookup() failing. It seems to result from flaky caching logic.
Using python>=3.8, we can get rid of most of the boilerplate. In a
subsequent PR we could also remove the module-level boilerplate.
@maresb
Copy link
Contributor Author

maresb commented Mar 2, 2023

@mariusvniekerk this occurs an order-of-magnitude less than the md5 keyerror, but this still occasionally snags up the CI.

@maresb maresb merged commit 216c4bf into conda:main Mar 3, 2023
@maresb maresb deleted the refactor-lookup branch March 3, 2023 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants