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

ci: specify pull request environment variable for sample builds #2178

Merged
merged 2 commits into from
Mar 22, 2024

Conversation

suztomo
Copy link
Member

@suztomo suztomo commented Mar 21, 2024

The build.sh has a logic to narrow the scope of the tests when it runs on a pull request. It uses an environmental variable.

Previous Attempt

https://cloud.google.com/build/docs/optimize-builds/increase-vcpu-for-builds#increase_vcpu_for_default_pools
machineType: 'N1_HIGHCPU_8'

The previous build took 24 minutes. => It turned out this didn't help.

@suztomo suztomo requested review from a team as code owners March 21, 2024 16:23
@product-auto-label product-auto-label bot added the size: xs Pull request size is extra small. label Mar 21, 2024
@suztomo suztomo marked this pull request as draft March 21, 2024 16:23
@product-auto-label product-auto-label bot added api: bigtable Issues related to the googleapis/java-bigtable API. samples Issues that are directly related to samples. labels Mar 21, 2024
@kolea2
Copy link
Collaborator

kolea2 commented Mar 21, 2024

@suztomo I believe this is what needs to be changed: https://github.com/googleapis/java-bigtable/blob/main/.kokoro/build.sh#L86

The new build is running all samples in each module as opposed to just snapshot. My guess is KOKORO_GITHUB_PULL_REQUEST_NUMBER is not getting set properly.

@suztomo
Copy link
Member Author

suztomo commented Mar 21, 2024

It got slower... "Test-Samples-java-bigtable (cloud-java-ci-sample) Successful in 26m — Summary"

@suztomo
Copy link
Member Author

suztomo commented Mar 21, 2024

@kolea2 Thank you

@suztomo
Copy link
Member Author

suztomo commented Mar 21, 2024

Test-Samples-java-bigtable (cloud-java-ci-sample) Successful in 9m — Summary

It worked. (9m is shorter than 24m)

[INFO] Results:
[INFO] 
[INFO] Tests run: 58, Failures: 0, Errors: 0, Skipped: 0

@suztomo suztomo changed the title ci: increasing vCPU for the sample build ci: specify pull request environment variable for sample builds Mar 21, 2024
@suztomo suztomo requested a review from kolea2 March 21, 2024 22:32
@suztomo suztomo marked this pull request as ready for review March 22, 2024 17:46
@suztomo suztomo added owlbot:run Add this label to trigger the Owlbot post processor. automerge Merge the pull request once unit tests and other checks pass. labels Mar 22, 2024
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Mar 22, 2024
@gcf-merge-on-green gcf-merge-on-green bot merged commit 37e5e19 into main Mar 22, 2024
24 checks passed
@gcf-merge-on-green gcf-merge-on-green bot deleted the faster_sample_build branch March 22, 2024 17:50
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigtable Issues related to the googleapis/java-bigtable API. samples Issues that are directly related to samples. size: xs Pull request size is extra small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants