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

feat: enable hermetic library generation #2048

Merged
merged 24 commits into from
Jul 3, 2024

Conversation

diegomarquezp
Copy link
Contributor

@diegomarquezp diegomarquezp commented May 28, 2024

This is part of the effort to enable multi-version support in hand-written libraries. More context and details in this doc.

This PR adds two workflows and their scripts:

  • update_generation_config which updates generation_config.yaml (added in this PR) to contain the latest googleapis_committish (source of truth of library generation) as well as other dependencies such as gapic_generator_version. This job runs nightly and creates a PR that modifies the config yaml.
  • hermetic_library_generation which reads generation_config.yaml and pushes a new commit to any PR whose latest commit affects generation_config.yaml (e.g. the nightly PR created by update_generation_config). It essentially translates changes in the config yaml to changes in the source code (of the generated part). This workflow will be a required check.

As an example of how they work in practice:

  1. Once per night, update_generation_config creates a PR that updates generation_config.yaml with the latest dependencies and googleapis committish
  2. hermetic_library_generation is triggered by this PR and generates the corresponding code changes. A new commit with the code changes is added to the PR. This step may occur for any PR affecting generation_config.yaml.

Follow ups

  • Add CLOUD_JAVA_BOT_TOKEN to repository for the hermetic generation workflow to work. We confirmed it works in our fork (job link).

@product-auto-label product-auto-label bot added size: l Pull request size is large. api: pubsub Issues related to the googleapis/java-pubsub API. labels May 28, 2024
@product-auto-label product-auto-label bot added size: xl Pull request size is extra large. and removed size: l Pull request size is large. labels Jun 4, 2024
@product-auto-label product-auto-label bot added size: l Pull request size is large. and removed size: xl Pull request size is extra large. labels Jun 26, 2024
@product-auto-label product-auto-label bot added size: xl Pull request size is extra large. and removed size: l Pull request size is large. labels Jun 26, 2024
@product-auto-label product-auto-label bot removed the size: xl Pull request size is extra large. label Jun 26, 2024
@diegomarquezp diegomarquezp marked this pull request as ready for review June 26, 2024 21:22
@diegomarquezp diegomarquezp requested review from a team as code owners June 26, 2024 21:22
generation_config.yaml Show resolved Hide resolved
generation_config.yaml Show resolved Hide resolved
@michaelpri10
Copy link
Contributor

Accidentally left comments on the local repo pull request, but copied the relevant ones here. Just 2 small suggestions but otherwise LGTM.

@michaelpri10 michaelpri10 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 1, 2024
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 1, 2024
@diegomarquezp diegomarquezp added the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 2, 2024
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 2, 2024
@diegomarquezp diegomarquezp added automerge Merge the pull request once unit tests and other checks pass. owlbot:run Add this label to trigger the Owlbot post processor. labels Jul 2, 2024
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 2, 2024
@diegomarquezp diegomarquezp merged commit 283a5e8 into googleapis:main Jul 3, 2024
22 of 23 checks passed
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the googleapis/java-pubsub API. size: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants