Skip to content

Allow PyYAML 6.x - #214

Merged
ajkavanagh merged 5 commits into
canonical:masterfrom
freyes:bump-up-pyyaml
Apr 6, 2023
Merged

Allow PyYAML 6.x#214
ajkavanagh merged 5 commits into
canonical:masterfrom
freyes:bump-up-pyyaml

Conversation

@freyes

Copy link
Copy Markdown
Contributor

ops>=2.1.0 depends on PyYAML-6.x[0], allowing the installation of that version in layer-basic and the charm using layer-basic can lockdown on a more specific version of PyYAML.

It's important to keep reactive charms compatible with the ops framework, because there are compatibility layers to allow the use of interfaces in ops framework based charms[1]

[0] canonical/operator@9162c87
[1] openstack/charm-interface-hacluster@34b12aa

freyes added 4 commits April 5, 2023 17:17
ops>=2.1.0 depends on PyYAML-6.x[0], allowing the installation of that
version in layer-basic and the charm using layer-basic can lockdown on a
more specific version of PyYAML.
It's important to keep reactive charms compatible with the ops
framework, because there are compatibility layers to allow the use of
interfaces in ops framework based charms[1]
[0] canonical/operator@9162c87
[1] openstack/charm-interface-hacluster@34b12aa
Python 3.6 is not available on github's ubuntu-latest image, the last
image with python 3.6 was ubuntu-20.04, so switch to that version to run
the linting with older versions of python on ubuntu-20.04
Error:
ValueError: Error code '#' supplied to 'ignore' option does not match '^[A-Z]{1,3}[0-9]{0,3}$'
Replace whitelist_externals with allowlist_externals and use the full
path to the commands.
@freyes

Copy link
Copy Markdown
ContributorAuthor

Example of the failure that this patch aims to fix - https://review.opendev.org/c/openstack/charm-vault/+/879677

@freyes
freyes requested a review from ajkavanaghApril 6, 2023 13:41

@ajkavanaghajkavanagh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ajkavanagh
ajkavanagh merged commit a41b355 into canonical:masterApr 6, 2023
Comment threadwheelhouse.txt

# Cython is required to build PyYAML. To find out the supported versions check
# https://github.com/cython/cython/issues/2800
Cython

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not 100% sure because of this change, but a reactive charm has failed to build over the weekend. It's failing at Cython installation due to missing (Python.h: python3-dev).

Are you going to manage this dependency centrally or do you expect every single charm to have python3-dev?

2023-04-10 07:13:03.353319 | focal-medium | :: x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/root/snap/charmcraft/common/tmp8fu559sx/include -I/usr/include/python3.10 -c /root/snap/charmcraft/common/pip-install-s2qs0rbg/cython_6d98672645614f43bf70d0b7f222b29d/Cython/Plex/Scanners.c -o build/temp.linux-x86_64-cpython-310/root/snap/charmcraft/common/pip-install-s2qs0rbg/cython_6d98672645614f43bf70d0b7f222b29d/Cython/Plex/Scanners.o
2023-04-10 07:13:03.353337 | focal-medium | :: /root/snap/charmcraft/common/pip-install-s2qs0rbg/cython_6d98672645614f43bf70d0b7f222b29d/Cython/Plex/Scanners.c:21:10: fatal error: Python.h: No such file or directory
2023-04-10 07:13:03.353350 | focal-medium | :: 21 | #include "Python.h"
2023-04-10 07:13:03.353363 | focal-medium | :: | ^~~~~~~~~~
2023-04-10 07:13:03.353375 | focal-medium | :: compilation terminated.
2023-04-10 07:13:03.353640 | focal-medium | :: error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
2023-04-10 07:13:03.353668 | focal-medium | :: [end of output]
2023-04-10 07:13:03.353683 | focal-medium | ::
2023-04-10 07:13:03.353715 | focal-medium | :: note: This error originates from a subprocess, and is likely not a problem with pip.
2023-04-10 07:13:03.353737 | focal-medium | :: error: legacy-install-failure
2023-04-10 07:13:03.353748 | focal-medium | ::
2023-04-10 07:13:03.353759 | focal-medium | :: × Encountered error while trying to install package.
2023-04-10 07:13:03.353770 | focal-medium | :: ╰─> Cython

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we'll need to make charm-tools grow a feature to allow layers express build-dependencies (and probably stage dependencies).

@esunaresunar mentioned this pull request Apr 10, 2023
openstack-mirroring pushed a commit to openstack/charm-manila-dashboard that referenced this pull request Apr 12, 2023
Add libpython3-dev to the list of the build-packages, this is needed
since canonical/layer-basic#214 .
Change-Id: I4c09f365c2ed7c7484c4e8fac87e5cdd6480bb10
openstack-mirroring pushed a commit to openstack/charm-neutron-api-plugin-arista that referenced this pull request Apr 12, 2023
Add libpython3-dev to the list of the build-packages, this is needed
since canonical/layer-basic#214 .
Change-Id: I2905e93c6154297a86eb41f2ae919f9bcdafabc9
openstack-mirroring pushed a commit to openstack/charm-cinder-netapp that referenced this pull request Apr 12, 2023
Add libpython3-dev to the list of the build-packages, this is needed
since canonical/layer-basic#214 .
Change-Id: I0499d6c3c7dac72525cd93a9fd96e2ed9f6d62f3
openstack-mirroring pushed a commit to openstack/charm-keystone-ldap that referenced this pull request Apr 12, 2023
Add libpython3-dev to the list of the build-packages, this is needed
since canonical/layer-basic#214 .
Change-Id: I8ac63e1a03d72c857ba04c0ec50b4491a00f7ef4
openstack-mirroring pushed a commit to openstack/openstack that referenced this pull request Apr 12, 2023
* Update charm-keystone-ldap from branch 'master'
to 0f1520f4fa779f9ee4f8ecca071e37489852f3c0
- Fix build
Add libpython3-dev to the list of the build-packages, this is needed
since canonical/layer-basic#214 .
Change-Id: I8ac63e1a03d72c857ba04c0ec50b4491a00f7ef4
openstack-mirroring pushed a commit to openstack/charm-barbican-vault that referenced this pull request Apr 12, 2023
Add libpython3-dev to the list of the build-packages, this is needed
since canonical/layer-basic#214 .
Change-Id: I69895d604fb453cb6f1a48b5fa69544287fcd448
openstack-mirroring pushed a commit to openstack/openstack that referenced this pull request Apr 12, 2023
* Update charm-barbican-vault from branch 'master'
to 9b95a69b8e6ca7ce159b7f5551719207979e788d
- Fix build
Add libpython3-dev to the list of the build-packages, this is needed
since canonical/layer-basic#214 .
Change-Id: I69895d604fb453cb6f1a48b5fa69544287fcd448
openstack-mirroring pushed a commit to openstack/charm-keystone-kerberos that referenced this pull request Apr 12, 2023
Add libpython3-dev to the list of the build-packages, this is needed
since canonical/layer-basic#214 .
Change-Id: I172378e5bc8e919da4b21e75a5a9bcc19722b9ac
openstack-mirroring pushed a commit to openstack/charm-neutron-api-plugin-arista that referenced this pull request Apr 21, 2023
Add libpython3-dev to the list of the build-packages, this is needed
since canonical/layer-basic#214 .
Change-Id: I2905e93c6154297a86eb41f2ae919f9bcdafabc9
(cherry picked from commit f92e04d)
openstack-mirroring pushed a commit to openstack/charm-barbican-vault that referenced this pull request Apr 21, 2023
Add libpython3-dev to the list of the build-packages, this is needed
since canonical/layer-basic#214 .
Change-Id: I69895d604fb453cb6f1a48b5fa69544287fcd448
(cherry picked from commit 9b95a69)
openstack-mirroring pushed a commit to openstack/charm-keystone-ldap that referenced this pull request Apr 21, 2023
Add libpython3-dev to the list of the build-packages, this is needed
since canonical/layer-basic#214 .
Change-Id: I8ac63e1a03d72c857ba04c0ec50b4491a00f7ef4
(cherry picked from commit 0f1520f)
openstack-mirroring pushed a commit to openstack/charm-manila-dashboard that referenced this pull request Apr 21, 2023
Add libpython3-dev to the list of the build-packages, this is needed
since canonical/layer-basic#214 .
Change-Id: I4c09f365c2ed7c7484c4e8fac87e5cdd6480bb10
(cherry picked from commit 1ec2142)
openstack-mirroring pushed a commit to openstack/charm-cinder-netapp that referenced this pull request Apr 21, 2023
Add libpython3-dev to the list of the build-packages, this is needed
since canonical/layer-basic#214 .
Change-Id: I0499d6c3c7dac72525cd93a9fd96e2ed9f6d62f3
(cherry picked from commit 24ed370)
openstack-mirroring pushed a commit to openstack/charm-keystone-kerberos that referenced this pull request May 2, 2023
Add libpython3-dev to the list of the build-packages, this is needed
since canonical/layer-basic#214 .
Change-Id: I172378e5bc8e919da4b21e75a5a9bcc19722b9ac
(cherry picked from commit c43146e)
samuelallan72 pushed a commit to canonical/layer-filebeat that referenced this pull request Jul 25, 2024
libpython3-dev is required to build cython.
See canonical/layer-basic#214
This problem is only evident now since we switched to charm 3.x
in charmcraft builds in #115
ref. https://review.opendev.org/c/openstack/charm-keystone-ldap/+/880084
samuelallan72 pushed a commit to canonical/layer-filebeat that referenced this pull request Jul 26, 2024
libpython3-dev is required to build cython.
See canonical/layer-basic#214
This problem is only evident now since we switched to charm 3.x
in charmcraft builds in #115
ref. https://review.opendev.org/c/openstack/charm-keystone-ldap/+/880084
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@freyes@ajkavanagh@nobuto-m