[v3-0-test] Fix module loading in logging config (#54555) #54686
+60
−2
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.
import_module()
import_string()
withimport_module()
inload_logging_config()
log_config.LOGGING_CONFIG
failedimportlib
import inside function to avoid circular importsEnsures logging config works with various module path structures
import_module()
import_string()
withimport_module()
inload_logging_config()
log_config.LOGGING_CONFIG
failedimportlib
import inside function to avoid circular importsEnsures logging config works with various module path structures
import_module()
import_string()
withimport_module()
inload_logging_config()
log_config.LOGGING_CONFIG
failedimportlib
import inside function to avoid circular importsEnsures logging config works with various module path structures
refactor(logging): move
import_module
to the top leveltest(logging): optimize test constants to reduce code duplication
Replace
SETTINGS_FILE_NESTED_MODULE
replicate part with string replacement fromSETTINGS_FILE_SIMPLE_MODULE
Replace manual assertions with
self._verify_basic_logging_config
in fallback test to ensure consistent validation across all logging config tests.SETTINGS_FILE_NESTED_MODULE
SETTINGS_FILE_SIMPLE_MODULE
toSETTINGS_FILE_WITH_REMOTE_VARS
SETTING_FILE_NO_REMOTE_VARS
bcz redundant var_verify_basic_logging_config
call
(cherry picked from commit 462ce9a)
Co-authored-by: Vic Wen [email protected]