Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[promtail] chart version 3.9.0 is missing from repo index #783

Closed
yafanasiev opened this issue Nov 6, 2021 · 5 comments
Closed

[promtail] chart version 3.9.0 is missing from repo index #783

yafanasiev opened this issue Nov 6, 2021 · 5 comments

Comments

@yafanasiev
Copy link

Hi!

It looks like something broke during the release of the new Promtail 3.9.0 chart. This commit that was created via Github Actions adds it, but then the next one removes it.

@Legion2
Copy link

Legion2 commented Nov 7, 2021

The CI pipeline for the release commit is failed https://github.com/grafana/helm-charts/runs/4122255988?check_suite_focus=true

@torstenwalter
Copy link
Collaborator

@yafanasiev Thank you for pointing this out. Looks like a race condition between two release pipelines. Promtail 3.9.0 should now be available (again). See 42c6214

@stevehipwell
Copy link
Contributor

@torstenwalter I think this has happened again, specifically for loki-distributed but potentially other charts are impacted.

@yafanasiev
Copy link
Author

Indeed - latest promtail 3.9.1 is up, but loki-distributed 0.39.1 disappeared. This is extremely annoying when using GitOps tools (we use Flux) as this generates alerts to our monitoring system. Looking at Github Action for releasing charts, I would suggest adding concurrency to workflow to ensure there are no race conditions. I can make a PR for this.

@stevehipwell
Copy link
Contributor

stevehipwell commented Nov 8, 2021

@yafanasiev concurrency sounds sensible. I'm trying to figure out how the chart releaser tooling is overwriting commits when the code is meant to be doing a plain commit.

FYI helm/chart-releaser#143

torstenwalter pushed a commit to torstenwalter/chart-releaser that referenced this issue Nov 10, 2021
So far the index.yaml was loaded directly from the chart repository.
In case of GitHub pages that's https://<user or org>.github.io/<repo>

The problem with this approach is that GitHub pages use a Content
Delivery Network. So the index.yaml files fetched from there might be
outdated as there is a delay between a git push to the gh-pages branch
until the content is visible.

This delay might lead to the situation that one downloads an old index
file from and updated that one instead of the most recent index.yaml.

For the grafana repository that resulted in already released charts
being removed again.
- grafana/helm-charts#783
- grafana/helm-charts#796

This PR resolves that issue by reading the index.yaml from the gh_pages
branch of the repository. The branch needs to be up-to-date anyhow if
you want to create a PR or directly push the changes.

It should also be fine for the chart-releaser-action as it uses
a fetch-depth: 0 to clone the whole repository.

```
jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          fetch-depth: 0
```

Fixes: helm#143

Signed-off-by: Torsten Walter <torsten.walter@syncier.com>
scottrigby pushed a commit to helm/chart-releaser that referenced this issue Nov 15, 2021
…it repository (#144)

* read index.yaml from git repository

So far the index.yaml was loaded directly from the chart repository.
In case of GitHub pages that's https://<user or org>.github.io/<repo>

The problem with this approach is that GitHub pages use a Content
Delivery Network. So the index.yaml files fetched from there might be
outdated as there is a delay between a git push to the gh-pages branch
until the content is visible.

This delay might lead to the situation that one downloads an old index
file from and updated that one instead of the most recent index.yaml.

For the grafana repository that resulted in already released charts
being removed again.
- grafana/helm-charts#783
- grafana/helm-charts#796

This PR resolves that issue by reading the index.yaml from the gh_pages
branch of the repository. The branch needs to be up-to-date anyhow if
you want to create a PR or directly push the changes.

It should also be fine for the chart-releaser-action as it uses
a fetch-depth: 0 to clone the whole repository.

```
jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          fetch-depth: 0
```

Fixes: #143

Signed-off-by: Torsten Walter <torsten.walter@syncier.com>

* fix error handling

Signed-off-by: Torsten Walter <torsten.walter@syncier.com>

* re-add charts-repo flag to avoid breaking changes

- message is printed when using the flag to let users know that it's
  deprecated
- update all docs in README

Signed-off-by: Torsten Walter <torsten.walter@syncier.com>

* Update cr/cmd/index.go

Co-authored-by: Reinhard Nägele <unguiculus@gmail.com>
Signed-off-by: Torsten Walter <mail@torstenwalter.de>

* fix import ordering

Signed-off-by: Torsten Walter <torsten.walter@syncier.com>

Co-authored-by: Reinhard Nägele <unguiculus@gmail.com>
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 a pull request may close this issue.

4 participants