Repository navigation
Reject root-module provider resources resolved through moduleFormat - #25020
Merged
iwahbe merged 1 commit intoOct 5, 2026
Merged
Conversation
The reserved-name check for "provider" in the root module only looked at the raw module segment of the token, so a token like "pkg:index/provider:Provider" with moduleFormat "(.*)(?:/[^/]*)" passed schema validation and then crashed every SDK generator with a duplicate provider file. Apply the check after moduleFormat resolution.
KR-Ravindra
marked this pull request as ready for review
October 4, 2026 04:21
|
PR is now waiting for a maintainer to take action. Note for the maintainer: Commands available:
|
Member
|
/run-acceptance-tests |
iwahbe
approved these changes
Oct 5, 2026
iwahbe
left a comment
Member
There was a problem hiding this comment.
This looks good. Assuming tests pass, I'll merge this later today.
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
Problem
The binder already treats
provideras a reserved name in the root module, but it checks the raw module segment of the token. WithmoduleFormat: "(.*)(?:/[^/]*)", a token likedatabricks:index/provider:Providerresolves to the root module, passes validation, and then every SDK generator panics withduplicate file: provider.*.Fix
Run the existing reserved-name check after
moduleFormatis applied, so it sees the resolved module.Fixes #17034
Test plan
How tested
bad-type-5.jsoncase inTestInvalidTypesBefore the fix:
After:
Validation
go test ./codegen/schema/..., plusTestGeneratePackage*for go and pythonpkg/codegen/schema— cleanChangelog
Risk
Such schemas already failed SDK generation. Newly refused: YAML-only providers using this, and root-module types/functions named
providerviamoduleFormat.Prepared with an AI agent operated by KR-Ravindra, who reviewed and tested it. The agent is pointed only at issues maintainers have confirmed and problems he has hit, not at producing contributions.