calico
calico copied to clipboard
Add the command to determine whether the system has netstat
Description
Add the command to determine whether the system has netstat,Can automatically select commands on the system for log prompt output.
Related issues/PRs
fixes #8653
Todos
- [x] Tests
- [x] Documentation
- [x] Release note
Release Note
TBD
Reminder for the reviewer
Make sure that this PR has the correct labels and milestone set.
Every PR needs one docs-*
label.
-
docs-pr-required
: This change requires a change to the documentation that has not been completed yet. -
docs-completed
: This change has all necessary documentation completed. -
docs-not-required
: This change has no user-facing impact and requires no docs.
Every PR needs one release-note-*
label.
-
release-note-required
: This PR has user-facing changes. Most PRs should have this label. -
release-note-not-required
: This PR has no user-facing changes.
Other optional labels:
-
cherry-pick-candidate
: This PR should be cherry-picked to an earlier release. For bug fixes only. -
needs-operator-pr
: This PR is related to install and requires a corresponding change to the operator.
Thanks for the PR! I have suggested a cleaner way to do this
This method is just a modification of the current code, which I think is reasonable. If you need to modify it, I can submit it according to the content of my screenshot
/sem-approve
@caseydavenport This is my first time to contribute to Calico. I am not sure how to solve this CI part. Please tell me how to solve this problem.
The CI is complaining that the diags.go file is "dirty"
make check-dirty01:47
make[1]: Entering directory '/home/semaphore/calico'01:47
The following files are dirty01:48
calicoctl/calicoctl/commands/node/diags.go | 22 +++++++++++-----------01:48
1 file changed, 11 insertions(+), 11 deletions(-)01:48
make[1]: *** [lib.Makefile:1125: check-dirty] Error 101:48
make[1]: Leaving directory '/home/semaphore/calico'01:48
make: *** [Makefile:41: ci-preflight-checks] Error 2
CI runs a code formatter to make sure that the code is following standard formatting rules and it seems like something is being picked up here.
Looks like it's 22 lines, which means it's probably all of the lines of code. My guess is that it's complaining about tabs instead of spaces?
Removing "merge-when-ready" label due to new commits
@caseydavenport I have replaced all tab characters, please continue to review.
/sem-approve
Removing "merge-when-ready" label due to new commits
@caseydavenport I don’t know how to modify it anymore. The places I modified are now not tab characters.
/sem-approve
Removing "merge-when-ready" label due to new commits
Hi @caseydavenport
I confirmed that there are no tab characters.
Please continue to review。
/sem-approve
Hopefully that's it! If not I will try to reproduce locally :crossed_fingers:
@caseydavenport Is it possible that the standard just uses tab characters?
Because I ran the command below to check that all other files contain tab characters.
I've reverted the code to its original submission state. I'm hoping you can assist me in pinpointing where the formatting issue lies. the CI check failed at the same position.
@opencmit2 thanks for sticking with this - I put up a fork of this PR and merged it here: https://github.com/projectcalico/calico/pull/8725
I think it was actually extra spaces at the end of the line that was the problem.