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 pinning expressions for prerelease builds #4272

Merged
merged 6 commits into from
Sep 1, 2021

Conversation

isuruf
Copy link
Contributor

@isuruf isuruf commented Aug 20, 2021

No description provided.

@anaconda-issue-bot anaconda-issue-bot added the cla-signed [bot] added once the contributor has signed the CLA label Aug 20, 2021
@isuruf
Copy link
Contributor Author

isuruf commented Aug 20, 2021

cc @mbargull

@mbargull
Copy link
Member

Ah, didn't see this before, thanks for the cc!
I think we have multiple issues here:

  1. apply_pin_expressions does not respect certain corner cases like pre-releases, epochs and thus needs fixing
  2. apply_pin_expressions should not be run on build string-pinned deps (because you also get things like python 3.10.0 h1234567 => python >=3.10,<3.11.0a0 which is not correct; see conda search --info conda-forge::libpython-static)

For 2.: Maybe something along this (in conda_build.render)

 def get_pin_from_build(m, dep, build_dep_versions):
+    match_spec = MatchSpec(dep)  # from conda.exports import MatchSpec
+    if match_spec.get_exact_value('version') and match_spec.get_exact_value('build'):
+        # exact pin; don't apply pin expressions
+        return dep 
     dep_split = dep.split()

might work. I haven't tried this one yet, though.

@isuruf
Copy link
Contributor Author

isuruf commented Aug 20, 2021

If 1 is fixed (at least the pre-release part) as in this PR, then 2 becomes not so important. 2 would be nice to have, but not necessary. Note that fixing 2 alone is not enough for our python issue if we start building downstream packages with rc0.

@mbargull
Copy link
Member

Note that fixing 2 alone is not enough for our python issue if we start building downstream packages with rc0.

Yep, I know. Either we fix 1 and get a new release with that fix or we'd have to mark the RC as python=3.10.0=rc_h123457 or similar as a workaround (and then of course always have it remain in the pre-release channel, i.e., never main label).

@isuruf
Copy link
Contributor Author

isuruf commented Aug 20, 2021

Either we fix 1 and get a new release with that fix

Which is what this PR does

@mbargull
Copy link
Member

Either we fix 1 and get a new release with that fix

Which is what this PR does

yeah, that was mostly meant regarding "and get a new release" ;).

@isuruf isuruf requested a review from mbargull August 23, 2021 00:16
@isuruf
Copy link
Contributor Author

isuruf commented Aug 24, 2021

This is ready for a review

@mbargull
Copy link
Member

@isuruf, I've added some commits for docs/news and adjusted the tests (I've duplicated the test to add one that specifically uses python -- that's technically not necessary, but to ensure we don't regress in "special handling cases" like with python). Let me know if you are fine with these changes or revert/amend as you see fit.

@isuruf
Copy link
Contributor Author

isuruf commented Aug 25, 2021

Looks good. Thanks

@mbargull
Copy link
Member

mbargull commented Sep 1, 2021

Merging this since all CI failures are unrelated to the PR.

@chenghlee, @jezdez, if we want to go ahead with a RC-based migration on conda-forge ( conda-forge/python-feedstock#481 , conda-forge/conda-forge.github.io#1499 ), we'd need a new conda-build release for this. I'm not aware of any other things we'd need though; @isuruf might know.

@mbargull mbargull merged commit ae9320c into conda:master Sep 1, 2021
@isuruf isuruf deleted the pin_prerelease branch September 1, 2021 12:30
@isuruf
Copy link
Contributor Author

isuruf commented Sep 1, 2021

Thanks @mbargull. I need #4248 as well for building GCC.

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Sep 2, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed [bot] added once the contributor has signed the CLA locked [bot] locked due to inactivity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants