-
-
Notifications
You must be signed in to change notification settings - Fork 646
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 issue with explicit dependency when using parametrize groups. #20768
Conversation
Could pick to 2.19.x if we are still running releases for that line..? |
I don't understand the mechanics here in detail... but what happens if the parametrizations are slightly different, with different names or fields. For instance, here's a semi-plausible example: python_sources(
...,
**parametrize("a", resolve="a", skip_mypy=True), # mypy doesn't work in this resolve
**parametrize("b", resolve="b", skip_mypy=False),
)
python_tests(
...,
# Want to run the tests in a few different environments, so different name & more fields than the source
**parametrize("a-1", resolve="a", skip_mypy=True, environment="some_docker"),
**parametrize("a-2", resolve="a", skip_mypy=True, environment="another_docker"),
# fewer fields than the source, because didn't add the skip_mypy=False explicitly
**parametrize("b", resolve="b"),
)
Might as well 🤷♂️ releases are easy enough now. |
We only match on the As the actual parameter values are not part of the address for grouped parametrizations, we don't know them as we only work with addresses for the matching, so this is the best we can do, currently, I think (with little effort). (or at least, it's a good first step which we can follow up on to improve later if we want..)
✔️ |
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.
That would not be a fun bug to run into! This fix makes sense to me.
…0768) When both a target and a explicitly provided dependency is using parametrize groups (the `**parametrize(..)` syntax), and the dependency does not explicitly provide the parametrization to use, pick the matching parametrization group with the target if available, rather than just the first one. Closes #20739
…0768) When both a target and a explicitly provided dependency is using parametrize groups (the `**parametrize(..)` syntax), and the dependency does not explicitly provide the parametrization to use, pick the matching parametrization group with the target if available, rather than just the first one. Closes #20739
…erry-pick of #20768) (#20778) When both a target and a explicitly provided dependency is using parametrize groups (the `**parametrize(..)` syntax), and the dependency does not explicitly provide the parametrization to use, pick the matching parametrization group with the target if available, rather than just the first one. Closes #20739 Co-authored-by: Andreas Stenius <[email protected]>
…erry-pick of #20768) (#20779) When both a target and a explicitly provided dependency is using parametrize groups (the `**parametrize(..)` syntax), and the dependency does not explicitly provide the parametrization to use, pick the matching parametrization group with the target if available, rather than just the first one. Closes #20739 Co-authored-by: Andreas Stenius <[email protected]>
When both a target and a explicitly provided dependency is using parametrize groups (the
**parametrize(..)
syntax), and the dependency does not explicitly provide the parametrization to use, pick the matching parametrization group with the target if available, rather than just the first one.Closes #20739