GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — chore: bake synthtool and owl-bot into library_generation docker image by diegomarquezp · Pull Request #2615 · googleapis/sdk-platform-java
This repository was archived by the owner on Oct 29, 2026. It is now read-only.
Conversation
|
|
[Maybe out of scope of this PR] |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| RUN chmod -R a+rx /home/.nvm | ||
|
|
||
| WORKDIR /workspace | ||
| ENTRYPOINT [ "python", "/src/cli/entry_point.py", "generate" ] |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Can the user run the image with different scripts/methods?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
yes, I declared this ENTRYPOINT since it's the "official" one. If we want to run a different script, we can pass the --entrypoint /src/my_script.py flag
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| # set dummy git credentials for the empty commit used in postprocessing | ||
| # we use system so all users using the container will use this configuration | ||
| RUN git config --system user.email "[email protected]" |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think the only reason we need git config is from the post processing here? If it is, I think we should look into not initialize a Git repo, as a follow up enhancement though.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
yes, but the root cause is that the owl-bot CLI assumes the source folder (the one we generate and arrange) is a git repository. Extra points to process owlbot yamls using a custom script.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| # install synthtool | ||
| WORKDIR /tools | ||
| RUN git clone https://github.com/googleapis/synthtool |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think the only reason we need synthtool is java.py and its dependencies?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Yes, mainly the common_templates function. We could in theory move java.py and that function to sdk-platform
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| # install OS tools | ||
| RUN apt-get update && apt-get install -y \ | ||
| unzip openjdk-17-jdk rsync maven jq \ | ||
| unzip openjdk-17-jdk rsync maven jq less vim \ |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I don't see less and vim being used, I guess the reason we need them is for testing purpose?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
It's just for inspecting the container files in case things go wrong during local development. Do we want to only keep the production dependencies?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
For local development, I think you can mention them in the development.md. No need to install it in production.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, I removed these tools from the image and added a small section in the development guide.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-authored-by: Joe Wang <[email protected]>
Yes, indeed. This is considered in the follow up section of the PR description. I will do it right after we merge this |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Yes, my only concern is that |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| COPY library_generation /src | ||
|
|
||
| # use python 3.11 (the base image has several python versions; here we define the default one) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Because the base image cloud-devrel-public-resources still uses 3.11 so we have to use 3.11? Who maintains cloud-devrel-public-resources?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
so we have to use 3.11?
We could use a higher version too, or even a lower one if it's still compatible with the dependencies
who maintains
cloud-devrel-public-resources?
Judging from a documentation entry in the cloud client libraries g3doc, I think it's the Cloud Client Libraries team
Maybe we can extract the base Dockerfile and prepend it to ours to eliminate this dependency.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
This intends to adapt the config yamle to the changes made in googleapis/sdk-platform-java#2615
…ig (#10833) This intends to adapt the config yamle to the changes made in googleapis/sdk-platform-java#2615
In this PR: - Remove generated files after running tests. Note that files generated by `docker run` have root permission, thus can't be removed by this PR. This issue will be resolved in #2615.
#2615) ## Context [Milestone 7 of Hermetic Build](https://docs.google.com/document/d/1v-sJBmdNEVBRryL8n90XK8OIiqVphaJemXVhANw14Jk/edit?pli=1&resourcekey=0-QGUb2do-JBlDWKvptWBp_g&tab=t.0#bookmark=id.bkbj04ib2d4n) ## In this PR - Bake synthtool into the docker image (we won't `git clone` it anymore) - Bake the owlbot CLI into the docker image (we won't use docker inside docker anymore) - Create a DEVELOPMENT.md file with instructions for local setup (example: install owlbot CLI locally) ## Follow ups - [ ] modify google-cloud-java's workflows to correct the volume mapping being used --------- Co-authored-by: Joe Wang <[email protected]>
…ig (#10833) This intends to adapt the config yamle to the changes made in googleapis/sdk-platform-java#2615
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.