Skip to content

feat(#5476): Add configuration property to allow the selection of the mismatch strategy to use for status update events#5483

Merged
SteKoe merged 2 commits into
codecentric:masterfrom
cdprete:feat/5476
Jul 3, 2026
Merged

feat(#5476): Add configuration property to allow the selection of the mismatch strategy to use for status update events#5483
SteKoe merged 2 commits into
codecentric:masterfrom
cdprete:feat/5476

Conversation

@cdprete

@cdprete cdprete commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Fixes #5476.

Introduced the spring.boot.admin.monitor.status-mismatch-strategy configuration property to allow the selection of the mismatch strategy to use for status update events.

  • The default value (FULL) will resolve to equals as per 4.1.1 implementation (backwards compatibility)
  • The STATUS_ONLY value allows to revert the comparison/mismatch behaviour as per version <= 4.1.0 by checking only the status code
  • Proper overloaded method(s) and constructor(s) have been added in order to not break the existing API
  • Abstract away the configuration property from the domain model objects through a BiPredicate

@cdprete cdprete requested a review from a team as a code owner June 24, 2026 20:24

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

Hi, thanks for your PR!

We just reviewed it and have some change requests. Most importantly, we agreed on the default value to be STATUS_ONLY to revert the breaking change introduced in 4.1.1.

* Strategy to determinate if two {@link StatusInfo} instances are different or
* not.
*/
public enum StatusInfoMismatchStrategy {

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.

Rename to StatusChangeDetectionStrategy.

* {@link AdminServerProperties.MonitorProperties#DEFAULT_STATUS_MISMATCH_STRATEGY}
* unless a different value is specified.
*/
private StatusInfoMismatchStrategy statusMismatchStrategy = DEFAULT_STATUS_MISMATCH_STRATEGY;

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.

Rename this to statusChangeDetectionStrategy, too, please.

…tion of the mismatch strategy to use for status update events
@cdprete

cdprete commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

@SteKoe all points apart #5483 (comment) have been addressed. Please review this once more.

@cdprete cdprete force-pushed the feat/5476 branch 2 times, most recently from 366f029 to 9e6af67 Compare July 3, 2026 12:06
@SteKoe SteKoe merged commit 72fe299 into codecentric:master Jul 3, 2026
1 check passed
@cdprete cdprete deleted the feat/5476 branch July 3, 2026 14:37
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.

OOM after updating to 4.1.x

2 participants