~pebble-dev/+git/snapcraft-pebble-b9e1ae3b8e1a4f709325bce95b7bbea5:main

Last commit made on 2024-02-15
Get this branch:
git clone -b main https://git.launchpad.net/~pebble-dev/+git/snapcraft-pebble-b9e1ae3b8e1a4f709325bce95b7bbea5
Only 🤖 Pebble Dev can upload to this branch. If you are 🤖 Pebble Dev please log in for upload directions.

Branch merges

Recent commits

cf052a4... by Ben Hoyt

Bump version to v1.8.0 for release

eab0015... by Ben Hoyt

fix(servstate): don't hold both servicesLock and state lock at once (#359)

* fix(servstate): don't hold both servicesLock and state lock at once

This avoids the 3-lock deadlock described in
https://github.com/canonical/pebble/issues/314. Other goroutines may be
holding the state lock and waiting for the services lock, so it's
problematic to acquire both locks at once. Break that part of the
cycle.

We could do this inside serviceForStart/serviceForStop by manually
calling Unlock() sooner, but that's error-prone, so continue using
defer, but have the caller write the task log (which needs the state
lock) after the services lock is released.

* Add regression test for the deadlock issue

This test consistently FAILs without the fix in this PR, but
consistently PASSes with the fix in this PR. The repro is basically
as per the instructions at
https://github.com/canonical/pebble/issues/314#issuecomment-1938053965

7c635e4... by Ben Hoyt

fix(servstate): reduce scope of holding ServiceManager.planLock (#355)

* Don't lock unnecessarily around userFromRequest

There's also a bug here if userFromRequest starts returning an err:
we're not unlocking in the error case.

userFromRequest does nothing right now, so it's a bit silly to lock.
Just remove the locking altogether and get rid of both issues.

* Reduce scope of holding ServiceManager.planLock

In most cases we're just reading from m.plan fields (Services,
DefaultServiceNames, and so on), so we can use m.Plan(), which holds
the plan lock only for the duration of fetch m.plan -- this is safe,
because we never mutate what's inside m.plan, we only replace it (in
updatePlan).

For the cases we are updating the plan (AppendLayer, CombineLayer,
SetServiceArgs), we still need acquirePlan.

In ServiceManager.ServiceLogs, we don't need to acquire the plan lock
at all (m.plan isn't used).

bb59b16... by Thomas Perl

daemon: make ucrednetGet() return *ucrednet (#357)

This ports https://github.com/snapcore/snapd/pull/10126 from snapd,
so that ucrednetGet() has the same return type.

This change is in preparation for porting the accessChecker API
from snapd (https://github.com/snapcore/snapd/pull/10127):
https://github.com/canonical/pebble/pull/358

0a1127e... by Harry Pidcock

Bump critical dependencies. (#353)

55b78b4... by Maksym Medvied

fix(cmdstate): use imperative language and upper case for the task summary (#348)

e494ff2... by Dmitry Lyfar <email address hidden>

feat(state): crossport latest changes from snapd/overlord/state (#344)

There are several major changes to the state package:

* 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 ready status.
* Add Change.AbortUnreadyLanes.
* Add Change.CheckTaskDependencies to check if tasks have circular
  dependencies.
* Add task and change callbacks invoked on a status change.
* Update clients of the State.Get to use a new NoStateError to check if
  a desired key is present.
* Take StartOfOperationTime as a Prune parameter.

df7277e... by Oliver Calder

tests(daemon): improve test coverage of notices API (#346)

This is a backport of a fix from the snapd port of pebble notices.
The original commit can be found at:

https://github.com/snapcore/snapd/pull/13434/commits/027ae88e2e57e6d930c142c890e419ae362db70c

Signed-off-by: Oliver Calder <email address hidden>

ecac3d4... by Cristovao Cordeiro

ci(snap): cope with concurrent builds (#341)

At the moment, the Pebble release process involves
a series of 3 commits under a very short amount of
time. GitHub's concurrency flag is being used to
cope with this, but it is unable to wait for
pending workflow runs, which raises the risk of
a Release workflow cancelling the previous
commit workflow, where the snap is being built,
if the run is pending, waiting for a GH runner.

This commit forces the snap build to happen on
releases also.

bbd5ab2... by Ben Hoyt

Revert "Bump version to v1.7.0 for release"

This reverts commit 3abbadccd2d771b8032e30b7193ec6b7d63f853f.