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

process: slow down generator re-runs #168

Open
grayside opened this issue May 4, 2023 · 0 comments
Open

process: slow down generator re-runs #168

grayside opened this issue May 4, 2023 · 0 comments
Labels
api: eventarc Issues related to the googleapis/google-cloudevents-go API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: process A process-related concern. May include testing, release, or the like.

Comments

@grayside
Copy link
Contributor

grayside commented May 4, 2023

Background

The code generator is run nightly, and if there's any diff, a PR is opened.

Currently, the generated tests include the git SHA of the repo as part of declaring the version of the custom generator. As a result, any change to the repo leads to the generator opening a PR / pushing an update.

Proposed Change

The SHA of the code generator still has value, because it allows us to look at generated code and see the specific SHA associated with the file being generated, which may be valuable to contrast library version from latest update to a specific type. However, the value of the overall repo SHA is not so high. Instead of HEAD, let's use the latest commit associated with a change in the generators directory.

Instead of using LibraryVersion:
https://github.com/googleapis/google-cloudevents-go/blob/main/generate-code.sh#L41-L42
https://github.com/googleapis/google-cloudevents-go/blob/main/generators/templates/validationtest.gotpl#L19

We would derive using:

git rev-parse --short HEAD:generators
@grayside grayside added type: process A process-related concern. May include testing, release, or the like. priority: p2 Moderately-important priority. Fix may not be included in next release. labels May 4, 2023
@product-auto-label product-auto-label bot added the api: eventarc Issues related to the googleapis/google-cloudevents-go API. label May 4, 2023
muncus added a commit that referenced this issue Jun 22, 2023
This checksum creates diffs on every test file, on every generator run (e.g. #173 ). This makes it hard to spot the substantial changes.

Removing this for now to make reviewing these prs simpler.

part of #168
muncus added a commit that referenced this issue Jun 22, 2023
This checksum creates diffs on every test file, on every generator run (e.g. #173 ). This makes it hard to spot the substantial changes.

Removing this for now to make reviewing these prs simpler.

part of #168
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: eventarc Issues related to the googleapis/google-cloudevents-go API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: process A process-related concern. May include testing, release, or the like.
Projects
None yet
Development

No branches or pull requests

1 participant