Skip to content

Extend RegisteredDataStore with upstream storage#1806

Merged
philbrookes merged 3 commits intoKuadrant:mainfrom
philbrookes:feat/registered-upstream-storage
Mar 11, 2026
Merged

Extend RegisteredDataStore with upstream storage#1806
philbrookes merged 3 commits intoKuadrant:mainfrom
philbrookes:feat/registered-upstream-storage

Conversation

@philbrookes
Copy link
Contributor

Summary

  • Adds RegisteredUpstreamKey, RegisteredUpstreamEntry, and TargetRef types to RegisteredDataStore for storing registered upstream configurations per policy
  • Implements full CRUD methods (SetUpstream, GetUpstream, GetAllUpstreams, GetUpstreamsByTargetRef, DeleteUpstream) with concurrency-safe locking
  • Extends ClearPolicyData to also clean up registered upstreams when a policy is removed
  • Updates manager.go to handle the new return value and trigger notifications on upstream changes
  • Marks Extend RegisteredDataStore with upstream storage #1790 as complete in the design doc and adds issue links to remaining TODOs

Review and local verification

# Run the upstream storage unit tests
make test-unit TEST_NAME=TestRegisteredDataStore

# Run all extension package tests
go test -tags unit ./internal/extension/ -v

Verify:

  • All existing RegisteredDataStore tests still pass (ClearPolicyData callers updated from 2 to 3 return values)
  • New upstream CRUD operations work correctly
  • GetUpstreamsByTargetRef filters entries by target reference
  • Concurrent upstream operations are safe (tested with 10 goroutines)
  • Edge cases handled: empty store, non-existent keys, overwrite

Closes #1790

🤖 Generated with Claude Code

@philbrookes philbrookes requested a review from a team as a code owner March 10, 2026 13:20
@philbrookes philbrookes force-pushed the feat/registered-upstream-storage branch from 43db493 to 5372412 Compare March 10, 2026 13:41
@philbrookes philbrookes moved this to Ready For Review in Kuadrant Mar 10, 2026
KevFan
KevFan previously approved these changes Mar 11, 2026
@KevFan KevFan moved this from Ready For Review to In Review in Kuadrant Mar 11, 2026
Add RegisteredUpstreamKey, RegisteredUpstreamEntry, and TargetRef types
to support storing registered upstream configurations per policy. Include
CRUD methods (SetUpstream, GetUpstream, GetAllUpstreams, DeleteUpstream),
filtering by TargetRef (GetUpstreamsByTargetRef), and policy-scoped
cleanup via extended ClearPolicyData. Update manager.go to handle the
new third return value and trigger notifications on upstream changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED

Signed-off-by: Phil Brookes <pbrookes@redhat.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED

Signed-off-by: Phil Brookes <pbrookes@redhat.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Phil Brookes <pbrookes@redhat.com>

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
@philbrookes philbrookes added this pull request to the merge queue Mar 11, 2026
Merged via the queue into Kuadrant:main with commit 51dfcd5 Mar 11, 2026
32 checks passed
@philbrookes philbrookes deleted the feat/registered-upstream-storage branch March 11, 2026 14:00
@github-project-automation github-project-automation bot moved this from In Review to Done in Kuadrant Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Extend RegisteredDataStore with upstream storage

2 participants