-
Notifications
You must be signed in to change notification settings - Fork 447
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: add platforms and drop architectures for core24 #4630
feat: add platforms and drop architectures for core24 #4630
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/craft-application #4630 +/- ##
=============================================================
+ Coverage 89.14% 89.23% +0.08%
=============================================================
Files 331 335 +4
Lines 22078 22323 +245
=============================================================
+ Hits 19682 19919 +237
- Misses 2396 2404 +8 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did a first review pass, thanks!
snapcraft/models/project.py
Outdated
if len(build_for) > 1: | ||
raise CraftValidationError( | ||
str( | ||
f"Trying to build a rock for {build_for} " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(this refers to rock
)
Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
84dfa5c
to
a136703
Compare
Sorry for the force-push, there were file conflicts. The already-reviewed commit has not been changed. |
@mr-cal is this ready for review? |
Not yet 🙃 |
Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
This is now ready for review. A few outstanding items:
Which means the effective base is |
grade: devel | ||
confinement: strict | ||
base: core22 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this might have uncovered a new bug?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or was this test in the core24
suite accidentally not updated to base: core24
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
tests/spread/core24/platforms/snaps/platform-match` fails because snapcraft is not using the build-for from the build plan and is instead using the host architecture. Snapcraft creates the correct build plan but it feels like the build-for isn't getting passed from craft-application to craft-parts. I haven't figured this out yet. |
I think the problem is this: https://github.com/canonical/snapcraft/blob/main/snapcraft/application.py#L47 |
Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
Thank you! I'm not sure I would have figured that out on my own. |
Looks like some spread tests are failing because there are a handful of |
Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic work! This was a biggie
Some of the failures are like this:
Looks like this validation should a) look at the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After a long discussion we understood the issues and the platforms validation pattern used in this PR. Although it works, there is redundant and/or sub-optimal model validation that also exists in Rockcraft. These can be addressed in follow-up PRs for both Snapcraft and Rockcraft.
Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
…work/CRAFT-2535-platforms
Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
For the test failures for google:ubuntu-24.04-64:tests/spread/core24/grammar:arm64: I think we need something like this in craft-application: canonical/craft-application@main...work/grammar-build-for . Maybe this should follow the same path as canonical/craft-application#259 now that there is a But even after that patch, Otherwise, the spread tests look good. |
@mr-cal I think the problem with the |
Sounds good, I'll make an issue after
New issue in craft-application: canonical/craft-application#261 |
@mr-cal Just migrated my app to core24. Platforms is declared only as amd64 and arm64 but remote build is trying to build for all platforms. |
tox run -m lint
?tox run -e test-py310
? (supported versions:py39
,py310
,py311
,py312
)This PR is a draft.
platforms
in core24architectures
in core24Similar to
architectures
, theplatforms
keyword is optional and defaults to building-on and building-for the host architecture.As much as possible, I tried to follow charmcraft's and rockcraft's implementation of platform support.
(CRAFT-2535)