~pebble-dev/pebble-dev-craft-remote-build/+git/snapcraft-pebble-e0755ce84e8f8932f16ee6c752bea8d2:main

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

Branch merges

Recent commits

0233919... by Ben Hoyt

chore: change version to v1.14.0 for release

d0993a2... by Tony Meyer

feat: include check name in notice data for perform-check and recover-check (#444)

For notices of kind `change-updated`, the notice data will include the
`kind` field that is standard for these notices, but also when `kind` is
`perform-check` or `recover-check`, it will also include `check-name`,
set to the name of the check that is being performed or recovered.

This is the Pebble portion of
[OP046](https://docs.google.com/document/d/13ItH8l5ZSmmv9WqZXpqjV8EifZU5e3zxINiNLubnC68/edit).
It is used by Juju ([PR](https://github.com/juju/juju/pull/17655)) and
ops ([PR](https://github.com/canonical/operator/pull/1281)).

---------

Co-authored-by: Ben Hoyt <email address hidden>

c330d5f... by Ben Hoyt

docs: various improvements to "service dependencies" section (#442)

`on-check-failure` is a map of check name to value, so this field
doesn't have a default, you have to add keys and values to the map
explicitly. I believe this incorrect text was just a copy 'n' paste
error.

In addition, I've added a (hopefully-clarifying) paragraph and tweaked
things a bit.

Fixes https://github.com/canonical/pebble/issues/439

a834ab6... by Ben Hoyt

fix(planstate): don't hold planLock while calling plan-changed listeners (#436)

Some listeners do quite a bit of stuff (check manager and log manager),
and they're defined in packages external to the planstate package, so
it's best to avoid holding our plan lock for the duration.

See [spec
OP040](https://docs.google.com/document/d/1cmZ5FWz0efglDAxGRciY5GRyD6KfWJCOe-kjWl6auig/edit#heading=h.po9vomna3y7d).

Also:

- PlanManager doesn't use state and runner, so remove them
- Rename planHandlers to changeListeners to match AddChangeListener

a2881f2... by Ben Hoyt

chore: update version to v1.14.0-dev for development

77c9e06... by Ben Hoyt

chore: update version to v1.13.0 for release

21916a6... by Rafid Bin Mostofa

fix(enter): block --verbose for exec subcommand (#394)

This PR blocks the usage of ``--verbose`` option in "enter" command
whenever the "exec" subcommand follows. Thus, the following will result
in errors:

    pebble enter --verbose [enter-OPTS*] exec [exec-OPTS] <cmd..>

Everything else, however, are kept unchanged. So the following is okay:

    pebble enter [enter-OPTS*] exec [exec-OPTS] <cmd..>

Note that `enter-OPTS*` refer to all "enter" options except `-v`,
`--verbose`.

Resolves https://github.com/canonical/pebble/issues/339.

d822e9f... by Tiexin Guo

docs: create reusable content for how to install guide and the tutorial (#433)

Create some reusable content for the tutorial, how-to-install doc, pebble install verification, and references.

25edfff... by Ben Hoyt

fix(daemon): turn off net/http panic recovery (#350)

By default, Go's `net/http` recovers panics in the `ServeHTTP` goroutine
and keeps serving. However, if a lock is held when the panic happens,
this will mean a complete deadlock and Pebble will go unresponsive. As
far as I know, this hasn't happened yet, but we use snippets without
`defer` like this fairly frequently if it's just a tiny amount of code
and defer is awkward:

```go
st.Lock()
foo := st.Foo()
st.Unlock()
```

If `st.Foo()` or whatever's between the lock and unlock panics,
`net/http` will recover the panic but the lock will still be held. And
in the case of the state lock that basically means all requests are
blocked -- bad!

There's no direct way of opting out of this `net/http` behaviour, so you
have to `recover()` from panics yourself, print the goroutine dump, and
exit.

I've tested this locally, and it prints the goroutine dump and exits
with code 1 on a panic as expected, instead of locking up. It also
handles any panic in the handler or middleware, eg in `logit`.

015ee5f... by Tiexin Guo

docs: a new getting started tutorial for pebble (#421)

Create a new getting started tutorial documentation for Pebble.