Skip to content

fix(helm): stamp Chart.yaml version on release - #64

Merged
onedr0p merged 1 commit into
mainfrom
feat/stamp-chart-version
Jul 24, 2026
Merged

onedr0p merged 1 commit into
mainfrom
feat/stamp-chart-version

Conversation

@onedr0p

@onedr0p onedr0p commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Ports home-operations/tuppr#414 + home-operations/tuppr#415 to this repo (chart-only; no Rust changes).

What

The in-repo chart carried a 0.0.0 placeholder for both version and appVersion, so the committed Chart.yaml and the generated chart README never matched a real release. release-please now stamps both (current release 0.3.1). The release workflow still packages with --version/--app-version from the tag, so the published chart is unchanged; this only keeps the repo copy from going stale.

Why the typed generic updater

Chart.yaml is registered as { "type": "generic", "path": ... } rather than a bare string path. A plain path with a .yaml extension makes release-please pick its YAML updater, which re-serializes the document (stripping every comment in Chart.yaml) and misses appVersion entirely. The generic updater does an annotation-driven in-place replacement, so the comments survive and both annotated lines get stamped.

Badge consequence

The chart README badges are now hand-rolled in README.md.gotmpl instead of {{ template "chart.badgesSection" . }}: the generic updater replaces only the first semver on an annotated line, and shields.io's /badge/ form would let it swallow the -informational colour suffix as a prerelease. Each version badge therefore uses the static/v1 query form (version followed by &), keeps the version out of its alt text, and carries its own <!-- x-release-please-version --> annotation. The comment in the template documents that constraint.

Tests

No chart unit test changes were needed. charts/drm-exporter/tests/daemonset_test.yaml already asserts the image tag by overriding chart.appVersion: 1.2.3 rather than matching the placeholder, so it is version-independent already. The only other 0.0.0-looking matches in the chart are the 0.0.0.0 metrics bind address, which is unrelated.

Cargo.toml / Cargo.lock are untouched: release-please (release-type: simple) does not stamp them here, and nothing in this change reaches Rust code.

Verification

  • mise run helm-lint - pass (1 chart(s) linted, 0 chart(s) failed; pre-existing icon is recommended info only)
  • mise run helm-test (helm unittest) - pass: 7 suites, 32 tests, 0 failures
  • mise run helm-docs then mise run helm-docs-check - pass, exit 0, no diff (README regenerated with the new badges and 0.3.1; values.schema.json unchanged)
  • jq -e . release-please-config.json - valid JSON; the shared lefthook format-json/format-yaml hooks ran clean on commit
  • Rust gates deliberately not run: no Rust file is touched

The in-repo chart carried a `0.0.0` placeholder for both `version` and
`appVersion`, so the committed Chart.yaml and README never matched a real
release. release-please now stamps both (the release workflow still re-stamps
them from the tag at package time, so the published chart is unchanged).

Chart.yaml is registered as `{"type": "generic"}` rather than a bare path: a
plain string path with a `.yaml` extension makes release-please pick its YAML
updater, which re-serializes the document (stripping every comment) and misses
`appVersion` entirely. The generic updater does an annotation-driven in-place
replacement instead.

The chart README badges are hand-rolled in README.md.gotmpl instead of
`chart.badgesSection`: the generic updater replaces only the first semver on an
annotated line, and shields.io's `/badge/` form would let it swallow the
`-informational` suffix as a prerelease, so each version badge uses the
`static/v1` query form and carries its own annotation.

The chart unit tests needed no change - the image-tag test already overrides
`chart.appVersion` instead of asserting the placeholder.

Signed-off-by: Devin Buhl <devin@buhl.casa>
@greptile-apps

greptile-apps Bot commented Jul 24, 2026

Copy link
Copy Markdown

Greptile Summary

Updates release automation to keep the repository’s Helm chart metadata synchronized with releases.

  • Registers Chart.yaml with release-please’s generic updater and adds version annotations.
  • Replaces generated chart badges with annotation-compatible static badges.
  • Regenerates the chart README with version 0.3.1.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete functional, release, documentation-generation, or security defects identified.

The chart and generated README use matching release annotations, while packaging continues to derive both chart versions directly from the release tag.

T-Rex T-Rex Logs

What T-Rex did

  • I reviewed pre-generation metadata, badge values, and hashes to establish the baseline state before Helm docs generation.
  • I ran Helm docs generation and confirmed the output had no differences compared to the baseline.
  • I executed the exact reproducible generation and validation script to ensure the workflow can be repeated reliably.
  • I verified the Helm lint and render results and completed final tracked-source verification to close the validation.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
charts/drm-exporter/Chart.yaml Replaces placeholder chart versions with annotated release values while preserving package-time stamping.
charts/drm-exporter/README.md Regenerates version badges in an annotation-compatible format using the current chart metadata.
charts/drm-exporter/README.md.gotmpl Replaces the standard badge helper with equivalent badges designed for release-please’s generic updater.
release-please-config.json Adds the chart metadata and generated README to the release-please extra-file update set.

Reviews (1): Last reviewed commit: "fix(helm): stamp Chart.yaml version on r..." | Re-trigger Greptile

@onedr0p
onedr0p merged commit 8309502 into main Jul 24, 2026
7 checks passed
@onedr0p
onedr0p deleted the feat/stamp-chart-version branch July 24, 2026 23:42
@sticky-gecko sticky-gecko Bot mentioned this pull request Jul 24, 2026
gabrielcosi pushed a commit to gabrielcosi/home-ops that referenced this pull request Jul 25, 2026
…ter (0.3.1 ➔ 0.3.2) (#108)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [ghcr.io/home-operations/charts/drm-exporter](https://github.com/home-operations/drm-exporter) | patch | `0.3.1` → `0.3.2` |

---

### Release Notes

<details>
<summary>home-operations/drm-exporter (ghcr.io/home-operations/charts/drm-exporter)</summary>

### [`v0.3.2`](https://github.com/home-operations/drm-exporter/blob/HEAD/CHANGELOG.md#032-2026-07-25)

[Compare Source](home-operations/drm-exporter@0.3.1...0.3.2)

##### Features

- **deps:** update rust crate tokio (1.52.3 → 1.53.0) ([#&#8203;51](home-operations/drm-exporter#51)) ([2646ce9](home-operations/drm-exporter@2646ce9))

##### Bug Fixes

- **deps:** update rust crate anyhow (1.0.103 → 1.0.104) ([#&#8203;55](home-operations/drm-exporter#55)) ([437b4aa](home-operations/drm-exporter@437b4aa))
- **deps:** update rust crate clap (4.6.1 → 4.6.2) ([#&#8203;49](home-operations/drm-exporter#49)) ([dee47b2](home-operations/drm-exporter@dee47b2))
- **deps:** update rust crate clap (4.6.2 → 4.6.3) ([#&#8203;56](home-operations/drm-exporter#56)) ([e14feba](home-operations/drm-exporter@e14feba))
- **deps:** update rust crate clap (4.6.3 → 4.6.4) ([#&#8203;59](home-operations/drm-exporter#59)) ([e5734c7](home-operations/drm-exporter@e5734c7))
- **deps:** update rust crate tokio (1.53.0 → 1.53.1) ([#&#8203;58](home-operations/drm-exporter#58)) ([fa3ca1c](home-operations/drm-exporter@fa3ca1c))
- **helm:** stamp Chart.yaml version on release ([#&#8203;64](home-operations/drm-exporter#64)) ([8309502](home-operations/drm-exporter@8309502))

##### Miscellaneous Chores

- add .editorconfig from the org standard ([#&#8203;57](home-operations/drm-exporter#57)) ([f611e31](home-operations/drm-exporter@f611e31))
- **github-release:** Update release helm-unittest/helm-unittest (v1.1.1 → v1.1.2) ([#&#8203;63](home-operations/drm-exporter#63)) ([43a55cf](home-operations/drm-exporter@43a55cf))
- **mise:** Update tool cosign (3.1.1 → 3.1.2) ([#&#8203;54](home-operations/drm-exporter#54)) ([b04620e](home-operations/drm-exporter@b04620e))
- **mise:** Update tool oxfmt (0.59.0 → 0.60.0) ([#&#8203;61](home-operations/drm-exporter#61)) ([ba4896c](home-operations/drm-exporter@ba4896c))
- **mise:** Update tool rust (1.97.0 → 1.97.1) ([#&#8203;50](home-operations/drm-exporter#50)) ([436fdd6](home-operations/drm-exporter@436fdd6))
- **mise:** Update tool zizmor (1.27.0 → 1.28.0) ([#&#8203;60](home-operations/drm-exporter#60)) ([c75e9c7](home-operations/drm-exporter@c75e9c7))

</details>

---

### Configuration

📅 **Schedule**: (in timezone Europe/Berlin)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yODAuMyIsInVwZGF0ZWRJblZlciI6IjQzLjI4MC40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL3BhdGNoIl19-->

Reviewed-on: https://git.xcd.dev/gabrielcosi/home-ops/pulls/108
eleboucher pushed a commit to eleboucher/homelab that referenced this pull request Jul 29, 2026
…ter (0.3.1 ➔ 0.3.3) (#1715)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [ghcr.io/home-operations/charts/drm-exporter](https://github.com/home-operations/drm-exporter) | patch | `0.3.1` → `0.3.3` |

---

### Release Notes

<details>
<summary>home-operations/drm-exporter (ghcr.io/home-operations/charts/drm-exporter)</summary>

### [`v0.3.3`](https://github.com/home-operations/drm-exporter/blob/HEAD/CHANGELOG.md#033-2026-07-28)

[Compare Source](home-operations/drm-exporter@0.3.2...0.3.3)

##### Bug Fixes

- **rust:** update crate qmlib (2.2.1 → 2.2.2) ([#&#8203;67](home-operations/drm-exporter#67)) ([44df613](home-operations/drm-exporter@44df613))

##### Build System

- **mise:** add actionlint and refresh the lockfile ([#&#8203;68](home-operations/drm-exporter#68)) ([cc77a8c](home-operations/drm-exporter@cc77a8c))

##### Continuous Integration

- gate pull requests on a single Build Success check ([#&#8203;66](home-operations/drm-exporter#66)) ([6b8b370](home-operations/drm-exporter@6b8b370))
- **github-action:** Update action docker/login-action (v4.5.0 → v4.5.1) ([#&#8203;72](home-operations/drm-exporter#72)) ([e427427](home-operations/drm-exporter@e427427))
- **github-action:** Update action jdx/mise-action (v4.2.1 → v4.2.2) ([#&#8203;71](home-operations/drm-exporter#71)) ([e34037a](home-operations/drm-exporter@e34037a))
- **github-action:** Update action jdx/mise-action (v4.2.2 → v4.2.3) ([#&#8203;74](home-operations/drm-exporter#74)) ([bfb474f](home-operations/drm-exporter@bfb474f))
- lint workflows with the shared composite action ([#&#8203;70](home-operations/drm-exporter#70)) ([5bb3065](home-operations/drm-exporter@5bb3065))
- skip release-please version-bump PRs in checks ([#&#8203;65](home-operations/drm-exporter#65)) ([13e7ef3](home-operations/drm-exporter@13e7ef3))

##### Miscellaneous Chores

- **mise:** Update tool oxfmt (0.60.0 → 0.61.0) ([#&#8203;73](home-operations/drm-exporter#73)) ([eb1624b](home-operations/drm-exporter@eb1624b))
- standardize release-please changelog sections ([#&#8203;75](home-operations/drm-exporter#75)) ([02b30d3](home-operations/drm-exporter@02b30d3))

### [`v0.3.2`](https://github.com/home-operations/drm-exporter/blob/HEAD/CHANGELOG.md#032-2026-07-25)

[Compare Source](home-operations/drm-exporter@0.3.1...0.3.2)

##### Features

- **deps:** update rust crate tokio (1.52.3 → 1.53.0) ([#&#8203;51](home-operations/drm-exporter#51)) ([2646ce9](home-operations/drm-exporter@2646ce9))

##### Bug Fixes

- **deps:** update rust crate anyhow (1.0.103 → 1.0.104) ([#&#8203;55](home-operations/drm-exporter#55)) ([437b4aa](home-operations/drm-exporter@437b4aa))
- **deps:** update rust crate clap (4.6.1 → 4.6.2) ([#&#8203;49](home-operations/drm-exporter#49)) ([dee47b2](home-operations/drm-exporter@dee47b2))
- **deps:** update rust crate clap (4.6.2 → 4.6.3) ([#&#8203;56](home-operations/drm-exporter#56)) ([e14feba](home-operations/drm-exporter@e14feba))
- **deps:** update rust crate clap (4.6.3 → 4.6.4) ([#&#8203;59](home-operations/drm-exporter#59)) ([e5734c7](home-operations/drm-exporter@e5734c7))
- **deps:** update rust crate tokio (1.53.0 → 1.53.1) ([#&#8203;58](home-operations/drm-exporter#58)) ([fa3ca1c](home-operations/drm-exporter@fa3ca1c))
- **helm:** stamp Chart.yaml version on release ([#&#8203;64](home-operations/drm-exporter#64)) ([8309502](home-operations/drm-exporter@8309502))

##### Miscellaneous Chores

- add .editorconfig from the org standard ([#&#8203;57](home-operations/drm-exporter#57)) ([f611e31](home-operations/drm-exporter@f611e31))
- **github-release:** Update release helm-unittest/helm-unittest (v1.1.1 → v1.1.2) ([#&#8203;63](home-operations/drm-exporter#63)) ([43a55cf](home-operations/drm-exporter@43a55cf))
- **mise:** Update tool cosign (3.1.1 → 3.1.2) ([#&#8203;54](home-operations/drm-exporter#54)) ([b04620e](home-operations/drm-exporter@b04620e))
- **mise:** Update tool oxfmt (0.59.0 → 0.60.0) ([#&#8203;61](home-operations/drm-exporter#61)) ([ba4896c](home-operations/drm-exporter@ba4896c))
- **mise:** Update tool rust (1.97.0 → 1.97.1) ([#&#8203;50](home-operations/drm-exporter#50)) ([436fdd6](home-operations/drm-exporter@436fdd6))
- **mise:** Update tool zizmor (1.27.0 → 1.28.0) ([#&#8203;60](home-operations/drm-exporter#60)) ([c75e9c7](home-operations/drm-exporter@c75e9c7))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMDEuMSIsInVwZGF0ZWRJblZlciI6IjQzLjEwMS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL3BhdGNoIl19-->

Reviewed-on: https://git.erwanleboucher.dev/eleboucher/homelab/pulls/1715
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.

1 participant