Skip to content

chore: Maven plugin offset handling, warning from deployment as logged information - #2796

Merged
rsynek merged 2 commits into
mainfrom
maven-pluging-offset-and-warning
Nov 3, 2026
Merged

rsynek merged 2 commits into
mainfrom
maven-pluging-offset-and-warning

Conversation

@mswiderski

Copy link
Copy Markdown
Contributor

No description provided.

@mswiderski
mswiderski requested review from a team and a balanced review from Copilot November 2, 2026 09:56
@mswiderski mswiderski changed the title Maven pluging offset and warning chore: Maven plugin offset handling, warning from deployment as logged information Nov 2, 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.

🟡 Changes recommended

The release-offset selector needs clearer user documentation and Javadoc, and warning-header logging lacks test coverage for successful initial registration.

2 open issues
What changed in this PR

This PR adds release selection and platform warning logging to the Maven plugin’s model deployment tools.

Changes:

  • Add timefold.model.offset, defaulting to 0, for updates and undeployment; initial registration ignores it.
  • Log X-TF-WARN-MSG response headers at WARN after successful registration or updates.
  • Add tests for default/custom offsets and update warnings.
File Description
service/​tools/​maven-plugin/​src/​test/​java/​ai/​timefold/​solver/​tools/​maven/​UndeployModelMojoTest.java Verify default and custom undeployment offsets.
service/​tools/​maven-plugin/​src/​test/​java/​ai/​timefold/​solver/​tools/​maven/​DeployModelMojoTest.java Verify offset handling and warning logging for updates.
service/​tools/​maven-plugin/​src/​main/​java/​ai/​timefold/​solver/​tools/​maven/​UndeployModelMojo.java Send the release offset with DELETE requests.
service/​tools/​maven-plugin/​src/​main/​java/​ai/​timefold/​solver/​tools/​maven/​DeployModelMojo.java Send offsets with PATCH requests and log platform warnings.
service/​tools/​maven-plugin/​src/​main/​java/​ai/​timefold/​solver/​tools/​maven/​AbstractPlatformModelMojo.java Define the shared offset parameter and default.

Review effort: Balanced

@rsynek

rsynek commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

It seems the code needs to be properly formatted by a maven build.

@mswiderski

Copy link
Copy Markdown
Contributor Author

It seems the code needs to be properly formatted by a maven build.

reformatted.

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.

🟡 Changes recommended

The successful registration POST warning path lacks test coverage confirming WARN logging while deployment succeeds, and a spelling typo remains.

3 open issues

Review effort: Balanced

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.

🟡 Changes recommended

The documented plugin configuration uses the Maven property name instead of <offset>, leaving the offset at zero and risking updates or deletion of the latest version rather than the intended older version.

3 open issues
1 resolved since last review

Review effort: Balanced

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.

🔵 Needs a closer look

The successful POST warning handler lacks a test asserting that X-TF-WARN-MSG is logged at WARN level, so removing it would leave all tests passing.

2 open issues
1 resolved since last review

Review effort: Balanced

@rsynek rsynek 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.

Thanks for adding the documentation, looks good.

@rsynek
rsynek merged commit 53b6b08 into main Nov 3, 2026
43 checks passed
@rsynek
rsynek deleted the maven-pluging-offset-and-warning branch November 3, 2026 14:54

This branch was successfully deployed

1 active and 1 inactive deployments
documentation (preview) — 60fd5552 Deployed Nov 3, 2026 by mswiderski via Build Documentation #846
internal — 60fd5552 Deployed Nov 3, 2026 by mswiderski via approval_required #5207
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants