Repository navigation
Conversation
steiler
added this pull request to stack #494
September 23, 2026 12:32
Open
steiler
force-pushed
the
cache-write-backend
branch
from
October 5, 2026 09:58
d6a3e67 to
dac3fa7
Compare
alexandernorth
approved these changes
Oct 9, 2026
steiler
force-pushed
the
cache-write-backend
branch
from
October 14, 2026 08:18
dac3fa7 to
2c641e4
Compare
steiler
removed this pull request from stack #494
October 14, 2026 08:20
steiler
added this pull request to stack #494
October 14, 2026 08:20
steiler
removed this pull request from stack #494
October 14, 2026 08:21
steiler
added this pull request to stack #528
October 14, 2026 08:21
steiler
force-pushed
the
cache-write-backend
branch
from
October 14, 2026 09:06
97c7272 to
0577d08
Compare
…C commit Pins to sdcio/sdc-protos@2e109b71c1dd — a rebase of the dangling last-applied-snapshot-write-at-apply branch's ConfigReadService -> ConfigSnapshotService rename + Modify/Delete RPC commit onto this stack's cache-read-backend tip (sdc-protos#134). Opened as sdcio/sdc-protos#135; swap for a tagged release once #123/#134/#135 merge. Signed-off-by: Markus Vahlenkamp <markus.vahlenkamp@nokia.com>
IntentModify/IntentDelete now write through to config-server's ConfigSnapshotService synchronously at apply time, replacing the noopIntentWriter composition ADR 0001 used. Last-applied tracking under this backend now matches Cache.Type: local's write-at-apply timing, closing the ghost-intent race where a deleted intent stayed last-applied until the next best-effort snapshot refresh. - ConfigServerCache gains a LocalConfigClient seam (read+write) and implements IntentWriter directly; NewConfigServerClient no longer composes noopIntentWriter. - New tree-to-JSON flattener (document_export.go) converts an applied tree_persist.Intent into the flat Document shape the read path already understands, for GRPCConfigClient.Modify's wire payload. - Fix the log-only IntentDelete failure in lowlevelTransactionSet: a failed delete-write now hard-fails the transaction, matching IntentModify's existing behavior (ADR 0003's asymmetry fix). - GRPCConfigReader/FakeLocalConfigReader renamed to GRPCConfigClient/FakeLocalConfigClient; mocks/mockconfigread regenerated against the renamed ConfigSnapshotServiceClient. - Tests: seam-level modify/delete round trips, malformed-datastore-name coverage for the new write callers, and datastore-level regression tests for delete-failure hard-fail and rollback-restores-a-deleted- intent. - Commit the previously-drafted ADR 0003 and CONTEXT.md Last-applied term update. Adapted from origin/config-server-cache-backend's 52d842e: reused the existing buildFixtureIntent test helper from sync_test.go instead of duplicating it, fixed the two new IntentGetAll mock expectations to the importer.IntentAdapter channel type (ticket 05's IntentAdapter/ ImportConfigAdapter split postdates this commit's original branch), and dropped ticket06's now-superseded TestConfigServerCache_WritesAreNoOps. Signed-off-by: Markus Vahlenkamp <markus.vahlenkamp@nokia.com>
Spec review of the real-IntentWriter commit found the delete-no-rehydration checklist item was backed by a weaker test than described, and the rollback-restore test only checked the intent's name, not its content. - Add TestConfigServerBackend_DeleteApply_NoRehydration: wires a real *cache.ConfigServerCache over configserver.FakeLocalConfigClient (not a generic mock) through two TransactionSet calls and asserts the exact regression signature named in the ticket — LoadAllButRunningIntents does not rehydrate a deleted intent. - Strengthen TestTransactionRollback_RestoresDeletedIntent to assert the restored leaf content, not just the intent name. - Clarify ConfigServerCache's ignoreNonExisting doc comment: unused by today's LocalConfigWriter implementations, not an inherent design guarantee. - Note in GRPCConfigClient.Modify why the wire payload is plaintext (ADR 0003's "encrypted payload" describes the persisted record; config-server encrypts on receipt, same as northbound SensitiveConfig). Standards review separately flagged Document<->ConfigEntry mapping duplicated across grpc.go/document_export.go; added configEntryFromDocument as the Modify-side counterpart to the existing documentFromEntry to remove the wire-mapping half of that duplication. Signed-off-by: Markus Vahlenkamp <markus.vahlenkamp@nokia.com>
Renames doc/comment references from ConfigReadService to ConfigSnapshotService in pkg/cache/CONTEXT.md, pkg/cache/configserver.go, pkg/cache/configserver/localread.go, and pkg/config/datastore.go. Follow-up carried over from ticket 06, which deliberately deferred it until ConfigSnapshotService actually existed (landed by the real-IntentWriter commit earlier in this ticket). Signed-off-by: Markus Vahlenkamp <markus.vahlenkamp@nokia.com>
Drop the unused no-op IntentWriter and dual NewConfigServerClient wrapper, and align comments/ADRs with real config-server last-applied writes. Kept HEAD's already-diverged always-union sensitive-redaction comments in intent_rpc.go/sensitive_path_union_test.go (ticket 04 rewrote that scoping independently of this source branch's snapshot at the time) rather than reapplying this commit's now-stale 'scoped semantics' wording verbatim. Signed-off-by: Markus Vahlenkamp <markus.vahlenkamp@nokia.com>
Colocate Intent flatten, blob merge, and NewImportAdapter so Modify->Get round-trips live in one package; configserver keeps only the remote port. Adapted the rename/rename conflict against ticket 06's own configserver/ package layout (which had already moved importer.go/merge.go there from pkg/tree/importer/configserver): re-homed those four files into configsnapshot instead, and kept NewImportAdapter returning importer.IntentAdapter (ticket 05's split) rather than this commit's original pre-split importer.ImportConfigAdapter return type. Signed-off-by: Markus Vahlenkamp <markus.vahlenkamp@nokia.com>
ADR 0003 already merged the wire into one ConfigSnapshotService; nothing typed against Reader or Writer alone, so the half-interfaces and half-files only mirrored a split the adapters refuse. Align the Go port name with the glossary term. Signed-off-by: Markus Vahlenkamp <markus.vahlenkamp@nokia.com>
Move split/strip next to the backend and keep join as a single helper behind Document.IntentName so the encoding story lives with its owners. Follow-up carried over from ticket 06 (deliberately deferred until configsnapshot's own document.go existed, which this ticket's 6f0d373 equivalent landed earlier). Signed-off-by: Markus Vahlenkamp <markus.vahlenkamp@nokia.com>
… types.UnknownOwner Extracted the orthogonal, no-behavior-change half of f0c91db (from origin/config-server-cache-backend): the ghost-intent exclusion mechanism that commit also removed was never added to this stack in the first place (ticket 05 skipped 10652b4 entirely), so there's nothing to revert here — just the pure magic-string cleanup, done as its own tiny commit per the ticket 07 notes. Signed-off-by: Markus Vahlenkamp <markus.vahlenkamp@nokia.com>
docs/architecture.md was never split into this repo's history — fold the two facts it was cited for (config-server as sole northbound Intent writer; cold-start recovery on the control plane) inline instead of pointing at a file that doesn't exist. Extracted the pkg/cache-relevant sliver of origin/config-server-cache-backend's 67f4bdf, which otherwise spans an unrelated repo-wide docs/agent-process reorg out of scope for this ticket. Signed-off-by: Markus Vahlenkamp <markus.vahlenkamp@nokia.com>
New tests from ticket 03 referenced treetypes.NewSensitivePathIndex, which does not exist; match the rest of the file and Datastore wiring. Signed-off-by: Markus Vahlenkamp <markus.vahlenkamp@nokia.com>
steiler
force-pushed
the
cache-write-backend
branch
from
October 14, 2026 09:09
0577d08 to
ed7e491
Compare
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket 07 of the #460 + #471 PR-split reorg
(see
graph.md/index.mdin the tracking gist for the full stack). Base:cache-read-backend(#496).Scope
Real
IntentWriterforCache.Type: config-server:IntentModify/IntentDeletewritethrough to config-server's
ConfigSnapshotServicesynchronously at apply time (ADR 0003),closing the ghost-intent race where a deleted intent stayed last-applied until the next
best-effort refresh.
Cross-repo dependency
Depends on sdcio/sdc-protos#135, which renames
ConfigReadServicetoConfigSnapshotServiceand addsModify/DeleteRPCs — a rebase ofthe dangling
last-applied-snapshot-write-at-applybranch's5a14ea0onto this stack'scache-read-backendtip (sdc-protos#134).go.modis pinned to that rebased commit; swap fora tagged release once
#123/#134/#135merge.What shipped
ConfigServerCachegains aconfigserver.ConfigSnapshotClientport (read+write) andimplements
IntentWriterdirectly —InstanceIntentModify/InstanceIntentDeletewritethrough synchronously, at the same moment
TransactionSet's apply loop calls them, matchingCache.Type: local's write-at-apply timing.configsnapshot.DocumentFromIntent) converts an appliedtree_persist.Intentinto the flatDocumentshape the read path already understands, forthe wire
Modifypayload.IntentDeletefailure inlowlevelTransactionSet: a failed delete-writenow hard-fails the transaction, matching
IntentModify's existing behavior (ADR 0003'sasymmetry fix).
GRPCConfigClient/FakeConfigSnapshotClientimplement the collapsedConfigSnapshotClientport (renamed from the read-only
GRPCConfigReader/FakeLocalConfigReader); dropped thehalf-split
LocalConfigReader/LocalConfigWriterinterfaces entirely once nothing was typedagainst either alone.
NewImportAdapter) intoits own
pkg/cache/configsnapshotpackage, so Modify→Get round-trips live in one place;pkg/cache/configservernow owns only the remoteConfigSnapshotClientport.splitDatastoreName/lookupConfigName)next to
ConfigServerCacheinpkg/cache/configserver_names.go.noopIntentWriterand the dualNewConfigServerClientwrapper —Server.createConfigServerCacheClientcomposescache.NewConfigServerCachedirectly.write callers, and datastore-level regression tests for delete-failure hard-fail and
rollback-restores-a-deleted-intent (content, not just name).
"unknown"owner literals across the fourYANG validators with a new
types.UnknownOwnerconstant (no behavior change).pkg/cache/docs/adr/0003-config-server-write-path-real-last-applied-writes.md)and the
CONTEXT.mdLast-applied/ConfigSnapshotService/Namespaced-name glossary updates.Adapted from the source branch
52d842e/7f4f4da/22899e2/6f0d373/b3f52c6fromorigin/config-server-cache-backend, plus ticket 06's deferred follow-ups706ecb6/2e8ffc6,re-resolving each against this stack's actual, narrower type shapes (ticket 05's
IntentAdapter/ImportConfigAdaptersplit, ticket 06'spkg/cache/configserverpackagelayout) rather than the source branch's pre-split/pre-relocation originals.
buildFixtureIntenttest helper fromsync_test.goinstead ofduplicating it, and fixed two new
IntentGetAllmock expectations to theimporter.IntentAdapterchannel type.TestConfigServerCache_WritesAreNoOps/TestCreateConfigServerCacheClient_WritesAreNoOps(writes are real now, not no-ops).10652b4/b3ca60d/f0c91db's ghost-exclusionmechanism (net-cancelling in the source history; never added to this stack in the first
place — ticket 05 already skipped
10652b4) and181394c(superseded — ticket 06 alreadybuilt
InstanceCreate's empty-Intent seeding in correctly).b27ab78/15b7efd(net-zerolock-retry pair) and
2c28a90/69aab56/6c1bf7d(local-dev cruft / empty CI retriggers)also dropped, consistent with prior tickets.
pkg/cache/-relevant sliver of67f4bdf(a deaddocs/architecture.mdreference in ADR 0001) rather than that commit's much larger, unrelated repo-wide docs/agent-
process reorg.
0525b9d(CI-failure investigation notes for a fix that landed in config-server/integration-tests, not here) dropped entirely, per the ticket's own note.
.scratch/planning artifacts, consistent with prior tickets.Verification
go build ./...,go vet ./...,go test ./...(full repo), andgolangci-lint run ./...all pass.