Lists files recursively in jib.getDependencies and other fixes.#1097
Lists files recursively in jib.getDependencies and other fixes.#1097dgageot merged 9 commits intoGoogleContainerTools:jib_skaffoldfrom
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.
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?
| 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.
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. |
dgageot
left a comment
There was a problem hiding this comment.
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.
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:
jibMavenandjibGradle.GetDependenciesGradleprocessJibGradleArtifact.Projectrunner.dependenciesForArtifactseems to try to resolve absolute deps against workspaceGetDependencies*to list files recursivelyjib.GetDependenciesMaven