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

build_charms_with_cache.yaml: Build breaks after .json file is added #32

Closed
carlcsaposs-canonical opened this issue Mar 30, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@carlcsaposs-canonical
Copy link
Contributor

Parts processing error: Failed to copy '/root/parts/charm/src/src/grafana_dashboards/MongoDB_Cluster_Summary.json': no such file or directory.
https://github.com/canonical/mongodb-operator/actions/runs/4564819236/jobs/8055086480

Appears related to #14

charmcraft logs

2023-03-30 14:49:03.820 Starting charmcraft version 2.2.0
2023-03-30 14:49:03.824 System details: OSPlatform(system='ubuntu', release='22.04', machine='x86_64'); Environment: None
2023-03-30 14:49:03.824 Packing the charm.
2023-03-30 14:49:03.825 Reading '/home/runner/work/mongodb-operator/mongodb-operator/metadata.yaml'
2023-03-30 14:49:03.828 Validating metadata format
2023-03-30 14:49:03.974 Executing on host: lxc --project default profile show local:default
2023-03-30 14:49:04.035 Building for 'bases[0]' as host matches 'build-on[0]'.
2023-03-30 14:49:04.035 Building for 'bases[0][0]'.
2023-03-30 14:49:04.035 Launching environment to pack for base name='ubuntu' channel='22.04' architectures=['amd64'] (may take a while the first time but it's reusable)
2023-03-30 14:49:04.036 Using hostname 'charmcraft-mongodb-785608-0-0-amd64'
2023-03-30 14:49:04.036 Executing on host: lxc remote list --format=yaml
2023-03-30 14:49:04.095 Executing on host: lxc remote add craft-com.ubuntu.cloud-buildd https://cloud-images.ubuntu.com/buildd/releases --protocol=simplestreams
2023-03-30 14:49:04.156 Remote 'craft-com.ubuntu.cloud-buildd' was successfully added.
2023-03-30 14:49:04.156 Executing on host: lxc project list local: --format=yaml
2023-03-30 14:49:04.221 Set LXD instance name to 'charmcraft-mongodb-785608-0-0-amd64'
2023-03-30 14:49:04.221 Executing on host: lxc --project charmcraft list local: --format=yaml
2023-03-30 14:49:04.296 Executing on host: lxc --project charmcraft list local: --format=yaml
2023-03-30 14:49:04.368 Executing on host: lxc --project charmcraft start local:charmcraft-mongodb-785608-0-0-amd64
2023-03-30 14:49:04.964 Executing in container: lxc --project charmcraft exec local:charmcraft-mongodb-785608-0-0-amd64 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin CHARMCRAFT_MANAGED_MODE=1 cat /etc/os-release
2023-03-30 14:49:05.092 Executing in container: lxc --project charmcraft exec local:charmcraft-mongodb-785608-0-0-amd64 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin CHARMCRAFT_MANAGED_MODE=1 test -f /etc/craft-instance.conf
2023-03-30 14:49:05.253 Executing on host: lxc --project charmcraft file pull local:charmcraft-mongodb-785608-0-0-amd64/etc/craft-instance.conf /home/runner/tmpwtmpw58v.tmp-craft/tmpenjhgtef
2023-03-30 14:49:05.395 Instance is compatible with compatibility tag 'charmcraft-buildd-base-v0.0'
2023-03-30 14:49:05.395 Waiting for environment to be ready...
2023-03-30 14:49:05.395 Executing in container: lxc --project charmcraft exec local:charmcraft-mongodb-785608-0-0-amd64 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin CHARMCRAFT_MANAGED_MODE=1 systemctl is-system-running
2023-03-30 14:49:05.535 systemctl is-system-running status: initializing
2023-03-30 14:49:05.785 Executing in container: lxc --project charmcraft exec local:charmcraft-mongodb-785608-0-0-amd64 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin CHARMCRAFT_MANAGED_MODE=1 systemctl is-system-running
2023-03-30 14:49:05.949 systemctl is-system-running status: starting
2023-03-30 14:49:06.200 Executing in container: lxc --project charmcraft exec local:charmcraft-mongodb-785608-0-0-amd64 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin CHARMCRAFT_MANAGED_MODE=1 systemctl is-system-running
2023-03-30 14:49:06.338 systemctl is-system-running status: starting
2023-03-30 14:49:06.588 Executing in container: lxc --project charmcraft exec local:charmcraft-mongodb-785608-0-0-amd64 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin CHARMCRAFT_MANAGED_MODE=1 systemctl is-system-running
2023-03-30 14:49:06.753 systemctl is-system-running status: starting
2023-03-30 14:49:07.004 Executing in container: lxc --project charmcraft exec local:charmcraft-mongodb-785608-0-0-amd64 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin CHARMCRAFT_MANAGED_MODE=1 systemctl is-system-running
2023-03-30 14:49:07.114 systemctl is-system-running status: starting
2023-03-30 14:49:07.365 Executing in container: lxc --project charmcraft exec local:charmcraft-mongodb-785608-0-0-amd64 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin CHARMCRAFT_MANAGED_MODE=1 systemctl is-system-running
2023-03-30 14:49:07.487 systemctl is-system-running status: starting
2023-03-30 14:49:07.737 Executing in container: lxc --project charmcraft exec local:charmcraft-mongodb-785608-0-0-amd64 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin CHARMCRAFT_MANAGED_MODE=1 systemctl is-system-running
2023-03-30 14:49:07.838 systemctl is-system-running status: starting
2023-03-30 14:49:08.089 Executing in container: lxc --project charmcraft exec local:charmcraft-mongodb-785608-0-0-amd64 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin CHARMCRAFT_MANAGED_MODE=1 systemctl is-system-running
2023-03-30 14:49:08.191 systemctl is-system-running status: starting
2023-03-30 14:49:08.441 Executing in container: lxc --project charmcraft exec local:charmcraft-mongodb-785608-0-0-amd64 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin CHARMCRAFT_MANAGED_MODE=1 systemctl is-system-running
2023-03-30 14:49:08.542 systemctl is-system-running status: starting
2023-03-30 14:49:08.793 Executing in container: lxc --project charmcraft exec local:charmcraft-mongodb-785608-0-0-amd64 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin CHARMCRAFT_MANAGED_MODE=1 systemctl is-system-running
2023-03-30 14:49:08.902 Waiting for networking to be ready...
2023-03-30 14:49:08.902 Executing in container: lxc --project charmcraft exec local:charmcraft-mongodb-785608-0-0-amd64 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin CHARMCRAFT_MANAGED_MODE=1 getent hosts snapcraft.io
2023-03-30 14:49:09.119 Holding refreshes for snaps.
2023-03-30 14:49:09.119 Executing in container: lxc --project charmcraft exec local:charmcraft-mongodb-785608-0-0-amd64 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin CHARMCRAFT_MANAGED_MODE=1 snap set system refresh.hold=2023-03-31T14:49:09.119417Z
2023-03-30 14:49:09.343 Waiting for pending snap refreshes to complete.
2023-03-30 14:49:09.343 Executing in container: lxc --project charmcraft exec local:charmcraft-mongodb-785608-0-0-amd64 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin CHARMCRAFT_MANAGED_MODE=1 snap watch '--last=auto-refresh?'
2023-03-30 14:49:09.462 Executing in container: lxc --project charmcraft exec local:charmcraft-mongodb-785608-0-0-amd64 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin CHARMCRAFT_MANAGED_MODE=1 snap unset system proxy.http
2023-03-30 14:49:09.684 Executing in container: lxc --project charmcraft exec local:charmcraft-mongodb-785608-0-0-amd64 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin CHARMCRAFT_MANAGED_MODE=1 snap unset system proxy.https
2023-03-30 14:49:09.910 Installing snap 'charmcraft' with channel=None and classic=True
2023-03-30 14:49:09.910 Installing snap 'charmcraft' from host (classic=True)
2023-03-30 14:49:09.917 Executing in container: lxc --project charmcraft exec local:charmcraft-mongodb-785608-0-0-amd64 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin CHARMCRAFT_MANAGED_MODE=1 test -f /etc/craft-instance.conf
2023-03-30 14:49:09.999 Executing on host: lxc --project charmcraft file pull local:charmcraft-mongodb-785608-0-0-amd64/etc/craft-instance.conf /home/runner/tmp3f9cdtwk.tmp-craft/tmpv76ig66z
2023-03-30 14:49:10.067 Revisions found: host='1171', target='1171'
2023-03-30 14:49:10.067 Skipping snap injection: target is already up-to-date with revision on host
2023-03-30 14:49:10.067 Mounting directory inside the instance
2023-03-30 14:49:10.067 Executing on host: lxc --project charmcraft config device show local:charmcraft-mongodb-785608-0-0-amd64
2023-03-30 14:49:10.130 Executing on host: lxc --project charmcraft config device add local:charmcraft-mongodb-785608-0-0-amd64 disk-/root/project disk source=/home/runner/work/mongodb-operator/mongodb-operator path=/root/project
2023-03-30 14:49:10.219 Packing the charm
2023-03-30 14:49:10.219 Running ['charmcraft', 'pack', '--bases-index', '0', '--verbosity=brief']
2023-03-30 14:49:10.219 Emitter: Pausing control of the terminal
2023-03-30 14:49:15.881 Emitter: Resuming control of the terminal
2023-03-30 14:49:16.044 Logs captured from managed instance:
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.026 Starting charmcraft version 2.2.0
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.031 System details: OSPlatform(system='ubuntu', release='22.04', machine='x86_64'); Environment: CHARMCRAFT_MANAGED_MODE='1'
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.031 Packing the charm.
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.032 Reading '/root/project/metadata.yaml'
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.035 Validating metadata format
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.042 Building for 'bases[0]' as host matches 'build-on[0]'.
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.042 Building for 'bases[0][0]'.
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.042 Building charm in '/root'
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.042 Parts definition: {'charm': {'source': '/root/project', 'charm-entrypoint': 'src/charm.py', 'charm-binary-python-packages': ['setuptools', 'cryptography'], 'charm-python-packages': [], 'charm-requirements': ['requirements.txt'], 'build-packages': ['git', 'libffi-dev', 'libssl-dev', 'rustc', 'cargo'], 'plugin': 'charm', 'prime': ['src', 'venv', 'metadata.yaml', 'dispatch', 'hooks', 'config.yaml', 'actions.yaml', 'lib', 'LICENSE', 'README.md']}}
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.043 is_snap: True, SNAP_NAME set to charmcraft
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.043 Setting target machine to x86_64
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.044 load state file: /root/parts/charm/state/pull
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.051 load state file: /root/parts/charm/state/overlay
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.056 load state file: /root/parts/charm/state/build
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.077 load state file: /root/parts/charm/state/stage
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.424 load state file: /root/parts/charm/state/prime
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.785 Executing parts lifecycle in '/root/project'
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.786 process charm:Step.PULL
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.786 check if Part('charm'):Step.PULL is dirty
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.786 check if Part('charm'):Step.PULL is outdated
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.786 ignore patterns: ['*.charm']
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.787 updated files: {'tests/unit/test_charm.py', 'metadata.yaml', 'tests/unit/test_tls_lib.py', 'tests/unit/__init__.py', '.gitignore', 'documentation/documentation_landing.md', 'src/machine_helpers.py', 'documentation/tutorial.md', 'tests/unit/test_mongodb_lib.py', 'tests/unit/test_mongodb_helpers.py', 'tests/unit/test_mongodb_backups.py', 'LICENSE', 'config.yaml', 'charmcraft.yaml', 'README.md', 'src/charm.py', '.jujuignore', 'actions.yaml', 'pyproject.toml', 'tests/unit/test_mongodb_provider.py', 'requirements.txt', 'tox.ini', 'tests/unit/helpers.py', 'CONTRIBUTING.md', 'src/grafana_dashboards/MongoDB_Cluster_Summary.json'}
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.787 updated directories: {'.github', 'tests/integration', 'tests/unit/data', 'src/alert_rules', 'tests/data', '.git', 'lib'}
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.787 charm:Step.PULL is outdated
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.787 update step charm:Step.PULL
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.788 add action charm:Step.PULL(ActionType.UPDATE)
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.788 process charm:Step.OVERLAY
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.788 check if Part('charm'):Step.OVERLAY is dirty
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.788 check if Part('charm'):Step.OVERLAY is outdated
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.788 charm:Step.OVERLAY is outdated
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.788 update step charm:Step.OVERLAY
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.788 add action charm:Step.OVERLAY(ActionType.UPDATE)
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.788 process charm:Step.BUILD
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.788 check if Part('charm'):Step.BUILD is dirty
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.788 check if Part('charm'):Step.BUILD is outdated
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.788 charm:Step.BUILD is outdated
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.788 update step charm:Step.BUILD
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.788 add action charm:Step.BUILD(ActionType.UPDATE)
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.788 process charm:Step.STAGE
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.788 check if Part('charm'):Step.STAGE is dirty
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.789 check if Part('charm'):Step.STAGE is outdated
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.789 charm:Step.STAGE is outdated
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.789 rerun step charm:Step.STAGE
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.789 add action charm:Step.STAGE(ActionType.RERUN)
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.789 process charm:Step.PRIME
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.789 add action charm:Step.PRIME(ActionType.RUN)
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.790 Parts actions: [Action(part_name='charm', step=Step.PULL, action_type=ActionType.UPDATE, reason='source changed', project_vars=None, properties=ActionProperties(changed_files=['.gitignore', '.jujuignore', 'CONTRIBUTING.md', 'LICENSE', 'README.md', 'actions.yaml', 'charmcraft.yaml', 'config.yaml', 'documentation/documentation_landing.md', 'documentation/tutorial.md', 'metadata.yaml', 'pyproject.toml', 'requirements.txt', 'src/charm.py', 'src/grafana_dashboards/MongoDB_Cluster_Summary.json', 'src/machine_helpers.py', 'tests/unit/__init__.py', 'tests/unit/helpers.py', 'tests/unit/test_charm.py', 'tests/unit/test_mongodb_backups.py', 'tests/unit/test_mongodb_helpers.py', 'tests/unit/test_mongodb_lib.py', 'tests/unit/test_mongodb_provider.py', 'tests/unit/test_tls_lib.py', 'tox.ini'], changed_dirs=['.git', '.github', 'lib', 'src/alert_rules', 'tests/data', 'tests/integration', 'tests/unit/data'])), Action(part_name='charm', step=Step.OVERLAY, action_type=ActionType.UPDATE, reason="'PULL' step changed", project_vars=None, properties=ActionProperties(changed_files=None, changed_dirs=None)), Action(part_name='charm', step=Step.BUILD, action_type=ActionType.UPDATE, reason="'PULL' step changed", project_vars=None, properties=ActionProperties(changed_files=['.gitignore', '.jujuignore', 'CONTRIBUTING.md', 'LICENSE', 'README.md', 'actions.yaml', 'charmcraft.yaml', 'config.yaml', 'documentation/documentation_landing.md', 'documentation/tutorial.md', 'metadata.yaml', 'pyproject.toml', 'requirements.txt', 'src/charm.py', 'src/grafana_dashboards/MongoDB_Cluster_Summary.json', 'src/machine_helpers.py', 'tests/unit/__init__.py', 'tests/unit/helpers.py', 'tests/unit/test_charm.py', 'tests/unit/test_mongodb_backups.py', 'tests/unit/test_mongodb_helpers.py', 'tests/unit/test_mongodb_lib.py', 'tests/unit/test_mongodb_provider.py', 'tests/unit/test_tls_lib.py', 'tox.ini'], changed_dirs=['.git', '.github', 'lib', 'src/alert_rules', 'tests/data', 'tests/integration', 'tests/unit/data'])), Action(part_name='charm', step=Step.STAGE, action_type=ActionType.RERUN, reason="'BUILD' step changed", project_vars=None, properties=ActionProperties(changed_files=None, changed_dirs=None)), Action(part_name='charm', step=Step.PRIME, action_type=ActionType.RUN, reason=None, project_vars=None, properties=ActionProperties(changed_files=None, changed_dirs=None))]
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.790 ignore patterns: ['*.charm']
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.790 part build packages: ['git', 'libffi-dev', 'libssl-dev', 'rustc', 'cargo']
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.790 plugin build packages: {'python3-setuptools', 'python3-venv', 'python3-wheel', 'python3-pip', 'python3-dev'}
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:14.790 Requested build-packages: ['cargo', 'git', 'libffi-dev', 'libssl-dev', 'python3-dev', 'python3-pip', 'python3-setuptools', 'python3-venv', 'python3-wheel', 'rustc']
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.324 Marking git (and its dependencies) to be fetched
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.324 package: git
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.332 Marking libffi-dev (and its dependencies) to be fetched
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.332 package: libffi-dev
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.338 Marking python3-setuptools (and its dependencies) to be fetched
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.338 package: python3-setuptools
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.344 Marking cargo (and its dependencies) to be fetched
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.344 package: cargo
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.349 Marking python3-venv (and its dependencies) to be fetched
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.349 package: python3-venv
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.355 Marking rustc (and its dependencies) to be fetched
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.355 package: rustc
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.361 Marking python3-wheel (and its dependencies) to be fetched
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.361 package: python3-wheel
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.366 Marking libssl-dev (and its dependencies) to be fetched
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.366 package: libssl-dev
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.372 Marking python3-pip (and its dependencies) to be fetched
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.372 package: python3-pip
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.377 Marking python3-dev (and its dependencies) to be fetched
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.377 package: python3-dev
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.405 Requested build-packages already installed: ['cargo', 'git', 'libffi-dev', 'libssl-dev', 'python3-dev', 'python3-pip', 'python3-setuptools', 'python3-venv', 'python3-wheel', 'rustc']
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.661 verify plugin environment for part 'charm'
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.662 Running step PULL for part 'charm'
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.663 Execute action
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.663 execute action charm:Action(part_name='charm', step=Step.PULL, action_type=ActionType.UPDATE, reason='source changed', project_vars=None, properties=ActionProperties(changed_files=['.gitignore', '.jujuignore', 'CONTRIBUTING.md', 'LICENSE', 'README.md', 'actions.yaml', 'charmcraft.yaml', 'config.yaml', 'documentation/documentation_landing.md', 'documentation/tutorial.md', 'metadata.yaml', 'pyproject.toml', 'requirements.txt', 'src/charm.py', 'src/grafana_dashboards/MongoDB_Cluster_Summary.json', 'src/machine_helpers.py', 'tests/unit/__init__.py', 'tests/unit/helpers.py', 'tests/unit/test_charm.py', 'tests/unit/test_mongodb_backups.py', 'tests/unit/test_mongodb_helpers.py', 'tests/unit/test_mongodb_lib.py', 'tests/unit/test_mongodb_provider.py', 'tests/unit/test_tls_lib.py', 'tox.ini'], changed_dirs=['.git', '.github', 'lib', 'src/alert_rules', 'tests/data', 'tests/integration', 'tests/unit/data']))
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.664 updated files: {'tests/unit/test_charm.py', 'metadata.yaml', 'tests/unit/test_tls_lib.py', 'tests/unit/__init__.py', '.gitignore', 'documentation/documentation_landing.md', 'src/machine_helpers.py', 'documentation/tutorial.md', 'tests/unit/test_mongodb_lib.py', 'tests/unit/test_mongodb_helpers.py', 'tests/unit/test_mongodb_backups.py', 'LICENSE', 'config.yaml', 'charmcraft.yaml', 'README.md', 'src/charm.py', '.jujuignore', 'actions.yaml', 'pyproject.toml', 'tests/unit/test_mongodb_provider.py', 'requirements.txt', 'tox.ini', 'tests/unit/helpers.py', 'CONTRIBUTING.md', 'src/grafana_dashboards/MongoDB_Cluster_Summary.json'}
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.664 updated directories: {'.github', 'tests/integration', 'tests/unit/data', 'src/alert_rules', 'tests/data', '.git', 'lib'}
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.708 load state file: /root/parts/charm/state/pull
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.720 Running step OVERLAY for part 'charm'
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.720 Execute action
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.721 execute action charm:Action(part_name='charm', step=Step.OVERLAY, action_type=ActionType.UPDATE, reason="'PULL' step changed", project_vars=None, properties=ActionProperties(changed_files=None, changed_dirs=None))
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.722 Running step BUILD for part 'charm'
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.722 Execute action
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.724 execute action charm:Action(part_name='charm', step=Step.BUILD, action_type=ActionType.UPDATE, reason="'PULL' step changed", project_vars=None, properties=ActionProperties(changed_files=['.gitignore', '.jujuignore', 'CONTRIBUTING.md', 'LICENSE', 'README.md', 'actions.yaml', 'charmcraft.yaml', 'config.yaml', 'documentation/documentation_landing.md', 'documentation/tutorial.md', 'metadata.yaml', 'pyproject.toml', 'requirements.txt', 'src/charm.py', 'src/grafana_dashboards/MongoDB_Cluster_Summary.json', 'src/machine_helpers.py', 'tests/unit/__init__.py', 'tests/unit/helpers.py', 'tests/unit/test_charm.py', 'tests/unit/test_mongodb_backups.py', 'tests/unit/test_mongodb_helpers.py', 'tests/unit/test_mongodb_lib.py', 'tests/unit/test_mongodb_provider.py', 'tests/unit/test_tls_lib.py', 'tox.ini'], changed_dirs=['.git', '.github', 'lib', 'src/alert_rules', 'tests/data', 'tests/integration', 'tests/unit/data']))
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.725 ignore patterns: []
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.726 updated files: {'tests/unit/test_charm.py', 'metadata.yaml', 'tests/unit/test_tls_lib.py', 'tests/unit/__init__.py', '.gitignore', 'documentation/documentation_landing.md', 'src/machine_helpers.py', 'documentation/tutorial.md', 'tests/unit/test_mongodb_lib.py', 'tests/unit/test_mongodb_helpers.py', 'tests/unit/test_mongodb_backups.py', 'LICENSE', 'config.yaml', 'charmcraft.yaml', 'README.md', 'src/charm.py', '.jujuignore', 'actions.yaml', 'pyproject.toml', 'tests/unit/test_mongodb_provider.py', 'requirements.txt', 'tox.ini', 'tests/unit/helpers.py', 'CONTRIBUTING.md', 'src/grafana_dashboards/MongoDB_Cluster_Summary.json'}
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.726 updated directories: {'.github', 'tests/integration', 'tests/unit/data', 'src/alert_rules', 'tests/data', '.git', 'lib'}
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.747 Parts processing error: Failed to copy '/root/parts/charm/src/src/grafana_dashboards/MongoDB_Cluster_Summary.json': no such file or directory.
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.752 Traceback (most recent call last):
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.752   File "/snap/charmcraft/1171/lib/craft_parts/utils/file_utils.py", line 172, in copy
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.752     shutil.copy2(source, destination, follow_symlinks=follow_symlinks)
2023-03-30 14:49:16.047 :: 2023-03-30 14:49:15.752   File "/snap/charmcraft/1171/usr/lib/python3.8/shutil.py", line 435, in copy2
2023-03-30 14:49:16.048 :: 2023-03-30 14:49:15.752     copyfile(src, dst, follow_symlinks=follow_symlinks)
2023-03-30 14:49:16.048 :: 2023-03-30 14:49:15.752   File "/snap/charmcraft/1171/usr/lib/python3.8/shutil.py", line 264, in copyfile
2023-03-30 14:49:16.048 :: 2023-03-30 14:49:15.752     with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
2023-03-30 14:49:16.048 :: 2023-03-30 14:49:15.752 FileNotFoundError: [Errno 2] No such file or directory: '/root/parts/charm/build/src/grafana_dashboards/MongoDB_Cluster_Summary.json'
2023-03-30 14:49:16.048 :: 2023-03-30 14:49:15.752
2023-03-30 14:49:16.048 :: 2023-03-30 14:49:15.752 The above exception was the direct cause of the following exception:
2023-03-30 14:49:16.048 :: 2023-03-30 14:49:15.752 Traceback (most recent call last):
2023-03-30 14:49:16.048 :: 2023-03-30 14:49:15.752   File "/snap/charmcraft/1171/lib/charmcraft/parts.py", line 397, in run
2023-03-30 14:49:16.048 :: 2023-03-30 14:49:15.752     aex.execute([act], stdout=stream, stderr=stream)
2023-03-30 14:49:16.048 :: 2023-03-30 14:49:15.752   File "/snap/charmcraft/1171/lib/craft_parts/executor/executor.py", line 301, in execute
2023-03-30 14:49:16.048 :: 2023-03-30 14:49:15.752     self._executor.execute(actions, stdout=stdout, stderr=stderr)
2023-03-30 14:49:16.048 :: 2023-03-30 14:49:15.752   File "/snap/charmcraft/1171/lib/craft_parts/executor/executor.py", line 126, in execute
2023-03-30 14:49:16.048 :: 2023-03-30 14:49:15.752     self._run_action(act, stdout=stdout, stderr=stderr)
2023-03-30 14:49:16.048 :: 2023-03-30 14:49:15.752   File "/snap/charmcraft/1171/lib/craft_parts/executor/executor.py", line 189, in _run_action
2023-03-30 14:49:16.048 :: 2023-03-30 14:49:15.752     handler.run_action(action, stdout=stdout, stderr=stderr)
2023-03-30 14:49:16.048 :: 2023-03-30 14:49:15.752   File "/snap/charmcraft/1171/lib/craft_parts/executor/part_handler.py", line 130, in run_action
2023-03-30 14:49:16.048 :: 2023-03-30 14:49:15.752     self._update_action(
2023-03-30 14:49:16.048 :: 2023-03-30 14:49:15.752   File "/snap/charmcraft/1171/lib/craft_parts/executor/part_handler.py", line 535, in _update_action
2023-03-30 14:49:16.048 :: 2023-03-30 14:49:15.752     handler(step_info, stdout=stdout, stderr=stderr)
2023-03-30 14:49:16.048 :: 2023-03-30 14:49:15.752   File "/snap/charmcraft/1171/lib/craft_parts/executor/part_handler.py", line 627, in _update_build
2023-03-30 14:49:16.048 :: 2023-03-30 14:49:15.752     source.update()
2023-03-30 14:49:16.048 :: 2023-03-30 14:49:15.752   File "/snap/charmcraft/1171/lib/craft_parts/sources/local_source.py", line 163, in update
2023-03-30 14:49:16.048 :: 2023-03-30 14:49:15.752     self.copy_function(
2023-03-30 14:49:16.048 :: 2023-03-30 14:49:15.752   File "/snap/charmcraft/1171/lib/craft_parts/utils/file_utils.py", line 174, in copy
2023-03-30 14:49:16.048 :: 2023-03-30 14:49:15.752     raise errors.CopyFileNotFound(source) from err
2023-03-30 14:49:16.048 :: 2023-03-30 14:49:15.752 craft_parts.errors.CopyFileNotFound: Failed to copy '/root/parts/charm/src/src/grafana_dashboards/MongoDB_Cluster_Summary.json': no such file or directory.
2023-03-30 14:49:17.297 Failed to build charm for bases index '0'.
2023-03-30 14:49:17.301 Traceback (most recent call last):
2023-03-30 14:49:17.301   File "/snap/charmcraft/1171/lib/charmcraft/commands/build.py", line 376, in pack_charm_in_instance
2023-03-30 14:49:17.301     instance.execute_run(cmd, check=True, cwd=instance_output_dir)
2023-03-30 14:49:17.301   File "/snap/charmcraft/1171/lib/craft_providers/lxd/lxd_instance.py", line 289, in execute_run
2023-03-30 14:49:17.301     return self.lxc.exec(
2023-03-30 14:49:17.301   File "/snap/charmcraft/1171/lib/craft_providers/lxd/lxc.py", line 329, in exec
2023-03-30 14:49:17.301     return runner(final_cmd, **kwargs)  # pylint: disable=subprocess-run-check
2023-03-30 14:49:17.301   File "/snap/charmcraft/1171/usr/lib/python3.8/subprocess.py", line 516, in run
2023-03-30 14:49:17.301     raise CalledProcessError(retcode, process.args,
2023-03-30 14:49:17.301 subprocess.CalledProcessError: Command '['lxc', '--project', 'charmcraft', 'exec', 'local:charmcraft-mongodb-785608-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-30 14:49:17.301 Full execution log: '/home/runner/.local/state/charmcraft/log/charmcraft-20230330-144903.819961.log'

charms-packed-with-cache-charmcraft-build-logs.zip

@carlcsaposs-canonical
Copy link
Contributor Author

@carlcsaposs-canonical
Copy link
Contributor Author

Findings

I don't think this is the exact same issue as #14, but without the charmcraft logs from #14 I can't confirm.
In #14, I believe the issue was that files in /root/parts/charm/src (on the LXC container) were not being updated.

Here, the issue is that files in /root/parts/charm/build/ are not being updated because of a charmcraft bug.

Opened charmcraft bug report and PR

@cmatsuoka
Copy link

cmatsuoka commented Apr 24, 2023

PR canonical/charmcraft#1092 updates craft-parts to a version containing @carlcsaposs-canonical's fix.

@carlcsaposs-canonical
Copy link
Contributor Author

Should be fixed in charmcraft 2.3—unable to test since issue is difficult to reproduce

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

No branches or pull requests

2 participants