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

chore: support multiple charm bases #272

Closed
wants to merge 6 commits into from
Closed

chore: support multiple charm bases #272

wants to merge 6 commits into from

Conversation

gruyaume
Copy link
Contributor

@gruyaume gruyaume commented Dec 2, 2024

Description

We add support for building, running integration tests, and publishing for multiple charm bases. For now, we will support [email protected] and [email protected].

Fixes #270

This is a temporary solution

This solution is aimed at supporting the Openstack team in releasing sunbeam by christmas. In the longer run, we'll want to leverage the (not yet existing) multi base support in charmcraft.

Why aren't we building for [email protected] on arm?

There is an issue when installing tox on Ubuntu24.04 on the arm runner:

error: externally-managed-environment
  
  × This environment is externally managed
  ╰─> To install Python packages system-wide, try apt install
      python3-xyz, where xyz is the package you are trying to
      install.
      
      If you wish to install a non-Debian-packaged Python package,
      create a virtual environment using python3 -m venv path/to/venv.
      Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
      sure you have python3-full installed.
      
      If you wish to install a non-Debian packaged Python application,
      it may be easiest to use pipx install xyz, which will manage a
      virtual environment for you. Make sure you have pipx installed.
      
      See /usr/share/doc/python3.12/README.venv for more information.
  
  note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
  hint: See PEP 668 for the detailed specification.

Arm support is a nice to have (that nobody uses for the time being) and solving this issue can be done at a different time.

Rationale

As of the latest charmcraft version, we can only specify 1 base per charmcraft.yaml file.

Reference:

Other alternatives

We could have gone with other alternatives like different charm folders, branches, or scripts. I found this approach here (2 different charmcraft.yaml) files to be the simplest.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that validate the behaviour of the software
  • I validated that new and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have bumped the version of the library

Signed-off-by: Guillaume Belanger <[email protected]>
@gruyaume gruyaume requested a review from a team as a code owner December 2, 2024 21:41
@gruyaume gruyaume marked this pull request as draft December 3, 2024 18:55
Signed-off-by: Guillaume Belanger <[email protected]>
@gruyaume gruyaume changed the title chore: bump charm base to ubuntu 24.04 chore: support multiple charm bases Dec 3, 2024
Signed-off-by: Guillaume Belanger <[email protected]>
@gruyaume gruyaume closed this Dec 3, 2024
@gruyaume gruyaume reopened this Dec 4, 2024
@gruyaume gruyaume closed this Dec 6, 2024
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.

[Feature Request] Release a 24.04 version
1 participant