Validate segment upload destinations - #19231
Open
xiangfu0 wants to merge 1 commit into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #19231 +/- ##
==============================================
+ Coverage 67.12% 100.00% +32.87%
+ Complexity 1424 6 -1418
==============================================
Files 3462 3 -3459
Lines 220677 6 -220671
Branches 35255 0 -35255
==============================================
- Hits 148136 6 -148130
+ Misses 60708 0 -60708
+ Partials 11833 0 -11833
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
xiangfu0
force-pushed
the
xiangfu0/bind-segment-upload-destination
branch
3 times, most recently
from
August 14, 2026 05:10
c5a14ec to
a345347
Compare
xiangfu0
force-pushed
the
xiangfu0/bind-segment-upload-destination
branch
from
August 14, 2026 08:43
a345347 to
8d66497
Compare
xiangfu0
marked this pull request as ready for review
August 14, 2026 08:44
xiangfu0
force-pushed
the
xiangfu0/bind-segment-upload-destination
branch
from
August 15, 2026 09:04
8d66497 to
22486a0
Compare
xiangfu0
requested review from
noob-se7en and
yashmayya
and
a balanced review from Copilot
August 16, 2026 09:03
xiangfu0
force-pushed
the
xiangfu0/bind-segment-upload-destination
branch
from
August 16, 2026 09:05
22486a0 to
d0bacb9
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Canonicalizes and authorizes segment upload destinations across controller endpoints.
Changes:
- Adds destination validation and exact-table authorization.
- Routes Purge and Refresh uploads through v2.
- Adds unit and integration regression coverage.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
RefreshSegmentTaskGeneratorTest.java |
Tests v2 upload URL generation. |
RefreshSegmentTaskGenerator.java |
Uses the v2 segment endpoint. |
PurgeTaskGenerator.java |
Uses the v2 segment endpoint. |
FineGrainedAuthUtilsTest.java |
Tests invalid and missing table parameters. |
FineGrainedAuthUtils.java |
Returns clear client errors for invalid tables. |
PinotSegmentUploadDownloadRestletResourceTest.java |
Tests destination resolution and mismatches. |
PinotSegmentUploadAuthorizationTest.java |
Adds end-to-end authorization coverage. |
PinotSegmentUploadDownloadRestletResource.java |
Canonicalizes, validates, and authorizes destinations. |
AuthenticationFilter.java |
Validates table inputs before authorization. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
xiangfu0
force-pushed
the
xiangfu0/bind-segment-upload-destination
branch
3 times, most recently
from
August 18, 2026 09:10
d2e3142 to
40fcffd
Compare
xiangfu0
force-pushed
the
xiangfu0/bind-segment-upload-destination
branch
from
August 20, 2026 09:12
40fcffd to
d4382fe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Root cause
The upload handlers did not share a canonical destination-binding step across request inputs and segment metadata. In v1, authorization could therefore complete before the final table destination was established. No-op minion conversions could also reuse promoted segment metadata while targeting the stricter v1 route.
Impact
Upload and refresh authorization now targets the same table used by all subsequent controller operations, independently of the configured access-control implementation. Existing valid v2 promotion behavior remains supported.
Regression coverage
Validation