crc-org / crc

CRC is a tool to help you run containers. It manages a local OpenShift 4.x cluster, Microshift or a Podman VM optimized for testing and development purposes
https://crc.dev
Apache License 2.0
1.26k stars 242 forks source link

fix (test/extended/util) : shell doesn't parse command output ending without newline (#4416) #4417

Closed rohanKanojia closed 2 weeks ago

rohanKanojia commented 1 month ago

Description

Fix #4416

Type of change

Checklist

Fixes: Issue #4416 Relates to: Issue #4397

Solution/Idea

ScanPipe should not assume that the entire line contains only the exit code token. It should extract the exit code token and write the remainder of the output to the output buffer.

Proposed changes

Do not assume that the entire output line contains only the exit code token. Extract any prefix and write it to the output buffer.

Testing

The test added in https://github.com/crc-org/crc/pull/4414 should pass once these changes get merged.

openshift-ci[bot] commented 1 month ago

Hi @rohanKanojia. Thanks for your PR.

I'm waiting for a crc-org 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](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
openshift-ci[bot] commented 1 month ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign gbraad for approval. For more information see the Kubernetes Code Review Process.

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

Needs approval from an approver in each of these files: - **[test/OWNERS](https://github.com/crc-org/crc/blob/main/test/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
praveenkumar commented 3 weeks ago

/ok-to-test

openshift-ci[bot] commented 3 weeks ago

@rohanKanojia: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/integration-crc fa728a44b0f28b2decca554fcf790d5bc73e3691 link true /test integration-crc
ci/prow/e2e-crc fa728a44b0f28b2decca554fcf790d5bc73e3691 link true /test e2e-crc

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).