-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Lists files recursively in jib.getDependencies and other fixes. #1097
Lists files recursively in jib.getDependencies and other fixes. #1097
Conversation
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
/cc @GoogleContainerTools/java-tools |
|
Codecov Report
@@ Coverage Diff @@
## jib_skaffold #1097 +/- ##
================================================
+ Coverage 43.37% 43.51% +0.14%
================================================
Files 78 78
Lines 3341 3362 +21
================================================
+ Hits 1449 1463 +14
- Misses 1759 1764 +5
- Partials 133 135 +2
Continue to review full report at Codecov.
|
CLAs look good, thanks! |
Merged #1073 . |
// Resolves directories recursively. | ||
info, err := os.Stat(dep) | ||
if err != nil { | ||
if os.IsNotExist(err) { |
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.
This is modeled after the logic in changes.go#stat
. I think ignoring non-existent files should be fine here since the files would be ignored by stat
anyways. The alternative is to just add the file to the deps
list upon this os.Stat
error. Thoughts?
@@ -428,7 +428,10 @@ func dependenciesForArtifact(a *latest.Artifact) ([]string, error) { | |||
|
|||
var p []string | |||
for _, path := range paths { | |||
p = append(p, filepath.Join(a.Workspace, path)) | |||
if !filepath.IsAbs(path) { |
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.
This should be fine in regards to the other artifacts right? There should be no case where a dep would be absolute yet need to resolve against workspace?
Logically looks fine to me, would probably want to have someone on @GoogleContainerTools/container-tools check out the go code. |
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.
I’ll have a look tomorrow
Sorry, this needs to be rebased |
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
CLAs look good, thanks! |
This is rebased and good for review. |
return nil, errors.Wrapf(err, "unable to stat file %s", dep) | ||
} | ||
if info.IsDir() { | ||
err := filepath.Walk(dep, func(path string, info os.FileInfo, err error) error { |
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.
godirwalk.Walk
is much faster at walking directories (like 10x faster), which is important since this is going to run every second in watch mode.
It's ok to leave that this way but we should take note to improve it in another PR.
Resolves issues in #1096:
jibMaven
andjibGradle
.GetDependenciesGradle
processJibGradleArtifact.Project
runner.dependenciesForArtifact
seems to try to resolve absolute deps against workspaceGetDependencies*
to list files recursivelyjib.GetDependenciesMaven