refactor: remove repositories list from OCI helm remote; use single-chart base_url per remote #41

Closed
opened 2026-05-05 22:11:40 +10:00 by unkinben · 0 comments
Owner

Problem

The current OCI helm remote implementation requires a repositories list in the remote config:

woodpecker-ci-helm:
  base_url: "oci://ghcr.io/woodpecker-ci/helm"
  package: "helm"
  repositories:
    - woodpecker

This is wrong. A remote should represent one upstream backend. Aggregating multiple charts in a single remote duplicates the job of virtuals.

Desired design

One remote = one OCI chart repository (full path in base_url):

woodpecker-helm:
  base_url: "oci://ghcr.io/woodpecker-ci/helm/woodpecker"
  package: "helm"

To combine multiple OCI charts, use a virtual (same as HTTP remotes).

Required changes

  • Remove the repositories list from remote/oci_helm.py
  • build_index_yaml should derive the chart name from the last path component of the OCI repo (or from the Chart.yaml name field in the config blob)
  • fetch_chart_tgz similarly needs no repositories parameter — the repo path is fully encoded in base_url
  • Introduce proper data classes (e.g. OciRemoteConfig, OciManifest, OciChartVersionEntry) instead of passing raw dict everywhere
  • Update example configs in examples/ to use the single-chart-per-remote form
  • Update unit and integration tests accordingly
## Problem The current OCI helm remote implementation requires a `repositories` list in the remote config: ```yaml woodpecker-ci-helm: base_url: "oci://ghcr.io/woodpecker-ci/helm" package: "helm" repositories: - woodpecker ``` This is wrong. A remote should represent **one** upstream backend. Aggregating multiple charts in a single remote duplicates the job of virtuals. ## Desired design One remote = one OCI chart repository (full path in `base_url`): ```yaml woodpecker-helm: base_url: "oci://ghcr.io/woodpecker-ci/helm/woodpecker" package: "helm" ``` To combine multiple OCI charts, use a virtual (same as HTTP remotes). ## Required changes - Remove the `repositories` list from `remote/oci_helm.py` - `build_index_yaml` should derive the chart name from the last path component of the OCI repo (or from the Chart.yaml `name` field in the config blob) - `fetch_chart_tgz` similarly needs no `repositories` parameter — the repo path is fully encoded in `base_url` - Introduce proper data classes (e.g. `OciRemoteConfig`, `OciManifest`, `OciChartVersionEntry`) instead of passing raw `dict` everywhere - Update example configs in `examples/` to use the single-chart-per-remote form - Update unit and integration tests accordingly
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unkin/artifactapi#41