Honor DefaultHostMetadataResolverFactory in host-metadata resolver wrapper - #5940
Open
Divyansh-db wants to merge 4 commits into
Open
Honor DefaultHostMetadataResolverFactory in host-metadata resolver wrapper#5940Divyansh-db wants to merge 4 commits into
Divyansh-db wants to merge 4 commits into
Conversation
…apper Co-authored-by: Isaac
Co-authored-by: Isaac
Divyansh-db
marked this pull request as ready for review
August 11, 2026 16:09
Divyansh-db
requested review from
mihaimitrea-db
and removed request for
a team
August 11, 2026 16:09
Divyansh-db
requested review from
rauchy
and removed request for
a team and
mihaimitrea-db
August 11, 2026 16:10
Co-authored-by: Isaac
Contributor
Unit testsIf this PR is from a fork, the If this PR changes Actions -> Warm Go Cache -> Run workflow -> pr_number = 5940 Re-run the failed check once the cache warming completes. Integration testsIntegration tests don't run automatically for external contributors; an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
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
Fixes a pre-existing bug where the provider silently ignored
config.DefaultHostMetadataResolverFactory.During provider configuration the provider installs a wrapper around the SDK's host-metadata resolver (
cfg.HostMetadataResolver) so it can observe the host'sworkspace_idfrom the single/.well-known/databricks-configfetch. The SDK only consults theDefaultHostMetadataResolverFactoryglobal whencfg.HostMetadataResolverisnil— but because the wrapper always setscfg.HostMetadataResolver, that factory was never reached. The wrapper's own fallback went straight to the built-in HTTP fetch, so any resolver installed through the factory was silently bypassed.Fix
The wrapper now replicates the SDK's resolver precedence when choosing what to delegate to: a pre-existing resolver, then
DefaultHostMetadataResolverFactory, then the built-in HTTP fetch. It still performs exactly one metadata fetch.Testing
Adds a regression test that installs a factory and asserts it is consulted (the config is back-filled from the factory's metadata). The test fails without the fix — the factory is called zero times and no back-fill happens — and passes with it.
make fmt lint wsclean; existing configuration tests pass.Note
This is the standalone fix for a bug that predates and is independent of the eager-workspace-id work; it is being sent separately so it can be reviewed and merged on its own.