process: slow down generator re-runs #168
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.
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:
The text was updated successfully, but these errors were encountered: