-
Notifications
You must be signed in to change notification settings - Fork 75
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
docs: add platforms reference and how-to #2080
Conversation
a156c79
to
3827095
Compare
Signed-off-by: Callahan Kovacs <[email protected]>
3827095
to
651c5be
Compare
@jnsgruk - do you mind reviewing this documentation? I'm looking for feedback from a charm dev who hasn't already tried building multi-base charms. For some reason, I can't add you as a PR reviewer. |
.. code-block:: yaml | ||
|
||
platforms: | ||
[email protected]:amd64: |
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’m kinda surprised by the difference between ‘ubuntu-22.04-amd64’ and ‘[email protected]:amd64’ - the two seem quite different and not in a very ‘obvious’ way?
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.
Yeah, I think I was too strict with the validation and am circumventing my own rules.
I made the validation strict to prevent ambiguous definitions, like this one that is a hybrid of shorthand and longhand notation with mismatched bases:
platforms:
[email protected]:riscv64:
build-on: [[email protected]:amd64, [email protected]:riscv64]
build-for: [[email protected]:riscv64]
But I can circumvent my own validation by not using <base>:<arch>
in the platform name:
platforms:
ubuntu-24.04-riscv64:
build-on: [[email protected]:amd64, [email protected]:riscv64]
build-for: [[email protected]:riscv64]
I could use simple platform names like noble-riscv64
or I could drop the validation, such that the platform name is completely arbitrary when build-on
and build-for
are defined. @lengau, any thoughts?
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.
(and my examples were wrong, to add to the confusion)
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.
My preference would be that the only time we have limitations on the name of a platform is when it's used to infer the build-on
and build-for
. Otherwise Järvfjället
is a perfectly good platform name.
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'm fine with that. Once you, Claudio, and I agree on it, I can update the spec, relax the validation (which is trivial), and update the docs.
I don't think we need to block this PR, it can be a future improvement.
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 <[email protected]>
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.
Since this is a critical topic, I've made some fairly in-depth suggestions.
I'm probably late to the party, but some of my points relate to the platform-architecture question, and affect the page and section titles. For clearer language that mimics natural speech, I'm leaning toward the notion of "build architecture" and "target architecture" (Docker uses this pair). I hope these proposals won't lead to blockages. If they do, feel free to ignore them.
I didn't give every line the same amount of attention, but I'm sure JJ and I will revisit these pages more than once later.
@medubelko requesting you again as I've got some follow-up questions. I haven't yet handled all the changes. |
With both snippets, building on amd64 will produce two charms, one for | ||
amd64 systems running Ubuntu 22.04 and one for amd64 systems running | ||
Ubuntu 24.04. |
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.
With both snippets, building on amd64 will produce two charms, one for | |
amd64 systems running Ubuntu 22.04 and one for amd64 systems running | |
Ubuntu 24.04. | |
With both snippets, building on AMD64 will produce two charms, one for | |
AMD64 hosts running Ubuntu 22.04 LTS and one for AMD64 hosts running | |
Ubuntu 24.04 LTS. |
Since you changed it to "hosts" earlier in the page.
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'm distinguishing here the build host from the runtime system, which is why I kept these as systems.
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.
Non-blocking, but what makes runtime different? Don't charms run on every kind of machine?
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.
@lengau I like the changes you've made. I've closed the ones we can't handle for now. The rest of these are mechanical improvements which should be easy to do, with one suggestion to resolve a semantic question. If you're short on time I can commit them today.
5cc482b
to
fc7df45
Compare
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 feel cheeky approving my own changes, but I'm hitting approve here so we have ample approvals for a merge.
Adds reference and how-to documentation for platforms, bases, and architectures in Charmcraft, including information on the new multi-base support.
Fixes #2009
(CRAFT-3720)