Repository navigation
Conversation
Require source-table UPDATE authorization for both create and update before committing a logical-table dependency.
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## master #20457 +/- ##
=============================================
- Coverage 71.50% 61.28% -10.23%
+ Complexity 1639 1 -1638
=============================================
Files 3618 2795 -823
Lines 245010 180941 -64069
Branches 39863 30303 -9560
=============================================
- Hits 175203 110886 -64317
- Misses 56586 60690 +4104
+ Partials 13221 9365 -3856
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
left a comment
There was a problem hiding this comment.
One point inline.
Defer missing strategy names to the existing config validator and retain source authorization for configured strategies.
xiangfu0
left a comment
There was a problem hiding this comment.
One small point inline from another pass.
| try { | ||
| physicalTableNames.addAll(TimeBoundaryStrategyService.getInstance() | ||
| .getTimeBoundaryStrategy(boundary.getBoundaryStrategy()).getTimeBoundaryTableNames(logicalTableConfig)); | ||
| } catch (IllegalArgumentException | ClassCastException e) { |
There was a problem hiding this comment.
getTimeBoundaryTableNames returns the raw parameter list unchecked, so a non-string element in includedTables passes addAll and the ClassCastException only surfaces in the loop on line 224, outside this try. A JSON null under the key gives a NullPointerException from addAll, which this clause doesn't catch either. Both come back as 500 rather than the 400 intended here. Copying the names into the set with an explicit string check inside the try would keep them a 400.
There was a problem hiding this comment.
Fixed in 74e8b5570a. Create and update now return HTTP 400 for malformed time-boundary source lists. Valid source names still go through authorization. All 51 focused controller tests passed.
Jackie-Jiang
left a comment
There was a problem hiding this comment.
Reviewed 7760e39 across source authorization, database-qualified names, compatibility, and test coverage.
One remaining P2 issue is already tracked in the existing inline thread: malformed timeBoundaryConfig.parameters.includedTables values return HTTP 500. [1] passes addAll and throws ClassCastException during iteration outside the catch; null throws an uncaught NullPointerException from addAll. Validate that the list is non-null and contains only non-null strings before adding its entries, return HTTP 400 for invalid values, and cover both create and update.
No additional authorization or compatibility defects found. All 17 reported checks pass for this revision; tests were not rerun locally.
Apply source-table permission checks when creating or updating a logical-table mapping.
Validated with 49 focused controller tests, including
PinotLogicalTableResourceUnitTest.Upgrade note
Creating or updating a logical table requires UPDATE permission on every mapped physical table and every table referenced by its time-boundary strategy. Grant those permissions before upgrading controllers.