Skip to content

chore: Updated helm releases to keep existing files#222

Merged
ravisoundar merged 1 commit into
mainfrom
helm-release
Mar 3, 2026
Merged

chore: Updated helm releases to keep existing files#222
ravisoundar merged 1 commit into
mainfrom
helm-release

Conversation

@ravisoundar
Copy link
Copy Markdown
Collaborator

No description provided.

@ravisoundar ravisoundar requested a review from dmitsh as a code owner March 2, 2026 20:45
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Mar 2, 2026

Greptile Summary

This PR renames .github/workflows/release.yml to .github/workflows/helm-release.yaml and significantly improves the Helm chart release workflow to correctly maintain a cumulative Helm repository on GitHub Pages.

Key changes:

  • Adds helm lint before packaging to catch chart issues early
  • Adds a step to fetch the existing index.yaml from the gh-pages branch before generating the repo index, with proper || true guards for graceful first-run behavior
  • Implements conditional --merge index.yaml logic so existing chart versions are preserved in the index when the file is available, and a fresh index is created on first deployment
  • Upgrades peaceiris/actions-gh-pages from v3 to v4
  • Adds keep_files: true to the deploy step so previously published .tgz chart packages are not deleted from gh-pages on each release

The combination of the manual index.yaml merge and keep_files: true is the correct pattern for a Helm chart repository — historical chart packages remain available and the index accurately reflects all versions.

Confidence Score: 4/5

  • This PR is safe to merge; the workflow logic is sound and correctly addresses the previously identified issues.
  • The changes are well-structured: both the || true guards on the fetch step and the conditional --merge logic properly handle the first-deployment edge case. keep_files: true correctly prevents historical chart packages from being wiped. No logic errors or security concerns are introduced by this PR.
  • No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/helm-release.yaml Renamed from release.yml and updated to properly maintain Helm repo: adds helm lint, fetches existing index.yaml from gh-pages with graceful failure handling, conditionally merges into new index, upgrades actions-gh-pages to v4, and adds keep_files: true.

Sequence Diagram

sequenceDiagram
    participant GH as GitHub Actions
    participant Repo as Main Branch
    participant GHPages as gh-pages Branch
    participant HelmRepo as Helm Repository

    GH->>Repo: actions/checkout@v5
    GH->>GH: helm lint charts/topograph
    GH->>GH: helm package → ./packaged/*.tgz
    GH->>GHPages: git fetch origin gh-pages || true
    GHPages-->>GH: index.yaml (if exists) || true
    alt index.yaml exists
        GH->>GH: helm repo index packaged --merge index.yaml
    else index.yaml not found (first deploy)
        GH->>GG: helm repo index packaged
    end
    GH->>GHPages: peaceiris/actions-gh-pages@v4 (keep_files: true)
    Note over GHPages,HelmRepo: Old .tgz files preserved, index.yaml updated
Loading

Last reviewed commit: e0c85e8

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, 6 comments

Edit Code Review Agent Settings | Greptile

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Mar 2, 2026

Additional Comments (3)

.github/workflows/helm-release.yaml
the index.yaml will overwrite the existing one, removing references to previously published chart versions (0.1.0 and 0.2.0 currently in gh-pages). Need to fetch and merge with existing index

        run: |
          git fetch origin gh-pages
          git checkout origin/gh-pages -- index.yaml 2>/dev/null || true
          helm repo index packaged --url https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }} --merge index.yaml

.github/workflows/helm-release.yaml
should run helm dependency build before packaging to ensure Chart.lock is up-to-date with local file dependencies

      - name: Package Helm chart
        run: |
          helm dependency build charts/topograph
          mkdir -p packaged
          helm package charts/topograph --destination packaged

.github/workflows/helm-release.yaml
consider adding helm lint charts/topograph step before packaging to catch chart issues early

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.91%. Comparing base (fdd9e82) to head (e0c85e8).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #222   +/-   ##
=======================================
  Coverage   65.91%   65.91%           
=======================================
  Files          82       82           
  Lines        4536     4536           
=======================================
  Hits         2990     2990           
  Misses       1428     1428           
  Partials      118      118           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

dmitsh
dmitsh previously approved these changes Mar 2, 2026
Comment thread .github/workflows/helm-release.yaml Outdated
Comment thread .github/workflows/helm-release.yaml Outdated
Comment thread .github/workflows/helm-release.yaml
Signed-off-by: Ravi Shankar <ravish@nvidia.com>
@ravisoundar ravisoundar merged commit 73f1e57 into main Mar 3, 2026
6 checks passed
@ravisoundar ravisoundar deleted the helm-release branch March 3, 2026 02:16
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.

2 participants