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

re-add loki 2.4.1 to index.yaml #796

Merged
merged 1 commit into from
Nov 8, 2021

Conversation

slim-bean
Copy link
Contributor

No description provided.

Signed-off-by: Edward Welch <edward.welch@grafana.com>
@slim-bean slim-bean merged commit c0e7729 into grafana:gh-pages Nov 8, 2021
@slim-bean slim-bean deleted the re-add-loki-2.4.1 branch November 8, 2021 18:26
torstenwalter pushed a commit to torstenwalter/chart-releaser that referenced this pull request 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 pull request 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 this pull request may close these issues.

1 participant