Skip to content

refactor: drop resource cache staleness workarounds - #3218

Draft
utkuozdemir wants to merge 1 commit into
siderolabs:mainfrom
utkuozdemir:drop-uncached-reads
Draft

refactor: drop resource cache staleness workarounds#3218
utkuozdemir wants to merge 1 commit into
siderolabs:mainfrom
utkuozdemir:drop-uncached-reads

Conversation

@utkuozdemir

@utkuozdemir utkuozdemir commented Aug 3, 2026

Copy link
Copy Markdown
Member

All controller reads now go through the controller runtime resource cache. The reads that bypassed the cache were workarounds for the cache serving mutually inconsistent data across resource types, which is now fixed at the state layer: all watches are served from a single shared watch stream, so cached reads are consistent with each other.

Unit tests now run with no resources marked as cached, which effectively disables the cache: the in-memory state they use does not provide the cross-resource event ordering the cache needs, and the cache is exercised by the integration tests against etcd. This can be reverted once the in-memory state provides the same ordering guarantees.

Requires the shared watch stream support in the etcd state backend.

All controller reads now go through the controller runtime resource cache. The reads that bypassed the cache were workarounds for the cache serving mutually inconsistent data across resource types, which is now fixed at the state layer: all watches are served from a single shared watch stream, so cached reads are consistent with each other.

Unit tests now run with no resources marked as cached, which effectively disables the cache: the in-memory state they use does not provide the cross-resource event ordering the cache needs, and the cache is exercised by the integration tests against etcd. This can be reverted once the in-memory state provides the same ordering guarantees.

Requires the shared watch stream support in the etcd state backend.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration/e2e Triggers all e2e tests for Omni

Projects

Status: To Do

Development

Successfully merging this pull request may close these issues.

1 participant