Skip to content

[ENGMP-365] Add protection config loading, roundtrip wiring, and e2e tests#318

Open
yishi3-db wants to merge 6 commits intoyi-shi_data/yishi3-db/query-protection-middlewarefrom
yi-shi_data/yishi3-db/query-protection-roundtrip
Open

[ENGMP-365] Add protection config loading, roundtrip wiring, and e2e tests#318
yishi3-db wants to merge 6 commits intoyi-shi_data/yishi3-db/query-protection-middlewarefrom
yi-shi_data/yishi3-db/query-protection-roundtrip

Conversation

@yishi3-db
Copy link

@yishi3-db yishi3-db commented Mar 18, 2026

What

  • pkg/queryfrontend/protection_config.go: YAML config loading with SHA256-based file watching
  • pkg/queryfrontend/roundtrip.go: wire ProtectionEngine into the middleware chain
  • cmd/thanos/query_frontend.go: add --protection-config flag, register WatchConfig with run.Group
  • test/e2e/query_frontend_test.go: e2e test verifying block returns 400 and log passes through

Test plan

  • Unit tests for loadRulesFromFile and WatchConfig in protection_config_test.go
  • TestQueryFrontendProtection e2e test

@yishi3-db yishi3-db changed the title Yi shi data/yishi3 db/query protection roundtrip [ENGMP-365] Add protection config loading, roundtrip wiring, and e2e tests Mar 19, 2026
@yishi3-db yishi3-db force-pushed the yi-shi_data/yishi3-db/query-protection-middleware branch from 06c366f to 5dc9004 Compare March 19, 2026 16:52
@yishi3-db yishi3-db force-pushed the yi-shi_data/yishi3-db/query-protection-roundtrip branch from b82adf6 to 1f94550 Compare March 19, 2026 16:56
@yishi3-db yishi3-db force-pushed the yi-shi_data/yishi3-db/query-protection-middleware branch 2 times, most recently from 1a833f5 to 2bce8ef Compare March 20, 2026 18:49
@yishi3-db yishi3-db force-pushed the yi-shi_data/yishi3-db/query-protection-roundtrip branch from 1f94550 to 91bb2c3 Compare March 20, 2026 18:51
@yishi3-db yishi3-db marked this pull request as ready for review March 20, 2026 20:41
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.

1 participant