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

o/registrystate: manage accesses to registries #14544

Merged
merged 7 commits into from
Oct 15, 2024

Commits on Sep 27, 2024

  1. 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>
    MiguelPires committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    00b806c View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2024

  1. o/registrystate: document Context; other improvements

    Signed-off-by: Miguel Pires <miguel.pires@canonical.com>
    MiguelPires committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    8ac66ce View commit details
    Browse the repository at this point in the history

Commits on Oct 8, 2024

  1. Configuration menu
    Copy the full SHA
    895a6b3 View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2024

  1. o/registrystate: improve comment, names

    Signed-off-by: Miguel Pires <miguel.pires@canonical.com>
    MiguelPires committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    8c2c328 View commit details
    Browse the repository at this point in the history
  2. 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>
    MiguelPires committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    c268103 View commit details
    Browse the repository at this point in the history
  3. o/h/ctlcmd: minor improvements

    Signed-off-by: Miguel Pires <miguel.pires@canonical.com>
    MiguelPires committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    6fcf0c8 View commit details
    Browse the repository at this point in the history

Commits on Oct 15, 2024

  1. o/registrystate: return callback from GetStoredTransaction

    Signed-off-by: Miguel Pires <miguel.pires@canonical.com>
    MiguelPires committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    b250f2b View commit details
    Browse the repository at this point in the history