Skip to content

Expose NewWriter from internal for openshift-tests-extension#16

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:v2.19-openshift-4.18from
stbenjam:writer
Oct 8, 2024
Merged

Expose NewWriter from internal for openshift-tests-extension#16
openshift-merge-bot[bot] merged 1 commit intoopenshift:v2.19-openshift-4.18from
stbenjam:writer

Conversation

@stbenjam
Copy link
Member

@stbenjam stbenjam commented Oct 8, 2024

Ginkgo's output writer hardcodes output to always go to os.Stdout, this exposes the NewWriter function so openshift-tests-extension can use it.

This gives us more control over how we handle output from ginkgo, including writing it to stderr instead of stdout, or writing it to io.Discard, while maintaing the bytes buffer for returning output to OTE.

@openshift-ci openshift-ci bot requested a review from bparees October 8, 2024 13:53
Copy link
Member

@bertinatto bertinatto left a comment

Choose a reason for hiding this comment

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

/lgtm

I don't see a problem with exposing a new constructor, as this won't affect existing code not using it and it can be useful to write to anything other than stdout.

@openshift-ci
Copy link

openshift-ci bot commented Oct 8, 2024

@bertinatto: changing LGTM is restricted to collaborators

Details

In response to this:

/lgtm

I don't see a problem with exposing a new constructor, as this won't affect existing code not using it and it can be useful to write to anything other than stdout.

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-sigs/prow repository.

Ginkgo's output writer hardcodes output to always go to os.Stdout, this
exposes the NewWriter function so openshift-tests-extension can use it.

This gives us more control over how we handle output from ginkgo,
including writing it to `stderr` instead of `stdout`, or writing it to
`io.Discard`, while maintaing the bytes buffer for returning output to
OTE.
@deads2k deads2k added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Oct 8, 2024
@openshift-ci
Copy link

openshift-ci bot commented Oct 8, 2024

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by: bertinatto, stbenjam

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

The pull request process is described here

Details 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

@openshift-merge-bot openshift-merge-bot bot merged commit 25bf9f1 into openshift:v2.19-openshift-4.18 Oct 8, 2024
dusk125 pushed a commit to dusk125/onsi-ginkgo that referenced this pull request Dec 5, 2024
Expose NewWriter from internal for openshift-tests-extension
dusk125 pushed a commit to dusk125/onsi-ginkgo that referenced this pull request Dec 5, 2024
Update suite.config.Timeout configuration logic for ginkgo v2.4 bump

Make sure ginkgo.By is printed

Merge pull request openshift#15 from stbenjam/labels

Patch spec to allow access to labels for tests

Merge pull request openshift#16 from stbenjam/writer

Expose NewWriter from internal for openshift-tests-extension

Remove bparees and soltysh from owners
jupierce pushed a commit that referenced this pull request Apr 16, 2025
Update suite.config.Timeout configuration logic for ginkgo v2.4 bump

Make sure ginkgo.By is printed

Merge pull request #15 from stbenjam/labels

Patch spec to allow access to labels for tests

Merge pull request #16 from stbenjam/writer

Expose NewWriter from internal for openshift-tests-extension

Remove bparees and soltysh from owners
jupierce pushed a commit that referenced this pull request Oct 1, 2025
Update suite.config.Timeout configuration logic for ginkgo v2.4 bump

Make sure ginkgo.By is printed

Merge pull request #15 from stbenjam/labels

Patch spec to allow access to labels for tests

Merge pull request #16 from stbenjam/writer

Expose NewWriter from internal for openshift-tests-extension

Remove bparees and soltysh from owners
jacobsee added a commit to jacobsee/onsi-ginkgo that referenced this pull request Nov 20, 2025
Update suite.config.Timeout configuration logic for ginkgo v2.4 bump

Make sure ginkgo.By is printed

Merge pull request openshift#15 from stbenjam/labels

Patch spec to allow access to labels for tests

Merge pull request openshift#16 from stbenjam/writer

Expose NewWriter from internal for openshift-tests-extension

Remove bparees and soltysh from owners
jacobsee added a commit to jacobsee/onsi-ginkgo that referenced this pull request Nov 20, 2025
Update suite.config.Timeout configuration logic for ginkgo v2.4 bump

Make sure ginkgo.By is printed

Merge pull request openshift#15 from stbenjam/labels

Patch spec to allow access to labels for tests

Merge pull request openshift#16 from stbenjam/writer

Expose NewWriter from internal for openshift-tests-extension

Remove bparees and soltysh from owners
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. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments