-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request juju#18726 from gfouillet/v4/dqlite/resources/wire…
…up/6401-revision-worker juju#18726 > [!WARNING] > Include commits from juju#18654 > > prdesc [x] Wait for merge juju#18654 and rebase This Pull request introduce the support of resources updates: * It add the required logic to insert `potential` resources on application creation * It wire up the revision worker to fetch updates and update revision on potential resources in state. ## Checklist - [X] Code style: imports ordered, good names, simple structure, etc - [X] Comments saying why design decisions were made - [X] Go unit tests, with comments saying what you're testing - [ ] [Integration tests](https://github.com/juju/juju/tree/main/tests), with comments saying what you're testing - [ ] [doc.go](https://discourse.charmhub.io/t/readme-in-packages/451) added or updated in changed packages ## QA steps ### setup We need to make the revision worker pass more often that once a day (unless you are really patient). Apply the following diff: ```diff diff --git a/cmd/jujud-controller/agent/machine.go b/cmd/jujud-controller/agent/machine.go index f552f6d596..cf6c70cb30 100644 --- a/cmd/jujud-controller/agent/machine.go +++ b/cmd/jujud-controller/agent/machine.go @@ -980,7 +980,7 @@ func (a *MachineAgent) startModelWorkers(cfg modelworkermanager.NewModelConfig) Clock: clock.WallClock, LoggingContext: loggingContext, RunFlagDuration: time.Minute, - CharmRevisionUpdateInterval: 24 prdesc time.Hour, + CharmRevisionUpdateInterval: 30 prdesc time.Second, NewEnvironFunc: newEnvirons, NewContainerBrokerFunc: newCAASBroker, NewMigrationMaster: migrationmaster.NewWorker, ``` Build. Create and populate controller ```sh juju bootstrap lxd lxd juju add-model m juju deploy juju-qa-test qa1 --resource foo-file=1 juju deploy juju-qa-test qa2 --resource foo-file=test.txt juju deploy juju-qa-test qa3 --resource foo-file=2 ``` ### Assert after a while (at least 30s) ```sh juju resources qa1 juju resources qa2 juju resources qa3 ``` Expected for qa1 ```sh Resource Supplied by Revision foo-file store 1 [Updates Available] Resource Revision foo-file 2 ``` Expected for qa2 ```sh Resource Supplied by Revision foo-file upload 2025-01-29T16:27 ``` Expected for qa3 ```sh Resource Supplied by Revision foo-file store 2 ``` ## Documentation changes None ## Links **Jira card:** [JUJU\-6401](https://warthogs.atlassian.net/browse/JUJU-6401)
- Loading branch information
Showing
18 changed files
with
751 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.