-
Notifications
You must be signed in to change notification settings - Fork 127
docs: remove comments from K8s tutorial and clarify about persisting data #2253
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
Conversation
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.
Pull request overview
This PR removes outdated HTML comments from the Kubernetes charm tutorial documentation and enhances guidance about data persistence in charms. The comments contained draft text that has been incorporated into the published tutorial and is no longer needed.
Key changes:
- Removed all HTML comment blocks containing draft/original tutorial text across multiple documentation files
- Expanded the tip about charm initialization in the "Create a minimal Kubernetes charm" section to clarify that data cannot be persisted between Juju events by storing it in memory
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| study-your-application.md | Removed HTML comments containing draft application overview text and Docker build instructions |
| observe-your-charm-with-cos-lite.md | Removed HTML comments with draft text about Grafana dashboard links and API endpoint testing |
| integrate-your-charm-with-postgresql.md | Removed HTML comment about updating documentation links |
| create-a-minimal-kubernetes-charm.md | Removed HTML comments with draft explanations and expanded the tip about charm initialization to clarify data persistence limitations |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| https://github.com/canonical/api_demo_server/pkgs/container/api_demo_server | ||
|
|
||
| <!-- |
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.
These details are captured in the README of the demo server repo: https://github.com/canonical/api_demo_server
benhoyt
left a comment
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.
Looks good to me, thanks
| ```{tip} | ||
| **Pro tip:** Use `__init__` to hold references (pointers) to other `Object`s or immutable state only. That is because a charm is reinitialised on every event. | ||
| **Pro tip:** Use `__init__` to hold references (pointers) to other `Object`s or immutable state only. That is because a charm is reinitialised on every event. You can't persist data between Juju events by storing it in memory. |
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.
sarcasm: the singular data strikes again!
The K8s charm tutorial contains comments with original/draft text of the tutorial. For the most part, the comments are captured in the text of the tutorial. I've reviewed all the comments and don't think we need to keep any of them.
While doing this, I felt it was worth expanding one tip in Create a minimal Kubernetes charm. I've used similar wording to the machine charm tutorial.
Resolves #2070.