canonical / canonical/charm-integration-testing

Bundle builder cannot discover providers available only on non-default tracks

Open
#634 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
6
Forks
1
Avg merge
1d 20h
Merged PRs (30d)
98

Description

## Problem

The Charmhub search API only returns charms that provide a given interface on their **default (latest) track**. When the provider charm has moved to a new track series and dropped an endpoint from its latest channel, the bundle builder solver cannot discover older-track revisions that still provide it.

## Example: `aws-iam`

`aws-iam` requires the `aws-iam` interface (its primary purpose - connecting to `kubernetes-control-plane` for AWS IAM webhook authentication).

- `kubernetes-control-plane` provided `aws-iam` on tracks 1.23-1.28
- `kubernetes-control-plane` >= 1.29 dropped the `aws-iam` provides endpoint (confirmed in the existing override comment and upstream source)
- The solver queries Charmhub for "who provides the `aws-iam` interface?" and gets no results, because `kubernetes-control-plane`'s default channel is now 1.35

Result: `UncompletableBundleError: Cannot fulfill charm endpoints: aws-iam:aws-iam` on all channels tested (1.25/, 1.33/, latest/).

The correct fix is **not** to mark `aws-iam:aws-iam` optional, since that endpoint is the charm's primary purpose. And it is **not** a stale override - `aws-iam` has no override at all.

## Root cause

The bundle builder's Charmhub resolver (`charmhub_http.py` / `bundle_builder.py`) uses the Charmhub search API to find candidate providers. That API only indexes the recommended/default channel of each charm. It has no way to query "which charms provide interface X on any track".

## Affected test results

28 test results attached to SQT-990 via rule 550 (`charm_qa:failure:build_bundle:unfulfilled_endpoint=aws-iam:aws-iam`). These may be more correctly attributed to this limitation than to SQT-990 (stale overrides).

## Possible fixes

1. **Extend the solver to try candidate providers on all their tracks**, not just the default channel. This would let it find `kubernetes-control-plane 1.25` as a valid provider of `aws-iam`.
2. **Allow the spec to pin a provider charm to a specific track**, so authors can explicitly declare `kubernetes-control-plane` at track `1.25` when writing the aws-iam spec.
3. **Accept this as a known limitation** and treat such failures as unanswerable by the override system.

Contributor guide

Open the contributing guide

Research direction

Start by tracing provider discovery through charmhub_http.py and bundle_builder.py, then reproduce the aws-iam:aws-iam failure on the listed channels. Review the existing override comment and the attached SQT-990 results, and clarify which proposed direction is accepted. Done means the resolver behavior and regression coverage demonstrate how non-default-track providers should be handled.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devops, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.