chore: remove dead code from AuthorizationCode - #32784
Conversation
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
✅ Playwright Results — workflow succeededValidated commit ✅ 557 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 48m 2s ⏱️ Max setup 6m 3s · max shard execution 19m 24s · max shard-job elapsed before upload 22m 25s · reporting 3s 🌐 234.18 requests/attempt · 2.82 app boots/UI scenario · 17.44% common-shard skew Optimization targets still in progress:
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
Removed the unused 7-arg constructor, the
redirectUriProvidedExplicitlyfield, and its never-called getter/setter from
AuthorizationCode.java.A whole-repo search found zero callers of the 7-arg constructor (both
production sites use the no-arg constructor + setters), and the
redirectUriProvidedExplicitlyfield/accessors are unused on thisclass (the only call to
setRedirectUriProvidedExplicitlyis on thesibling
AuthorizationParamsclass). The field's only writer was theremoved constructor, so it cascaded to fully dead.
Describe your changes:
Fixes #N/A (dead-code cleanup, no associated issue)
I worked on removing unused code from
AuthorizationCode.javabecausethe 7-arg constructor and
redirectUriProvidedExplicitlyaccessorshad zero callers and were misleading (the constructor notably omits
the PKCE-essential
codeVerifier, so using it would produce a codethat fails PKCE verification).
Type of change:
High-level design:
N/A — small change (single file, ~27 lines removed).
Tests:
Use cases covered
Unit tests
Verified build (
mvn compile -pl openmetadata-mcp) and existing tests pass:OAuthHttpStatelessServerTransportProviderTest(26 tests) and the authhandler tests (
AuthorizationHandlerTest,McpCallbackServletTest,RegistrationHandlerTest,RevocationHandlerTest— 67 tests) all green.Backend integration tests
Ingestion integration tests
Playwright (UI) tests
Manual testing performed
UI screen recording / screenshots:
Not applicable.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.History
Dead Code PRs can be configured here.