-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
✨ (go/v3-alpha) *: Replace 'docker build . -t ${IMG}' with '-t ${IMG} .' #1817
✨ (go/v3-alpha) *: Replace 'docker build . -t ${IMG}' with '-t ${IMG} .' #1817
Conversation
Welcome @wking! |
Hi @wking. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
9e997ee
to
7769cd9
Compare
/ok-to-test |
Add 🌱 at the start of the title of the PR please |
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.
Just a few nits:
- Revert the change in the doc
docs/kubebuilder_v0_v1_difference.md
since this change should not affect that. - Ensure that the commits are squashed
- Update the title of this PR to ad the mojo (see: https://github.com/kubernetes-sigs/kubebuilder/blob/master/CONTRIBUTING.md#pr-process).
Because folks may have 'docker' aliased to 'podman', and Podman prefers options before positional arguments [1]: $ podman build --help | grep CONTEXT-DIRECTORY podman build [command options] CONTEXT-DIRECTORY | URL Generated with: $ sed -i 's/ . -t \([^ ]*\)/ -t \1 ./' $(git grep -l 'docker.*build.* \. ') $ git checkout HEAD -- docs/kubebuilder_v0_v1_difference.md The docs checkout leaves historical docs alone [2]. [1]: containers/podman#2811 [2]: kubernetes-sigs#1817 (comment)
7769cd9
to
3b13378
Compare
Hi @wking, IMO it is not a bug. So, shows that the mojo should be @Adirio , the 🌱 is for Infra/Tests/Other. However, the proposed change here changes the Makefile of the built projects to allow users to easily work with the postman. So, it shows not the most appropriate one. |
Because folks may have 'docker' aliased to 'podman', and Podman prefers options before positional arguments [1]: $ podman build --help | grep CONTEXT-DIRECTORY podman build [command options] CONTEXT-DIRECTORY | URL Generated with: $ sed -i 's/ . -t \([^ ]*\)/ -t \1 ./' $(git grep -l 'docker.*build.* \. ') $ git checkout HEAD -- docs/kubebuilder_v0_v1_difference.md The docs checkout leaves historical docs alone [2]. [1]: containers/podman#2811 [2]: kubernetes-sigs#1817 (comment)
3b13378
to
1ef003d
Compare
This moves kubebuilder Makefile rules from "silently build images without tagging them" to "correctly tag built images" on older |
/test pull-kubebuilder-e2e-k8s-1-14-1 |
@@ -63,7 +63,7 @@ generate: controller-gen | |||
|
|||
# Build the docker image | |||
docker-build: test | |||
docker build . -t ${IMG} | |||
docker build -t ${IMG} . |
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 is not a breaking change. However, just to do a quick poll.
Do you think that it should be addressed to v2+ or only v3-alpha plugin @estroz @Adirio @gabbifish ?
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 would say it is a breaking change (v2 projects scaffolded before this PR will have a different Makefile), and thsu, only to v3-alpha
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.
IMO: v2 projects scaffolded before this PR will have a different Makefile
does not characterize a breaking change since it will not break the projects scaffolds before this change. However, we have been very restrictive regards changes in v2 and it is not a critical bug fix for the tool which might is a good argumentation to be only v3+.
+1.
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.
Hi @wking,
Could you please revert the changes in pkg/plugin/v2
and run make generate
and push it again. I think would be better to address it only for v3-alpha as well. Could you also add (go/v3-alpha) on the title to make it clear enough? Then, I think would be fine to get this one merged.
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.
...v2 projects scaffolded before this PR will have a different Makefile...
Ideally there would be a flow to easily re-scaffold projects to pull in minor stuff like this, instead of delaying all of that and batching it in major-version bumps. Is there a ticket around that I can subscribe to? If not, should I file one?
Could you please revert the changes in
pkg/plugin/v2
and...
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.
The philosophy we have had until now is that once scaffolded, kubebuilder doesn't own the file, user can modify them (actually, they will modify files, kubebuilder provides the scheleton but you need to code parts) so once scaffolded we are not allowed to delete a file, and thus, we can't re-scaffold it later. The only exception is that some code is injected into some files with some special markers.
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.
The philosophy we have had until now is that once scaffolded, kubebuilder doesn't own the file, user can modify them...
That offloads a lot of maintenance cost to folks maintaining the consuming project, doesn't it? E.g. if we landed a v2 fix here, every kubebuilder-scaffolded project would still be on their own to discover, diagnose, and manually patch their own project to pick up the fix for podman
compatibility. It seems like there should be a way to maintain kubebuilder input for portions of the scaffolding, and make it easy for downstream maintainers to ask "do the kubebuilder maintainers have any improvements to suggest for my project?", see a set of suggestions, and then accept or reject them as they see fit. For one approach to this (tracking the scaffolding in a separate branch which is periodically merged into downstream code), see here. I expect there are many alternative approaches which would also allow for downstream maintainers to delegate scaffolding maintenance to the kubebuilder maintainers.
Because folks may have 'docker' aliased to 'podman', and Podman prefers options before positional arguments [1]: $ podman build --help | grep CONTEXT-DIRECTORY podman build [command options] CONTEXT-DIRECTORY | URL Generated with: $ sed -i 's/ . -t \([^ ]*\)/ -t \1 ./' $(git grep -l 'docker.*build.* \. ') $ git checkout HEAD -- docs/kubebuilder_v0_v1_difference.md $ git checkout HEAD -- pkg/plugin/v2 testdata/project-v2* The docs checkout leaves historical docs alone [2]. The v2 checkouts are because Adrián and Camila consider this minor and not worth fixing in v2 [3]. [1]: containers/podman#2811 [2]: kubernetes-sigs#1817 (comment) [3]: kubernetes-sigs#1817 (comment)
1ef003d
to
cced240
Compare
Because folks may have 'docker' aliased to 'podman', and Podman prefers options before positional arguments [1]: $ podman build --help | grep CONTEXT-DIRECTORY podman build [command options] CONTEXT-DIRECTORY | URL Generated with: $ sed -i 's/ . -t \([^ ]*\)/ -t \1 ./' $(git grep -l 'docker.*build.* \. ') $ git checkout HEAD -- docs $ git checkout HEAD -- pkg/plugin/v2 testdata/project-v2* The docs checkout leaves historical docs alone [2,3,4]. The v2 checkouts are because Adrián and Camila consider this minor and not worth fixing in v2 [5]. [1]: containers/podman#2811 [2]: kubernetes-sigs#1817 (comment) [3]: kubernetes-sigs#1817 (comment) [4]: kubernetes-sigs#1817 (comment) [5]: kubernetes-sigs#1817 (comment)
cced240
to
ccb1127
Compare
/test pull-kubebuilder-test |
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.
/lgtm
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Adirio, estroz, wking The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Because folks may have
docker
aliased topodman
, and Podman prefers options before positional arguments (containers/podman#2811):Generated with:
$ sed -i 's/ . -t \([^ ]*\)/build -t \1 ./' $(git grep -l 'docker.*build.* \. ')