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

acceptance: de-flake test_missing_log_output #19402

Merged
merged 1 commit into from
Oct 20, 2017

Conversation

tbg
Copy link
Member

@tbg tbg commented Oct 20, 2017

Fixes #19397.
Fixes #19388.

@tbg tbg requested a review from a team as a code owner October 20, 2017 11:44
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@tbg tbg requested a review from knz October 20, 2017 11:44
@tbg
Copy link
Member Author

tbg commented Oct 20, 2017

@knz I'm having trouble running this test locally for unrelated reasons (slow bandwidth and no builder image present), but I'll loop it a few times in CI to see that it really does fix the problem.

# Note that grpc sends WARNING messages which we accept in this
# test for now.
# See, for example, https://github.com/cockroachdb/cockroach/issues/19397.
send "echo marker; $argv quit 2>&1 | grep '^\\(\[IEF\]\[0-9\]\\)' \r"
Copy link
Contributor

Choose a reason for hiding this comment

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

This is probably a bit too permissive now - we're just interested in permitting the one grpc warning message (rather than all warning messages). How about ... | grep -vE '^W[0-9]+ grpc:' | grep '^[IWEF][0-9]' (note that I've also removed the capture groups, which appear to be useless here.

@tamird
Copy link
Contributor

tamird commented Oct 20, 2017

Per our discussion, updated this for you.

# interested in the absence of INFO messages, remove the warnings from
# the output.
send "echo marker; $argv quit --logtostderr 2>&1 | grep -v '^W'\r"
send "echo marker; $argv quit --logtostderr 2>&1 | grep -vE '^\[IWEF\]\[0-9\]+ .\* grpc: '\r"
Copy link
Contributor

Choose a reason for hiding this comment

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

The test is supposed to check no info messages are printed because the default logging level should be WARNING. The grep should not remove them.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, good point. Fixed.

Copy link
Member Author

@tbg tbg left a comment

Choose a reason for hiding this comment

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

LGTM, though if you're eating CI anyway, you may want to add the type of message we're special casing in the commit msg:

W171020 12:24:14.884065 21 vendor/google.golang.org/grpc/clientconn.go:1034 grpc: addrConn.resetTransport failed to create client transport: ...

Copy link
Contributor

@tamird tamird left a comment

Choose a reason for hiding this comment

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

@tschottdorf done.

# interested in the absence of INFO messages, remove the warnings from
# the output.
send "echo marker; $argv quit --logtostderr 2>&1 | grep -v '^W'\r"
send "echo marker; $argv quit --logtostderr 2>&1 | grep -vE '^\[IWEF\]\[0-9\]+ .\* grpc: '\r"
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, good point. Fixed.

@tbg
Copy link
Member Author

tbg commented Oct 20, 2017

LGTM. Since it's now basically your PR, I'd say it's between you and @knz to merge. Thanks!

@knz
Copy link
Contributor

knz commented Oct 20, 2017

:lgtm:


Reviewed 1 of 1 files at r3.
Review status: all files reviewed at latest revision, 2 unresolved discussions, some commit checks pending.


Comments from Reviewable

@tamird tamird force-pushed the tcl-missing-log branch 2 times, most recently from 6da8a73 to 3566f7b Compare October 20, 2017 13:31
...by filtering out all GRPC log messages. The specific offender is
https://github.com/grpc/grpc-go/blob/v1.7.0/clientconn.go#L937; this is
the same error message that we throttle in the grpcutil log bridge. It
is a warning that reads:

> grpc: addrConn.resetTransport failed to create client transport: ...

Turns out there are other offenders, so we just filter out any log messages
that originates from GRPC. Another example is logged from
https://github.com/grpc/grpc-go/blob/v1.7.0/clientconn.go#L696 and reads:

> Failed to dial ...: ...; please retry.

Fixes cockroachdb#19397.
Fixes cockroachdb#19388.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants