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

testserver: introduce CockroachLogsDirOpt #170

Merged
merged 1 commit into from Jun 3, 2023

Conversation

renatolabs
Copy link
Contributor

This new parameter allows callers to specify a root directory where logs for cockroach processes created by testserver will be located.

Previously, when calling testserver.Stop(), all resources would be deleted, including cockroach logs. By allowing the caller to specify a custom directory, we allow the possibility for the logs to outlive the cockroach processes, which is especially useful when debugging test failures.

@renatolabs renatolabs requested a review from rafiss May 26, 2023 19:23
@cockroach-teamcity
Copy link
Member

This change is Reviewable

This new parameter allows callers to specify a root directory where
logs for cockroach processes created by testserver will be located.

Previously, when calling `testserver.Stop()`, *all* resources would be
deleted, including cockroach logs. By allowing the caller to specify a
custom directory, we allow the possibility for the logs to outlive the
cockroach processes, which is especially useful when debugging test
failures.
Copy link
Contributor

@rafiss rafiss left a comment

Choose a reason for hiding this comment

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

this is a great addition, thanks!

@rafiss rafiss merged commit 2e2ec24 into cockroachdb:master Jun 3, 2023
3 checks passed
renatolabs added a commit to renatolabs/cockroach that referenced this pull request Jun 14, 2023
This commit makes use of the new `CockroachLogsDirOpt` option
introduced in [1] to pass a custom directory where cockroach logs will
be stored. This directory is relative to TMPDIR, which is part of the
artifacts path when the test runs in CI. With this change, when a
logic test using the cockroach-go config fails, we'll be able to see
both the test logs as well as the cockroach logs themselves. The
latter will be in the `cockroach.stderr` file.

[1] cockroachdb/cockroach-go#170

Epic: none

Release note: None
renatolabs added a commit to renatolabs/cockroach that referenced this pull request Jun 14, 2023
This commit makes use of the new `CockroachLogsDirOpt` option
introduced in [1] to pass a custom directory where cockroach logs will
be stored. This directory is relative to TMPDIR, which is part of the
artifacts path when the test runs in CI. With this change, when a
logic test using the cockroach-go config fails, we'll be able to see
both the test logs as well as the cockroach logs themselves. The
latter will be in the `cockroach.stderr` file.

[1] cockroachdb/cockroach-go#170

Epic: none

Release note: None
craig bot pushed a commit to cockroachdb/cockroach that referenced this pull request Jun 14, 2023
104821: upgrade: checkpoint fence version for multi-tenant clusters r=JeffSwenson a=JeffSwenson

Previously, the tenant upgrade interlock checkpointed the version attached to the upgrade, when it should have checkpointed the fence version. This made it possible for an upgrade to skip versions. The conditions needed for this are rare, but could be triggered by crashes in the upgrade system or by the autoscaler downscaling a serverless cluster with multiple nodes.

Release Note: None

Fixes: #104884

104876: logic: keep cockroach-go logs in case of failure r=rafiss a=renatolabs

This commit makes use of the new `CockroachLogsDirOpt` option introduced in [1] to pass a custom directory where cockroach logs will be stored. This directory is relative to TMPDIR, which is part of the artifacts path when the test runs in CI. With this change, when a logic test using the cockroach-go config fails, we'll be able to see both the test logs as well as the cockroach logs themselves. The latter will be in the `cockroach.stderr` file.

[1] cockroachdb/cockroach-go#170

Epic: none

Release note: None

104879: upgrades: deflake TestBackfillJobsInfoTable r=stevendanna a=adityamaru

Previously, this test created jobs that could be adopted during test execution causing the number of payload/progress updates to be variable. With this change we create startable jobs so that they are not adopted and the number of payload/progress remain constant.

Fixes: #103046
Release note: None

Co-authored-by: Jeff <swenson@cockroachlabs.com>
Co-authored-by: Renato Costa <renato@cockroachlabs.com>
Co-authored-by: adityamaru <adityamaru@gmail.com>
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.

None yet

3 participants