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

chore: make generator version an optional param #3040

Merged
merged 14 commits into from
Jul 25, 2024

Conversation

JoeWang1127
Copy link
Collaborator

@JoeWang1127 JoeWang1127 commented Jul 10, 2024

In this PR:

  • Change gapic_generator_version as an optional parameter.
  • Set gapic_generator_version through environment variable if it's not specified in the generation config.

@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Jul 10, 2024
@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels Jul 10, 2024
@JoeWang1127 JoeWang1127 marked this pull request as ready for review July 10, 2024 21:33
Copy link
Collaborator

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

I was hoping we can skip calling the generator if the version is not provided, maybe reusing the proto_only flag, but it probably requires more effort to populate the value and pass the flag around. I think this approach if good for now.

@@ -104,6 +107,7 @@ docker run \
-u "$(id -u):$(id -g)" \
-v "$(pwd):${workspace_name}" \
-v "$HOME"/.m2:/home/.m2 \
-e generator_version="${generator_version}" \
Copy link
Contributor

Choose a reason for hiding this comment

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

From our shell style guide: Constants and anything exported to the environment should be capitalized, separated with underscores, and declared at the top of the file.

The top of the file part doesn't apply, but I think it's reasonable to make it uppercase for consistency with other env vars we set up in the Dockerfile

Copy link
Collaborator

@blakeli0 blakeli0 Jul 24, 2024

Choose a reason for hiding this comment

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

Makes sense, do you mind updating it in the absence of Joe?

Copy link
Contributor

Choose a reason for hiding this comment

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

Done

@diegomarquezp diegomarquezp enabled auto-merge (squash) July 25, 2024 15:55
Copy link

Copy link

Quality Gate Passed Quality Gate passed for 'java_showcase_integration_tests'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

@diegomarquezp diegomarquezp merged commit 10f950e into main Jul 25, 2024
47 of 49 checks passed
@diegomarquezp diegomarquezp deleted the chore/make-generator-optional branch July 25, 2024 16:11
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.

3 participants