Describe your environment
OS: (e.g, Ubuntu)
Python version: (e.g., Python 3.10.0)
SDK version: (e.g., 1.25.0)
API version: (e.g., 1.25.0)
What happened?
CHANGELOG.md for the 1.44.0/0.65b0 release states "bump declarative configuration
schema to v1.1.0" (#5345), but file/_loader.py still hardcodes
_SUPPORTED_SCHEMA_MINOR = 0. As a result, any config file that declares
file_format: "1.1.0" — the version this release claims to support — is treated
as an unrecognized newer minor version and produces a misleading warning that
settings may be ignored, even though nothing is actually unsupported.
tests/file/test_loader.py::TestFileFormatValidation::test_newer_minor_is_accepted_with_warning
currently asserts this warning fires for "1.1", so the test suite encodes the
same stale assumption and won't catch a regression either way.
Steps to Reproduce
minimal_repro.yaml:
file_format: "1.1.0"
from opentelemetry.configuration import load_config_file
config = load_config_file("minimal_repro.yaml")
Expected Result
No warning. "1.1.0" is the schema version this SDK release targets per the
changelog, so it should be accepted as fully supported.
Actual Result
WARNING:opentelemetry.configuration.file._loader:Configuration file_format
'1.1.0' has a newer minor version than this SDK supports (1.0); some settings
may be ignored.
Additional context
Verified _validate_file_format() is the live code path invoked from
load_config_file() (not dead code). Reproduced against main (commit matches
the 1.44.0/0.65b0 release) and against the current PyPI release.
Two possible fixes, and I'm not certain which the maintainers intend:
- _SUPPORTED_SCHEMA_MINOR should be bumped to 1, and the now-misleading test
updated/renamed accordingly, or
- v1.1.0 support isn't actually fully wired up yet, in which case the
CHANGELOG entry / vendored schema.json are ahead of the validation logic
and need to be reconciled the other way.
Either way, the two are currently inconsistent.
Would you like to implement a fix?
None
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.
Describe your environment
OS: (e.g, Ubuntu)
Python version: (e.g., Python 3.10.0)
SDK version: (e.g., 1.25.0)
API version: (e.g., 1.25.0)
What happened?
CHANGELOG.md for the 1.44.0/0.65b0 release states "bump declarative configuration
schema to v1.1.0" (#5345), but file/_loader.py still hardcodes
_SUPPORTED_SCHEMA_MINOR = 0. As a result, any config file that declares
file_format: "1.1.0" — the version this release claims to support — is treated
as an unrecognized newer minor version and produces a misleading warning that
settings may be ignored, even though nothing is actually unsupported.
tests/file/test_loader.py::TestFileFormatValidation::test_newer_minor_is_accepted_with_warning
currently asserts this warning fires for "1.1", so the test suite encodes the
same stale assumption and won't catch a regression either way.
Steps to Reproduce
minimal_repro.yaml:
file_format: "1.1.0"
from opentelemetry.configuration import load_config_file
config = load_config_file("minimal_repro.yaml")
Expected Result
No warning. "1.1.0" is the schema version this SDK release targets per the
changelog, so it should be accepted as fully supported.
Actual Result
WARNING:opentelemetry.configuration.file._loader:Configuration file_format
'1.1.0' has a newer minor version than this SDK supports (1.0); some settings
may be ignored.
Additional context
Verified _validate_file_format() is the live code path invoked from
load_config_file() (not dead code). Reproduced against main (commit matches
the 1.44.0/0.65b0 release) and against the current PyPI release.
Two possible fixes, and I'm not certain which the maintainers intend:
updated/renamed accordingly, or
CHANGELOG entry / vendored schema.json are ahead of the validation logic
and need to be reconciled the other way.
Either way, the two are currently inconsistent.
Would you like to implement a fix?
None
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding
+1orme too, to help us triage it. Learn more here.