Skip to content

opentelemetry-configuration: resolve false-positive warning logs for newer schema minor version#5436

Open
herin049 wants to merge 4 commits into
open-telemetry:mainfrom
herin049:fix/decl-config-schema-ver
Open

opentelemetry-configuration: resolve false-positive warning logs for newer schema minor version#5436
herin049 wants to merge 4 commits into
open-telemetry:mainfrom
herin049:fix/decl-config-schema-ver

Conversation

@herin049

Copy link
Copy Markdown
Contributor

Description

Fixes issue where a false-positive warning log is emitted while using the latest supported schema version 1.1.

Fixes #5435

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

uv run tox -e py314-test-opentelemetry-configuration

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@herin049
herin049 requested a review from a team as a code owner July 18, 2026 23:53
@herin049 herin049 changed the title opentelemetry-configuration: resolve false-positive warning logs for newer minor version opentelemetry-configuration: resolve false-positive warning logs for newer schema minor version Jul 18, 2026
@herin049 herin049 moved this to Ready for review in Python PR digest Jul 18, 2026
Comment on lines +372 to +373
if _SUPPORTED_SCHEMA_MAJOR > 0:
versions.append(f"{_SUPPORTED_SCHEMA_MAJOR - 1}.0")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we can just hardcode 0.4 since we aren't going backwards from 1.0?

# https://github.com/open-telemetry/opentelemetry-configuration/blob/main/VERSIONING.md
_SUPPORTED_SCHEMA_MAJOR = 1
_SUPPORTED_SCHEMA_MINOR = 0
_SUPPORTED_SCHEMA_MINOR = 1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While the warning may be annoying the packages are shipping a 1.0 schema so if we bump here we are breaking support for them?

@herin049 herin049 Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_validate_file_format() doesn't log anything if the current minor is smaller than the latest supported. From my understanding, older minor versions should be fully supported, it's just newer supported minor versions that may include functionality which isn't implemented in the SDK (which is why we log). It's the same as SemVer semantics.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ofc, all bets are off when using developmental features.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah. just tested. didn't break for me while still using 1.0

@xrmx xrmx Jul 24, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I was confused by the reading the newer major test. Should we test the older minor as well if _SUPPORTED_SCHEMA_MINOR > 0?

@xrmx xrmx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, a couple of nits in the tests

@xrmx xrmx moved this from Ready for review to Approved PRs that need fixes in Python PR digest Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Approved PRs that need fixes

Development

Successfully merging this pull request may close these issues.

Declarative config: file_format "1.1.0" triggers a false "newer minor version" warning after the schema was bumped to v1.1.0

3 participants