← Back to issue list

22.10 - Failed to build charm for bases index '0'.

View original Github issue

Metadata

Project
charmcraft
Number
#792
Type
issue
State
closed
Author
freyes
Labels
—
Created
Updated
Closed

Current evaluation

Reporter's reactive charm failed to build; maintainer facundobatista closed it as not a Charmcraft bug — the legacy `charm` tool rejects metadata.yaml without a `series` list. Author agreed and took it to the Juju team.

Resolution: closed not a bug

Reason: Closed by maintainer facundobatista on 2022-06-27 with the diagnosis that the external `charm` build backend (used by reactive charms) errors with 'E: missing series: must be a list of series names', i.e. the upstream charm's metadata.yaml was the problem, not Charmcraft. The author confirmed on 2022-06-28 that the tested change dropped the series section and would follow up with the Juju team.

Evaluated by: mr-cal-bot

No scores available.

Issue body

building a charm that includes the "22.10" version in charmcraft.yaml run-on stanza fails. Steps to reproduce: ``` git clone https://opendev.org/openstack/charm-aodh cd charm-aodh git fetch https://review.opendev.org/openstack/charm-aodh refs/changes/93/847393/1 && git checkout FETCH_HEAD tox -e build ``` This was tested with 1.5/stable, latest/stable and latest/edge. ``` 2022-06-23 22:31:59.150 plugin validation command: 'charm version' 2022-06-23 22:32:00.472 :: + /snap/charmcraft/x2/bin/python3 -I /snap/charmcraft/x2/lib/charmcraft/reactive_plugin.py aodh /root/parts/charm/build /root/parts/charm/install 2022-06-23 22:32:02.823 :: I: metadata name (aodh) must match directory name (build) exactly for local deployment. 2022-06-23 22:32:02.823 :: I: `display-name` not provided, add for custom naming in the UI 2022-06-23 22:32:02.823 :: E: missing series: must be a list of series names 2022-06-23 22:32:02.824 :: I: no hooks directory 2022-06-23 22:32:02.824 :: I: relation nrpe-external-master has no hooks 2022-06-23 22:32:02.824 :: I: relation mongodb has no hooks 2022-06-23 22:32:02.824 :: I: missing recommended hook install 2022-06-23 22:32:02.824 :: I: missing recommended hook start 2022-06-23 22:32:02.824 :: I: missing recommended hook stop 2022-06-23 22:32:02.824 :: I: missing recommended hook config-changed 2022-06-23 22:32:02.824 :: W: config.yaml: option openstack-origin does not have the keys: description, type 2022-06-23 22:32:03.025 Parts processing error: Failed to run the build script for part 'charm'. 2022-06-23 22:32:03.029 Traceback (most recent call last): 2022-06-23 22:32:03.029 File "/snap/charmcraft/x2/lib/craft_parts/executor/step_handler.py", line 134, in _builtin_build 2022-06-23 22:32:03.029 subprocess.run( 2022-06-23 22:32:03.029 File "/snap/charmcraft/x2/usr/lib/python3.8/subprocess.py", line 516, in run 2022-06-23 22:32:03.029 raise CalledProcessError(retcode, process.args, 2022-06-23 22:32:03.029 subprocess.CalledProcessError: Command '['/root/parts/charm/run/build.sh']' returned non-zero exit status 200. 2022-06-23 22:32:03.035 2022-06-23 22:32:03.035 The above exception was the direct cause of the following exception: 2022-06-23 22:32:03.035 Traceback (most recent call last): 2022-06-23 22:32:03.035 File "/snap/charmcraft/x2/lib/charmcraft/parts.py", line 323, in run 2022-06-23 22:32:03.035 aex.execute([action], stdout=stream, stderr=stream) 2022-06-23 22:32:03.036 File "/snap/charmcraft/x2/lib/craft_parts/executor/executor.py", line 301, in execute 2022-06-23 22:32:03.036 self._executor.execute(actions, stdout=stdout, stderr=stderr) 2022-06-23 22:32:03.036 File "/snap/charmcraft/x2/lib/craft_parts/executor/executor.py", line 126, in execute 2022-06-23 22:32:03.036 self._run_action(act, stdout=stdout, stderr=stderr) 2022-06-23 22:32:03.036 File "/snap/charmcraft/x2/lib/craft_parts/executor/executor.py", line 189, in _run_action 2022-06-23 22:32:03.036 handler.run_action(action, stdout=stdout, stderr=stderr) 2022-06-23 22:32:03.037 File "/snap/charmcraft/x2/lib/craft_parts/executor/part_handler.py", line 160, in run_action 2022-06-23 22:32:03.037 state = handler(step_info, stdout=stdout, stderr=stderr) 2022-06-23 22:32:03.037 File "/snap/charmcraft/x2/lib/craft_parts/executor/part_handler.py", line 296, in _run_build 2022-06-23 22:32:03.037 self._run_step( 2022-06-23 22:32:03.037 File "/snap/charmcraft/x2/lib/craft_parts/executor/part_handler.py", line 469, in _run_step 2022-06-23 22:32:03.037 return step_handler.run_builtin() 2022-06-23 22:32:03.038 File "/snap/charmcraft/x2/lib/craft_parts/executor/step_handler.py", line 106, in run_builtin 2022-06-23 22:32:03.038 return handler() 2022-06-23 22:32:03.038 File "/snap/charmcraft/x2/lib/craft_parts/executor/step_handler.py", line 142, in _builtin_build 2022-06-23 22:32:03.038 raise errors.PluginBuildError(part_name=self._part.name) from process_error 2022-06-23 22:32:03.039 craft_parts.errors.PluginBuildError: Failed to run the build script for part 'charm'. 2022-06-23 18:32:05.473 Failed to build charm for bases index '0'. 2022-06-23 18:32:05.477 Traceback (most recent call last): 2022-06-23 18:32:05.478 File "/snap/charmcraft/1003/lib/charmcraft/commands/build.py", line 497, in pack_charm_in_instance 2022-06-23 18:32:05.478 instance.execute_run(cmd, check=True, cwd=instance_output_dir) 2022-06-23 18:32:05.478 File "/snap/charmcraft/1003/lib/craft_providers/lxd/lxd_instance.py", line 221, in execute_run 2022-06-23 18:32:05.478 return self.lxc.exec( 2022-06-23 18:32:05.478 File "/snap/charmcraft/1003/lib/craft_providers/lxd/lxc.py", line 307, in exec 2022-06-23 18:32:05.478 return runner(final_cmd, **kwargs) # pylint: disable=subprocess-run-check 2022-06-23 18:32:05.478 File "/snap/charmcraft/1003/usr/lib/python3.8/subprocess.py", line 516, in run 2022-06-23 18:32:05.478 raise CalledProcessError(retcode, process.args, 2022-06-23 18:32:05.478 subprocess.CalledProcessError: Command '['lxc', '--project', 'charmcraft', 'exec', 'local:charmcraft-aodh-20847739-0-0-amd64', '--cwd', '/root/project', '--', 'env', 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin', 'CHARMCRAFT_MANAGED_MODE=1', 'charmcraft', 'pack', '--bases-index', '0', '--verbose']' returned non-zero exit status 1. 2022-06-23 18:32:05.478 Full execution log: '/home/freyes/snap/charmcraft/common/cache/charmcraft/log/charmcraft-20220623-182822.291836.log' ```

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed not a bug Reporter's reactive charm failed to build; maintainer facundobatista closed it as not a Charmcraft bug — the legacy `charm` tool rejects metadata.yaml without a `series` list. Author agreed and took it to the Juju team.
stealth/space-bunny-alpha — closed not a bug Closed as not a Charmcraft bug: the legacy `charm` reactive build backend rejected the charm because metadata.yaml dropped the `series` list. Reporter (freyes) agreed and took it to the Juju team.
stealth/space-bunny-alpha — closed not a bug Closed as not a Charmcraft bug: the legacy charm tool required a series list in metadata.yaml; the author accepted this and deferred to the Juju team.
qwen3.6-35b-a3b-mtp-q6 — — Rejected as not a Charmcraft bug. The build fails due to a missing series field in metadata.yaml when using the legacy charm tool. The author acknowledged the config change and will coordinate with the Juju team.
qwen/qwen3.6-35b-a3b — — Closed as not a charmcraft bug. The build failure resulted from a missing series field in the project's metadata.yaml. The author acknowledged the configuration issue and will coordinate with the Juju team regarding the transition from series to bases.
qwen3.6-35b-a3b-mtp-q6 — — Closed as not a Charmcraft bug. The reactive charm backend requires a series field in metadata.yaml, but the project removed it to use bases instead. Author acknowledged the issue and will coordinate with the Juju team to fix metadata.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/charmcraft#872 (confidence 60%)

    Other reactive-plugin charm building gaps filed by the same era, but concerns missing build metadata rather than this series validation failure

Related issues

Issue Project State Summary Similarity
#639 Can't build charm: Failed to build charm for bases index '0' charmcraft closed Closed as a dependency/configuration issue: adding setuptools fixed Jinja2 packing, while Tempita required setuptools <58. A later build recovered after charmcraft clean.
76%
#529 Charm deployment to OSM fails charmcraft closed Maintainer facundobatista closed it as not charmcraft-related: bundle.yaml pointed at a build directory, not the generated powerdns.charm. Reporter confirmed deploying works after using the .charm file path.
72%
#904 Can't build/pack a charm with Focal charmcraft closed Closed as an upstream charm-tools bug; the missing MarkupSafe failure was tracked in juju/charm-tools#646.
72%
#1267 Can't build charm targeted at the current development release: `Skipping 'bases[8].build-on[0]': channel 'devel' does not match host '23.10'.` charmcraft closed Development-release builds stopped being rejected in Charmcraft 3; platform support landed in PR #1554 (commit e3de0a46), and the maintainer closed the report as fixed.
72%
#632 Cant build charm with charmhelpers - missing markupsafe charmcraft closed Charmhelpers-based charm build failed with missing markupsafe via Jinja2/setuptools 58+ vs Tempita 2to3 conflict. cmatsuoka diagnosed it and the reporter confirmed the workaround works; maintainer closed the issue as solved without a charmcraft code change.
71%
#249 `charmcraft build` will let you build a charm that won't deploy charmcraft closed Closed by facundobatista as a duplicate, tracking all build-time sanity checks (incl. config.yaml/actions.yaml validity) in the umbrella issue charmcraft#27; later implemented by merged PR #556 (a585aec6).
70%