charmcraft:spike/CRAFT-2217

Last commit made on 2023-11-29
Get this branch:
git clone -b spike/CRAFT-2217 https://git.launchpad.net/charmcraft

Branch merges

Branch information

Name:
spike/CRAFT-2217
Repository:
lp:charmcraft

Recent commits

027e2bc... by Alex Lowe

spike: arch-dependent resource uploads

CRAFT-2217

4fae04d... by Alex Lowe

build: use ruff snap (#1387)

23bf390... by Jack Shaw

feat: deprecate 'series' in metadata.yaml & patch linter (#1376)

Patch the metadata linter to fail if the 'series' key is present. For a
long time charmcraft has generated a manifest.yaml on pack which has
been used instead series in metadata.

Juju ignores 'series' in metadata for any packed charm (i.e. a charm
with a manifest.yaml)

There is an effort to remove the notion of a series from Juju entirely,
substituting it for bases. As such, Juju is roadmapped to deprecate
support for charms without manifest.yaml files in 3.4, removing support
entirely in 4.0 (i.e. showing an error).

Showing a linter error in `charmcraft analyze` will be a convenient way
to begin communicating this

As a flyby fix, remove whitespace from the end of line in the templates

## QA Steps

```
$ juju download kafka
Fetching charm "kafka" revision 123 using "stable" channel and base "amd64/ubuntu/22.04"
Install the "kafka" charm with:
    juju deploy ./kafka_r123.charm

$ charmcraft analyze ./kafka_r123.charm
Attributes:
- language: python (https://juju.is/docs/sdk/charmcraft-analyzers-and-linters#heading--language)
- framework: operator (https://juju.is/docs/sdk/charmcraft-analyzers-and-linters#heading--framework)
Lint Errors:
- metadata: The metadata.yaml file contains deprecated attribute: series. (https://juju.is/docs/sdk/charmcraft-analyzers-and-linters#heading--metadata)
Lint OK:
- juju-actions: no issues found (https://juju.is/docs/sdk/charmcraft-analyzers-and-linters#heading--juju-actions)
- juju-config: no issues found (https://juju.is/docs/sdk/charmcraft-analyzers-and-linters#heading--juju-config)
- entrypoint: no issues found (https://juju.is/docs/sdk/charmcraft-analyzers-and-linters#heading--entrypoint)

$ unzip kafka.charm
$ rm kafka.charm
(edit metadata.yaml to remove series key)
$ cat metdata.yaml
# Copyright 2023 Canonical Ltd.
# See LICENSE file for licensing details.

description: |
  Kafka is an event streaming platform. This charm deploys and operates Kafka.
display-name: Kafka
issues: https://github.com/canonical/kafka-operator/issues/new
docs: https://discourse.charmhub.io/t/charmed-kafka-documentation/10288
maintainers:
  - Marc Oppenheimer <email address hidden>
name: kafka
source: https://github.com/canonical/kafka-operator
summary: The Charmed Kafka Operator

peers:
  cluster:
    interface: cluster
  restart:
    interface: rolling_op

requires:
  zookeeper:
    interface: zookeeper
  certificates:
    interface: tls-certificates
    limit: 1
    optional: true
  trusted-ca:
    interface: tls-certificates
    optional: true
  trusted-certificate:
    interface: tls-certificates
    optional: true

provides:
  kafka-client:
    interface: kafka_client
  cos-agent:
    interface: cos_agent

storage:
  data:
    type: filesystem
    description: Directories where the log data is stored
    minimum-size: 10G
    location: /var/snap/charmed-kafka/common/var/lib/kafka
    multiple:
      range: 1-

$ zip -r kafka_r123.charm .
$ charmcraft analyze kafka_r123.charm
Attributes:
- language: python (https://juju.is/docs/sdk/charmcraft-analyzers-and-linters#heading--language)
- framework: operator (https://juju.is/docs/sdk/charmcraft-analyzers-and-linters#heading--framework)
Lint OK:
- juju-actions: no issues found (https://juju.is/docs/sdk/charmcraft-analyzers-and-linters#heading--juju-actions)
- juju-config: no issues found (https://juju.is/docs/sdk/charmcraft-analyzers-and-linters#heading--juju-config)
- metadata: no issues found (https://juju.is/docs/sdk/charmcraft-analyzers-and-linters#heading--metadata)
- entrypoint: no issues found (https://juju.is/docs/sdk/charmcraft-analyzers-and-linters#heading--entrypoint)
```

## Documentation changes

https://juju.is/docs/sdk/charmcraft-analyzers-and-linters#heading--metadata
will require updating with the new linter check

90f2362... by Alex Lowe

test: use MATCH in spread tests (#1382)

We've got a few places where we use grep directly in a way that doesn't
guarantee test failure when it should.

9ce6797... by Alex Lowe

release: merge 2.5.1 candidate to main

2e7e023... by Alex Lowe

Merge branch 'main' into release/2.5.1

f5558b8... by Alex Lowe

fix: make snap build on all architectures. (#1377)

fixes #1369

Multi-platform build:
https://launchpad.net/~lengau/+snap/snapcraft-charmcraft-084dfcb7321972fd248f5d75baf555ca

- [x]
[armhf](https://launchpad.net/~lengau/+snap/snapcraft-charmcraft-084dfcb7321972fd248f5d75baf555ca/+build/2296258)
- [x]
[arm64](https://launchpad.net/~lengau/+snap/snapcraft-charmcraft-084dfcb7321972fd248f5d75baf555ca/+build/2296257)
- [x]
[ppc64el](https://launchpad.net/~lengau/+snap/snapcraft-charmcraft-084dfcb7321972fd248f5d75baf555ca/+build/2296256)
([buildlog](https://launchpad.net/~lengau/+snap/snapcraft-charmcraft-084dfcb7321972fd248f5d75baf555ca/+build/2296256/+files/buildlog_snap_ubuntu_jammy_ppc64el_snapcraft-charmcraft-084dfcb7321972fd248f5d75baf555ca_BUILDING.txt.gz))
- [x]
[s390x](https://launchpad.net/~lengau/+snap/snapcraft-charmcraft-084dfcb7321972fd248f5d75baf555ca/+build/2296255)
([buildlog](https://launchpad.net/~lengau/+snap/snapcraft-charmcraft-084dfcb7321972fd248f5d75baf555ca/+build/2296255/+files/buildlog_snap_ubuntu_jammy_s390x_snapcraft-charmcraft-084dfcb7321972fd248f5d75baf555ca_BUILDING.txt.gz))

485a756... by Jon Seager

build: replace `black` with `ruff format` in charmcraft templates (#1378)

As the title suggests! :)

Driveby to bump the default `ops` version to `2.8`

3877731... by Tiago Nobrega

chore(ci): publish feature branches to edge/ (#1373)

This is pretty much a copy-paste of the equivalent yaml from Rockcraft.

Fixes #1372

543b595... by Callahan Kovacs

build(deps): bump craft-providers to 1.19.2 (#1370)

Signed-off-by: Callahan Kovacs <email address hidden>