visit2rahul opened a new pull request, #4422:
URL: https://github.com/apache/polaris/pull/4422

   Closes #4355
   
   ## Summary
   
   Adds validation to reject catalog updates where the new 
`default-base-location` is not within any of the `allowedLocations` configured 
in the catalog's existing storage configuration.
   
   Previously, updating only the `default-base-location` property without also 
providing `storageConfigInfo` would leave the catalog in an inconsistent state 
— the property would be accepted but subsequent namespace and table creation 
would fail because the new location wasn't in `allowedLocations`.
   
   ### Change
   
   Added `validateBaseLocationAgainstStorageConfig()` in 
`PolarisAdminService.updateCatalog()` that checks the new base location is a 
child of at least one allowed storage location when the storage config itself 
is not being updated.
   
   ### Scenario
   1. Catalog created with `default-base-location=s3://foo/`, 
`allowedLocations=["s3://foo/"]`
   2. Update catalog to `default-base-location=s3://bar/` without updating 
storage config
   3. **Before:** Update accepted silently, namespace/table creation fails later
   4. **After:** Update rejected with clear error message
   
   ## Test Plan
   - [x] `polaris-runtime-service:compileJava` passes
   - [x] `polaris-runtime-service:test` (admin tests) passes
   - [x] Spotless and checkstyle pass


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to