~pebble-dev/+git/snapcraft-pebble-7253185d7869626fe49c18f8ca59609c:main

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

Branch merges

Recent commits

4b5f254... by Ben Hoyt

Reinstate GitHub Actions snap workflow (on latest release branch)

18ceb69... by Ben Hoyt

Bump version up to v1.10.2 for release

a5f6f06... by Ben Hoyt

fix(daemon): require admin access for POSTs and file pull API (#406)

Most of this was introduced in PR #358, when we ported the AccessChecker
changes from snapd, but accidentally set all the WriteAccess fields to
UserAccess{} instead of AdminAccess{}. Previously there was a
r.Method=="GET" check in Command.canAccess that handled this case.

Additionally:

- We lock down the files "pull" API to require admin. Even though it's a
read (GET), this meant any user could potentially read sensitive files.
- We lock down the task-websocket endpoint to admin. This is a GET
endpoint, but these websockets are used by exec to send stdin/out/err
and commands to the exec'd process, so they should require admin too.

I've added some tests for these to ensure we don't accidentally change
them in future, without noticing. How valuable these tests are I'm not
sure, as they only cover a subset of the API endpoints, but it seems
better than nothing.

a84efd8... by Ben Hoyt

Bump up version for v1.10.1 release

c6af96b... by Ben Hoyt

feat(client): add change-update notice type (#401)

Just the addition of the constant.

This was missed earlier when adding the change-update notice.

067be31... by Ben Hoyt

Delete GitHub Actions snap workflow on 1.0-maintenance branch

852f07d... by Ben Hoyt

Bump version to v1.10.0 for release

345d13c... by Ben Hoyt

fix(daemon): improve health state lock test, remove LockCount (#373)

As Harry pointed out at
https://github.com/canonical/pebble/pull/369#discussion_r1505423350,
there's a much simpler way to test this without needing a new State
method like LockCount. Just acquire the state lock, then call the
endpoint. If it times out, we know it was trying to acquire the lock.

In addition, fix an issue where the health endpoint would still hold the
state lock if it returned an error. Fix those and add a test for that
too.

0d00024... by Ben Hoyt

fix(taskrunner): consistent, nicer formatting for task failed log (#391)

This changes this log:

```
2024-03-21T06:37:37.224Z [pebble] [change 32 "Start service \"svc1\"" task] failed: cannot start service: exited quickly with code 1
```

To this, which is more consistent with the formatting of the other
Pebble logs:

```
2024-03-21T06:43:09.559Z [pebble] Change 33 task (Start service "svc1") failed: cannot start service: exited quickly with code 1
```

This log was introduced in this commit:

https://github.com/canonical/pebble/commit/e494ff2eed86799ce5756ae02f9442b890c3472f#diff-e8b7c8da8654dde95838cfa0cc4b497cdd32050ea3a1bf0640e6404303aef0d6R294
which was pulled across from snapd, which originally added it here:
https://github.com/snapcore/snapd/commit/8b2a5a8b9b62408e4d549fde3d231f2775dce3b9

fc1f14b... by Thomas Perl

fix(help): DefaultDir to personality, allow overriding header and footer (#397)

Just like `ProgramName` and `DisplayName` can already be customized via
public vars in the `cmd` package, `DefaultDir` also looks like a perfect
candidate to customize this way (and assembling the help text can then
be done using `{{.DefaultDir}}`).

In addition, `cli.HelpHeader` and `cli.HelpFooter` are made public, so
that they can be extended and overridden.