You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add Teardown and TeardownAndDestroy RPCs to the State service
Allow clients to mark a resource as being destroyed and to delete it atomically without intermediate reads.
Teardown marks a resource as being destroyed in a single round-trip, without first reading it back. The response indicates whether the resource has no pending finalizers and is ready to be destroyed.
TeardownAndDestroy deletes a resource as a single atomic operation. The call marks the resource as being destroyed, blocks until it has no pending finalizers, and then destroys it. This avoids needing to watch the resource between teardown and destroy, which is useful for resources that callers can destroy but not read.
Two new optional interfaces, Teardowner and TeardownAndDestroyer, let CoreState implementations provide native versions of these operations that bypass the default fallback paths. The state wrapper picks them up via type assertion, with the existing logic retained as the fallback for implementations that do not satisfy them. The gRPC client adapter implements both interfaces so that one round-trip reaches the server, transparently falling back when the server returns Unimplemented.
Also rekres the project and bump dependencies.
Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
@@ -65,6 +65,9 @@ RUN --mount=type=cache,target=/root/.cache/go-build,id=runtime/root/.cache/go-bu
65
65
&& mv /go/bin/golangci-lint /bin/golangci-lint
66
66
RUN --mount=type=cache,target=/root/.cache/go-build,id=runtime/root/.cache/go-build --mount=type=cache,target=/go/pkg,id=runtime/go/pkg go install golang.org/x/vuln/cmd/govulncheck@latest \
67
67
&& mv /go/bin/govulncheck /bin/govulncheck
68
+
ARG DIS_VULNCHECK_VERSION
69
+
RUN --mount=type=cache,target=/root/.cache/go-build,id=runtime/root/.cache/go-build --mount=type=cache,target=/go/pkg,id=runtime/go/pkg go install github.com/shanduur/dis-vulncheck@${DIS_VULNCHECK_VERSION} \
70
+
&& mv /go/bin/dis-vulncheck /bin/dis-vulncheck
68
71
ARG GOFUMPT_VERSION
69
72
RUN go install mvdan.cc/gofumpt@${GOFUMPT_VERSION} \
70
73
&& mv /go/bin/gofumpt /bin/gofumpt
@@ -116,8 +119,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build,id=runtime/root/.cache/go-bu
RUN --mount=type=cache,target=/root/.cache/go-build,id=runtime/root/.cache/go-build --mount=type=cache,target=/go/pkg,id=runtime/go/pkg ./hack/govulncheck.sh ./...
122
+
RUN --mount=type=cache,target=/root/.cache/go-build,id=runtime/root/.cache/go-build --mount=type=cache,target=/go/pkg,id=runtime/go/pkg dis-vulncheck -tool=false ./...
0 commit comments