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

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

Branch merges

Recent commits

35e2b7c... by Ben Hoyt

feat(cli): identities CLI commands (#431)

This adds the CLI commands for identities (part of [spec
OP043](https://docs.google.com/document/d/1nASgUt-piV94i1cpFsbEPRk_xFbZt8AskgL97gh1Dgg/edit)),
specifically:

* `identities`: list all identities
* `identity`: show details for a single named identity
* `add-identities`: add one or more new identities
* `update-identities`: update one or more existing identities
(`--replace` for replace operation)
* `remove-identities`: remove one or more identities

In addition, this updates `pebble run` to support an `--identities
<file>` option to allow seeding initial identities when running the
daemon.

d3a84b0... by Ben Hoyt

feat(client): Go client for identities (#430)

This adds the Go client types and methods for identities (part of [spec
OP043](https://docs.google.com/document/d/1nASgUt-piV94i1cpFsbEPRk_xFbZt8AskgL97gh1Dgg/edit)),
specifically:

* `Identity` and `IdentityAccess` types, with access level constants
* `Identities`
* `AddIdentities`
* `UpdateIdentities`
* `ReplaceIdentities`
* `RemoveIdentities`

4e6c5f6... by Ben Hoyt

feat(daemon): identities API endpoints (#429)

This adds the API endpoints for identities ([spec
OP043](https://docs.google.com/document/d/1nASgUt-piV94i1cpFsbEPRk_xFbZt8AskgL97gh1Dgg/edit)),
specifically:

* `GET /v1/identities`: list all identities (read/user access)
* `POST /v1/identities`: modify identities with action `add`, `update`,
`replace`, `remove` (admin access)

9490b2d... by Ben Hoyt

feat(state): core of reading/writing identities in state (#428)

This adds code and tests for the state core of identities ([spec
OP043](https://docs.google.com/document/d/1nASgUt-piV94i1cpFsbEPRk_xFbZt8AskgL97gh1Dgg/edit#heading=h.a291qhvyhsw3)).

There's a new `map[string]*Identity` in state, which is marshalled via
`marshalledIdentity` to disk. The marshalling for API requests is done
by the `apiIdentity` type -- these are separate to ensure that the API
(default) `MarshalJSON` for `Identity` does not include secrets (in
future when we have identity types that include secrets; there's only
user-id for now). So that's why there's a few more types and a bit more
boilerplate than is necessary right now.

The new public `State` methods are:

* `AddIdentities`: add new identities to the system
* `UpdateIdentities`: update existing identities in the system
* `ReplaceIdentities`: replace the given identities in the system; this
allows adding new ones, updating existing ones, and removing identities
(nil/null means remove)
* `RemoveIdentities`: remove existing identities in the system
* `Identities`: list all identities

Each of the `FooIdentities` modification functions validates that the
identities are valid, and that the user-ids are unique, before applying
to state.

dc996b4... by Ben Hoyt

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

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