Skip to content

🌱 code clean for pkg/envtest/server.go - #2180

Merged
k8s-ci-robot merged 1 commit into
kubernetes-sigs:masterfrom
yanggangtony:clean-envtest-server
Feb 8, 2023
Merged

k8s-ci-robot merged 1 commit into
kubernetes-sigs:masterfrom
yanggangtony:clean-envtest-server

Conversation

@yanggangtony

@yanggangtony yanggangtony commented Feb 6, 2023

Copy link
Copy Markdown

Signed-off-by: yanggang gang.yang@daocloud.io

/kind cleanup

Code clean for evntest.server.
Because the variable AttachControlPlaneOutput is only used in the os.Getenv(envAttachOutput) method..
Maybe we should clean the code for that condition.

@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 6, 2023
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Feb 6, 2023
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

Hi @yanggangtony. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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 size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Feb 6, 2023
Comment thread pkg/envtest/server.go
@@ -229,18 +229,18 @@ func (te *Environment) Start() (*rest.Config, error) {

if os.Getenv(envAttachOutput) == "true" {
te.AttachControlPlaneOutput = true

@inteon inteon Feb 7, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@yanggangtony AttachControlPlaneOutput is set to true if os.Getenv(envAttachOutput) == "true", however it can also be true if os.Getenv(envAttachOutput) != "true" and the AttachControlPlaneOutput value was set to true.
So, please create a new if te.AttachControlPlaneOutput { statement.

Signed-off-by: yanggang <gang.yang@daocloud.io>
@yanggangtony

Copy link
Copy Markdown
Author

@inteon
Thanks for review.
Had rebased..

@inteon

inteon commented Feb 7, 2023

Copy link
Copy Markdown
Member

@yanggangtony can you fix the typo in this PR, replace evntest with envtest? Also, make sure to add an icon in the title: https://github.com/kubernetes-sigs/controller-runtime/pull/2180/checks?check_run_id=11167764386

@yanggangtony yanggangtony changed the title code clean for evntest.server 🌱 code clean for pkg/envtest/server.go Feb 7, 2023
@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 7, 2023

@inteon inteon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Super small code-style change
/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 7, 2023
@yanggangtony

Copy link
Copy Markdown
Author

thanks for review..

@FillZpp FillZpp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks!
/approve

@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: FillZpp, inteon, yanggangtony

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 8, 2023
@k8s-ci-robot
k8s-ci-robot merged commit 2271827 into kubernetes-sigs:master Feb 8, 2023
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. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants