Skip to content

feat: add debug juju action for enabling/disabling flavor#106

Merged
florentianayuwono merged 19 commits into
mainfrom
feat/debug-action-ISD-4481
Feb 6, 2026
Merged

feat: add debug juju action for enabling/disabling flavor#106
florentianayuwono merged 19 commits into
mainfrom
feat/debug-action-ISD-4481

Conversation

@florentianayuwono

@florentianayuwono florentianayuwono commented Jan 28, 2026

Copy link
Copy Markdown
Collaborator

Overview

Add a debug Juju action that enables operators to enable or disable flavors directly through the planner charm.

Rationale

So that operators can perform debugging.

Checklist

  • Changes comply with the project's coding standards and guidelines (see CONTRIBUTING.md and STYLE.md)
  • CONTRIBUTING.md has been updated upon changes to the contribution/development process (e.g. changes to the way tests are run)
  • Technical author has been assigned to review the PR in case of documentation changes (usually *.md files)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adds a debug Juju action that enables operators to enable or disable flavors directly through the planner charm without requiring API calls.

Changes:

  • Adds a new update-flavor subcommand to the planner binary that modifies flavor enabled/disabled state in the database
  • Implements a Juju action handler in the charm that invokes the planner subcommand
  • Adds integration test coverage for the new action functionality

Reviewed changes

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

File Description
cmd/planner/main.go Implements update-flavor subcommand with flag parsing and database operations to enable/disable flavors
charms/planner-operator/src/charm.py Adds action handler that executes the planner subcommand via subprocess
charms/planner-operator/charmcraft.yaml Defines the update-flavor action schema with flavor and disable parameters
charms/tests/integration/test_planner.py Adds integration test verifying the action correctly toggles flavor state

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

Comment thread cmd/planner/main.go Outdated
Comment thread cmd/planner/main.go Outdated
Comment thread charms/planner-operator/charmcraft.yaml Outdated
Comment thread charms/tests/integration/test_planner.py Outdated
florentianayuwono and others added 3 commits January 29, 2026 10:06
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

@cbartz cbartz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

TY! I think we should use the REST API, seems to make the code much simpler.

Comment thread charms/planner-operator/src/charm.py Outdated
Comment thread cmd/planner/main.go

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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


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

Comment thread charms/planner-operator/src/charm.py Outdated
Comment thread charms/planner-operator/src/charm.py Outdated
Comment thread charms/planner-operator/src/charm.py Outdated
Comment thread charms/planner-operator/src/charm.py Outdated
Comment thread charms/planner-operator/src/charm.py Outdated
Comment thread charms/planner-operator/src/charm.py Outdated
Comment thread charms/planner-operator/src/charm.py Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.


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

Comment thread charms/planner-operator/src/charm.py Outdated
Comment thread charms/planner-operator/src/charm.py Outdated
Comment thread charms/planner-operator/src/charm.py Outdated
Comment thread charms/tests/integration/test_planner.py

@florentianayuwono florentianayuwono left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

review session from weii

Comment thread charms/planner-operator/src/charm.py Outdated
Comment thread charms/planner-operator/src/charm.py Outdated
Comment thread charms/planner-operator/src/charm.py Outdated
Comment thread charms/planner-operator/src/charm.py Outdated

@yanksyoon yanksyoon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would refactoring the planner client out help with charm code implementation and testing?
Thank you!

Comment thread charms/planner-operator/src/charm.py Outdated
Comment thread charms/planner-operator/src/charm.py Outdated
Comment thread charms/planner-operator/src/charm.py Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread charms/tests/integration/test_planner.py
@florentianayuwono florentianayuwono self-assigned this Feb 3, 2026

@yanksyoon yanksyoon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for the changes, LGTM!

Comment thread charms/planner-operator/src/charm.py Outdated
Comment thread charms/planner-operator/src/planner.py
Comment thread charms/planner-operator/src/planner.py

Copilot AI commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

@yanksyoon I've opened a new pull request, #111, to work on those changes. Once the pull request is ready, I'll request review from you.

Comment thread charms/planner-operator/src/charm.py
Comment thread charms/planner-operator/src/planner.py
Comment thread charms/planner-operator/src/charm.py
Comment thread charms/planner-operator/src/planner.py Outdated
florentianayuwono and others added 2 commits February 5, 2026 19:46
Co-authored-by: Christopher Bartz <christopher.bartz@canonical.com>
Comment thread charms/planner-operator/tests/unit/test_planner.py Outdated
Comment thread charms/planner-operator/tests/unit/test_planner.py Outdated
@florentianayuwono florentianayuwono merged commit 4619008 into main Feb 6, 2026
34 checks passed
@florentianayuwono florentianayuwono deleted the feat/debug-action-ISD-4481 branch February 6, 2026 08:52
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.

8 participants