-
Notifications
You must be signed in to change notification settings - Fork 222
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
List changed fixes #190
Conversation
@@ -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) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
Signed-off-by: Jeff Knurek <j.knurek@travelaudience.com>
Signed-off-by: Jeff Knurek <j.knurek@travelaudience.com>
ccec0c9
to
8545bf5
Compare
Signed-off-by: Jeff Knurek <j.knurek@travelaudience.com>
Thanks 🎉 |
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.