-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
roachprod: keep reference to parent logger #106850
Merged
craig
merged 1 commit into
cockroachdb:master
from
renatolabs:rc/remote-session-child-logger
Jul 18, 2023
Merged
roachprod: keep reference to parent logger #106850
craig
merged 1 commit into
cockroachdb:master
from
renatolabs:rc/remote-session-child-logger
Jul 18, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
renatolabs
requested review from
srosenberg and
smg260
and removed request for
a team
July 14, 2023 17:51
renatolabs
force-pushed
the
rc/remote-session-child-logger
branch
from
July 14, 2023 17:52
58782cf
to
3dc848f
Compare
renatolabs
added
the
backport-23.1.x
Flags PRs that need to be backported to 23.1
label
Jul 14, 2023
renatolabs
force-pushed
the
rc/remote-session-child-logger
branch
from
July 14, 2023 20:05
3dc848f
to
e30afc2
Compare
srosenberg
reviewed
Jul 18, 2023
srosenberg
approved these changes
Jul 18, 2023
renatolabs
force-pushed
the
rc/remote-session-child-logger
branch
from
July 18, 2023 13:15
e30afc2
to
f1d03c3
Compare
Rebased against latest master to get the fix for #105726, which flaked on this PR. |
renatolabs
force-pushed
the
rc/remote-session-child-logger
branch
from
July 18, 2023 14:31
f1d03c3
to
fe35a46
Compare
Rebased again to get the skip for a different flake in Essential CI (#106865). |
This changes roachprod's Logger to keep a reference to the parent instance when a call to `ChildLogger` is made. This allows any logger instance to then reference the root logger in the chain via a new `RootLogger` function added in this commit. This function is used in `newRemoteSession`: when determining the path to the SSH log file, we now generate a path relative to the root logger, instead of relative to the logger instance passed as parameter. This makes it so that, on roachtest failures, the `ssh/` directory is created at the top of the artifacts directory regardless of whether the test itself is using a `ChildLogger` or not. Ideally, the `remoteSession` would have access to the artifacts directory, since that's what it actually cares about. Making that plumbing, however, would involve a significant amount of infrastructure and test changes, so this commit takes the pragmatic approach of assuming that the root logger points to the root of the artifacts directory, an assumption that will likely hold for a long time. Epic: none Release note: None
renatolabs
force-pushed
the
rc/remote-session-child-logger
branch
from
July 18, 2023 18:02
fe35a46
to
092154e
Compare
Rebased again due to another flake in Essential CI. |
Another flake! #107098 |
TFTR! bors r=srosenberg |
Build succeeded: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This changes roachprod's Logger to keep a reference to the parent instance when a call to
ChildLogger
is made. This allows any logger instance to then reference the root logger in the chain via a newRootLogger
function added in this commit.This function is used in
newRemoteSession
: when determining the path to the SSH log file, we now generate a path relative to the root logger, instead of relative to the logger instance passed as parameter. This makes it so that, on roachtest failures, thessh/
directory is created at the top of the artifacts directory regardless of whether the test itself is using aChildLogger
or not.Ideally, the
remoteSession
would have access to the artifacts directory, since that's what it actually cares about. Making that plumbing, however, would involve a significant amount of infrastructure and test changes, so this commit takes the pragmatic approach of assuming that the root logger points to the root of the artifacts directory, an assumption that will likely hold for a long time.Epic: none
Release note: None