← 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

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.

Suggested action:

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
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.
qwen3.6-35b-a3b-mtp-q6 Closed as invalid. The build failure resulted from a missing series field in metadata.yaml, not a charmcraft bug. The author acknowledged the root cause stems from dropping series for bases and will coordinate with the Juju team to resolve the compatibility issue.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#639 Can't build charm: Failed to build charm for bases index '0' charmcraft closed Resolved as a jinja2 and setuptools version conflict. Provided a charmcraft.yaml workaround to install or pin setuptools. A later user confirmed charmcraft clean followed by pack also fixed it. Closed without code changes.
78%
#1789 Unable to build multi-base subordinate charms on 24.04 charmcraft closed Reported build failures for multi-base subordinate charms under charmcraft 3's new syntax. Closed after a user identified PR #2054 as the resolution for configuring multiple bases.
73%
#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 Building charms with channel devel failed due to a host channel mismatch. The issue was closed as fixed in Charmcraft 3.
72%
#2507 Cannot build charm when base is Questing and build-base is devel charmcraft open charmcraft pack fails with 'Couldn't get EOL data for devel' when base=ubuntu@25.10 and build-base=ubuntu@devel on charmcraft 4.0.1. Unlabelled, no maintainer activity in 262 days; devel-base support has since been expanded in later releases.
72%