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

Merge snapcore/snapd/state changes #259

Closed

Commits on Jul 23, 2023

  1. Merge snapcore/snapd/state changes as of ffa162ef6b

    State:
    - Add WaitStatus support that allows a task to wait until further action
      to continue its execution. The WaitStatus is treated mostly as
      DoneStatus, except it is not a ready status.
    - Add CopyState function.
    - Add Change.AbortUnreadyLanes.
    - Add Change.CheckTaskDependencies to check if tasks have circular
      dependencies.
    - Add task and change callbacks invoked on a status change.
    - Implement timings.GetSaver interface in state.State. Note, however,
      the snapcore/snapd/timings package that provides the interface is not
      included in this PR. pebble has a similar "timing" package. It might
      be reasonable to introduce "timings" separately to replace the
      "timing" package to keep concerns (state and timings) separated.
    
    State engine:
    - Add StateStarterUp interface to perform possible expensive
      initialisation in a separate StartUp method.
    
    Overlord:
    - Implement the StateStarterUp interface
    
    Daemon:
    - Call Overlord StartUp during the start process to complete its
      initialisation. Note, that there is no obvious requirement to
      introduce this separation for pebble. It can still initialise Overlord
      in New(). The separation was mimicked to maintain better compatibility
      with possible future mergers of the snapcore/snapd/overlord/* changes.
    
    Misc:
    - Add jsonutil package required by the new state's CopyState function.
    - Rename osutil.CanStat to osutil.FileExist.
    - Rename task.FakeTime to task.MockTime.
    - Add testutil.ErrorIs and testutil.DeepUnsortedMatches checkers.
    dmitry-lyfar committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    2632a29 View commit details
    Browse the repository at this point in the history