-
Notifications
You must be signed in to change notification settings - Fork 24
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
use index in offline mode when called from conda-build #395
Conversation
Errors are due to conda/conda#13360 |
@conda/conda-core @conda/conda-libmamba-solver this is ready for review :) 🙏 |
conda_libmamba_solver/index.py
Outdated
@@ -409,3 +411,26 @@ def _process_query_result( | |||
|
|||
# for conda-build | |||
_CachedLibMambaIndexHelper = lru_cache(maxsize=None)(LibMambaIndexHelper) | |||
|
|||
|
|||
def _LibMambaIndexForCondaBuild(*args, **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The type change from class to function for the index helper is a little miffy, I'd rather see use a subclass and then override context.offline
in the _CachedLibMambaIndexHelper.__init__
when calling super
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I like it.
Makes sense to me. I'm not too familiar with the code base to give a proper review yet. |
We have some simple tests for these conda-build cases:
|
Description
Fixes #386, together with conda/conda#13357.
We need to instantiate
IndexHelper
in offline mode for compatibility with conda-build. Otherwise the index can get out of sync during long build processes.Checklist - did you ...
news
directory (using the template) for the next release's release notes?