helm / helm/chart-releaser

Optionally build index.yaml in an idempotent fashion

Open
#133 3 comments 6 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
783
Forks
126
Avg merge
1d 18h
Merged PRs (30d)
11

Description

It would be nice if there were a way to "build an index.yaml from GitHub release metadata" in an idempotent fashion

In some cases, a git repository can get broken and mess up the index.yaml / the index.yaml gets out of sync with the git releases that are stored on GitHub. This happens most often when there are errors in the chart-releaser action - for instance, a submodule that did not clone properly, etc. From this scenario, it is non-trivial to build an index.yaml from the git release metadata.

It can also be a nice way to sanity check that the organically built / "pet" index.yaml matches up with git state.

We had a need for such work and wrote up a bash script to fit the bill in the short term: [latest](https://github.com/rstudio/helm/blob/main/scripts/rebuild.sh) // [permalink](https://github.com/rstudio/helm/blob/8f2a639400193139971499f74abc2c4d42651e24/scripts/rebuild.sh)

We also wrote a GitHub action to allow triggering this adhoc when needed: [latest](https://github.com/rstudio/helm/blob/main/.github/workflows/chart-rebuild.yaml) // [permalink](https://github.com/rstudio/helm/blob/8f2a639400193139971499f74abc2c4d42651e24/.github/workflows/chart-rebuild.yaml)

If it is useful to anyone in the meantime, shout out to @jonyoder who did the actual implementation 😄

NOTE: the script is not perfect and _can_ modify an index.yaml / create duplicates in some cases. Further, it is not perfectly idempotent because timestamps will be updated. It is good enough for us at the moment, but would love to see a proper fix. An example PR: https://github.com/rstudio/helm/pull/21

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.