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

Fix golint failures of test/e2e/apps #76132

Merged

Conversation

SataQiu
Copy link
Member

@SataQiu SataQiu commented Apr 4, 2019

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Fix golint failures of e2e/apps/cronjob.go e2e/apps/daemon_restart.go

Which issue(s) this PR fixes:

Ref #68026

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. area/test sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Apr 4, 2019
@SataQiu
Copy link
Member Author

SataQiu commented Apr 4, 2019

/priority important-soon

@k8s-ci-robot k8s-ci-robot added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Apr 4, 2019
@SataQiu
Copy link
Member Author

SataQiu commented Apr 9, 2019

/assign @mfojtik

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 13, 2019
@SataQiu
Copy link
Member Author

SataQiu commented Apr 14, 2019

/assign @fejta @neolit123

Copy link
Member

@neolit123 neolit123 left a comment

Choose a reason for hiding this comment

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

thanks, added a couple of comments.

ADD = "ADD"
DEL = "DEL"
UPDATE = "UPDATE"
// ADD represents for ADD event
Copy link
Member

Choose a reason for hiding this comment

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

for -> the
[1]

UPDATE = "UPDATE"
// ADD represents for ADD event
ADD = "ADD"
// DEL represents for DEL event
Copy link
Member

Choose a reason for hiding this comment

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

[1]

ADD = "ADD"
// DEL represents for DEL event
DEL = "DEL"
// UPDATE represents for UPDATE event
Copy link
Member

Choose a reason for hiding this comment

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

[1]

// it comes back up. It uses ssh to send a SIGTERM to the daemon.
type restartDaemonConfig struct {
type RestartDaemonConfig struct {
Copy link
Member

Choose a reason for hiding this comment

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

private struct with private methods should be fine.
what was the linter error here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for your feedback @neolit123
Because public method NewRestartConfig returns an instance of private restartDaemonConfig.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is the linter error: @neolit123

daemon_restart.go:71:110: exported func NewRestartConfig returns unexported type *apps.restartDaemonConfig, which can be annoying to use

Copy link
Member

Choose a reason for hiding this comment

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

thanks for the info.
the change seems OK.

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 14, 2019
@SataQiu
Copy link
Member Author

SataQiu commented Apr 14, 2019

/retest

@@ -20,8 +20,8 @@ import (
"fmt"
"time"

. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/ginkgo"
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for your feedback. @fejta
Now I have updated all the files in the folder test/e2e/apps and cleaned up hack/.golint_failures.

@SataQiu SataQiu force-pushed the fix-e2e-apps-golint-20190404 branch from 356b222 to a04a15f Compare April 17, 2019 03:02
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 17, 2019
@SataQiu SataQiu changed the title Fix golint failures of e2e/apps/cronjob.go e2e/apps/daemon_restart.go Fix golint failures of test/e2e/apps Apr 17, 2019
@SataQiu
Copy link
Member Author

SataQiu commented Apr 17, 2019

/retest

@SataQiu SataQiu force-pushed the fix-e2e-apps-golint-20190404 branch from a04a15f to 03180ec Compare April 17, 2019 03:13
@SataQiu
Copy link
Member Author

SataQiu commented Apr 17, 2019

/test pull-kubernetes-kubemark-e2e-gce-big

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 17, 2019
Copy link
Member

@neolit123 neolit123 left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link
Contributor

@fejta fejta left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve
thanks!

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fejta, SataQiu

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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 17, 2019
@k8s-ci-robot k8s-ci-robot merged commit 23e6f80 into kubernetes:master Apr 17, 2019
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. area/test 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. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note-none Denotes a PR that doesn't merit a release note. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants