Skip to content

fix(#5450): Trigger status update events not only when the status itself changes but also when the details change so that the UI displays the correct, most recent, information#5457

Open
cdprete wants to merge 5 commits into
codecentric:masterfrom
cdprete:fix/5450
Open

fix(#5450): Trigger status update events not only when the status itself changes but also when the details change so that the UI displays the correct, most recent, information#5457
cdprete wants to merge 5 commits into
codecentric:masterfrom
cdprete:fix/5450

Conversation

@cdprete

@cdprete cdprete commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Fixes #5450.

I can revert the part about the echo health indicator, if wanted.

@cdprete cdprete requested a review from a team as a code owner June 17, 2026 09:56
@cdprete

cdprete commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

I can't understand why that test is now failing after the change 6b3eaad.
Some guidance would be helpful, because I'm kind of failing to understand what the setup and expectations of that test are.

@cdprete

cdprete commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

I can't understand why that test is now failing after the change 6b3eaad. Some guidance would be helpful, because I'm kind of failing to understand what the setup and expectations of that test are.

Ok, I sorted this out.

The instances in the test were defining as healthUrl a path which was not existing.
As a result, the call to /application/health triggered by the StatusUpdater was returning a response like { path=/application/health, error=Not Found, requestId=eda53c52-8, status=404, timestamp=2026-06-17T17:52:06.979Z } and, given that the requestId and timestamp are changing for each request, this was triggering an additional STATUS_UPDATED event (which is indeed correct because the details have changed from one call to the next one).

To fix this without changing the test, I added --management.endpoints.web.base-path=/application so that /application/health can indeed be found instead of resolving in a 404 with these changed details all the time.

@cdprete

cdprete commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Hi guys.

I was wondering, who is actually updating the information in red below?
image

In the code I can see that instance.statusTimestamp is used in InstancesList.vue, but I see no SSE consumption.
Am I right or will now this change impact, in the wrong way, the time shown there because multiple STATUS_UPDATED events are received, each with their own timestamp (even if the state inside is still, from one poll to the next one, UP for example)?

@cdprete

cdprete commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Hi guys.

I was wondering, who is actually updating the information in red below? image

In the code I can see that instance.statusTimestamp is used in InstancesList.vue, but I see no SSE consumption. Am I right or will now this change impact, in the wrong way, the time shown there because multiple STATUS_UPDATED events are received, each with their own timestamp (even if the state inside is still, from one poll to the next one, UP for example)?

Hi again.

I checked the code more carefully and, if I'm not wrong, we indeed use SSE for that view which is done in the applicationStore and calls de.codecentric.boot.admin.server.web.ApplicationsController#applicationsStream from the backend. Please correct me if I'm wrong.

If I'm right, de.codecentric.boot.admin.server.services.ApplicationRegistry#getStatus needs to be adjusted according to the new fact that multiple STATUS_UPDATED events can come now.
Therefore, I'm putting this in draft for now.

@cdprete cdprete changed the title fix(#5450): Trigger status update events not only when the status itself changes but also when the details change so that the UI displays the correct, most recent, information Draft: fix(#5450): Trigger status update events not only when the status itself changes but also when the details change so that the UI displays the correct, most recent, information Jun 18, 2026
@cdprete cdprete changed the title Draft: fix(#5450): Trigger status update events not only when the status itself changes but also when the details change so that the UI displays the correct, most recent, information draft: fix(#5450): Trigger status update events not only when the status itself changes but also when the details change so that the UI displays the correct, most recent, information Jun 18, 2026
@cdprete cdprete changed the title draft: fix(#5450): Trigger status update events not only when the status itself changes but also when the details change so that the UI displays the correct, most recent, information fix(#5450): Trigger status update events not only when the status itself changes but also when the details change so that the UI displays the correct, most recent, information Jun 18, 2026
@cdprete cdprete marked this pull request as draft June 18, 2026 08:13
@cdprete cdprete marked this pull request as ready for review June 18, 2026 11:26
@cdprete

cdprete commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Hi guys.
I was wondering, who is actually updating the information in red below? image
In the code I can see that instance.statusTimestamp is used in InstancesList.vue, but I see no SSE consumption. Am I right or will now this change impact, in the wrong way, the time shown there because multiple STATUS_UPDATED events are received, each with their own timestamp (even if the state inside is still, from one poll to the next one, UP for example)?

Hi again.

I checked the code more carefully and, if I'm not wrong, we indeed use SSE for that view which is done in the applicationStore and calls de.codecentric.boot.admin.server.web.ApplicationsController#applicationsStream from the backend. Please correct me if I'm wrong.

If I'm right, de.codecentric.boot.admin.server.services.ApplicationRegistry#getStatus needs to be adjusted according to the new fact that multiple STATUS_UPDATED events can come now. Therefore, I'm putting this in draft for now.

Fixed with 0418ccf

Cosimo Damiano Prete and others added 5 commits June 18, 2026 13:31
… status itself changes but also when the details change so that the UI displays the correct, most recent, information
… resources to easily test changes in the health directly from the browser
…s update events when only their details have changed but not their status
…return_registered_instances by correctly exposing the Actuator health endpoint for the instances
@cdprete

cdprete commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

I think it's now ready for review, unless there is some other place in the codebase which I should adapt and I'm not aware of it.

@cdprete cdprete changed the title fix(#5450): Trigger status update events not only when the status itself changes but also when the details change so that the UI displays the correct, most recent, information fix(#5450): Trigger status updates events not only when the status itself changes but also when the details change so that the UI displays the correct, most recent, information Jun 18, 2026
@cdprete cdprete changed the title fix(#5450): Trigger status updates events not only when the status itself changes but also when the details change so that the UI displays the correct, most recent, information fix(#5450): Trigger status update events not only when the status itself changes but also when the details change so that the UI displays the correct, most recent, information Jun 18, 2026
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.

Bug: UI health state doesn't reflect the latest state

1 participant