GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — chore: bake Java formatter into image by JoeWang1127 · Pull Request #3271 · googleapis/sdk-platform-java

This repository was archived by the owner on Oct 29, 2026. It is now read-only.

Conversation

@JoeWang1127

@JoeWang1127 JoeWang1127 commented Oct 3, 2024

Copy link
Copy Markdown
Contributor

In this PR:

  • Bake Java formatter into image.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@JoeWang1127
chore: bake Java formatter into image
91be6bb
@product-auto-label product-auto-label Bot added the size: s Pull request size is small. label Oct 3, 2024
JoeWang1127 and others added 4 commits October 3, 2024 10:39
@JoeWang1127
copy jar
87b8bac
@JoeWang1127
add prefix
5a3aeb1
@JoeWang1127
remove copy
f5738aa
@cloud-java-bot
chore: generate libraries at Thu Oct 3 15:02:17 UTC 2024
4214760
@product-auto-label product-auto-label Bot added size: l Pull request size is large. and removed size: s Pull request size is small. labels Oct 3, 2024
JoeWang1127 and others added 2 commits October 3, 2024 11:46
@JoeWang1127
downgrade to 1.7
5f23ab5
@cloud-java-bot
chore: generate libraries at Thu Oct 3 15:54:18 UTC 2024
d65a6e0
@product-auto-label product-auto-label Bot added size: s Pull request size is small. and removed size: l Pull request size is large. labels Oct 3, 2024
JoeWang1127
JoeWang1127 commented Oct 3, 2024
View reviewed changes
Comment thread .cloudbuild/library_generation/library_generation.Dockerfile
ARG OWLBOT_CLI_COMMITTISH=ac84fa5c423a0069bbce3d2d869c9730c8fdf550
ARG PROTOC_VERSION=25.5
ARG GRPC_VERSION=1.67.1
ARG JAVA_FORMAT_VERSION=1.7

@JoeWang1127 JoeWang1127 Oct 3, 2024

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I think we can upgrade the formatter, the latest version is 1.23.0.

It will cause code formatting so it's better in a separate PR.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@blakeli0 blakeli0 Oct 9, 2024

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Agree that it should be tracked differently. However, I think the newer versions of formatter are not compatible with Java 8.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@JoeWang1127 JoeWang1127 Oct 10, 2024

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This fomatter is not part of client library and we should be able use a new version of Java to run it.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@blakeli0 blakeli0 Oct 10, 2024

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Since it is a jar, I think it still needs to be run with Java. I see that we are currently using Java 21 in our build file, but we probably want to use a lower version to guarantee the compatibility since our client library still supports Java 8.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@JoeWang1127 JoeWang1127 Oct 11, 2024

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I think this repo has a check to verify the compiled code is compatible with Java 8 (maven profile should make sure of that). Of course, we can change it to Java8 as well.

On the other hand, running generator/formatter jar only requires JRE which I think we can choose a different version from JDK. We can optimize the image to only include a JRE but not a JDK.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
JoeWang1127 added 4 commits October 3, 2024 12:15
@JoeWang1127
change doc
10c37ec
@JoeWang1127
change formatter to the well-known location
4a30e9d
@JoeWang1127
change development guide
6bed4da
@JoeWang1127
add check
a740367
@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 Oct 3, 2024
JoeWang1127 added 11 commits October 3, 2024 22:33
@JoeWang1127
Merge branch 'main' into chore/bake-formattor
09e1119
@JoeWang1127
add unit tests
24dbbc0
@JoeWang1127
change doc
cb49f4f
@JoeWang1127
restore comment
3e60bbf
@JoeWang1127
restore comment
7cd097c
@JoeWang1127
restore func name
83ffa50
@JoeWang1127
fix showcase
beaf8cd
@JoeWang1127
fix showcase
b363914
@JoeWang1127
fix typo
eb347bb
@JoeWang1127
fix typo
ad77e6e
@JoeWang1127
use variable
6979a21
JoeWang1127 added 3 commits October 3, 2024 23:54
@JoeWang1127
fix typo
11359fc
@JoeWang1127
fix sh unit test
a0a9b82
@JoeWang1127
Merge branch 'main' into chore/bake-formattor
1d16e78
@JoeWang1127
JoeWang1127 marked this pull request as ready for review October 4, 2024 13:19
@JoeWang1127
JoeWang1127 requested a review from blakeli0 October 4, 2024 13:19
JoeWang1127 added 5 commits October 4, 2024 14:16
@JoeWang1127
Merge branch 'main' into chore/bake-formattor
778e1a9
@JoeWang1127
Merge branch 'main' into chore/bake-formattor
2cec3aa
@JoeWang1127
Merge branch 'main' into chore/bake-formattor
7f457e7
@JoeWang1127
Merge branch 'main' into chore/bake-formattor
7c7a58a
@JoeWang1127
Merge branch 'main' into chore/bake-formattor
b8f41f9
blakeli0
blakeli0 reviewed Oct 10, 2024
View reviewed changes
Comment thread .cloudbuild/library_generation/library_generation.Dockerfile
RUN ln -sf ${NODE_PATH}/* /usr/local/bin

# download the Java formatter
ADD https://maven-central.storage-download.googleapis.com/maven2/com/google/googlejavaformat/google-java-format/${JAVA_FORMAT_VERSION}/google-java-format-${JAVA_FORMAT_VERSION}-all-deps.jar \

@blakeli0 blakeli0 Oct 10, 2024

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This probably need to be downloaded from Airlock as well, but definitely a separate PR. cc: @suztomo.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

JoeWang1127 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Comment thread library_generation/utils/utilities.sh Outdated
if [[ ! -f "${required_tool}" ]]; then
>&2 echo "File ${required_tool} not found in the "
>&2 echo "filesystem. Please configure your environment and store the "
>&2 echo "generator jar in this location"

@blakeli0 blakeli0 Oct 10, 2024

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Since this logic is reused now, we should update the wording from "generator jar" to something more generic.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@JoeWang1127 JoeWang1127 Oct 11, 2024

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Done.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread showcase/scripts/generate_showcase.sh

@blakeli0 blakeli0 Oct 10, 2024

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

We probably don't need this sh anymore once we move to hermetic build image in showcase right? Or at least it should be much simpler, things like downloading jars would not be needed anymore.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@JoeWang1127 JoeWang1127 Oct 10, 2024

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Yes, I'll cleanup these files when I'm working on b/325061217

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@JoeWang1127
change comment
0baf09a
@sonarqubecloud

sonarqubecloud Bot commented Oct 11, 2024

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed for 'gapic-generator-java-root'

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sonarqubecloud

sonarqubecloud Bot commented Oct 11, 2024

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@JoeWang1127
JoeWang1127 requested a review from blakeli0 October 11, 2024 14:09
blakeli0
blakeli0 approved these changes Oct 11, 2024
View reviewed changes
@JoeWang1127
JoeWang1127 merged commit 259e9f7 into main Oct 11, 2024
@JoeWang1127
JoeWang1127 deleted the chore/bake-formattor branch October 11, 2024 16:18
jinseopkim0 added a commit that referenced this pull request Oct 11, 2024
@jinseopkim0 @JoeWang1127 @cloud-java-bot
chore: bake Java formatter into image (#3271) (#3292)
4e3ba3e
In this PR:
- Bake Java formatter into image.

---------

Thank you for opening a Pull Request! Before submitting your PR, please
read our [contributing
guidelines](https://github.com/googleapis/gapic-generator-java/blob/main/CONTRIBUTING.md).

There are a few things you can do to make sure it goes smoothly:
- [ ] Make sure to open an issue as a
[bug/issue](https://github.com/googleapis/gapic-generator-java/issues/new/choose)
before writing your code! That way we can discuss the change, evaluate
designs, and agree on the general idea
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> ☕️

Co-authored-by: Joe Wang <[email protected]>
Co-authored-by: cloud-java-bot <[email protected]>
@diegomarquezp diegomarquezp mentioned this pull request Oct 30, 2024
chore: remove .m2 folder mapping in library generation workflow #3328
Merged
diegomarquezp added a commit that referenced this pull request Oct 30, 2024
@diegomarquezp
chore: remove .m2 folder mapping in library generation workflow (#3328)
ee34704
#3271 renders this
volume mapping unnecessary
chingor13 pushed a commit to googleapis/google-cloud-java that referenced this pull request Mar 24, 2026
@diegomarquezp
chore: remove .m2 folder mapping in library generation workflow (#3328)
99333d5
googleapis/sdk-platform-java#3271 renders this
volume mapping unnecessary
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

1 more reviewer
@blakeli0 blakeli0 blakeli0 approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size: m Pull request size is medium.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@JoeWang1127 @blakeli0 @cloud-java-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.