feat: Move grpc pbs to shared
This commit is contained in:
@@ -451,10 +451,21 @@ is in `ScopedCollections` (which `scopedCollectionsForPurge` derives from). Ther
|
||||
is no history: a workload list is state, not a record.
|
||||
|
||||
**`proto/vantage/v1/vantage.proto` is documentation, not a generator input.**
|
||||
Both `pb` packages are hand-written JSON-tagged structs over a custom codec, and
|
||||
there are two copies — `agent/internal/grpc/pb` and `server/internal/grpc/pb`.
|
||||
A message added to one must be added to the other and to the `.proto`, in the
|
||||
same commit.
|
||||
`shared/grpc/pb` is hand-written JSON-tagged structs over the custom codec in
|
||||
`shared/grpc/codec`, and it is **one** package shared by both sides — a message
|
||||
added to it must be added to the `.proto` in the same commit, but there is no
|
||||
longer a second Go copy to keep in step. There used to be two
|
||||
(`agent/internal/grpc/pb` and `server/internal/grpc/pb`) and they had already
|
||||
drifted: the agent's `UnimplementedVantageServer` was three methods stale and
|
||||
carried no `ReportWorkloads` at all. The agent links the server half as dead
|
||||
code, which the linker drops.
|
||||
|
||||
This makes `agent` the **fifth** consumer of `shared/`, and the second one CI
|
||||
does not rebuild on a push to main: like `vantagectl`, the agent image is cut by
|
||||
`agent-release.yml` on an `agent/v*` tag, so a wire change reaches the server at
|
||||
the next push and the fleet at the next agent release. That gap existed before
|
||||
too — it is just now a compile error in the same tree rather than a silent
|
||||
mismatch between two copies that both compiled.
|
||||
|
||||
### Status pages
|
||||
|
||||
@@ -1346,7 +1357,10 @@ stale**. `vantagectl` also imports `shared/` and is the exception: it is built
|
||||
by `vantagectl-release.yml`, so a `shared/` fix reaches it only when someone
|
||||
cuts a `vantagectl/v*` tag. That is deliberate — an operator restoring a
|
||||
database should be running a version they can name — but it does mean a
|
||||
`shared/backup` fix is not live until it is released. A change to the workflow file rebuilds everything, since
|
||||
`shared/backup` fix is not live until it is released. `agent` is the same shape
|
||||
of exception since `shared/grpc/pb` moved there: it is built by
|
||||
`agent-release.yml` on an `agent/v*` tag, so a wire change lands on the server
|
||||
at the next push to main and on the fleet only at the next agent release. A change to the workflow file rebuilds everything, since
|
||||
a build arg is baked into the image. So does anything that leaves no
|
||||
trustworthy base commit: a manual `workflow_dispatch`, a new branch, or a
|
||||
force-push whose old head is gone.
|
||||
|
||||
Reference in New Issue
Block a user