-
Notifications
You must be signed in to change notification settings - Fork 65
feat: move Java Owlbot into this repository for postprocessing #2282
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
Conversation
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.
Memo: As per the design doc, we won't use this until the end of Q1 2024.
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.
Until we start using this postprocessor (around Feb/March 2024), people, including me, continue make changes to the Owlbot Java postprocessor via the synthtool repository. Would you write some README section what steps are needed to copy these changes in future (when?)?
That's valid concern. How often do we usually update owlbot post-processor? We thought it does not change often so expected it to not change in another two months. But if it does change, I think we can either
|
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.
LGTM. As we discussed offline, please look into the possibility of moving the Java specific Github templates into this repo, but it can be a separate PR.
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.
Nice work @diegomarquezp!
@suztomo Done |
@blakeli0 I missed point edit: I would lean for avoiding modifications until end up using this implementation, then we can transfer all the changes since this PR and then. |
|
IT for |
|
This is stage 1 of the Owlbot replacement project.
This PR moves the implementation of Synthtool's Java Owlbot to this repository.
Changes
pip install
sdk-platform-java
postprocess_library.sh
will be modified (see next section). It will still, however, be intended to be called bygenerate_library.sh
. It will still be expected to be run on pre-existing fully functional GAPIC libraries.New interface of
postprocess_library.sh
We will define the interface of
postprocess_library.sh
as follows:Input parameters
owlbot.py
used by java-owlbot.OwlBot.yaml
(optional) used to transfer code frompreprocessed_sources_path
.repo-metadata.json
- essential metadata file used by java owlbotIn the context of
generate_library.sh
,destination_path
should be pointing to a folder with such files, since it isdestination_path
that will be called aspostprocessing_target
In the perspective of
generate_library.sh
, the script will generate a temporary folder with such structure and will pass it topostprocess_library.sh
Outputs
preprocessed_sources_path
is provided..Remarks
synthtool
andjava owlbot
run on python, a python version will be stored inlibrary_generation/configuration
. This will be managed viapyenv
google-java-format
was originally added in the image definition. The scripts will now download it at runtime. The formatter requires java 11, so the github integration test was updated to run on java 11.destination_path
was previously being used as a pre-existing, fully functional GAPIC library when postprocessing is enabled, it will now clash with the java owlbot postprocessor by having unexpected folders in the GAPIC folder (i.e. preprocessed libraries produced bygenerate_library.sh
will be sent to, for example,google-cloud-java/java-.../
which will produce a library with pre-processed folders). This is dealt with by having atemp_destination_path
ingenerate_library.sh
that we will either (1) use it aspreprocessed_sources_path
when postprocessing is enabled or (2) simply transfer its contents todestination_path
when it's not enabled.google/cloud/asset/v1p2beta1
andgoogle/cloud/compute