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

roachtest/costfuzz: create failure.log file on demand #108739

Merged
merged 1 commit into from
Aug 15, 2023

Conversation

yuzefovich
Copy link
Member

This commit makes it so that failure.log files are created lazily on demand in costfuzz and unoptimized_query_oracle roachtests. It seems nicer this way since for successful runs previously we'd see empty failure log files which were a bit confusing.

Epic: None

Release note: None

@yuzefovich yuzefovich requested review from michae2 and a team August 14, 2023 20:50
@yuzefovich yuzefovich requested a review from a team as a code owner August 14, 2023 20:50
@yuzefovich yuzefovich requested review from rachitgsrivastava and DarrylWong and removed request for a team August 14, 2023 20:50
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@msirek msirek left a comment

Choose a reason for hiding this comment

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

Nice fix!

Reviewed all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @michae2 and @yuzefovich)


pkg/cmd/roachtest/tests/query_comparison_util.go line 168 at r1 (raw file):

		}
	}()
	defer failureLog.Close()

Should this line be removed because now failureLog might be nil and the deferred function is doing the closing?

This commit makes it so that `failure.log` files are created lazily on
demand in `costfuzz` and `unoptimized_query_oracle` roachtests. It seems
nicer this way since for successful runs previously we'd see empty
failure log files which were a bit confusing.

Epic: None

Release note: None
Copy link
Member Author

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @michae2 and @msirek)


pkg/cmd/roachtest/tests/query_comparison_util.go line 168 at r1 (raw file):

Previously, msirek (Mark Sirek) wrote…

Should this line be removed because now failureLog might be nil and the deferred function is doing the closing?

Oops, nice catch, thanks.

Copy link
Contributor

@msirek msirek left a comment

Choose a reason for hiding this comment

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

:lgtm:

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

@yuzefovich
Copy link
Member Author

TFTR!

bors r+

@craig craig bot merged commit 8ebc6f1 into cockroachdb:master Aug 15, 2023
@craig
Copy link
Contributor

craig bot commented Aug 15, 2023

Build succeeded:

@yuzefovich yuzefovich deleted the costfuzz branch August 15, 2023 17:44
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.

3 participants