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

Add a verbosity option to framework.exec #96194

Merged
merged 1 commit into from Nov 4, 2020

Conversation

jayunit100
Copy link
Member

@jayunit100 jayunit100 commented Nov 3, 2020

Exec is a utility function but, if you call it and are already planning to either suppress or print the exec command before hand, its ability to log can be redundant or a hinderance on test readability

Fixes #96193
What type of PR is this?

What this PR does / why we need it:

Makes the ExecUtil log selectable, so that it doesn't always create spam when recording the action its producing

Which issue(s) this PR fixes:
Fixes #96193

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. area/e2e-test-framework Issues or PRs related to refactoring the kubernetes e2e test framework area/test sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Nov 3, 2020
@jayunit100 jayunit100 changed the title Add a verbosity option to exec Add a verbosity option to framework.exec Nov 3, 2020
@jayunit100
Copy link
Member Author

Note this isn't widely used, mostly networking and I think one storage test uses it. Folks not using this option will see no effect...

@neolit123
Copy link
Member

/triage accepted
/kind feature
/priority backlog

please keep the commits squashed to one.

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Nov 3, 2020
Exec is a utility function but, if you call it and are already planning to either suppress or print the exec command before hand, its ability to log can be redundant or a hinderance on test readability
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
/approve
thanks!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 3, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jayunit100, neolit123

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 Nov 3, 2020
@jayunit100
Copy link
Member Author

/test pull-kubernetes-bazel-test

@jayunit100
Copy link
Member Author

exec ${PAGER:-/usr/bin/less} "$0" || exit 1
Executing tests from //staging/src/k8s.io/apiserver/pkg/server/filters:go_default_test
-----------------------------------------------------------------------------
2020/11/04 00:57:28 httptest.Server blocked in Close after 5 seconds, waiting for connections:
  *net.TCPConn 0xc000386228 127.0.0.1:56738 in state active

flake

@jayunit100
Copy link
Member Author

/test pull-kubernetes-bazel-test

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

1 similar comment
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@k8s-ci-robot k8s-ci-robot merged commit e1909c7 into kubernetes:master Nov 4, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.20 milestone Nov 4, 2020
@jayunit100
Copy link
Member Author


go_test: //staging/src/k8s.io/apiserver/pkg/server/filters/go_default_test:run_2_of_2 expand_less | 0s
-- | --
exec ${PAGER:-/usr/bin/less} "$0" \|\| exit 1 Executing tests from //staging/src/k8s.io/apiserver/pkg/server/filters:go_default_test -----------------------------------------------------------------------------

flake?

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/e2e-test-framework Issues or PRs related to refactoring the kubernetes e2e test framework area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/backlog Higher priority than priority/awaiting-more-evidence. release-note-none Denotes a PR that doesn't merit a release note. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ExecUtil in framework.go doesn't allow you to toggle command logging
4 participants