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

feat(dqlite): Add WatchModelMachines on machine WatchableService #17558

Merged
merged 6 commits into from
Jun 25, 2024

Conversation

cderici
Copy link
Member

@cderici cderici commented Jun 20, 2024

This adds the following:

  • Adds a WatchableService on top of the machine service, and implements the WatchModelMachines (old one is at state/watcher.go) on top of that WatchableService.
  • Adds triggers for machine table (that puts uuid into the change).
  • Return uuid from CreateMachine from the machine state layer
  • Lifts up the uuid creation from the state layer up to the service layer (if we do retries we don't keep regenerating stuff).
  • Renames WatchModelMachines -> WatchMachines and UpsertMachine -> CreateMachine

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

 $ TEST_PACKAGES="./domain/schema/... -count=1 -race" make run-go-tests
 $ TEST_PACKAGES="./domain/machine/... -count=1 -race" make run-go-tests

Links

Jira card: JUJU-6197

domain/machine/service/watcher.go Outdated Show resolved Hide resolved
domain/machine/service/service.go Outdated Show resolved Hide resolved
domain/machine/state/state.go Outdated Show resolved Hide resolved
@cderici cderici force-pushed the watchmodelmachines-on-dqlite branch from ead01dd to e2d8002 Compare June 25, 2024 19:22
@cderici
Copy link
Member Author

cderici commented Jun 25, 2024

/merge

@jujubot jujubot merged commit e6322a9 into juju:main Jun 25, 2024
17 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants