-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Skip uninstallable tags in QPY backwards compatibility tests #13202
Conversation
When a tag has been made, but the package has not yet landed on PyPI, the QPY job fails in the environment-building step. This is not actually a failure of the QPY backwards-compatibility guarantees, and it isn't the job of the QPY tests to detect a bad tag anyway.
One or more of the following people are relevant to this code:
|
Pull Request Test Coverage Report for Build 11013854521Details
💛 - Coveralls |
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.
I'm a bit concerned about incorrectly skipping something we shouldn't and that masking our coverage for a version. I feel like we need to be a bit more intentional about when we're skipping as it should only be if we have yet to upload the package to pypi not for any other installation failure. The other changes here look fine to me though.
fe4de79
to
ca25cb1
Compare
The logic we actually want for versions to test is "find the versions that _should_ be installable", rather than "try it and see"; the latter is susceptible to silently suppressing errors. This new form now queries PyPI to find what versions of Qiskit are available in binary distributions for this platform, and filters based on that.
4070f76
to
394b6c1
Compare
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.
Overall this looks fine to me. I personally find the new variable naming for the venvs and python in the bash scripts a bit harder to parse, but that's probably just how I think about working with this things is a bit more explicit in file paths. I only left one inline question about a change in behavior around rc releases. I'm fine if that's the direction you want to move here, but since it is a change I wanted to make sure it was intentional.
|
||
|
||
def main(): | ||
"""main""" |
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.
Hah, I like this docstring
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.
passive aggressive suppression of the pylint warning haha
For the bash scripts venv renaming: the main problem for me locally was that they were all making a lot of strong assumptions about the working directory they were executed from, and one of them was making assumptions about the existence of a Python venv at a particular relative path, which meant I had to keep recreating the entire CI setup in order to test a single script. I generally agree the changes make it not as pleasant to read, but they decouple the scripts from particular working directories, and let me pass more information explicitly into each script, so it was easier to run things locally. |
@Mergifyio backport stable/1.2 stable/0.46 |
✅ Backports have been created
|
* Skip uninstallable tags in QPY backwards compatibility tests When a tag has been made, but the package has not yet landed on PyPI, the QPY job fails in the environment-building step. This is not actually a failure of the QPY backwards-compatibility guarantees, and it isn't the job of the QPY tests to detect a bad tag anyway. * Query PyPI to find versions to test The logic we actually want for versions to test is "find the versions that _should_ be installable", rather than "try it and see"; the latter is susceptible to silently suppressing errors. This new form now queries PyPI to find what versions of Qiskit are available in binary distributions for this platform, and filters based on that. * Include release candidates in testing (cherry picked from commit 1344cdd) # Conflicts: # test/qpy_compat/process_version.sh # test/qpy_compat/run_tests.sh
* Skip uninstallable tags in QPY backwards compatibility tests When a tag has been made, but the package has not yet landed on PyPI, the QPY job fails in the environment-building step. This is not actually a failure of the QPY backwards-compatibility guarantees, and it isn't the job of the QPY tests to detect a bad tag anyway. * Query PyPI to find versions to test The logic we actually want for versions to test is "find the versions that _should_ be installable", rather than "try it and see"; the latter is susceptible to silently suppressing errors. This new form now queries PyPI to find what versions of Qiskit are available in binary distributions for this platform, and filters based on that. * Include release candidates in testing (cherry picked from commit 1344cdd) # Conflicts: # test/qpy_compat/process_version.sh # test/qpy_compat/run_tests.sh
…skit#13202) * Skip uninstallable tags in QPY backwards compatibility tests When a tag has been made, but the package has not yet landed on PyPI, the QPY job fails in the environment-building step. This is not actually a failure of the QPY backwards-compatibility guarantees, and it isn't the job of the QPY tests to detect a bad tag anyway. * Query PyPI to find versions to test The logic we actually want for versions to test is "find the versions that _should_ be installable", rather than "try it and see"; the latter is susceptible to silently suppressing errors. This new form now queries PyPI to find what versions of Qiskit are available in binary distributions for this platform, and filters based on that. * Include release candidates in testing (cherry picked from commit 1344cdd)
…#13202) (#13217) * Skip uninstallable tags in QPY backwards compatibility tests (#13202) * Skip uninstallable tags in QPY backwards compatibility tests When a tag has been made, but the package has not yet landed on PyPI, the QPY job fails in the environment-building step. This is not actually a failure of the QPY backwards-compatibility guarantees, and it isn't the job of the QPY tests to detect a bad tag anyway. * Query PyPI to find versions to test The logic we actually want for versions to test is "find the versions that _should_ be installable", rather than "try it and see"; the latter is susceptible to silently suppressing errors. This new form now queries PyPI to find what versions of Qiskit are available in binary distributions for this platform, and filters based on that. * Include release candidates in testing (cherry picked from commit 1344cdd) # Conflicts: # test/qpy_compat/process_version.sh # test/qpy_compat/run_tests.sh * Resolve conflicts * Add qpy_teest_constraints.txt --------- Co-authored-by: Jake Lishman <[email protected]> Co-authored-by: Eli Arbel <[email protected]>
…#13202) (#13216) * Skip uninstallable tags in QPY backwards compatibility tests (#13202) * Skip uninstallable tags in QPY backwards compatibility tests When a tag has been made, but the package has not yet landed on PyPI, the QPY job fails in the environment-building step. This is not actually a failure of the QPY backwards-compatibility guarantees, and it isn't the job of the QPY tests to detect a bad tag anyway. * Query PyPI to find versions to test The logic we actually want for versions to test is "find the versions that _should_ be installable", rather than "try it and see"; the latter is susceptible to silently suppressing errors. This new form now queries PyPI to find what versions of Qiskit are available in binary distributions for this platform, and filters based on that. * Include release candidates in testing (cherry picked from commit 1344cdd) # Conflicts: # test/qpy_compat/process_version.sh # test/qpy_compat/run_tests.sh * Resolve conflicts and add qpy_test_constraints.txt --------- Co-authored-by: Jake Lishman <[email protected]> Co-authored-by: Eli Arbel <[email protected]>
Summary
When a tag has been made, but the package has not yet landed on PyPI, the QPY job fails in the environment-building step. This is not actually a failure of the QPY backwards-compatibility guarantees, and it isn't the job of the QPY tests to detect a bad tag anyway.
Details and comments
Since this commit is an acknowledgement that not every tag might be a valid version, and my editor was complaining about the safety of the various script calls, I made the variable expansion safe against word splitting, just in case.