Skip to content

chore: clean up hermetic build script and test#1943

Merged
JoeWang1127 merged 62 commits intomainfrom
hermetic_cleanup
Aug 29, 2023
Merged

chore: clean up hermetic build script and test#1943
JoeWang1127 merged 62 commits intomainfrom
hermetic_cleanup

Conversation

@meltsufin
Copy link
Copy Markdown
Member

@meltsufin meltsufin commented Aug 26, 2023

Builds on #1916.

Allow running on OSX in addition to Linux.

Test execution improvement from 2m45s to 11s.

@meltsufin meltsufin marked this pull request as ready for review August 26, 2023 03:50
@meltsufin meltsufin requested a review from a team August 26, 2023 03:50
Base automatically changed from feat/generate-aiplatform-without-postprocessing to main August 28, 2023 15:15
@JoeWang1127 JoeWang1127 requested a review from suztomo August 28, 2023 18:28
Comment thread .github/workflows/verify_library_generation.yaml Outdated
java-version: ${{ matrix.java }}
distribution: temurin
cache: maven
- uses: kanga333/variable-mapper@3681b75f5c6c00162721168fb91ab74925eaebcb
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a personal project that has very few usage based on the Github stars, it looks risky to me and I'm not sure we want to use it. Is there any alternatives?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a personal project that has very few usage based on the Github stars, it looks risky to me and I'm not sure we want to use it.

Makes sense. I'll do more research then.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

matrix:
  sys: [ {os: ubuntu-22.04, arch: linux-x86_64}, {os: macos-12, arch: osx-x86_64} ]
...
${{ matrix.sys.os }} and ${{ matrix.sys.arch }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@burkedavison thanks for the help.
However, Github complains that: Matrix options must only contain primitive values

Comment thread library_generation/generate_library_integration_test.sh
@sonarqubecloud
Copy link
Copy Markdown

[gapic-generator-java-root] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@sonarqubecloud
Copy link
Copy Markdown

[java_showcase_integration_tests] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@sonarqubecloud
Copy link
Copy Markdown

[java_showcase_unit_tests] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Copy Markdown
Contributor

@blakeli0 blakeli0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@JoeWang1127 JoeWang1127 merged commit 6545fd5 into main Aug 29, 2023
@blakeli0
Copy link
Copy Markdown
Contributor

Test execution improvement from 2m45s to 11s.

What made the test execution so much faster? The sparse_clone and rsync?

@JoeWang1127 JoeWang1127 deleted the hermetic_cleanup branch August 29, 2023 18:25
@JoeWang1127
Copy link
Copy Markdown
Contributor

JoeWang1127 commented Aug 29, 2023

What made the test execution so much faster? The sparse_clone and rsync?

I think it speeds up by not checking out HEAD of googleapis-gen (git clone -n) and only checking out files needed (git sparse-checkout) as checking out googleapis-gen is the most time-consuming part of the verification process.

As for rsync, it is a fast file copying tool (man page) but I don't think it'll have significant impact on the execution time in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants