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

feat: support multi-base recipes #2054

Merged
merged 6 commits into from
Dec 19, 2024
Merged

Conversation

mr-cal
Copy link
Contributor

@mr-cal mr-cal commented Dec 18, 2024

Adds support for multi-base recipes with the platforms keyword.

Internally, this moves to a new practice where the application stops modifying project data before passing the it to craft-platforms. This will ensure consistent processing by charmcraft and by launchpad.

Documentation is coming soon via canonical/craft-platforms#75 and #2009.

To summarize the usage, base and build-base are removed from the project and the base is encoded into the platform.

Platforms can be defined in a shorthand notation:

platforms:
  [email protected]:amd64:
  [email protected]:amd64:

Or they can be defined in standard form:

platforms:
  jammy:
    build-on: [[email protected]:amd64]
    build-for: [[email protected]:amd64]
  noble:
    build-on: [[email protected]:amd64]
    build-for: [[email protected]:amd64]

Fixes #1789
Fixes #2008
Creates canonical/craft-platforms#85
Found during implementation canonical/craft-platforms#80
(CRAFT-3718)

@mr-cal mr-cal force-pushed the work/CRAFT-3721-multi-base-support branch from f5e1f1c to 292d9fc Compare December 18, 2024 16:57
@mr-cal mr-cal added the squash label Dec 18, 2024
@mr-cal mr-cal force-pushed the work/CRAFT-3721-multi-base-support branch from 292d9fc to 750daa8 Compare December 18, 2024 21:26
Signed-off-by: Callahan Kovacs <[email protected]>
Signed-off-by: Callahan Kovacs <[email protected]>
@mr-cal mr-cal requested a review from cmatsuoka December 19, 2024 19:31
@mr-cal mr-cal marked this pull request as ready for review December 19, 2024 20:18
@mr-cal mr-cal requested a review from lengau December 19, 2024 20:19
@mr-cal
Copy link
Contributor Author

mr-cal commented Dec 19, 2024

Looks like I have one store-related spread test to address but otherwise this is ready for review.

Update: it was a transient store-side failure

Copy link
Contributor

@cmatsuoka cmatsuoka left a comment

Choose a reason for hiding this comment

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

Thanks! It would be nice to have a description of the overall platforms handling strategy in the PR description to help our confused future selves understand what's happening here.

Copy link
Collaborator

@lengau lengau left a comment

Choose a reason for hiding this comment

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

Nicely done! Lots of moving parts here.

@lengau lengau merged commit 1ad02d8 into main Dec 19, 2024
28 checks passed
@lengau lengau deleted the work/CRAFT-3721-multi-base-support branch December 19, 2024 21:45
lengau added a commit that referenced this pull request Jan 18, 2025
Adds
[reference](https://canonical-charmcraft--2080.com.readthedocs.build/en/2080/reference/platforms/)
and
[how-to](https://canonical-charmcraft--2080.com.readthedocs.build/en/2080/howto/build-guides/platforms/)
documentation for platforms, bases, and architectures in Charmcraft,
including information on the new [multi-base
support](#2054).


Fixes #2009
(CRAFT-3720)

---------

Signed-off-by: Callahan Kovacs <[email protected]>
Co-authored-by: Alex Lowe <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multi-base platform support Unable to build multi-base subordinate charms on 24.04
3 participants