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.2 not accepting non-vectorised build-on and build-for #1874

Closed
lengau opened this issue Sep 4, 2024 · 1 comment
Closed

charmcraft 3.2 not accepting non-vectorised build-on and build-for #1874

lengau opened this issue Sep 4, 2024 · 1 comment
Labels
Bug Something isn't working triaged

Comments

@lengau
Copy link
Collaborator

lengau commented Sep 4, 2024

Bug Description

See: https://matrix.to/#/!LhFxJIPEcCacgdMghH:ubuntu.com/$h_KICbWryOMQQcmQ6FPZzXro0aFp-Qiyk8tbz_obrRg

@wolsen: hmm, I noticed a difference between charmcraft 3.1.2 and charmcraft 3.2.0 which is a bit confusing to me. This charmcraft.yaml file (https://opendev.org/openstack/charm-cinder-backup/src/branch/master/charmcraft.yaml) works fine for 3.1.2, but fails on 3.2.0 as its expecting that the build-on and build-for stanzas to contain lists of architectures

To Reproduce

n/a

Environment

n/a

charmcraft.yaml

type: charm

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

base: ubuntu@24.04
platforms:
 amd64:
   build-on: amd64
   build-for: amd64
 arm64:
   build-on: arm64
   build-for: arm64
 ppc64el:
   build-on: ppc64el
   build-for: ppc64el
 s390x:
   build-on: s390x
   build-for: s390x

Relevant log output

Logging execution to '/root/.local/state/charmcraft/log/charmcraft-20240904-124944.844686.log'
Bad charmcraft.yaml content:
- input should be a valid list (in field 'platforms.amd64.build-on')
- input should be a valid list (in field 'platforms.amd64.build-for')
- input should be a valid list (in field 'platforms.arm64.build-on')
- input should be a valid list (in field 'platforms.arm64.build-for')
- input should be a valid list (in field 'platforms.ppc64el.build-on')
- input should be a valid list (in field 'platforms.ppc64el.build-for')
- input should be a valid list (in field 'platforms.s390x.build-on')
- input should be a valid list (in field 'platforms.s390x.build-for')
Build failed
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/lpbuildd/target/build_charm.py", line 119, in run
    self.build()
  File "/usr/lib/python3/dist-packages/lpbuildd/target/build_charm.py", line 109, in build
    self.run_build_command(args, env=env, cwd=build_context_path)
  File "/usr/lib/python3/dist-packages/lpbuildd/target/operation.py", line 62, in run_build_command
    return self.backend.run(args, cwd=cwd, env=full_env, **kwargs)
  File "/usr/lib/python3/dist-packages/lpbuildd/target/lxd.py", line 718, in run
    subprocess.check_call(cmd, **kwargs)
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['lxc', 'exec', 'lp-noble-arm64', '--env', 'LANG=C.UTF-8', '--env', 'SHELL=/bin/sh', '--env', 'http_proxy=http://10.10.10.1:8222/', '--env', 'https_proxy=http://10.10.10.1:8222/', '--env', 'GIT_PROXY_COMMAND=/usr/local/bin/lpbuildd-git-proxy', '--env', 'SNAPPY_STORE_NO_CDN=1', '--', '/bin/sh', '-c', 'cd /home/buildd/cinder-backup/. && linux64 charmcraft pack -v --destructive-mode']' returned non-zero exit status 1.
Revoking proxy token...
RUN: /usr/share/launchpad-buildd/bin/in-target scan-for-processes --backend=lxd --series=noble --arch=arm64 CHARMRECIPEBUILD-27678
Scanning for processes to kill in build CHARMRECIPEBUILD-27678
@lengau lengau added Bug Something isn't working triaged labels Sep 4, 2024
Copy link

Thank you for reporting us your feedback!

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

This message was autogenerated

lengau added a commit to canonical/craft-application that referenced this issue Sep 5, 2024
This is a fix for canonical/charmcraft#1874

The spec (ST105) allows <list-of-arch> | <arch> in both build-on and
build-for on all craft apps. This change makes the Platform model accept
a string value, but doesn't specify that in the schema. This means
text editors using the schema will still suggest converting the build-on
and build-for values to lists.
lengau added a commit to canonical/craft-application that referenced this issue Sep 5, 2024
This is a fix for canonical/charmcraft#1874

The spec (ST105) allows <list-of-arch> | <arch> in both build-on and
build-for on all craft apps. This change makes the Platform model accept
a string value, but doesn't specify that in the schema. This means
text editors using the schema will still suggest converting the build-on
and build-for values to lists.
lengau added a commit that referenced this issue Sep 5, 2024
@lengau lengau closed this as completed Sep 9, 2024
linostar pushed a commit to linostar/craft-application that referenced this issue Dec 4, 2024
This is a fix for canonical/charmcraft#1874

The spec (ST105) allows <list-of-arch> | <arch> in both build-on and
build-for on all craft apps. This change makes the Platform model accept
a string value, but doesn't specify that in the schema. This means
text editors using the schema will still suggest converting the build-on
and build-for values to lists.
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

No branches or pull requests

1 participant