Skip to content

server: remove KeepRedactable logs rpc option#56878

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
andreimatei:log-fetch-rpc
Nov 20, 2020
Merged

server: remove KeepRedactable logs rpc option#56878
craig[bot] merged 1 commit intocockroachdb:masterfrom
andreimatei:log-fetch-rpc

Conversation

@andreimatei
Copy link
Copy Markdown
Contributor

This patch removes the KeepRedactable option from the Logs and LogFile
RPCs. The option existed just for backwards compatibility with pre-20.2
clients. Even for such old clients, I don't think there's real
consequences to removing this option. This patch retains the behvior of
the option being set.
The option, when coupled with the Redact=false option, made the RPCs
keep the log entries exactly as they are in the log file - i.e.
redactable, with sensistive data markers. With this patch, the logs
returned by the RPCs are either redacted, or redactable. "Flattening"
them (i.e. not redacting, but stripping the markers) is no longer an
option.

The Logs RPC is used by the AdminUI, which doesn't use either Redact or
KeepRedactable - so, with this patch, the UI will show logs with markers
in them. I think that's OK.
The LogFile RPC is used by the cli getting a debug zip. Since 20.2, the
client is setting KeepRedactable, and so nothing changes. Older clients
will get log entries with markers in them.

This change is motivated by the fact that I'd like to replace the
LogFile RPC with a more efficient version that returns a raw file, not a
proto-encoded list of log entries. In fact we already have that RPC in
the form of GetFiles, which we may be able to use. This KeepRedactable
option was in my way.

Release note: None

@andreimatei andreimatei requested a review from knz November 19, 2020 00:36
@andreimatei andreimatei requested a review from a team as a code owner November 19, 2020 00:36
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Contributor

@knz knz left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 6 of 6 files at r1.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained

@andreimatei andreimatei requested a review from a team as a code owner November 19, 2020 21:21
This patch removes the KeepRedactable option from the Logs and LogFile
RPCs. The option existed just for backwards compatibility with pre-20.2
clients. Even for such old clients, I don't think there's real
consequences to removing this option. This patch retains the behvior of
the option being set.
The option, when coupled with the Redact=false option, made the RPCs
keep the log entries exactly as they are in the log file - i.e.
redactable, with sensistive data markers. With this patch, the logs
returned by the RPCs are either redacted, or redactable. "Flattening"
them (i.e. not redacting, but stripping the markers) is no longer an
option.

The Logs RPC is used by the AdminUI, which doesn't use either Redact or
KeepRedactable - so, with this patch, the UI will show logs with markers
in them. I think that's OK.
The LogFile RPC is used by the cli getting a debug zip. Since 20.2, the
client is setting KeepRedactable, and so nothing changes. Older clients
will get log entries with markers in them.

This change is motivated by the fact that I'd like to replace the
LogFile RPC with a more efficient version that returns a raw file, not a
proto-encoded list of log entries. In fact we already have that RPC in
the form of GetFiles, which we may be able to use. This KeepRedactable
option was in my way.

Release note: None
Copy link
Copy Markdown
Contributor Author

@andreimatei andreimatei left a comment

Choose a reason for hiding this comment

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

bors r+

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

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Nov 19, 2020

Build failed:

@andreimatei
Copy link
Copy Markdown
Contributor Author

flaked on #53724

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Nov 20, 2020

Build succeeded:

@craig craig bot merged commit 099dae8 into cockroachdb:master Nov 20, 2020
@andreimatei andreimatei deleted the log-fetch-rpc branch November 20, 2020 16:03
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