canonical / charmcraft

Collaborate, build and publish charmed operators for Kubernetes, Linux and Windows.
Apache License 2.0
66 stars 71 forks source link

Have to run charmcraft clean after adding a new integration #1654

Closed jdkandersson closed 6 months ago

jdkandersson commented 6 months ago

Bug Description

It seems that, after packing a charm, then adding a new integration in charmcraft.yaml and then re-packing the charm the created charm doesn't have the newly added integration. After running charmcraft clean, the newly added integration does appear.

To Reproduce

Follow this tutorial from https://juju.is/docs/sdk/write-your-first-kubernetes-charm-using-the-paas-app-charmer#heading--enable-juju-config-sample-flask-languagelanguage and the step for adding the mysql integration should fail without running a clean before another pack.

Environment

Using the latest/edge of charmcraft and rockcraft on Ubuntu 22.04 using the flask-framework extension where everything for the charm is defined in charmcraft.yaml

charmcraft.yaml

name: sample-flask

type: charm

bases:
  - build-on:
    - name: ubuntu
      channel: "22.04"
    run-on:
    - name: ubuntu
      channel: "22.04"

# (Required)
summary: A very short one-line summary of the flask application.

# (Required)
description: |
  A comprehensive overview of your Flask application.

extensions:
  - flask-framework

# Uncomment the below for the second run of charmcraft pack
# requires:
#   mysql:
#     interface: mysql_client
#     limit: 1

Relevant log output

juju integrate sample-flask postgresql-k8s
ERROR no relations found
syncronize-issues-to-jira[bot] commented 6 months ago

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-2816.

This message was autogenerated

lengau commented 6 months ago

This will be on latest/edge later today and I'll be including it in the next 3.0 hotfix