Commit a39d51a
authored
feat(tool/cmd/importconfigs): add update-release-level subcommand (#4520)
A new update-release-level subcommand is added to the importconfigs tool
to parse the release_level attribute from `BUILD.bazel` files in the
googleapis directory.
The API struct in `internal/serviceconfig` is updated to include a
`ReleaseLevels` map. This map is populated by the new command to track
the release level per language for each API, which allows the generator
to determine the appropriate release level dynamically instead of
relying on default values.
The result shows only Go has `release_level` in {lang}_gapic_library
target. To reduce the configuration size, only add the value to API if
it is `alpha` or `beta`.
`internal/servceconfig/sdk.yaml` is updated with:
```sh
go run tool/cmd/importconfigs update-release-level --googleapis=path/to/googleapis
```
For #44351 parent 6fb6bf9 commit a39d51a
12 files changed
Lines changed: 1123 additions & 6 deletions
File tree
- doc
- internal/serviceconfig
- tool/cmd/importconfigs
- bazel
- testdata/test-update-rl
- add-cloud-api/google/cloud/workstations/v1
- add-non-cloud-api/google/non-cloud/v1
- no-change-cloud-api/google/cloud/workstations/v1
- no-change-non-cloud-api/google/non-cloud/v1
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
83 | 88 | | |
84 | 89 | | |
85 | 90 | | |
| |||
0 commit comments