-
Notifications
You must be signed in to change notification settings - Fork 104
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
Add build string when resolving with --lock-file from environment #363
Comments
Sounds good to me, perhaps under @mariusvniekerk, now that we're post-graduation, is there a procedure for maintaining and updating the spec? The initial brainstorming of the spec occurred on mamba-org/mamba#1209. |
Ah I supposed that: conda-lock/conda_lock/lockfile/models.py Line 50 in 5bdab2b
build attribute was meant for this, maybe it's something else? |
Ah, indeed! Given that, from my perspective, I think this should be straightforward to get merged. |
There is another thing I should have mentioned before, but there is also a build number for conda packages but that is not included in the format at all. We could just put it in the build attribute (it's at the end of the build string) but it's better to be explicit I suppose. WDYT? @maresb |
We get build number from micromamba; see #338 (comment). The format from Conda is a bit different though. I don't remember off the top of my head. |
Conda/Mamba: {
"base_url": "https://conda.anaconda.org/conda-forge",
"build_number": 0,
"build_string": "pyhd8ed1ab_0",
"channel": "conda-forge",
"dist_name": "pip-23.0.1-pyhd8ed1ab_0",
"name": "pip",
"platform": "noarch",
"version": "23.0.1"
} Micromamba: {
"build": "pyhd8ed1ab_0",
"build_number": 0,
"build_string": "pyhd8ed1ab_0",
"channel": "https://conda.anaconda.org/conda-forge/noarch",
"constrains": null,
"depends": [
"setuptools",
"wheel",
"python >=3.7"
],
"fn": "pip-23.0.1-pyhd8ed1ab_0.conda",
"license": "MIT",
"md5": "8025ca83b8ba5430b640b83917c2a6f7",
"name": "pip",
"sha256": "e1698cbf4964cd60a2885c0edbc654133cd0db5ac4cb568412250e577dbc42ad",
"size": 1366466,
"subdir": "noarch",
"timestamp": 1676670714,
"track_features": "",
"url": "https://conda.anaconda.org/conda-forge/noarch/pip-23.0.1-pyhd8ed1ab_0.conda",
"version": "23.0.1"
} So Also on my wishlist for a long time has been the package upload date, or |
For me, it would be ideal if the conda-lock file contains all the identifying properties that enable matching a MatchSpec. This would mean that all properties found in the repodata should also be present in the conda-lock file, since MatchSpec can technically match against any of those properties. I would like to have this feature so we can check if MatchSpecs in an environment.yml file already match a conda-lock file. If they do, we can skip the solving process altogether. After reviewing
Although not all properties may be exposed by Conda/Mamba, we should consider adding these fields to the model. WDYT? |
I'm in favor of adding all the available data. One potential challenge is that we work with PyPI dependencies, and I'm not sure if or how much we use the MatchSpec for this purpose. Another challenge is the divergence between conda and libmamba. Indeed, this weekend I've been trying to improve the reliability of the conda-lock CI tests against apparent race conditions. One annoyance about Micromamba is the lack of Prefix looks like a very exciting venture!!! I'm really looking forward to what comes out of it. Also, I really wish I knew Rust! 😄 |
Thanks! @maresb :) We are as well! 😄 Do you think we would need to introduce a new version if we add any extra fields? I suppose the version is still at I've asked about the |
Thanks!!! To clarify, are you asking about the lockfile version? If so, then my understanding (meaning what I say should be verified with people like Marius and Wolf) is that this integer for version is semantically major so that backwards compatible changes don't require an increment. My understanding is also that adding a new optional field is backwards compatible. So I believe that as long as nothing is renamed we can stay at 1. AFAIK there is no formal spec, so it feels a bit silly to be discussing as if there were one. But we should probably formalize it so that versions and changes are concrete. |
Ah okay! Yeah that is what I meant :) |
@maresb it's maybe not as nice but you can get this as YAML:
|
It should be quite trivial to add this info to the |
Awesome, thanks for the tip!!! This will be an enormous help. |
Checklist
What is the idea?
It seems that
build
that I assume corresponds to thebuild_string
is not filled in when resolving anenvironment.yml
file with mamba/micromamba/conda.None of the locked packages have the build attribute. Moreover,
conda_solver.py:183
where the structure is being created does not fill it at all. I think the mamba json does return this.Why is this needed?
Because it is an identifying feature for a package.
What should happen?
The code should be modified to fill in the build string where possible. We can now retro-actively extract it from the URL if we want, but I guess this would be more correct.
Additional Context
We are using the lock-files at prefix, if you want we could take a stab at a PR :)
The text was updated successfully, but these errors were encountered: