Skip to content

feat(notes): read Helm charts' own changes and their sources - #192

Merged
sweepies merged 2 commits into
mainfrom
feat/helm-chart-notes
Nov 6, 2026
Merged

sweepies merged 2 commits into
mainfrom
feat/helm-chart-notes

Conversation

@sweepies

@sweepies sweepies commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

Fixes #191.

OCI Helm charts never got release notes. The Count read the source from the image config's Labels, and a chart's config is Chart.yaml as JSON, so it has none. Charts from an index.yaml had no source lookup at all.

Changes

  • Chart's own changes first. When any version in the range has Artifact Hub's artifacthub.io/changes annotation, those lists are the notes: plain entries as a list, structured ones grouped by kind, and versions without the annotation say so. OCI charts are read one config per version (at most 32); an index.yaml already holds every version.
  • Then sources. Without the annotation, the chart's first sources entry on a supported host is the source repository. PRs then say the notes came from the chart's sources and may describe the packaged application.
  • Manifest annotation. Images without a source label fall back to the manifest's org.opencontainers.image.source annotation, after the official-image table (official images annotate their Dockerfile repository).
  • Package directory. GitHub /tree/<branch>/<dir> URLs set the package directory, so a chart's own CHANGELOG.md in a charts monorepo is found. The branch must be one path segment.
  • chart-releaser tags. <chart>-<version> tags are understood, matched against the chart's name only.
  • Bare #123. Chart text has no upstream, so bare #123 references are neutralised rather than letting GitHub link them to the PR's own repository.

Docs: guide/release-notes.md (source table, Helm section, private GitHub repositories only give changelogs) and the compatibility matrix.

Follow-ups

  • Reading a CHANGELOG.md packaged inside the chart. On hold until we hear whether the annotation or sources covers the reporter's case.
  • Branch names containing / in /tree/ URLs pick the wrong directory, which falls back to the root changelog.

View guided diff Turn on auto-fix

OCI Helm charts never got release notes: their source was read from image
config labels, which a chart's config does not have, and index.yaml charts
had no source lookup at all.

- A chart's artifacthub.io/changes annotation is its notes when any version
  in the range has it, for OCI and index.yaml charts alike.
- Otherwise the chart's `sources` name the repository, and the PR says the
  notes came from there, since that is often the application's repository.
- Images without a source label take the manifest's source annotation.
- GitHub /tree/<branch>/<dir> URLs name the package directory, and
  chart-releaser's <chart>-<version> tags are understood.

Refs #191
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
count-patchula 869c111 Commit Preview URL

Branch Preview URL
Nov 06 2026, 08:45 AM

@olivia-colomar-app

olivia-colomar-app Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

¡Listo! Review complete — see the comment below. 4 inline notes attached to the diff. 🎯

Comment thread crates/datasource/src/docker.rs Resolved
Comment thread crates/datasource/src/docker.rs Resolved
Comment thread crates/datasource/src/notes/chart.rs Resolved
Comment thread crates/datasource/src/notes.rs Resolved

@olivia-colomar-app olivia-colomar-app Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@/tmp/tmp.FxM84fD0hw/old_body.md

- Map OCI build metadata (+) to its tag (_) for every config read, and let
  OCI versions with build metadata bound a range.
- Read a chart's own changes before its source, so a source that cannot be
  read only loses the Source link.
- Take org.opencontainers.image.source from a multi-platform index when the
  platform's manifest has none.
- Say a chart version could not be read rather than that it lists no changes.
- Match chart-releaser's <chart>-<version> tags only for charts.

@olivia-colomar-app olivia-colomar-app Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

¡Volví! Sombra again — I traced c1e8add line by line against my four findings. Clean work, everything holds. 🕷️

Follow-up on fix(notes): address review of chart release notes (869c111..c1e8add). I verified each fix in the tree and read the three new tests; I did not re-run the suite locally.

Resolved — verified

  • P2 — image_source and the +→_ mapping: image_config now normalises +→_ itself, so oci_chart, image_source and the chart range probe all share it, and Source::Docker is unaffected (+ can't appear in its tags). release_notes reads chart_sections first, and in the from_chart path a failed source read now only costs the Source link (.ok().flatten()), which is the right failure scope. boundary also gained the OCI fallback for + build metadata — 1.1.0+meta now bounds the range. Covered by chart_versions_with_build_metadata_read_their_underscore_tags.
  • P3 — index-level annotations: the annotation is captured at every manifest level as the loop descends, so a platform manifest's own org.opencontainers.image.source overrides the index's and the index's survives otherwise. Covered by a_multi_platform_index_annotates_the_source_for_its_platforms.
  • P3 — failed read renders "lists no changes": per-version reads are now Result<Option<String>, ()>; Err renders "The Count could not read the chart for this version." and sets incomplete, while Ok(None) keeps the honest "lists no changes". Covered by a_chart_version_that_cannot_be_read_says_so.
  • P4 — global - separator: narrowed to repository.chart_sources, which is set exactly where a repository comes from a chart's sources (ChartNotes::repository, the chart annotation fallback in image_source). Since - is new in this PR, gating it this way loses nothing that main matched. Covered by chart_releaser_tags_name_the_chart_then_its_version.

New pass — no new findings

  • The Ok(Some) arm of release_notes still returns early with from_chart; the extra notes_source_repository call is batch-memoised and its failure only drops the link, as intended.
  • The all-Err early return in read_chart_range falls back to source notes without flagging incomplete — identical to before, so not a regression (and the Err(_) arm in the caller still covers wholesale chart_sections failure).
  • image_config's +→_ is the exact inverse of lookup's _→+ for Source::Oci, so tags that genuinely contain _ round-trip correctly.

Nothing to flag from P0–P4. CI is green except the corpus job still in flight at review time.

@sweepies
sweepies merged commit 104dfc7 into main Nov 6, 2026
11 checks passed
@sweepies
sweepies deleted the feat/helm-chart-notes branch November 6, 2026 09:12
@sweepies sweepies mentioned this pull request Nov 6, 2026
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.

Release notes for private OCI images

1 participant