Skip to content

chore(java): use separate autosynth job for README #767

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

Merged
merged 9 commits into from
Sep 29, 2020

Conversation

chingor13
Copy link
Contributor

Split java README generation into a separate, per-repo continuous job running from Kokoro.

We now generate a new job that runs on commits to the primary branch that strictly manages the README.md. This should prevent us from seeing the contextless autosynth PRs which are caused by non-proto/template upstream changes.

@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Sep 21, 2020

# README.md is now synthesized separately. This prevents synthtool from deleting the
# README as it's no longer generated here.
excludes.append("README.md")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This prevents synthtool from removing the README.

Comment on lines +377 to +381
if (
not toolbox.metadata_contains_generated_files(toolbox.branch)
and toolbox.metadata_contains_generated_files(toolbox.sub_branch(youngest))
and not change_pusher.check_if_pr_already_exists(toolbox.branch)
):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Running nox locally made this change on my machine. It still seems to pass tests.

echo "https://${GITHUB_TOKEN}:@github.com" >> ~/.git-credentials
git config --global credential.helper 'store --file ~/.git-credentials'

python3.6 -m pip install git+https://github.com/googleapis/synthtool.git#egg=gcp-synthtool
Copy link
Contributor

Choose a reason for hiding this comment

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

What does #egg= do?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's used to specify the name of the library being installed: https://pip.pypa.io/en/stable/reference/pip_install/#working-out-the-name-and-version

@SurferJeffAtGoogle
Copy link
Contributor

Please trigger a kokoro build with these changes and link to the result.

@chingor13
Copy link
Contributor Author

chingor13 commented Sep 23, 2020

I need to run this from a fork because autosynth assumes that we run from the default branch.

Opened #773 as a feature request to make testing something like this easier.

@chingor13 chingor13 added the automerge Merge the pull request once unit tests and other checks pass. label Sep 29, 2020
@gcf-merge-on-green gcf-merge-on-green bot merged commit e616863 into googleapis:master Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge the pull request once unit tests and other checks pass. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants