← Back to issue list

Mark optional endpoints as optional in extensions

View original Github issue

Metadata

Project
charmcraft
Number
#2868
Type
issue
State
open
Author
wctaylor
Labels
—
Created
Updated
Closed
—

Current evaluation

Extension-generated charm metadata still omits optional: true for observability endpoints; maintainers support explicit values, but the open request remains unimplemented.

Suggested action: keep open

Reason: The extension snippet in charmcraft/extensions/app.py defines logging, metrics-endpoint, and grafana-dashboard endpoints without an optional field, and tests currently assert that incomplete shape. Maintainer tonyandrewmeyer explicitly supported making optional values explicit across profiles, including 12-factor ones, so this is a valid, localized change with moderate downstream testing impact.

Evaluated by: mr-cal-bot

Impact: 48 Quick Win: 30 Complexity: 25 Confidence: 91 Actionability: 84

Issue body

### Check existing issues - [x] I've verified that this request isn't described by any existing issues. ### Request The @canonical/solutions-qa team relies heavily on charm metadata in our automated charm testing pipelines in order to determine how to build a proper test bundle. Critically, we assume all endpoints that don't explicitly have `optional: true` are required, and this often results in extra charms pulled into tests that don't need to be there, which further increases the surface area for failures and often results in tests failing for reasons unrelated to the actual charm being tested. Observability endpoints are prime examples. They are almost never required for a charm to actually function. Marking endpoints like `logging`, `grafana-dashboard`, and `metrics-endpoint` as optional would significantly improve the accuracy and effectiveness of the charm integration testing initiative. The extensions generate metadata that don't mark these as optional, so we are requesting that the extensions get updated to add `optional: true` to the relevant endpoints. ### The problem it solves This solves the problem of larger-than-necessary charm bundles being deployed in the charm testing initiative, which increases the risk of irrelevant test failures, which in turn waste compute time.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 48
Quick Win: 30
Complexity: 25
Confidence: 91
Actionability: 84
keep open Extension-generated charm metadata still omits optional: true for observability endpoints; maintainers support explicit values, but the open request remains unimplemented.
stealth/space-bunny-alpha
Impact: 45
Quick Win: 28
Complexity: 25
Confidence: 92
Actionability: 82
keep open Framework extensions still omit `optional` from generated observability relations. Maintainers support explicit optional metadata, but the source and corresponding tests have not yet been updated.
stealth/space-bunny-alpha
Impact: 53
Quick Win: 34
Complexity: 28
Confidence: 93
Actionability: 88
keep open Extension-generated metadata should explicitly mark observability endpoints as optional, improving test bundle accuracy; maintainers support the change, including 12-factor profiles.
qwen3.6-35b-a3b-mtp-q6
Impact: 55
Quick Win: 47
Staleness: 5
Complexity: 15
Confidence: 85
Support Request: 10
keep open Feature request to mark observability endpoints (logging, metrics-endpoint, grafana-dashboard) as optional in charmcraft extension metadata templates. Actively discussed with maintainer buy-in.
qwen3.6-35b-a3b-mtp-q6
Impact: 50
Quick Win: 40
Staleness: 0
Complexity: 20
Confidence: 90
Support Request: 0
keep open Feature request to mark observability endpoints as optional in charmcraft extensions; maintainers have engaged and agreed to the proposed template updates.
qwen3.6-35b-a3b-mtp-q6
Impact: 40
Quick Win: 34
Staleness: 5
Complexity: 15
Confidence: 75
Support Request: 25
needs triage Feature request to mark grafana-dashboard, metrics-endpoint, and logging endpoints as optional in extension-generated metadata.

Update history

Date Change
updated
updated
updated
updated
updated
updated
created

Related issues

Issue Project State Summary Similarity
#2869 chore: mark extension-provided endpoints as optional charmcraft open Adds `optional: true` to observability/ingress endpoints in framework charmcraft.yaml templates, addressing issue #2868. +156/-32 across 5 files; unit/lint CI green but 3 snap-tests fail and 1 review comment is unresolved, awaiting maintainer review.
72%