Skip to content

Conversation

@parthea
Copy link
Contributor

@parthea parthea commented Sep 3, 2021

The issue with owlbot mentioned in #492 is fixed. I'd like to switch back to using the public post processor image.

This PR migrates from using a private post processor image gcr.io/repo-automation-bots/owlbot-python:latest to a public one gcr.io/cloud-devrel-public-resources/owlbot-python:latest which is used by automation to update templated files across python repositories in the googleapis org.

Use the following commands to test the feature:

# Pull the latest python post processor image `gcr.io/cloud-devrel-public-resources/owlbot-python`
docker pull gcr.io/cloud-devrel-public-resources/owlbot-python:latest
# Read the digest of the post processor image `gcr.io/cloud-devrel-public-resources/owlbot-python` with the tag `latest`
docker inspect --format='{{.RepoDigests}}' gcr.io/cloud-devrel-public-resources/owlbot-python:latest 
# In the root of the repo, use this command to run the public post processor image 
docker run --user $(id -u):$(id -g) --rm -v $(pwd):/repo -w /repo gcr.io/cloud-devrel-public-resources/owlbot-python:latest

The benefit is that external maintainers should now be able to run the post-processor locally and PRs should continue to be opened by automation when there are updates to templated files.

I tested the functionality in the python-datastream repository and it seems to be working correctly. If there is any issue , we can roll back to the private post processor image.

@parthea parthea requested review from a team as code owners September 3, 2021 09:05
@product-auto-label product-auto-label bot added the api: pubsub Issues related to the googleapis/python-pubsub API. label Sep 3, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Sep 3, 2021
Copy link
Contributor

@plamut plamut left a comment

Choose a reason for hiding this comment

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

I ran the commands and they run without error. However, I didn't notice that the local changes I made to owlbot.py had any effect? For example, I modified one of the replacement rules, but the change was not reflected in the generated code.

Or did I misunderstand and the post-processor image does not use the local owlbot.py file? (and is there a way to tell it do so?)

@plamut
Copy link
Contributor

plamut commented Sep 8, 2021

@parthea Bump. 🙃

@parthea
Copy link
Contributor Author

parthea commented Sep 24, 2021

Hi @plamut ,
I apologize for the delay. This PR is superseded by #503. I'll close it as obsolete.

You should see changes when you modify owlbot.py. Please make sure to run all 4 commands below in the root of your clone of this repo.

docker pull gcr.io/cloud-devrel-public-resources/owlbot-cli:latest
docker run --rm --user $(id -u):$(id -g) -v $(pwd):/repo -w /repo gcr.io/cloud-devrel-public-resources/owlbot-cli:latest copy-code
docker pull gcr.io/cloud-devrel-public-resources/owlbot-python:latest
docker run --user $(id -u):$(id -g) --rm -v $(pwd):/repo -w /repo gcr.io/cloud-devrel-public-resources/owlbot-python:latest

@parthea parthea closed this Sep 24, 2021
@plamut
Copy link
Contributor

plamut commented Sep 27, 2021

@parthea I confirm that running these commands makes local changes to one's repo fork. 👍

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/python-pubsub API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants