Skip to content

[DEMO] Test skip unsupported prerelease packages - #18034

Draft
hebaalazzeh wants to merge 2 commits into
mainfrom
test-skip-unsupported-prerelease-packages
Draft

[DEMO] Test skip unsupported prerelease packages#18034
hebaalazzeh wants to merge 2 commits into
mainfrom
test-skip-unsupported-prerelease-packages

Conversation

@hebaalazzeh

Copy link
Copy Markdown
Contributor

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces workarounds in the CI script (ci/run_single_test.sh) to handle packages with heavy C/Rust dependencies that fail to install on pre-release Python versions (such as Python 3.15). However, the review feedback points out that these workarounds are currently applied unconditionally. This would cause packages to be skipped or installation failures to be silently ignored even on stable Python versions. The reviewer has provided actionable code suggestions to restrict these checks specifically to Python 3.15 environments.

Comment thread ci/run_single_test.sh
Comment on lines +107 to +119
UNSUPPORTED_PRE_RELEASE_PACKAGES=(
"bigframes"
"pandas-gbq"
"google-cloud-documentai-toolbox"
"db-dtypes"
"bigquery-magics"
)
for unsupported in "${UNSUPPORTED_PRE_RELEASE_PACKAGES[@]}"; do
if [ "${PACKAGE_NAME}" = "${unsupported}" ]; then
echo "WARNING: Skipping import_profile for ${PACKAGE_NAME}: package has heavy C/Rust dependencies not yet supported on pre-release Python ${PY_VERSION}."
exit 0
fi
done

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The check for unsupported pre-release packages is executed unconditionally for all Python versions. This will cause import_profile to be skipped for these packages even on stable Python versions (e.g., 3.10, 3.11, 3.12) where they should be fully tested. Wrap this check in a condition that restricts it to pre-release Python versions (e.g., checking if ${PY_VERSION} starts with 3.15).

Suggested change
UNSUPPORTED_PRE_RELEASE_PACKAGES=(
"bigframes"
"pandas-gbq"
"google-cloud-documentai-toolbox"
"db-dtypes"
"bigquery-magics"
)
for unsupported in "${UNSUPPORTED_PRE_RELEASE_PACKAGES[@]}"; do
if [ "${PACKAGE_NAME}" = "${unsupported}" ]; then
echo "WARNING: Skipping import_profile for ${PACKAGE_NAME}: package has heavy C/Rust dependencies not yet supported on pre-release Python ${PY_VERSION}."
exit 0
fi
done
if [[ "${PY_VERSION}" == "3.15"* ]]; then
UNSUPPORTED_PRE_RELEASE_PACKAGES=(
"bigframes"
"pandas-gbq"
"google-cloud-documentai-toolbox"
"db-dtypes"
"bigquery-magics"
)
for unsupported in "${UNSUPPORTED_PRE_RELEASE_PACKAGES[@]}"; do
if [ "${PACKAGE_NAME}" = "${unsupported}" ]; then
echo "WARNING: Skipping import_profile for ${PACKAGE_NAME}: package has heavy C/Rust dependencies not yet supported on pre-release Python ${PY_VERSION}."
exit 0
fi
done
fi

Comment thread ci/run_single_test.sh
Comment on lines +162 to 172
if ! pip install -e . ; then
echo "WARNING: Could not install dependencies for ${PACKAGE_NAME} on Python ${PY_VERSION} (missing pre-built binary wheels for pre-release Python). Skipping import_profile."
retval=0
else
python ${PROFILER_SCRIPT} --package ${PACKAGE_NAME} --iterations 11 --fail-threshold 5000
if [ -f "${BASELINE_CSV}" ]; then
python ${PROFILER_SCRIPT} --package ${PACKAGE_NAME} --iterations 11 --fail-threshold 5000 --diff-baseline "${BASELINE_CSV}" --diff-threshold 100
else
python ${PROFILER_SCRIPT} --package ${PACKAGE_NAME} --iterations 11 --fail-threshold 5000
fi
retval=$?
fi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

If pip install -e . fails on a stable Python version, the script will silently ignore the failure and return success (retval=0). This fallback should only be applied on pre-release Python versions (e.g., 3.15) where missing binary wheels are expected. On stable Python versions, installation failures should result in a non-zero exit code to correctly fail the CI build.

Suggested change
if ! pip install -e . ; then
echo "WARNING: Could not install dependencies for ${PACKAGE_NAME} on Python ${PY_VERSION} (missing pre-built binary wheels for pre-release Python). Skipping import_profile."
retval=0
else
python ${PROFILER_SCRIPT} --package ${PACKAGE_NAME} --iterations 11 --fail-threshold 5000
if [ -f "${BASELINE_CSV}" ]; then
python ${PROFILER_SCRIPT} --package ${PACKAGE_NAME} --iterations 11 --fail-threshold 5000 --diff-baseline "${BASELINE_CSV}" --diff-threshold 100
else
python ${PROFILER_SCRIPT} --package ${PACKAGE_NAME} --iterations 11 --fail-threshold 5000
fi
retval=$?
fi
if ! pip install -e . ; then
if [[ "${PY_VERSION}" == "3.15"* ]]; then
echo "WARNING: Could not install dependencies for ${PACKAGE_NAME} on Python ${PY_VERSION} (missing pre-built binary wheels for pre-release Python). Skipping import_profile."
retval=0
else
echo "ERROR: Failed to install dependencies for ${PACKAGE_NAME} on Python ${PY_VERSION}."
retval=1
fi
else
if [ -f "${BASELINE_CSV}" ]; then
python ${PROFILER_SCRIPT} --package ${PACKAGE_NAME} --iterations 11 --fail-threshold 5000 --diff-baseline "${BASELINE_CSV}" --diff-threshold 100
else
python ${PROFILER_SCRIPT} --package ${PACKAGE_NAME} --iterations 11 --fail-threshold 5000
fi
retval=$?
fi

@hebaalazzeh hebaalazzeh changed the title Test skip unsupported prerelease packages [DEMO] Test skip unsupported prerelease packages Aug 7, 2026
hebaalazzeh added a commit that referenced this pull request Aug 8, 2026
…profiler (#18033)

Skip packages with heavy native/scientific dependencies (bigframes,
pandas-gbq,
google-cloud-documentai-toolbox, db-dtypes, bigquery-magics) that fail
to build
on Python 3.15 due to missing pre-built wheels.

Test PR: #18034

Fixes: b/535231604
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant