You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "deepthi912 (via GitHub)" <gi...@apache.org> on 2026/09/01 04:35:41 UTC
[PR] Run SPI-registered validators from /tables/validate preflight [pinot]
deepthi912 opened a new pull request, #19420:
URL: https://github.com/apache/pinot/pull/19420
## Summary
`PinotTableRestletResource#validateConfig` — the private method served by `POST /tables/validate` — only invokes `TableConfigUtils.validate` and `TaskConfigUtils.validateTaskConfigs`. The create and update paths (`POST /tables`, `PUT /tables/{tableName}`) route through `TableConfigValidationUtils#validateTableConfig`, which additionally invokes `TableConfigValidatorRegistry.validate`. Any SPI-registered validator therefore rejects the config at apply time but silently passes at preflight time.
This PR adds the registry call to the preflight so validate/apply agree.
## Behavior
| Endpoint | Registry invoked? | Before | After |
|---|---|---|---|
| `POST /tables` (create) | ✅ (via `TableConfigValidationUtils#validateTableConfig`) | unchanged | unchanged |
| `PUT /tables/{tableName}` (update) | ✅ (via same helper) | unchanged | unchanged |
| `POST /tables/validate` (preflight) | ❌ → ✅ | false green when an SPI validator would reject | preflight now matches apply |
| `POST /tableConfigs`, `PUT /tableConfigs/{tableName}`, `POST /tableConfigs/validate` | ✅ (via `TableConfigsRestletResource#validateConfig`) | unchanged | unchanged |
The bundle-config counterpart `TableConfigsRestletResource#validateConfig` already invokes the registry, so its `/tableConfigs` endpoints (create, update, validate) are unaffected.
## Test
New unit test `PinotTableRestletResourceTest#testValidateConfigRunsRegisteredValidators`: registers a stub `TableConfigValidator` that throws for any config, invokes `validateConfig`, and asserts the preflight rejects and surfaces the validator's rejection message. Uses `finally` to unregister the stub so it does not leak into other tests. `validateConfig` visibility relaxed from `private` to package-private with `@VisibleForTesting` to allow direct invocation.
## Backward compatibility
Adds a new validation gate on the preflight endpoint. Configs that previously produced a false green from `/tables/validate` will now produce the same rejection the create/update paths already produce. No wire format, segment format, or config format changes.
--
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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Fix /tables/validate to use TableConfigValidatorRegistry [pinot]
Posted by "KKcorps (via GitHub)" <gi...@apache.org>.
KKcorps merged PR #19420:
URL: https://github.com/apache/pinot/pull/19420
--
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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Fix /tables/validate to use TableConfigValidatorRegistry [pinot]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #19420:
URL: https://github.com/apache/pinot/pull/19420#issuecomment-5489311802
## [Codecov](https://app.codecov.io/gh/apache/pinot/pull/19420?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 100.00%. Comparing base ([`2f89dab`](https://app.codecov.io/gh/apache/pinot/commit/2f89dab09e7096a5a42cdc4d1d74f035c5f51b5a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`e04f605`](https://app.codecov.io/gh/apache/pinot/commit/e04f6059f5c7b10149c42f649b427a8a1f7a97c5?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #19420 +/- ##
==============================================
+ Coverage 67.57% 100.00% +32.42%
+ Complexity 1430 6 -1424
==============================================
Files 3487 3 -3484
Lines 224203 6 -224197
Branches 35385 0 -35385
==============================================
- Hits 151510 6 -151504
+ Misses 60666 0 -60666
+ Partials 12027 0 -12027
```
| [Flag](https://app.codecov.io/gh/apache/pinot/pull/19420/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [integration](https://app.codecov.io/gh/apache/pinot/pull/19420/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `100.00% <ø> (ø)` | |
| [integration1](https://app.codecov.io/gh/apache/pinot/pull/19420/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `100.00% <ø> (ø)` | |
| [integration2](https://app.codecov.io/gh/apache/pinot/pull/19420/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `0.00% <ø> (ø)` | |
| [java-25](https://app.codecov.io/gh/apache/pinot/pull/19420/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `100.00% <ø> (+32.42%)` | :arrow_up: |
| [lane-a](https://app.codecov.io/gh/apache/pinot/pull/19420/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `100.00% <ø> (ø)` | |
| [lane-b](https://app.codecov.io/gh/apache/pinot/pull/19420/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `0.00% <ø> (ø)` | |
| [temurin](https://app.codecov.io/gh/apache/pinot/pull/19420/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `100.00% <ø> (+32.42%)` | :arrow_up: |
| [unittests](https://app.codecov.io/gh/apache/pinot/pull/19420/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [unittests1](https://app.codecov.io/gh/apache/pinot/pull/19420/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [unittests2](https://app.codecov.io/gh/apache/pinot/pull/19420/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/pinot/pull/19420?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Fix /tables/validate to use TableConfigValidatorRegistry [pinot]
Posted by "xiangfu0 (via GitHub)" <gi...@apache.org>.
xiangfu0 commented on PR #19420:
URL: https://github.com/apache/pinot/pull/19420#issuecomment-5490575717
Documentation follow-up: https://github.com/pinot-contrib/pinot-docs/pull/1022
This documents both TableConfigValidator SPI preflight paths and adds the corrected `POST /tables/validate` behavior to the Controller API reference.
--
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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org