-
Notifications
You must be signed in to change notification settings - Fork 1k
pkglib/build: make dockerRunner public #4173
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
pkglib/build: make dockerRunner public #4173
Conversation
deitch
left a comment
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.
There are some comment changes (the find-and-replace got a little too aggressive), and one func that probably should be public as well, given the changes. Those are for the first commit.
For the second commit, the disentangle, I didn't quite get what the change is. Instead of a different docker runner, it calls pkglib.WithDryRun() and it calls pkglib.WithBuildDocker(pkglib.NewDockerDryRunner())? I don't get it
a090dbb to
b9a9795
Compare
there is already a public method "WithBuildDocker", so it makes sense that the parameter definition is public as well so that a user of this method can actually use it Signed-off-by: Christoph Ostarek <[email protected]>
b9a9795 to
0c7e48e
Compare
|
Thanks for cleaning those up. I still don't quite get the second commit, though. |
Perhaps if you have a look at https://github.com/lf-edge/eve/pull/5227/files#diff-d4026cc3de67a3f4fd7524ddfa23d059e96437dd33764d85de6c2f2dbeef2e42R100 If the second commit wouldn't be there, then https://github.com/lf-edge/eve/pull/5227/files#diff-d4026cc3de67a3f4fd7524ddfa23d059e96437dd33764d85de6c2f2dbeef2e42R100 would just overwrite the |
|
The current way is:
You are trying to merge those together, so instead of BTW, the first commit is good to go, and solves your immediate problem. If you want to move the second commit to its own PR slo it can be discussed, and not hold you up on your requirements, go for it. |
I also need that commit. |
It was a nice idea, though 😁 |
What for? |
I need |
|
But it does already, with |
The problem is that |
Is that what the second commit is trying to do? In normal usage (no dry run), it respects your |
Yes, it gets overwritten here: https://github.com/linuxkit/linuxkit/blob/master/src/cmd/linuxkit/pkglib/build.go#L322 |
|
OK, now I get it. I will make a small suggestion, then we will be good to go. |
src/cmd/linuxkit/pkg_build.go
Outdated
|
|
||
| if dryRun { | ||
| opts = append(opts, pkglib.WithDryRun()) | ||
| opts = append(opts, pkglib.WithBuildDocker(pkglib.NewDockerDryRunner())) |
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.
Recommend getting rid of this, as this will override if someone both uses WithDryRun() and WithBuildDocker().
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.
Wrong line?
This is in the cobra.Command ...
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.
Okay, now with the other comment it makes sense to me
this makes it possible for a user of this API to build their own DryRunner also make newDockerRunner public as well to be consistent Signed-off-by: Christoph Ostarek <[email protected]>
0c7e48e to
c670e2d
Compare
- What I did
there is already a public method "WithBuildDocker", so it makes sense that the parameter definition is public as well so that a user of this method can actually use it
also allow dry-run with specific docker-runner
- How I did it
- How to verify it
no new feature was implemented, everything should work as before
- Description for the changelog
make
dockerRunnerpublicuntangle
dockerRunnerandDryRun- A picture of a cute animal (not mandatory but encouraged)