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

safekeeper,pageserver: fix CPU profiling allowlists #9856

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

erikgrinaker
Copy link
Contributor

Problem

The HTTP router allowlists matched both on the path and the query string. This meant that only /profile/cpu would be allowed without auth, while /profile/cpu?format=svg would require auth.

Follows #9764.

Summary of changes

  • Match allowlists on URI path, rather than the entire URI.
  • Fix the allowlist for Safekeeper to use /profile/cpu rather than the old /pprof/profile.
  • Just use a constant slice for the allowlist; it's only a handful of items, and these handlers are not on hot paths.

@erikgrinaker erikgrinaker self-assigned this Nov 22, 2024
@erikgrinaker erikgrinaker requested a review from a team as a code owner November 22, 2024 15:54
Copy link

github-actions bot commented Nov 22, 2024

5561 tests run: 5344 passed, 0 failed, 217 skipped (full report)


Flaky tests (3)

Postgres 17

Postgres 15

Code coverage* (full report)

  • functions: 31.4% (7955 of 25337 functions)
  • lines: 49.3% (63105 of 128000 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
91cc48e at 2024-11-22T17:53:22.732Z :recycle:

@erikgrinaker erikgrinaker added this pull request to the merge queue Nov 22, 2024
Merged via the queue into main with commit e939d36 Nov 22, 2024
84 checks passed
@erikgrinaker erikgrinaker deleted the erik/profile-cpu-allowlist branch November 22, 2024 17:53
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.

2 participants