From 920f27c5014a4e07febee29b9bc1bd51b3f9cd6f Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Tue, 16 Jan 2024 12:26:54 -0500 Subject: [PATCH] Exclude non-rc pre-releases from qpy backwards compat tests (#11572) The QPY backwards compatibility tests are setup to verify that we can load qpy files generated with historical releases using the current version of Qiskit under development. This ensures we're meeting our backwards compatibility guarantees with QPY. However, the tests were over eagerly running on pre-releases that don't have any stability guarantees, mainly alpha and beta releases indicated by "a" and "b" suffixes respectively in the version number. This commit excludes these pre-release versions from the tests as it's not valid to run with these. Release candidate pre-releases should still be run because they have stable APIs and they're not skipped by this PR. (cherry picked from commit abb803f44dc2d402b01d7ecf1d8337e1a4ed7d42) --- test/qpy_compat/process_version.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/qpy_compat/process_version.sh b/test/qpy_compat/process_version.sh index 9112be67adb1..f5ea685394a3 100755 --- a/test/qpy_compat/process_version.sh +++ b/test/qpy_compat/process_version.sh @@ -29,6 +29,11 @@ if [[ ${parts[0]} -eq 0 && ${parts[1]} -lt 18 ]] ; then exit 0 fi +# Exclude any non-rc pre-releases as they don't have stable API guarantees +if [[ $version == *"b"* || $version == *"a"* ]] ; then + exit 0 +fi + # If the source version is newer than the version under test exit fast because # there is no QPY compatibility for loading a qpy file generated from a newer # release with an older release of Qiskit.