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

List changed fixes #190

Merged
merged 3 commits into from
Dec 8, 2019
Merged

Conversation

jeff-knurek
Copy link

What this PR does / why we need it:
Using list-changed caused a lot of confusion when trying to get the structure/config correct. This PR is to help make it more understood.

@@ -705,7 +705,7 @@ func (t *Testing) ComputeChangedChartDirectories() ([]string, error) {
changedChartDirs = append(changedChartDirs, chartDir)
}
} else {
fmt.Printf("Directory '%s' is no chart directory. Skipping...", chartDir)
fmt.Printf("Directory '%s' is not a valid chart directory. Skipping...\n", dir)
Copy link
Author

Choose a reason for hiding this comment

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

When the tool found non-chart files changed, it output as:

Directory '' is no chart directory. Skipping...Directory '' is no chart directory. Skipping...Directory '' is no chart directory. Skipping...Directory '' is no chart directory. Skipping...

This was extremely confusing.

pkg/util/util.go Outdated
@@ -131,6 +131,7 @@ func (u ChartUtils) LookupChartDir(chartDirs []string, dir string) (string, erro
for {
chartYaml := path.Join(currentDir, "Chart.yaml")
parent := path.Dir(path.Dir(chartYaml))
chartDir = path.Join(chartDir) // removes any trailing slash from the dir
Copy link
Author

Choose a reason for hiding this comment

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

if you try setting chart-dirs as ./, the tool gets stuck in an infinite loop. (even more confusing because . works as expected)
This was because of later in the code,
if (joined == chartDir) || strings.HasPrefix(relativeDir, "..") {
would check if . == ./.

I didn't test, but i'm pretty sure it was a similar problem with the (parent == chartDir) check as well.

Jeff Knurek added 2 commits December 4, 2019 15:56
Signed-off-by: Jeff Knurek <j.knurek@travelaudience.com>
Signed-off-by: Jeff Knurek <j.knurek@travelaudience.com>
Signed-off-by: Jeff Knurek <j.knurek@travelaudience.com>
@unguiculus
Copy link
Member

Thanks 🎉

@unguiculus unguiculus merged commit b9d4ad0 into helm:master Dec 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants