treat delete path not found as success#439
Conversation
| } | ||
| needle := ops.ErrNavigateSdcpbPathNotFound.Error() | ||
| for _, e := range intentErrors { | ||
| if !strings.Contains(e, needle) { |
There was a problem hiding this comment.
Are we not able to use errors.Is or other errors.* functions? do we get the errors as anything but strings?
There was a problem hiding this comment.
@steiler if you expose these errors in proto files this might be the better solution.
There was a problem hiding this comment.
what do you mean exactly? expose an error in the sdcpb repo, as a golang error or something proto specific?
There was a problem hiding this comment.
Normally we have transport errors that are covered in the gRPC transport layer, but these are application errors we need to expose in the proto as part of the result or so.
| github.com/prometheus/client_golang v1.23.2 | ||
| github.com/prometheus/client_model v0.6.2 | ||
| github.com/prometheus/prometheus v0.309.1 | ||
| github.com/sdcio/data-server v0.0.69-0.20260506072726-3d7d03086dfa |
There was a problem hiding this comment.
We should decide if we really want to deal with a strict import of data-server in config-server
There was a problem hiding this comment.
we will but so far there is no tagged version that has this capability and the alternative is defining our own errors.
Fixes **idempotent delete** when the target path is **already absent** from the internal config tree: `writeBackSyncTree` → `DeleteBranch` no longer fails on `NavigateSdcpbPath` “path not found”, so **TransactionSet** can complete successfully instead of surfacing a hard RPC error that **config-server** treated as unrecoverable. **Domain:** `ops.ErrNavigateSdcpbPathNotFound` stays in **data-server**; `DeleteBranch` treats it as **no-op** (aligned with existing `ApplyToRunning` / `sync` behavior). **No** extra gRPC mapping or **sdc-protos** wire helpers. **Relation to [config-server#439](sdcio/config-server#439) / [#433](sdcio/config-server#433 addresses the **root cause** so string-matching or importing **data-server** errors in config-server for this case should be **unnecessary** once this server version is in use.
handle delete path not found as success