Added bazel in local execution environment#1662
Added bazel in local execution environment#1662priyawadhwa merged 7 commits intoGoogleContainerTools:masterfrom
Conversation
I added bazel as a builder plugin in the local execution environment. This required moving DependenciesForArtifact into the build interface; if people want to write their own plugins, they will need some way of telling the skaffold watcher what their dependencies are.
Codecov Report
@@ Coverage Diff @@
## master #1662 +/- ##
==========================================
- Coverage 47.41% 46.69% -0.72%
==========================================
Files 122 123 +1
Lines 5448 5600 +152
==========================================
+ Hits 2583 2615 +32
- Misses 2604 2716 +112
- Partials 261 269 +8
Continue to review full report at Codecov.
|
balopat
left a comment
There was a problem hiding this comment.
It's looking good - Now that we introduced the DependenciesForArtifact in the Builder interface, I think we can break out the build.DependenciesForArtifact to the separate implementations now instead of keeping it a centralized switch statement. WDYT?
|
I think the switch statement may still be the cleanest option, since build.DependenciesForArtifact applies to the overall "local" builder instead of the different types of artifacts -- is that what you meant? |
No, what I meant is that the builder itself now should know what the dependencies are for a given artifact. It is weird to see bazel.DependenciesForArtifact calling out to a global build.DependenciesForArtifact where it checks whether the artifact is docker, jib or bazel... Instead the logic should be something like this in bazel.DependenciesForArtifact: |
|
@balopat thanks for clarifying, that should be done now! |
|
Great, almost there - I think we should go all the way, we can just nuke deps.go. |
Return dependencies in DependenciesForArtifact for each builder; moved switch statement into timeToListDependencies for the diagnose command.
|
This looks great! |
|
Ahh got it that makes sense, thanks! I updated diagnose to do that :) |
For reference, initial PR that added this change was GoogleContainerTools#1707 and GoogleContainerTools#1662
I added bazel as a builder plugin in the local execution environment.
This required moving DependenciesForArtifact into the build interface;
if people want to write their own plugins, they will need some way of
telling the skaffold watcher what their dependencies are.
fixes #1553