Skip to content

馃悰 Clean up stale secret links - #433

Merged
srenatus merged 1 commit into
open-policy-agent:mainfrom
Bankdata:issue-431-clean-up-bundle-secret-links
Oct 1, 2026
Merged

srenatus merged 1 commit into
open-policy-agent:mainfrom
Bankdata:issue-431-clean-up-bundle-secret-links

Conversation

@bdumpp

@bdumpp bdumpp commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

馃挕Reason for Change

Updating a bundle or source to reference a different credentials secret leaves the previous relation in the database. The stale link can keep the old secret in use and prevents deleting it.

Fixes #431.

馃摑 Description of Change

Track the active secret IDs while upserting bundles and sources, then remove stale relation rows with the existing deleteNotIn helper. This also removes the relation when credentials are removed.

Add database regression coverage for bundle and source credential changes and removals, plus a CLI end-to-end test covering the bundle API flow

Signed-off-by: Michael Lautrup <mpp@bankdata.dk>
@bdumpp
bdumpp force-pushed the issue-431-clean-up-bundle-secret-links branch from b79f23c to acb693c Compare October 1, 2026 11:42

@srenatus srenatus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing! LGTM 馃巿

@srenatus
srenatus merged commit 909357a into open-policy-agent:main Oct 1, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

馃悰 Changing a bundle's credentials secret leaves the old secret in use

2 participants