-
Notifications
You must be signed in to change notification settings - Fork 1.7k
test(monorepo): [WIP] adds adhoc package selection for CI system tests #17931
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
Draft
chalmerlowe
wants to merge
20
commits into
main
Choose a base branch
from
feat/adhoc-package-selection
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
4f980bd
feat: implement ad-hoc package selection for CI/CD
chalmerlowe 59b5102
chore: revert ad-hoc integration in run_conditional_tests.sh to focus…
chalmerlowe 55baa28
docs: add comment explaining inline python usage in system.sh
chalmerlowe bc3081b
docs: tweak comment explaining inline python usage
chalmerlowe b0d077e
fix: make grep commands safe and quote variables in adhoc_test_runner.sh
chalmerlowe e710e45
fix: add auth token to curl and harden inline python in system.sh
chalmerlowe fbab28a
Apply suggestion from @chalmerlowe
chalmerlowe 4bda578
fix: harden ad-hoc integration in system.sh against silent failures
chalmerlowe 4424735
chore: add experimental comment to trigger kokoro
chalmerlowe f38b42c
chore: add experimental timeout to parallel test execution in system.sh
chalmerlowe 962bc9e
chore: replace heavy packages (bigquery, bigtable) with lighter ones …
chalmerlowe 7ca31c9
fix: wrap run_package_test in bash -c for timeout command
chalmerlowe 801d0f6
chore: inject intentional failure in google-resumable-media to test a…
chalmerlowe 3ac8fa5
chore: break setup.py in google-resumable-media to guarantee failure
chalmerlowe 2269f4e
chore: dump logs for passed packages in system.sh for debugging
chalmerlowe 4861794
chore: add debug echoes and robustify log dumping in system.sh
chalmerlowe b2199b3
fix: resolve nested quoting bug in timeout command
chalmerlowe aeac1b1
fix: refactor xargs to use -n 1 for robust argument passing
chalmerlowe 73100e7
fix: simplify argument passing to bash -c in xargs to avoid positiona…
chalmerlowe 042227d
fix: resolve catastrophic quoting bug caused by single quotes in comment
chalmerlowe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| handwritten: google-cloud-translate | ||
| handwritten: google-cloud-logging | ||
| core: google-api-core | ||
| core: google-cloud-core |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| package: google-cloud-logging | ||
| package: google-cloud-dns | ||
| group: handwritten |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Script to determine ad-hoc packages to test. | ||
| # This script is intended to be sourced from main test scripts. | ||
| # | ||
| # Ensure we are in the project root if called directly, | ||
| # but usually this is sourced and CWD is already project root. | ||
| # For safety, we can use script location but if sourced $0 might be the parent script. | ||
| # Let's assume CWD is project root as per system.sh behavior. | ||
|
|
||
| ADHOC_DIR="ci/adhoc" | ||
| STANDALONE_LIST="${ADHOC_DIR}/.standalone_package_list.txt" | ||
| GROUPS_FILE="${ADHOC_DIR}/.package_groups.txt" | ||
|
|
||
| if [[ ! -f "$STANDALONE_LIST" ]]; then | ||
| echo "Warning: $STANDALONE_LIST not found." | ||
| return 0 2>/dev/null || exit 0 | ||
| fi | ||
|
|
||
| if [[ ! -f "$GROUPS_FILE" ]]; then | ||
| echo "Warning: $GROUPS_FILE not found." | ||
| return 0 2>/dev/null || exit 0 | ||
| fi | ||
|
|
||
| # Grab individual packages | ||
| adhoc_packages=$(grep "^package:" "$STANDALONE_LIST" | cut -d':' -f2 | xargs || true) | ||
|
|
||
| # Grab requested groups | ||
| requested_groups=$(grep "^group:" "$STANDALONE_LIST" | cut -d':' -f2 | xargs || true) | ||
|
|
||
| # Expand groups | ||
| for group in $requested_groups; do | ||
| group_pkgs=$(grep "^$group:" "$GROUPS_FILE" | cut -d':' -f2 | xargs || true) | ||
| adhoc_packages="$adhoc_packages $group_pkgs" | ||
| done | ||
|
|
||
| # Convert to unique list (deduplicate our adhoc packages) | ||
| ADHOC_PACKAGES=$(echo "$adhoc_packages" | tr ' ' '\n' | sort -u | xargs) | ||
|
|
||
| export ADHOC_PACKAGES |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.