forked from canonical/snapd
-
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.
o/registrystate: manage accesses to registries (canonical#14544)
* o/registrystate: manage accesses to registries This change changes the registries accesses to use GetTransaction which determines which kind of access it's dealing with (e.g,. snap set, snapctl set, in or out of a hook, registry hook or non-registry, etc) and takes the appropriate action. This omits the concurrency checks and I've also opted to removed the bits allowing reading concurrently if the registry being read is different than the one with a transaction ongoing (this will require changes anyway since we'll add a load-registry change in the future). At the moment, the user API endpoint isn't connected to this yet since that will require more changes to it. Signed-off-by: Miguel Pires <miguel.pires@canonical.com> * o/registrystate: document Context; other improvements Signed-off-by: Miguel Pires <miguel.pires@canonical.com> * o/registrystate: improve comment, names Signed-off-by: Miguel Pires <miguel.pires@canonical.com> * many: simplify registry access for reads Make reads through snapctl go through a different flow than the writes. This will change in the future as the reads will also trigger a change to load data but for now this makes access logic easier to reason about and it's also slightly more correct. Signed-off-by: Miguel Pires <miguel.pires@canonical.com> * o/h/ctlcmd: minor improvements Signed-off-by: Miguel Pires <miguel.pires@canonical.com> * o/registrystate: return callback from GetStoredTransaction Signed-off-by: Miguel Pires <miguel.pires@canonical.com> --------- Signed-off-by: Miguel Pires <miguel.pires@canonical.com>
- Loading branch information
1 parent
3a3af7e
commit 4a721a2
Showing
13 changed files
with
798 additions
and
314 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
Oops, something went wrong.