Skip to content
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

🐛 (v3-alpha) Makefile: fix source error, improve output text #1725

Conversation

estroz
Copy link
Contributor

@estroz estroz commented Oct 15, 2020

The test rule uses the source command which is a bash util, but the default shell is /bin/sh which may not have this function. Explicitly invoking commands with bash in these recipes guarantees that this command, and others, are available.

Additionally this target prints a bunch of commands unnecessarily. Using a make condition stops this from happening.

/kind bug

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Oct 15, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: estroz

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Oct 15, 2020
@estroz estroz force-pushed the bugfix/makefile-source-envtest-script branch from 4b3a78b to f073de7 Compare October 15, 2020 21:52
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 15, 2020
@estroz estroz force-pushed the bugfix/makefile-source-envtest-script branch 5 times, most recently from 45635df to 2847e10 Compare October 15, 2020 23:29
@estroz estroz force-pushed the bugfix/makefile-source-envtest-script branch from 2847e10 to 45eb563 Compare October 15, 2020 23:53
fetch_envtest_tools $(ENVTEST_ASSETS_DIR) && \
setup_envtest_env $(PWD)/$(ENVTEST_ASSETS_DIR) && \
go test ./... -coverprofile cover.out ; \
}
Copy link
Member

@camilamacedo86 camilamacedo86 Oct 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @estroz,

Since it is more a @joelanford's idea. I think would be nice ping him here to see what he thinks about that.

@estroz
Copy link
Contributor Author

estroz commented Oct 19, 2020

/cc @joelanford

@estroz
Copy link
Contributor Author

estroz commented Nov 10, 2020

This would be better fixed by kubernetes-sigs/controller-runtime#1258. If/when that PR gets merged I will updated this one with the improved script usage.

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 10, 2020
@k8s-ci-robot
Copy link
Contributor

@estroz: PR needs rebase.

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.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 10, 2020
fetch_envtest_tools $(ENVTEST_ASSETS_DIR) && \
setup_envtest_env $(PWD)/$(ENVTEST_ASSETS_DIR) && \
go test ./... -coverprofile cover.out ; \
}
Copy link
Member

@camilamacedo86 camilamacedo86 Nov 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My main concerns with this current solution are:

  • Users are unable to run the tests to troubleshooting via delve or an IDE since the test will ONLY work if we execute them via the source.
  • The target is complex and not too much unstable which reduces it maintainability
  • Its dependency with controller-runtime which make harder we keep it maintained. See that controller-runtime is only a framework and who install/use the bins is ONLY the kubebuilder. So, IMO its implementation should be done in Kubebuilder side. Note that if we want to change something on the steps required to get the binaries we need to bump a new version of the controller-runtime and wait for the next release whcih for example do not allow we do it for v2+ since controller-runtime has breaking changes in the upper version.

IMO: I prefer the approach done in the PR #1711 which solves all problems described above.

c/c @estroz @joelanford @DirectXMan12

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

responded on #1711

@k8s-ci-robot
Copy link
Contributor

@estroz: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-kubebuilder-e2e-k8s-1-15-12 45eb563 link /test pull-kubebuilder-e2e-k8s-1-15-12
pull-kubebuilder-e2e-k8s-1-16-15 45eb563 link /test pull-kubebuilder-e2e-k8s-1-16-15
pull-kubebuilder-e2e-k8s-1-14-10 45eb563 link /test pull-kubebuilder-e2e-k8s-1-14-10

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/bug Categorizes issue or PR as related to a bug. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants