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 --ignore-errors does not take effect if multiple logs are printed and unfollowed #97686

Merged
merged 1 commit into from Feb 26, 2021

Conversation

wzshiming
Copy link
Member

@wzshiming wzshiming commented Jan 4, 2021

What type of PR is this?
/kind bug

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #97530

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Does this PR before, exit if there are any errors

> kubectl logs --previous deploy/random-crash --all-containers --ignore-errors
error: previous terminated container "bash" in pod "random-crash-67858b7cdc-kwc6z" not found

Does this PR after, be consistent with parallelConsumeRequest behavior

> kubectl logs --previous deploy/random-crash --all-containers --ignore-errors
error: previous terminated container "bash" in pod "random-crash-67858b7cdc-kwc6z" not found
error: previous terminated container "error-container" in pod "random-crash-67858b7cdc-kwc6z" not found
kubectl logs: Fix --ignore-errors does not take effect if multiple logs are printed and unfollowed

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


@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/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. labels Jan 4, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @wzshiming. Thanks for your PR.

I'm waiting for a kubernetes 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.

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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Jan 4, 2021
@k8s-ci-robot k8s-ci-robot added area/kubectl sig/cli Categorizes an issue or PR as relevant to SIG CLI. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jan 4, 2021
@pacoxu
Copy link
Member

pacoxu commented Jan 4, 2021

/ok-to-test

@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 Jan 4, 2021
@pacoxu
Copy link
Member

pacoxu commented Jan 4, 2021

/retest

1 similar comment
@wzshiming
Copy link
Member Author

/retest

@pacoxu
Copy link
Member

pacoxu commented Jan 5, 2021

/lgtm

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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. labels Jan 5, 2021
@wzshiming wzshiming changed the title Fix 'kubectl logs --all-containers --previous' - failure to report all logs before erroring Fix --ignore-errors does not take effect if multiple logs are printed and unfollowed Jan 5, 2021
@pacoxu
Copy link
Member

pacoxu commented Jan 6, 2021

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jan 6, 2021
Copy link
Contributor

@seans3 seans3 left a comment

Choose a reason for hiding this comment

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

Thanks for sending this PR. Please add a unit test, and consider an integration test to prove that this code is doing what it claims. Thanks.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 7, 2021
@wzshiming
Copy link
Member Author

/retest

@wzshiming
Copy link
Member Author

/retest

@wzshiming
Copy link
Member Author

/assign @liggitt

@liggitt
Copy link
Member

liggitt commented Jan 11, 2021

/unassign
/assign @soltysh

@k8s-ci-robot k8s-ci-robot assigned soltysh and unassigned liggitt Jan 11, 2021
@wzshiming
Copy link
Member Author

@soltysh @seans3 @dixudx PTAL

@dougsland
Copy link
Member

/cc

@wzshiming wzshiming added this to Needs review in SIG CLI Feb 2, 2021
Copy link
Contributor

@soltysh soltysh 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

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pacoxu, soltysh, wzshiming

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 Feb 25, 2021
@pacoxu
Copy link
Member

pacoxu commented Feb 25, 2021

/retest

1 similar comment
@wzshiming
Copy link
Member Author

/retest

@k8s-ci-robot k8s-ci-robot merged commit bce5d7a into kubernetes:master Feb 26, 2021
SIG CLI automation moved this from Needs review to Done Feb 26, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.21 milestone Feb 26, 2021
@wzshiming wzshiming deleted the fix-logs-all-containers branch February 26, 2021 07:51
@bl-ue
Copy link
Contributor

bl-ue commented Feb 26, 2021

Wow—great job @wzshiming! 🚀

@wzshiming
Copy link
Member Author

Hi @bl-ue
Thanks, your notes are very helpful.

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/kubectl cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. 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. priority/backlog Higher priority than priority/awaiting-more-evidence. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cli Categorizes an issue or PR as relevant to SIG CLI. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Development

Successfully merging this pull request may close these issues.

kubectl logs --all-containers --previous - failure to report all logs before erroring
8 participants