chore(test): improve diff detection for unit tests - #17998
Conversation
Adds a **Related Libraries** table to the `google-cloud-bigquery` [README.rst](file:///usr/local/google/home/shuowei/src/google-cloud-python/google-cloud-python/packages/google-cloud-bigquery/README.rst) linking connector libraries for DataFrame operations: - **BigQuery DataFrames (`bigframes`)**: pandas/scikit-learn-like API powered by BigQuery engine. - **`pandas-gbq`**: integration for loading and writing pandas DataFrames. Fixes #<522853190> 🦕
There was a problem hiding this comment.
Code Review
This pull request updates CI scripts to use triple-dot diffs when comparing against the target branch in presubmits, adds support for a pre-determined package list in coverage reporting, and outputs a space-separated list of packages to GitHub Actions output. Feedback was provided to replace --deepen=200 with --depth=200 in ci/run_conditional_tests.sh to avoid potential failures on non-shallow repositories.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
parthea
left a comment
There was a problem hiding this comment.
LGTM, but holding off on formal approval until the temporary changes are removed.
Also added unit_test:all_packages to start a thorough test
|
Please mark this ready for review once the temporary changes are removed |
| executed the first time *any* client library is instantiated in your application, and only if the affected loggers have not been previously configured. | ||
| (This is the reason for 2.i. above.) | ||
|
|
||
| .. test comment |
Following up on this, the results look good. |
The diff logic in the new unit test sharding system had an issue: when comparing against main to find the modified packages, any packages that changed on main would be treated as packages that changed in the PR
This could especially cause issues if a commit was added while a workflow was running, because the changed package list would shift mid-run
This PR fixes the issue by:
...and a depth of 200 to find the common ancestor commit to diff against, instead of diffing against main directly