Skip to content

fix: false positive warnings for new properties (#2617) - #2618

Merged
triceo merged 1 commit into
TimefoldAI:2.6.xfrom
winklerm:fix/false-positive-warnings-on-properties-2-6-x
Aug 26, 2026
Merged

fix: false positive warnings for new properties (#2617)#2618
triceo merged 1 commit into
TimefoldAI:2.6.xfrom
winklerm:fix/false-positive-warnings-on-properties-2-6-x

Conversation

@winklerm

Copy link
Copy Markdown
Contributor

The warning must only be logged when a legacy value is actually chosen over the new one, not merely because the requested name happens to have a known legacy counterpart (which may itself be unset).

Closes #2616.

Backport of #2617.

The warning must only be logged when a legacy value is actually chosen
over the new one, not merely because the requested name happens to have
a known legacy counterpart (which may itself be unset).

Closes TimefoldAI#2616.
Copilot AI lite review requested due to automatic review settings August 26, 2026 10:15
@winklerm
winklerm requested review from rsynek and triceo as code owners August 26, 2026 10:15
@winklerm winklerm added the component/service Issues related to timefold-solver-service components label Aug 26, 2026
@winklerm winklerm changed the title [2.6.x] fix: false positive warnings for new properties (#2617) fix: false positive warnings for new properties (#2617) Aug 26, 2026

Copilot AI 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.

Pull request overview

This PR backports a fix to the Quarkus config fallback interceptor so that deprecation warnings are only emitted when a legacy (deprecated) configuration key is actually used to resolve a value, addressing false-positive warnings reported in #2616.

Changes:

  • Stop logging warnings during name translation (toLegacyName), and instead log only when a legacy value wins during resolution.
  • Refactor interceptor lookup to resolve exact/prefix/multi-legacy mappings through a single resolveWithLegacyNames(...) path.
  • Add parameterized tests that assert warnings are logged only when legacy properties are defined/resolved, and not when only the new property is set.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
service/quarkus/runtime/src/main/java/ai/timefold/solver/service/quarkus/deployment/config/TimefoldRenamedPropertiesFallbackInterceptor.java Moves warning emission to the point where a legacy ConfigValue is actually selected over the new key.
service/quarkus/runtime/src/test/java/ai/timefold/solver/service/quarkus/deployment/config/TimefoldRenamedPropertiesFallbackInterceptorTest.java Adds log-capture-based tests to prevent regressions of false-positive deprecation warnings.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@triceo triceo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Cherry-pick from main.

@triceo
triceo merged commit 39bd86e into TimefoldAI:2.6.x Aug 26, 2026
2 checks passed
@winklerm
winklerm deleted the fix/false-positive-warnings-on-properties-2-6-x branch August 26, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/service Issues related to timefold-solver-service components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants