Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add secrets watcher backend for notifying of secret revision changes #14450

Merged
merged 1 commit into from
Aug 12, 2022

Conversation

wallyworld
Copy link
Member

Add backend support for watching changes to secrets.

The watcher looks at the secrets consumers collection - we need to add the latest secret revision to the doc and this is updated when a secret is updated. Extra logic was also needed to handle concurrent updates.

The Get/Save secrets consumer methods were moved off the secrets service interface and onto a new interface which is backed by State. The secrets service interface is purely for managing secrets themselves.

Also a couple of driveby fixes to naming.

Checklist

  • Code style: imports ordered, good names, simple structure, etc
  • Comments saying why design decisions were made
  • Go unit tests, with comments saying what you're testing
  • Integration tests, with comments saying what you're testing
  • [ ] doc.go added or updated in changed packages

QA steps

Just unit tests for now, until next PR.

Copy link
Member

@ycliuhw ycliuhw left a comment

Choose a reason for hiding this comment

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

lgtm ty

state/secrets.go Show resolved Hide resolved
@wallyworld
Copy link
Member Author

/merge

1 similar comment
@wallyworld
Copy link
Member Author

/merge

@jujubot jujubot merged commit 7f3226a into juju:develop Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants