Fix conf.has_option not respects default provider metadata#64209
Draft
jason810496 wants to merge 4 commits intoapache:mainfrom
Draft
Fix conf.has_option not respects default provider metadata#64209jason810496 wants to merge 4 commits intoapache:mainfrom
jason810496 wants to merge 4 commits intoapache:mainfrom
Conversation
Simplifies and centralizes provider configuration loading by removing redundant methods and properties, ensuring consistent state management. Updates fallback logic to use a sentinel value instead of None, improving accuracy in config lookups. Improves test coverage for provider metadata fallbacks and clarifies lazy initialization behavior. Streamlines provider manager interfaces to reduce duplication and potential import cycles.
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.
What
TL;DR;
Cleanup for deprecated path for the new "make conf respect provider metadata" mechanism.
The
write(include_providers=True),with conf.make_sure_configuration_loaded(with_providers=False)or anyconf.as_dictare the caller that introduce the recursive call betweenconfmodule and Provider Manager, so it would be better to clean them up in case they cause more regression just because we need to maintain those interfaces.Before the clean up:
configuration_descriptionas stateful attributesload_providers_configuration,restore_core_default_configurationto change the state ofconfiguration_descriptionjust to reflect the sources of theconfconfiguration_descriptionbefore the cleanup will not respect_provider_cfg_config_fallback_default_valuesor_provider_metadata_config_fallback_default_values.After the current clean up:
configuration_descriptionas viewconfiguration_descriptionis now a cache_property that can reflect_provider_cfg_config_fallback_default_valuesand_provider_metadata_config_fallback_default_valuesconfig sourcesWas generative AI tooling used to co-author this PR?