Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Charmcraft 3 breaks charms with multiple run-on architectures #1697

Closed
lengau opened this issue Jun 10, 2024 · 3 comments · Fixed by #1818
Closed

Charmcraft 3 breaks charms with multiple run-on architectures #1697

lengau opened this issue Jun 10, 2024 · 3 comments · Fixed by #1818
Assignees
Labels
Bug Something isn't working triaged

Comments

@lengau
Copy link
Collaborator

lengau commented Jun 10, 2024

Bug Description

For Jammy and below, charms with multiple run-on get the message Architecture 'amd64-arm64-ppc64el-s390x' is not supported. (or similar)

To Reproduce

  1. git clone https://opendev.org/openstack/charm-vault.git
  2. git switch stable/1.8
  3. charmcraft pack (with charmcraft 3)

Environment

Linux charmcraft 3

charmcraft.yaml

type: charm

parts:
  charm:
    plugin: dump
    source: .
    prime:
      - actions/*
      - charmhelpers/*
      - files/*
      - hooks/*
      - lib/*
      - templates/*
      - actions.yaml
      - config.yaml
      - copyright
      - hardening.yaml
      - icon.svg
      - LICENSE
      - Makefile
      - metadata.yaml
      - README.md

bases:
  - build-on:
      - name: ubuntu
        channel: "22.04"
        architectures:
          - amd64
    run-on:
      - name: ubuntu
        channel: "22.04"
        architectures: [amd64, s390x, ppc64el, arm64]

Relevant log output

2024-06-10 14:08:02.305 Starting charmcraft, version 3.0.0.post46+ga44c03e
2024-06-10 14:08:02.305 Log verbosity level set to BRIEF
2024-06-10 14:08:02.305 Configuring application...
2024-06-10 14:08:02.305 Preparing application...
2024-06-10 14:08:02.306 Build plan: platform=None, build_for=None
2024-06-10 14:08:02.307 Loading project file '/home/lengau/Work/Code/charm-nova-compute/charmcraft.yaml'
2024-06-10 14:08:02.309 Warning: use of 'prime' in a charm part is deprecated and no longer works, see https://juju.is/docs/sdk/include-extra-files-in-a-charm
2024-06-10 14:08:02.339 Architecture 'amd64-arm64-ppc64el-s390x' is not supported.
2024-06-10 14:08:02.340 Traceback (most recent call last):
2024-06-10 14:08:02.340   File "/snap/charmcraft/3838/lib/python3.10/site-packages/craft_application/application.py", line 508, in run
2024-06-10 14:08:02.340     self.services.project = self.get_project(
2024-06-10 14:08:02.340   File "/snap/charmcraft/3838/lib/python3.10/site-packages/craft_application/application.py", line 303, in get_project
2024-06-10 14:08:02.340     yaml_data = self._transform_project_yaml(yaml_data, build_on, build_for)
2024-06-10 14:08:02.340   File "/snap/charmcraft/3838/lib/python3.10/site-packages/craft_application/application.py", line 601, in _transform_project_yaml
2024-06-10 14:08:02.340     self._expand_environment(yaml_data=yaml_data, build_for=build_for)
2024-06-10 14:08:02.340   File "/snap/charmcraft/3838/lib/python3.10/site-packages/craft_application/application.py", line 629, in _expand_environment
2024-06-10 14:08:02.340     info = craft_parts.ProjectInfo(
2024-06-10 14:08:02.340   File "/snap/charmcraft/3838/lib/python3.10/site-packages/craft_parts/infos.py", line 99, in __init__
2024-06-10 14:08:02.340     self._set_machine(arch)
2024-06-10 14:08:02.340   File "/snap/charmcraft/3838/lib/python3.10/site-packages/craft_parts/infos.py", line 333, in _set_machine
2024-06-10 14:08:02.340     raise errors.InvalidArchitecture(arch)
2024-06-10 14:08:02.340 craft_parts.errors.InvalidArchitecture: Architecture 'amd64-arm64-ppc64el-s390x' is not supported.
2024-06-10 14:08:02.340 Make sure the architecture name is correct.
2024-06-10 14:08:02.340 Recommended resolution: Make sure the architecture name is correct.
2024-06-10 14:08:02.340 Full execution log: '/home/lengau/.local/state/charmcraft/log/charmcraft-20240610-140802.305265.log'
@lengau lengau added the Bug Something isn't working label Jun 10, 2024
@jadonn
Copy link

jadonn commented Jun 13, 2024

This bug is causing charm builds for OpenStack charms to fail. I have builds on charmcraft 3.x latest/edge failing with this error:

2024-06-13 07:40:46.146506 | focal-medium | Architecture 'amd64-arm64-ppc64el-s390x' is not supported.

This started happening sometime between charmcraft snap version 3.0.0.post46+ga44c03e revision 3838 and version 3.0.0.post51+gfb8680e revision 3937. Here is a successful CI test run on 3.0.0.post46+ga44c03e and here is a failed CI test run on 3.0.0.post51+gfb8680e.

I can also confirm this is still happening when I try to build this Vault charm locally using version version 3.0.0.post52+gbcb1903.

If it helps, here is the charmcraft.yaml file for the affected charm.

@lengau lengau added the triaged label Jul 16, 2024
Copy link

Thank you for reporting us your feedback!

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

This message was autogenerated

@lengau
Copy link
Collaborator Author

lengau commented Jul 23, 2024

This is blocked by canonical/craft-application#394, but that should be a fairly simple fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants