Skip to content

Commit a525fad

Browse files
author
Arvind Iyengar
committed
Ensure validation fails if a chart is removed that exists in upstream
1 parent d37c7d7 commit a525fad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/validate/validate.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ type CompareGeneratedAssetsResponse struct {
2929

3030
// PassedValidation returns whether the response seems to indicate that the chart repositories are in sync
3131
func (r CompareGeneratedAssetsResponse) PassedValidation() bool {
32-
return len(r.ModifiedPostRelease) == 0 && len(r.UntrackedInRelease) == 0
32+
return len(r.UntrackedInRelease) == 0 && len(r.RemovedPostRelease) == 0 && len(r.ModifiedPostRelease) == 0
3333
}
3434

3535
// LogDiscrepancies produces logs that can be used to pretty-print why a validation might have failed
@@ -121,7 +121,7 @@ func CompareGeneratedAssets(repoFs billy.Filesystem, u options.UpstreamOptions,
121121
return err
122122
}
123123
if releaseOptions.Contains(chart.Metadata.Name, chart.Metadata.Version) {
124-
// Chart is tracked in release.yaml
124+
// Chart is tracked in release.yaml; this chart was removed intentionally
125125
return nil
126126
}
127127
// Chart was removed from local and is not tracked by release.yaml

0 commit comments

Comments
 (0)