Fix handling of v2 hashes#18522
Conversation
mvdbeek
left a comment
There was a problem hiding this comment.
Wait, this can't be right, why did you remove the build parsing ?
|
I only remove it from the function that parses targets from a string (comma separated list of tools and versions) which is used in The remaining code (e.g. the mulled container resolver etc) keeps the build as part of the version. I think that the tests which I added in my first commit show this (the version part of the hash differs when builds are added, i.e. the build is considered as part of the version when computing the hash). Wondering if this got a bit confusing when we merged |
1c0354c to
727850b
Compare
mvdbeek
left a comment
There was a problem hiding this comment.
Thanks, I think this looks good to me now!
|
Anything else to do here? |
ea3180c to
aa2660f
Compare
aa2660f to
f5310f6
Compare
to verify if the build is considered as part of the version or not
the build information that may be contained in requirement versions is considered as part of the version in some places of the code - mulled container resolvers - mulled-build-tool - [planemo](https://github.com/galaxyproject/planemo/blob/b3e12a334e3d358ce30bf2c8c3f8d5a7a7e08136/planemo/conda.py#L116) in others it isn't: - mulled-hash - mulled-build-files - mulled_build which are the files that use the `target_str_to_targets` function. With this change the build info in version strings is always considered as part of the version. `mulled-build-files` is used in the multi-package-containers repo which led to wrong hashes in up to approx 50 tools (check with `grep "=[^,]*=" combinations/* | wc -l`).
2f223d0 to
16e7cdf
Compare
an empty set of requirements gives an empty requirement string which was wrongly parsed to an CondaTarget with empty package name This triggered a `conda search ''` which took so much memory that other processes crashed. The fix is to parse an empty list of CondaTargets for an empty target string. In addition we check for empty package name during the creation of the CondaTarget (to make this more easily detectable in the future)
c57cca2 to
da7926a
Compare
|
If github let's me I will merge this 😆 |
|
This PR was merged without a "kind/" label, please correct. |
some mulled v2 hashes where computed wrong due to: galaxyproject/galaxy#18522
the function is still used by `planemo container_register` which results in wrong v2 hashes if requirement versions contain build info. xref galaxyproject#18522
in planemo.mulled.conda_to_mulled_targets essentially the build info is stripped from the conda targets. that is - conda target = (name, version, build) - mulled target = (name, version) since the build information has not been determined so far - galaxyproject/galaxy#21481, - galaxyproject/galaxy#18522 the distinction seems to make no sense.
in planemo.mulled.conda_to_mulled_targets essentially the build info is stripped from the conda targets. that is - conda target = (name, version, build) - mulled target = (name, version) since the build information has not been determined so far - galaxyproject/galaxy#21481, - galaxyproject/galaxy#18522 the distinction seems to make no sense.
in planemo.mulled.conda_to_mulled_targets essentially the build info is stripped from the conda targets. that is - conda target = (name, version, build) - mulled target = (name, version) since the build information has not been determined so far - galaxyproject/galaxy#21481, - galaxyproject/galaxy#18522 the distinction seems to make no sense.
in planemo.mulled.conda_to_mulled_targets essentially the build info is stripped from the conda targets. that is - conda target = (name, version, build) - mulled target = (name, version) since the build information has not been determined so far - galaxyproject/galaxy#21481, - galaxyproject/galaxy#18522 the distinction seems to make no sense.
Added tests first for the mulled container resolvers here 5b3c4bd
Then fixed (and more tests) here: e7bca83
See details in e7bca83
I'm tempted to backport this to 24.1 in order to make this effective in the multi-package-container repo.
How to test the changes?
(Select all options that apply)
License