canonical / kafka-bundle

2 stars 2 forks source link

Move test app to jammy and update all (tls) libraries for test app #44

Closed taurus-forever closed 1 year ago

taurus-forever commented 1 year ago

Otherwise test app charm is not buildable which locks PR. Somohow the previous commit of migcation bundle to jammy affect test app now.

Example of the error: https://github.com/canonical/kafka-bundle/pull/43

INFO pytest_operator.plugin:plugin.py:942 Charm build for application completed with errors (return code=1) in 386.09s FAILED

The local build:

Parts processing error: Failed to run the build script for part 'charm'. Failed to build charm for bases index '0'.

Debug log:

2023-03-09 10:42:58.868 Packing the charm 2023-03-09 10:42:58.869 Running ['charmcraft', 'pack', '--bases-index', '0', '--verbosity=brief'] 2023-03-09 10:42:58.869 Emitter: Pausing control of the terminal 2023-03-09 10:43:28.763 Emitter: Resuming control of the terminal 2023-03-09 10:43:28.955 Interrupted. 2023-03-09 10:43:28.960 Traceback (most recent call last): 2023-03-09 10:43:28.960 File "/snap/charmcraft/1171/lib/charmcraft/commands/build.py", line 376, in pack_charm_in_instance 2023-03-09 10:43:28.960 instance.execute_run(cmd, check=True, cwd=instance_output_dir) 2023-03-09 10:43:28.960 File "/snap/charmcraft/1171/lib/craft_providers/lxd/lxd_instance.py", line 289, in execute_run 2023-03-09 10:43:28.960 return self.lxc.exec( 2023-03-09 10:43:28.960 File "/snap/charmcraft/1171/lib/craft_providers/lxd/lxc.py", line 329, in exec 2023-03-09 10:43:28.960 return runner(final_cmd, kwargs) # pylint: disable=subprocess-run-check 2023-03-09 10:43:28.960 File "/snap/charmcraft/1171/usr/lib/python3.8/subprocess.py", line 516, in run 2023-03-09 10:43:28.960 raise CalledProcessError(retcode, process.args, 2023-03-09 10:43:28.960 subprocess.CalledProcessError: Command '['lxc', '--project', 'charmcraft', 'exec', 'local:charmcraft-application-96474887-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', '--verbosity=brief']' returned non-zero exit status 1. 2023-03-09 10:43:28.960 2023-03-09 10:43:28.960 The above exception was the direct cause of the following exception: 2023-03-09 10:43:28.960 Traceback (most recent call last): 2023-03-09 10:43:28.960 File "/snap/charmcraft/1171/lib/charmcraft/commands/build.py", line 381, in pack_charm_in_instance 2023-03-09 10:43:28.960 raise CraftError( 2023-03-09 10:43:28.960 craft_cli.errors.CraftError: Failed to build charm for bases index '0'. 2023-03-09 10:43:28.960 2023-03-09 10:43:28.960 During handling of the above exception, another exception occurred: 2023-03-09 10:43:28.960 Traceback (most recent call last): 2023-03-09 10:43:28.960 File "/snap/charmcraft/1171/lib/craft_providers/lxd/lxd_provider.py", line 143, in launched_environment 2023-03-09 10:43:28.960 yield instance 2023-03-09 10:43:28.960 File "/snap/charmcraft/1171/lib/charmcraft/commands/build.py", line 385, in pack_charm_in_instance 2023-03-09 10:43:28.960 providers.capture_logs_from_instance(instance) 2023-03-09 10:43:28.960 File "/snap/charmcraft/1171/lib/charmcraft/providers.py", line 202, in capture_logs_from_instance 2023-03-09 10:43:28.960 with instance.temporarily_pull_file(source=source_log_path, missing_ok=True) as local_log_path: 2023-03-09 10:43:28.960 File "/snap/charmcraft/1171/usr/lib/python3.8/contextlib.py", line 113, in enter 2023-03-09 10:43:28.960 return next(self.gen) 2023-03-09 10:43:28.960 File "/snap/charmcraft/1171/lib/craft_providers/executor.py", line 119, in temporarily_pull_file 2023-03-09 10:43:28.960 self.pull_file(source=source, destination=tmp_file) 2023-03-09 10:43:28.960 File "/snap/charmcraft/1171/lib/craft_providers/lxd/lxd_instance.py", line 467, in pull_file 2023-03-09 10:43:28.960 proc = self.execute_run(["test", "-f", source.as_posix()], check=False) 2023-03-09 10:43:28.960 File "/snap/charmcraft/1171/lib/craft_providers/lxd/lxd_instance.py", line 289, in execute_run 2023-03-09 10:43:28.960 return self.lxc.exec( 2023-03-09 10:43:28.960 File "/snap/charmcraft/1171/lib/craft_providers/lxd/lxc.py", line 329, in exec 2023-03-09 10:43:28.960 return runner(final_cmd, kwargs) # pylint: disable=subprocess-run-check 2023-03-09 10:43:28.960 File "/snap/charmcraft/1171/usr/lib/python3.8/subprocess.py", line 495, in run 2023-03-09 10:43:28.960 stdout, stderr = process.communicate(input, timeout=timeout) 2023-03-09 10:43:28.960 File "/snap/charmcraft/1171/usr/lib/python3.8/subprocess.py", line 1020, in communicate 2023-03-09 10:43:28.960 self.wait() 2023-03-09 10:43:28.960 File "/snap/charmcraft/1171/usr/lib/python3.8/subprocess.py", line 1083, in wait 2023-03-09 10:43:28.960 return self._wait(timeout=timeout) 2023-03-09 10:43:28.960 File "/snap/charmcraft/1171/usr/lib/python3.8/subprocess.py", line 1806, in _wait 2023-03-09 10:43:28.960 (pid, sts) = self._try_wait(0) 2023-03-09 10:43:28.960 File "/snap/charmcraft/1171/usr/lib/python3.8/subprocess.py", line 1764, in _try_wait 2023-03-09 10:43:28.960 (pid, sts) = os.waitpid(self.pid, wait_flags) 2023-03-09 10:43:28.960 KeyboardInterrupt 2023-03-09 10:43:28.960 2023-03-09 10:43:28.960 During handling of the above exception, another exception occurred: 2023-03-09 10:43:28.960 Traceback (most recent call last): 2023-03-09 10:43:28.960 File "/snap/charmcraft/1171/lib/charmcraft/main.py", line 184, in main 2023-03-09 10:43:28.960 retcode = dispatcher.run() 2023-03-09 10:43:28.960 File "/snap/charmcraft/1171/lib/craft_cli/dispatcher.py", line 448, in run 2023-03-09 10:43:28.960 return self._loaded_command.run(self._parsed_command_args) 2023-03-09 10:43:28.960 File "/snap/charmcraft/1171/lib/charmcraft/commands/pack.py", line 133, in run 2023-03-09 10:43:28.960 pack_method(parsed_args) 2023-03-09 10:43:28.960 File "/snap/charmcraft/1171/lib/charmcraft/commands/pack.py", line 165, in _pack_charm 2023-03-09 10:43:28.960 charms = builder.run( 2023-03-09 10:43:28.960 File "/snap/charmcraft/1171/lib/charmcraft/instrum.py", line 152, in _f 2023-03-09 10:43:28.960 return func(*args, kwargs) 2023-03-09 10:43:28.960 File "/snap/charmcraft/1171/lib/charmcraft/commands/build.py", line 292, in run 2023-03-09 10:43:28.960 charm_name = self.pack_charm_in_instance( 2023-03-09 10:43:28.960 File "/snap/charmcraft/1171/lib/charmcraft/commands/build.py", line 394, in pack_charm_in_instance 2023-03-09 10:43:28.960 raise CraftError("Unexpected error retrieving charm from instance.") from error 2023-03-09 10:43:28.960 File "/snap/charmcraft/1171/usr/lib/python3.8/contextlib.py", line 131, in exit 2023-03-09 10:43:28.960 self.gen.throw(type, value, traceback) 2023-03-09 10:43:28.960 File "/snap/charmcraft/1171/lib/craft_providers/lxd/lxd_provider.py", line 146, in launched_environment 2023-03-09 10:43:28.960 instance.unmount_all() 2023-03-09 10:43:28.960 File "/snap/charmcraft/1171/lib/craft_providers/lxd/lxd_instance.py", line 580, in unmount_all 2023-03-09 10:43:28.960 self.lxc.config_device_remove( 2023-03-09 10:43:28.960 File "/snap/charmcraft/1171/lib/craft_providers/lxd/lxc.py", line 171, in config_device_remove 2023-03-09 10:43:28.960 self._run_lxc( 2023-03-09 10:43:28.960 File "/snap/charmcraft/1171/lib/craft_providers/lxd/lxc.py", line 98, in _run_lxc 2023-03-09 10:43:28.960 return subprocess.run(lxc_cmd, check=check, stdin=stdin.value, kwargs) 2023-03-09 10:43:28.960 File "/snap/charmcraft/1171/usr/lib/python3.8/subprocess.py", line 495, in run 2023-03-09 10:43:28.960 stdout, stderr = process.communicate(input, timeout=timeout) 2023-03-09 10:43:28.960 File "/snap/charmcraft/1171/usr/lib/python3.8/subprocess.py", line 1028, in communicate 2023-03-09 10:43:28.960 stdout, stderr = self._communicate(input, endtime, timeout) 2023-03-09 10:43:28.960 File "/snap/charmcraft/1171/usr/lib/python3.8/subprocess.py", line 1868, in _communicate 2023-03-09 10:43:28.960 ready = selector.select(timeout) 2023-03-09 10:43:28.960 File "/snap/charmcraft/1171/usr/lib/python3.8/selectors.py", line 415, in select 2023-03-09 10:43:28.960 fd_event_list = self._selector.poll(timeout) 2023-03-09 10:43:28.960 KeyboardInterrupt 2023-03-09 10:43:28.960 Full execution log: '/home/taurus/.local/state/charmcraft/log/charmcraft-20230309-104240.697710.log'

taurus-forever commented 1 year ago

Created a ticket to TLS library to fix typos: https://github.com/canonical/tls-certificates-operator/issues/35