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

sql: re-enable flaky show_trace_nonmetamorphic test #66001

Merged
merged 1 commit into from
Jul 14, 2021

Conversation

cucaroach
Copy link
Contributor

@cucaroach cucaroach commented Jun 2, 2021

Cleanup some commented out tests

Resolves #58202

Release note: none

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@cucaroach cucaroach changed the title re-enable test sql: re-enable flaky show_trace_nonmetamorphic test Jun 2, 2021
@cucaroach cucaroach marked this pull request as draft June 3, 2021 15:58
@cucaroach cucaroach force-pushed the show_trace_58202 branch 2 times, most recently from b141285 to 6613f47 Compare June 30, 2021 17:15
@cucaroach cucaroach marked this pull request as ready for review July 1, 2021 12:04
@cucaroach cucaroach requested review from tbg and a team July 1, 2021 12:05
Copy link
Member

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

Thanks Tommy! I have had this open a few times but never felt confident enough to decide whether these tests are even testing anything anymore, see the inline comments. Feels like you need someone with more skin in the game to make that call (or to guide you towards figuring out what to actually test here!)

# This test shows some variation across runs so use statement okay instead
# of baking in flakey values.
statement ok
SELECT DISTINCT node_id, store_id, replica_id
Copy link
Member

Choose a reason for hiding this comment

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

Is there a point to this if we're not saying anything about the output?

SET tracing = on,kv; SELECT * FROM system.eventlog AS OF SYSTEM TIME '-1us'; SET tracing = off

query TT
SELECT operation, regexp_replace(regexp_replace(message, 'job_id:[1-9]\d*', 'job_id:...', 'g'), 'drop_time:\d+', 'drop_time:...', 'g') as message
Copy link
Member

Choose a reason for hiding this comment

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

What's with all of the regexp_replace that then doesn't seem to apply to anything in the trace? Kinda feels like this has rotted beyond recognition & purpose.

Copy link
Contributor Author

@cucaroach cucaroach left a comment

Choose a reason for hiding this comment

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

I'm from the "every test should carry some load or be deleted" camp. Happy to nuke these if that's the case.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @tbg)


pkg/sql/opt/exec/execbuilder/testdata/show_trace_nonmetamorphic, line 280 at r1 (raw file):

Previously, tbg (Tobias Grieger) wrote…

Is there a point to this if we're not saying anything about the output?

The only other test we have for this is sql.TestShowTraceReplica. If this adds nothing beyond that test I'll nuke it.


pkg/sql/opt/exec/execbuilder/testdata/show_trace_nonmetamorphic, line 290 at r1 (raw file):

Previously, tbg (Tobias Grieger) wrote…

What's with all of the regexp_replace that then doesn't seem to apply to anything in the trace? Kinda feels like this has rotted beyond recognition & purpose.

Looks like some vestigial id redacting, should I just nuke the whole thing or just remove the regexp_replaces? Feels like we rely on SHOW KV TRACE FOR SESSION for so many other tests now that this test is gratuitous.

@cucaroach cucaroach requested a review from yuzefovich July 7, 2021 20:08
Copy link
Member

@yuzefovich yuzefovich left a comment

Choose a reason for hiding this comment

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

nit: update the PR description to close the github issue.

:lgtm:

Reviewed 1 of 1 files at r2.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @tbg)


pkg/sql/opt/exec/execbuilder/testdata/show_trace_nonmetamorphic, line 290 at r1 (raw file):

Previously, cucaroach (Tommy Reilly) wrote…

Looks like some vestigial id redacting, should I just nuke the whole thing or just remove the regexp_replaces? Feels like we rely on SHOW KV TRACE FOR SESSION for so many other tests now that this test is gratuitous.

I imagine regexp_replace part was copy-pasted from somewhere and doesn't seem necessary here.

Copy link
Contributor Author

@cucaroach cucaroach left a comment

Choose a reason for hiding this comment

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

TFTRs!

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @tbg)

@cucaroach
Copy link
Contributor Author

bors r+

@craig
Copy link
Contributor

craig bot commented Jul 14, 2021

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Jul 14, 2021

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Jul 14, 2021

Build succeeded:

@craig craig bot merged commit 00f9b26 into cockroachdb:master Jul 14, 2021
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.

sql: audit show_trace opt logic test
4 participants