Skip to content
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

fix: Run all tests if changing test folders itself #528

Closed
wants to merge 24 commits into from

Conversation

glasnt
Copy link
Contributor

@glasnt glasnt commented Nov 9, 2023

Description

Fixes b/309966756

Proof of concept: When a PR comes in that edits testing infra itself, then all tests should be run to verify the change.

This PR adds an escape hatch to return successfully from the "prune unchanged directories" step without pruning anything, in the event we are changing something to do with tests themselves.

Initial list of folders: build, test, .github (changes in any of these folders will cause all tests to run)

Additionally: adds the _RUN_ALL_TEST check (define as a substitution variable on Cloud Build triggers, for example) to escape the escape sequence, and don't even check about pruning, just run all the tests.

Note: given current infra, unsure if this change itself will allow tests to run.

Additional: In case of failures like #518 where git commands fail within the step, add set -e as to exit immediately on error (otherwise last exit code for step is used to confirm success of step). Resolves #518

Checklist

Readiness

  • Yes, merge this PR after it is approved

@glasnt glasnt marked this pull request as ready for review November 14, 2023 23:36
@glasnt glasnt requested review from a team as code owners November 14, 2023 23:36
@rogerthatdev rogerthatdev self-assigned this Nov 14, 2023
@rogerthatdev rogerthatdev self-requested a review November 14, 2023 23:47
@rogerthatdev rogerthatdev requested a review from a team as a code owner November 21, 2023 19:52
@rogerthatdev
Copy link
Contributor

The int test blocking this PR is failing on the sqlserver_instance_private_ip sample. I've added a skip to this sample so that we could troubleshoot it separately.

@msampathkumar
Copy link
Contributor

/gcbrun

@iennae
Copy link
Contributor

iennae commented Jan 13, 2024

/gcbrun

@glasnt glasnt changed the title debug: Run all tests if changing test folders itself fix: Run all tests if changing test folders itself Jan 16, 2024
@glasnt glasnt mentioned this pull request Jan 16, 2024
@glasnt
Copy link
Contributor Author

glasnt commented Jan 24, 2024

The updates to this PR show the limitations in the current CI limitation technique:

This PR is currently running the following tests:

Folders in scope for tests:
bigquery/
build/
cloud_sql/
test/

@glasnt
Copy link
Contributor Author

glasnt commented Feb 26, 2024

Changes in #602 implemented some of these. Will re-create this PR after re-assessment.

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.

CICD Bugs
5 participants