Skip to content

fix:(cos): Use cos custom directory#169

Merged
cbartz merged 8 commits intomainfrom
fix/cos-custom-dashboard-migration
Mar 27, 2026
Merged

fix:(cos): Use cos custom directory#169
cbartz merged 8 commits intomainfrom
fix/cos-custom-dashboard-migration

Conversation

@cbartz
Copy link
Copy Markdown
Collaborator

@cbartz cbartz commented Mar 25, 2026

Overview

Move the dashboards to cos_custom.

Rationale

A recent change in paas-charm made get_cos_dir unusable. We spotted it because the dashboard was gone.

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)

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 updates observability assets so Grafana dashboards are delivered from the cos_custom directory (addressing the paas-charm change that made the previous COS dir lookup unusable), and adds integration coverage to ensure dashboards are actually present on the grafana-dashboard relation.

Changes:

  • Add integration tests that verify grafana-dashboard relation data includes non-empty dashboard templates (planner + webhook-gateway).
  • Add a any-charm Grafana-dashboard consumer fixture used by the new tests.
  • Remove the planner charm’s get_cos_dir override and add the planner Grafana dashboard under cos_custom/grafana_dashboards.

Reviewed changes

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

Show a summary per file
File Description
charms/tests/integration/test_webhook_gateway.py Adds an integration test asserting the webhook-gateway publishes dashboard templates over the grafana-dashboard relation.
charms/tests/integration/test_planner.py Adds an integration test asserting planner publishes dashboards and that the content includes planner-specific metrics.
charms/tests/integration/conftest.py Adds a fixture deploying any-charm as a Grafana-dashboard consumer for relation inspection.
charms/planner-operator/src/charm.py Removes the get_cos_dir override (previously used to locate COS assets).
charms/planner-operator/cos_custom/grafana_dashboards/go.json Introduces the planner Grafana dashboard in the cos_custom directory.
charms/planner-operator/src/cos/prometheus_alert_rules/.gitkeep Keeps the alert rules directory tracked (empty placeholder).
charms/planner-operator/src/cos/loki_alert_rules/.gitkeep Keeps the alert rules directory tracked (empty placeholder).

cbartz added 5 commits March 26, 2026 07:57
setuptools-scm 10.0.2 is incompatible with charmcraft's pinned pip
24.1.1 when building from source, causing "paths must be inside source
tree" errors. Use charm-binary-python-packages to install pydantic and
pydantic-core from wheels instead.
Use --only-binary=pluggy in requirements.txt to prevent pip from
building pluggy from source, avoiding the setuptools-scm >= 10
incompatibility with charmcraft's pinned pip 24.1.1.

See pypa/setuptools-scm#1302
juju show-unit displays the remote application's data under
application-data. We were checking from the provider side and seeing
the consumer's empty data. Check from the consumer side instead.
@cbartz cbartz marked this pull request as ready for review March 27, 2026 17:21
@cbartz cbartz enabled auto-merge (squash) March 27, 2026 17:21
@cbartz cbartz merged commit aeb65a0 into main Mar 27, 2026
40 of 41 checks passed
@cbartz cbartz deleted the fix/cos-custom-dashboard-migration branch March 27, 2026 17:22
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.

3 participants