-
Notifications
You must be signed in to change notification settings - Fork 66
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 #1697
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.
Have you run these workflows to test out?
The .sh files look good, although I'm not the best person to review bash files. Given that this is probably done consistently across other repos, would it make sense for someone else from your team to review as well?
@ehsannas thanks for taking a look. We have tested the scripts in a fork (example PR, example workflow run). These tests are tracked in this internal doc. We will also go through a review from @blakeli0 (adding now). We need both approvals before we merge this PR. |
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 updatesgeneration_config.yaml
(added in this PR) to contain the latestgoogleapis_committish
(source of truth of library generation) as well as other dependencies such asgapic_generator_version
. This job runs nightly and creates a PR that modifies the config yaml.hermetic_library_generation
which readsgeneration_config.yaml
and pushes a new commit to any PR whose latest commit affectsgeneration_config.yaml
(e.g. the nightly PR created byupdate_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:
update_generation_config
creates a PR that updatesgeneration_config.yaml
with the latest dependencies and googleapis committishhermetic_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 affectinggeneration_config.yaml
.Follow ups
CLOUD_JAVA_BOT_TOKEN
to repository for the hermetic generation workflow to work