-
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
Added bazel in local execution environment #1662
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.
|
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.
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