Specify content interface socket directory path#33
Specify content interface socket directory path#33hemanthnakkina merged 2 commits intocanonical:mainfrom
Conversation
f2cd531 to
59ac30c
Compare
| charm: | ||
| charm-binary-python-packages: | ||
| - pydantic | ||
| - ops |
There was a problem hiding this comment.
FYI @gboutry @hemanthnakkina - if we don't pin this, the charmpack start failing from this week
charmcraft pack
Failed to run the build script for part 'charm'.
Detailed information:
:: + env -i LANG=C.UTF-8 LC_ALL=C.UTF-8 CRYPTOGRAPHY_OPENSSL_NO_LEGACY=true PIP_CONSTRAINT=/snap/charmcraft/7517/lib/python3.12/site-packages/charmcraft/parts/plugins/charm-constraints.txt PATH=/snap/charmcraft/7517/libexec/charmcraft:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin SNAP=/snap/charmcraft/7517 SNAP_ARCH=amd64 SNAP_NAME=charmcraft SNAP_VERSION=4.0.1 /snap/charmcraft/7517/bin/python -u -I /snap/charmcraft/7517/lib/python3.12/site-packages/charmcraft/charm_builder.py --builddir /root/parts/charm/build --installdir /root/parts/charm/install --entrypoint /root/parts/charm/build/src/charm.py -p pip -p setuptools -p wheel -b pydantic -r requirements.txt
:: Traceback (most recent call last):
:: File "/snap/charmcraft/7517/lib/python3.12/site-packages/charmcraft/charm_builder.py", line 499, in <module>
:: main()
:: File "/snap/charmcraft/7517/lib/python3.12/site-packages/charmcraft/charm_builder.py", line 494, in main
:: builder.build_charm()
:: File "/snap/charmcraft/7517/lib/python3.12/site-packages/charmcraft/charm_builder.py", line 95, in build_charm
:: self.handle_dependencies()
:: File "/snap/charmcraft/7517/lib/python3.12/site-packages/charmcraft/charm_builder.py", line 368, in handle_dependencies
:: self._install_dependencies(staging_venv_dir)
:: File "/snap/charmcraft/7517/lib/python3.12/site-packages/charmcraft/instrum.py", line 152, in _f
:: return func(*args, **kwargs)
:: ^^^^^^^^^^^^^^^^^^^^^
:: File "/snap/charmcraft/7517/lib/python3.12/site-packages/charmcraft/charm_builder.py", line 298, in _install_dependencies
:: _process_run(
:: File "/snap/charmcraft/7517/lib/python3.12/site-packages/charmcraft/charm_builder.py", line 428, in _process_run
:: raise RuntimeError(
:: RuntimeError: Subprocess command ['/root/parts/charm/build/staging-venv/bin/pip', 'install', '--no-binary=:all:', '--requirement=requirements.txt'] execution failed with retcode 1
Recommended resolution: Check the build output and verify the project can work with the 'charm' plugin.
For more information, check out: https://documentation.ubuntu.com/charmcraft/4.0.1/reference/plugins/
Failed to run charmcraft in instance
There was a problem hiding this comment.
Can you run in verbose? I've been fixing rust type issues recently
There was a problem hiding this comment.
It's not reoccurring anymore
59ac30c to
8a349a1
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates how the Consul TCP health-check script is configured to locate the consul-notify Unix socket by prepending a fixed content-interface directory prefix from the config builder, rather than relying on relation-provided paths.
Changes:
- Add
ConsulConfigBuilder.HYPERVISOR_SOCKET_PREFIXand use it to prefix--socket-pathin generated Consul service check args. - Update unit tests to assert the prefixed socket path.
- Add
opstocharm-binary-python-packagesin the 22.04/24.04 charmcraft configs.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
tests/unit/test_charm.py |
Updates assertions to expect the socket path to be prefixed via ConsulConfigBuilder.HYPERVISOR_SOCKET_PREFIX. |
src/config_builder.py |
Prepends a fixed directory (hypervisor/) to the --socket-path argument in the Consul check configuration. |
charmcraft-24.04.yaml |
Adds ops to packaged Python dependencies for the 24.04 build config. |
charmcraft-22.04.yaml |
Adds ops to packaged Python dependencies for the 22.04 build config. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
efd3ebb to
03705db
Compare
03705db to
22a2d82
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8a349a1 to
c670a82
Compare
b4c6696 to
f26bb2b
Compare
f26bb2b to
4a6d91e
Compare
Issue
set socket directory prefix via config builder instead of relation data