close
Skip to content

docs: use cosl binary in K8s tutorial charm to work around error#2232

Merged
dwilding merged 1 commit intocanonical:mainfrom
dwilding:k8s-tutorial-binary
Dec 12, 2025
Merged

docs: use cosl binary in K8s tutorial charm to work around error#2232
dwilding merged 1 commit intocanonical:mainfrom
dwilding:k8s-tutorial-binary

Conversation

@dwilding
Copy link
Copy Markdown
Contributor

@dwilding dwilding commented Dec 12, 2025

This PR temporarily fixes #2229. As a more permanent fix, we should switch the K8s tutorial to use the latest uv-based Charmcraft profiles. We're planning to do that later in the 26.04 cycle.

@dwilding dwilding marked this pull request as ready for review December 12, 2025 08:46
Copilot AI review requested due to automatic review settings December 12, 2025 08:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements a temporary workaround for build errors encountered when packing charms with cos-lite dependencies. Instead of installing cargo to build Rust dependencies from source, the charm now uses pre-built binary packages for cosl.

Key changes:

  • Replaced the cargo build-package approach with charm-binary-python-packages configuration
  • Updated documentation to explain the workaround and note it's temporary until the tutorial is modernized

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
examples/k8s-5-observe/charmcraft.yaml Replaced cargo build-packages with charm-binary-python-packages configuration to use cosl binary
docs/tutorial/from-zero-to-hero-write-your-first-kubernetes-charm/observe-your-charm-with-cos-lite.md Updated documentation to reflect the workaround approach and clarify the temporary nature of the fix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Collaborator

@tonyandrewmeyer tonyandrewmeyer left a comment

Choose a reason for hiding this comment

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

Thanks for sorting this out - I agree that temporarily making this change until we're ready to do the larger one is a good move.

@dwilding dwilding merged commit 6032adb into canonical:main Dec 12, 2025
56 of 57 checks passed
@dwilding dwilding deleted the k8s-tutorial-binary branch December 12, 2025 10:20
dwilding added a commit that referenced this pull request Dec 17, 2025
…e charms (#2233)

As James suggested in #2229, this PR adds a scheduled workflow that
packs and runs integration tests for our example charms. I've scheduled
it to run each Tuesday before NZ hours.

(We already have a workflow that lints and runs unit tests for the
example charms. That workflow is fast and runs on PRs.)

I've organised the example charms into three jobs:
- The machine tutorial charm, based on a Charmcraft 4 profile.
- The httpbin-demo K8s charm, based on a Charmcraft 4 profile.
- The K8s tutorial charms, not based on a Charmcraft 4 profile. We're
planning to refactor these later in the 26.04 cycle.

I tested the jobs by temporarily enabling them for this PR. All are
passing after #2232 merged.
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.

Errors are being reported by onboarders when following the K8s tutorial

4 participants