Skip to content
This repository was archived by the owner on May 8, 2026. It is now read-only.

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

Merged
gcf-merge-on-green[bot] merged 2 commits into
mainfrom
faster_sample_build
Mar 22, 2024
Merged

ci: specify pull request environment variable for sample builds#2178
gcf-merge-on-green[bot] merged 2 commits into
mainfrom
faster_sample_build

Conversation

@suztomo

@suztomo suztomo commented Mar 21, 2024

Copy link
Copy Markdown
Member

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 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

kolea2 commented Mar 21, 2024

Copy link
Copy Markdown
Contributor

@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

suztomo commented Mar 21, 2024

Copy link
Copy Markdown
Member Author

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

@suztomo

suztomo commented Mar 21, 2024

Copy link
Copy Markdown
Member Author

@kolea2 Thank you

@suztomo

suztomo commented Mar 21, 2024

Copy link
Copy Markdown
Member Author

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
@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 subscribe to this conversation on GitHub. Already have an account? Sign in.

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.

3 participants