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 (make verify) with Go 1.16 #142

Merged
merged 1 commit into from
Feb 23, 2021

Conversation

mtrmac
Copy link
Contributor

@mtrmac mtrmac commented Feb 20, 2021

failing with

go vet -mod=vendor ./...
# github.com/openshift/service-ca-operator/test/util
test/util/rotate.go:113:4: call to (*T).Fatalf from a non-test goroutine

Aborting the test from inside a goroutine is invalid; instead, just mark the test as failed, and let the client on the main goroutine time out. By default, that waits too long and the test fails with a generic "timed out" panic, and no record of the cause, so impose a 1-minute connection/client timeout to ensure the test fails in time; 1 minute should be plenty.

We could do more work to fail immediately (e.g. by moving the client into a separate goroutine and having the main test goroutine wait for either of the client and server), but this seems good enough for an error we don't expect to happen.

failing with
> go vet -mod=vendor ./...
> # github.com/openshift/service-ca-operator/test/util
> test/util/rotate.go:113:4: call to (*T).Fatalf from a non-test goroutine

Aborting the test from inside a goroutine is invalid; instead, just mark
the test as failed, and let the client on the main goroutine time out.
By default, that waits too long and the test fails with a generic "timed out"
panic, and no record of the cause, so impose a 1-minute connection/client
timeout to ensure the test fails in time; 1 minute should be plenty.

We could do more work to fail immediately (e.g. by moving the client into
a separate goroutine and having the main test goroutine wait for either
of the client and server), but this seems good enough for an error we
don't expect to happen.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
@mtrmac
Copy link
Contributor Author

mtrmac commented Feb 20, 2021

/retest

3 similar comments
@mtrmac
Copy link
Contributor Author

mtrmac commented Feb 20, 2021

/retest

@mtrmac
Copy link
Contributor Author

mtrmac commented Feb 20, 2021

/retest

@mtrmac
Copy link
Contributor Author

mtrmac commented Feb 22, 2021

/retest

@stlaz
Copy link
Contributor

stlaz commented Feb 22, 2021

/lgtm
Thanks for the fix 👍

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 22, 2021
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mtrmac, stlaz

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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 22, 2021
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

12 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit a84926e into openshift:master Feb 23, 2021
@mtrmac mtrmac deleted the go-1.16 branch February 23, 2021 09:26
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.

None yet

5 participants