sigstore/helm-charts

Issue with `ct lint` cmd on contributions

karlhaworth opened this issue · 8 comments

Description

Bringing in from slack -> https://sigstore.slack.com/archives/C01DGF0G8U9/p1701277976970429. Tagging @bobcallaway.

I made a readme change on charts/ctlog which then resulted in the below.

 ✖︎ ctlog => (version: "0.2.48", path: "charts/ctlog") > chart version not ok. Needs a version bump!

I tried this locally on an existing clone, a new clone, and a github workspace, and a forked github workflow run... This is fresh off main.

"sigstore" already exists with the same configuration, skipping
Linting chart "ctlog => (version: \"0.2.48\", path: \"charts/ctlog\")"
Checking chart "ctlog => (version: \"0.2.48\", path: \"charts/ctlog\")" for a version bump...
Old chart version: 0.2.48
New chart version: 0.2.48
The old and new versions are the same, but the above error claims I need to bump it

I ran this in a workflow on a fork -> https://github.com/karlhaworth/sigstore-helm-charts/actions/runs/7036051262/job/19147823608?pr=1

The overall change I want to make is much greater, however I started with small steps and took an action plan of testing along the way... Ran into issues instantly.

Version

Working off main branch.

did you try helm dependency update charts/ctlog followed by helm dependency build charts/ctlog?

I did not try the second cmd. I will do that shortly. Did I miss the docs on this? Want to ensure I’m checking the right resources.

Seemed to still be unhappy

❯ helm dependency update charts/ctlog
❯ helm dependency build charts/ctlog
❯ ct lint --config ct.yaml
Linting charts...

------------------------------------------------------------------------------------------------------------------------
 Charts to be processed:
------------------------------------------------------------------------------------------------------------------------
 ctlog => (version: "0.2.48", path: "charts/ctlog")
------------------------------------------------------------------------------------------------------------------------

"sigstore" already exists with the same configuration, skipping
Linting chart "ctlog => (version: \"0.2.48\", path: \"charts/ctlog\")"
Checking chart "ctlog => (version: \"0.2.48\", path: \"charts/ctlog\")" for a version bump...
Old chart version: 0.2.48
New chart version: 0.2.48

------------------------------------------------------------------------------------------------------------------------
 ✖︎ ctlog => (version: "0.2.48", path: "charts/ctlog") > chart version not ok. Needs a version bump! 
------------------------------------------------------------------------------------------------------------------------
Error: failed linting charts: failed processing charts
failed linting charts: failed processing charts

try running helm-docs from charts/ctlog directory before running ct lint

Ran the helm-docs cmd from charts/ctlog

❯ cd charts/ctlog
❯ helm-docs
INFO[2023-11-29T14:01:09-06:00] Found Chart directories [.]                  
INFO[2023-11-29T14:01:09-06:00] Generating README Documentation for chart .  
❯ cd ../../
❯ ct lint --config ct.yaml
Linting charts...

------------------------------------------------------------------------------------------------------------------------
 Charts to be processed:
------------------------------------------------------------------------------------------------------------------------
 ctlog => (version: "0.2.48", path: "charts/ctlog")
------------------------------------------------------------------------------------------------------------------------

"sigstore" already exists with the same configuration, skipping
Linting chart "ctlog => (version: \"0.2.48\", path: \"charts/ctlog\")"
Checking chart "ctlog => (version: \"0.2.48\", path: \"charts/ctlog\")" for a version bump...
Old chart version: 0.2.48
New chart version: 0.2.48

------------------------------------------------------------------------------------------------------------------------
 ✖︎ ctlog => (version: "0.2.48", path: "charts/ctlog") > chart version not ok. Needs a version bump! 
------------------------------------------------------------------------------------------------------------------------
Error: failed linting charts: failed processing charts
failed linting charts: failed processing charts
~/Downloads/helm-charts main !1                                                      
❯ 
bcallaway-macbookpro:helm-charts bcallaway$ gs
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean
bcallaway-macbookpro:helm-charts bcallaway$ echo "" >> charts/ctlog/README.md 
bcallaway-macbookpro:helm-charts bcallaway$ ct lint --config ct.yaml
Linting charts...

------------------------------------------------------------------------------------------------------------------------
 Charts to be processed:
------------------------------------------------------------------------------------------------------------------------
 ctlog => (version: "0.2.48", path: "charts/ctlog")
------------------------------------------------------------------------------------------------------------------------

"sigstore" already exists with the same configuration, skipping
Linting chart "ctlog => (version: \"0.2.48\", path: \"charts/ctlog\")"
Checking chart "ctlog => (version: \"0.2.48\", path: \"charts/ctlog\")" for a version bump...
Old chart version: 0.2.48
New chart version: 0.2.48

------------------------------------------------------------------------------------------------------------------------
 ✖︎ ctlog => (version: "0.2.48", path: "charts/ctlog") > chart version not ok. Needs a version bump! 
------------------------------------------------------------------------------------------------------------------------
Error: failed linting charts: failed processing charts
failed linting charts: failed processing charts

then

bcallaway-macbookpro:helm-charts bcallaway$ (cd charts/ctlog && helm-docs .)
INFO[2023-11-29T17:04:26-03:00] Found Chart directories [.]                  
INFO[2023-11-29T17:04:26-03:00] Generating README Documentation for chart .  
bcallaway-macbookpro:helm-charts bcallaway$ ct lint --config ct.yaml
Linting charts...

------------------------------------------------------------------------------------------------------------------------
No chart changes detected.
------------------------------------------------------------------------------------------------------------------------
All charts linted successfully

Ah, I realized I can look at https://github.com/karlhaworth/sigstore-helm-charts/pull/1/files

You're exposing a new parameter from the chart (imagePullSecrets) so it wants at least a minor version bump

Ok so I manually bump the chart.yaml. Got it. Thank you. I don't seem to see something in the docs for this, but might be missing something?