googleapis / googleapis/google-cloud-go
containeranalysis: all generated code should be autogenerated by automation
- Dominant language
- Go
- Stars
- 4.5k
- Forks
- 1.6k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 109
Description
## v1
Currently we don't regenerate the [google/devtools/containeranalysis/v1](https://github.com/googleapis/googleapis/tree/master/google/devtools/containeranalysis/v1) API.
It was last updated at #10533, where @codyoss made some manual tweaks.
We should figure out how to automate those tweaks so that the library can be kept up-to-date with API changes.
## v1beta1/grafeas
Additionally, the [google/devtools/containeranalysis/v1beta1/grafeas](https://github.com/googleapis/googleapis/tree/master/google/devtools/containeranalysis/v1beta1/grafeas) directory is used by the GAPIC generator to create `grafeas_v1_beta1_client.go`, but the [https://github.com/googleapis/google-cloud-go/tree/main/containeranalysis/apiv1beta1/grafeas/grafeaspb](grafeas/grafeaspb) directory is *not* autogenerated. It was last changed in 2023 in #7482. Fortunately [`grafeas.proto`](https://github.com/googleapis/googleapis/blob/master/google/devtools/containeranalysis/v1beta1/grafeas/grafeas.proto) itself hasn't changed since 2020, but even so, we should regenerate it as part of normal generation to keep up-to-date with protoc changes etc.
`grafeas.proto` makes this harder for us because it's declared with a package under `google.golang.org/genproto`:
```text
option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/grafeas;grafeas";
```
... whereas librariangen has a "flatten" operation which expects all packages to be under `cloud.google.com/go`.
Given how little the v1beta1 API has changed over time (and how much of a snowflake it is), we may want to simply deprecate and eventually remove the client library rather than going to heroic lengths to generate it automatically. We will need to consult the API team first though.
Contributor guide
Assessment
This issue has not been assessed yet.