Skip to content

server: status test filters out non-heap files#98587

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
dhartunian:test-status-get-files-ignores-memprof
Mar 14, 2023
Merged

server: status test filters out non-heap files#98587
craig[bot] merged 1 commit intocockroachdb:masterfrom
dhartunian:test-status-get-files-ignores-memprof

Conversation

@dhartunian
Copy link
Copy Markdown
Collaborator

@dhartunian dhartunian commented Mar 14, 2023

Resolves: #98213
Resolves: #47121

Epic: None
Release note: None

@dhartunian dhartunian requested review from a team and knz March 14, 2023 15:47
@dhartunian dhartunian requested a review from a team as a code owner March 14, 2023 15:47
@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.

it feels to me that if the type of file requested is HEAP, the pattern should never select heap files (i.e. we should filter server-side so that the client cannot use Patterns to grab unrelated files that they shouldn't have access to)

@dhartunian
Copy link
Copy Markdown
Collaborator Author

it feels to me that if the type of file requested is HEAP, the pattern should never select heap files (i.e. we should filter server-side so that the client cannot use Patterns to grab unrelated files that they shouldn't have access to)

the handler prepends the glob with the target directory already so the memprof files are generated in the heap directory. I think it's ok to allow arbitrary globbing within the dir. We already disallow path separators in the glob.

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.

thanks for explaining.

Copy link
Copy Markdown
Contributor

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

@dhartunian
Copy link
Copy Markdown
Collaborator Author

TFTRs

bors r=knz,abarganier

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Mar 14, 2023

Build failed (retrying...):

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Mar 14, 2023

Build succeeded:

@craig craig bot merged commit 094df2b into cockroachdb:master Mar 14, 2023
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.

server: TestStatusGetFiles/heap is flaky server: TestStatusGetFiles failed

4 participants