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

Split bases to fix install errors #115

Merged
merged 1 commit into from
Jul 25, 2024
Merged

Split bases to fix install errors #115

merged 1 commit into from
Jul 25, 2024

Conversation

samuelallan72
Copy link
Contributor

@samuelallan72 samuelallan72 commented Jul 25, 2024

charm was pinned to 2.x, which uses a bundled version of python (I think python3.6).
See https://forum.snapcraft.io/t/2-x-and-3-x-tracks-for-the-charm-snap/31937 . This means that the requirements resolved from wheelhouse.txt at build time are not necessarily the same requirements as would be installed at deploy time,
because the python version may be different.
So this caused missing python package dependencies during install on focal and jammy.

According to juju/charm-tools#640 , this can be fixed by switching to charm 3.x,
and separating the bases
so the charm for each base is built on that base.
This ensures that the same version of python is used at build time as at runtime.

Fixes: #112
Fixes: #114

`charm` was pinned to 2.x, which uses a bundled version of python[0]
(I think python3.6).
See https://forum.snapcraft.io/t/2-x-and-3-x-tracks-for-the-charm-snap/31937 .
This means that the requirements resolved from wheelhouse.txt
at build time are not necessarily the same requirements
as would be installed at deploy time,
because the python version may be different.
So this caused missing python package dependencies during install
on focal and jammy.

According to juju/charm-tools#640 ,
this can be fixed by switching to `charm` 3.x,
and separating the bases
so the charm for each base is built on that base.
This ensures that the same version of python is used
at build time as at runtime.

Fixes: #112
Fixes: #114
Copy link

@jneo8 jneo8 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@chanchiwai-ray chanchiwai-ray left a comment

Choose a reason for hiding this comment

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

Tested and it's working

@samuelallan72 samuelallan72 merged commit f050387 into master Jul 25, 2024
1 check failed
@samuelallan72 samuelallan72 deleted the bases branch July 25, 2024 07:46
@samuelallan72
Copy link
Contributor Author

Merged without workflow passing, because the workflow is known to fail because there are no tests.

samuelallan72 added a commit 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 added a commit 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 free to 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.

Charm install broken on jammy Charm install broken on focal
3 participants