-
Notifications
You must be signed in to change notification settings - Fork 169
[frontend/backend] Use healthchecks to manage inject readyness (#4263) #4277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release/current
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## release/current #4277 +/- ##
=====================================================
+ Coverage 49.45% 50.14% +0.69%
- Complexity 3564 3620 +56
=====================================================
Files 887 886 -1
Lines 26427 26623 +196
Branches 1965 1977 +12
=====================================================
+ Hits 13069 13351 +282
+ Misses 12569 12476 -93
- Partials 789 796 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
5894abc to
af362ed
Compare
d000635 to
4678888
Compare
4868b54 to
c4bf9ad
Compare
openaev-api/src/main/java/io/openaev/healthcheck/utils/HealthCheckUtils.java
Outdated
Show resolved
Hide resolved
openaev-api/src/main/java/io/openaev/service/InjectImportService.java
Outdated
Show resolved
Hide resolved
| @Schema(description = "Title of the inject") | ||
| private String title; | ||
|
|
||
| @JsonProperty("inject_description") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: I don’t quite understand this change — the DTO seems to be turning into something that looks like the original entity.
This could lead to performance issues if we end up returning the full inject object, which contains a large number of properties.
What’s the reason behind this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't add the healthchecks informations to the Inject entity because there is no healthcheck information into the database, so we have to use a DTO to return the informations with healthchecks.
To avoid any regression, the InjectOutput have to hold the same informations as before, but the process didn't change.
All attributes exist into the InjectOutput, but it doesn't mean every time an InjectOutput is returned to the frontend all attributes are set.
For example, for the inject search, only a few informations are set to the InjectOutput object, the ones needed to display a light list of inject. And the get one Inject API still return the full informations as before.
| @@ -1,18 +1,25 @@ | |||
| package io.openaev.rest.inject.output; | |||
|
|
|||
| import static java.time.Instant.now; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: This isn’t directly related to the PR, but I don’t quite understand the purpose of runInjectsChecksFor.
From what I can tell, it seems to act as a kind of garbage collector for health checks that weren’t handled earlier — but why weren’t they?
It makes the code feel quite repetitive. Why do we need to handle it this way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new healthchecks are the ones who creates the missing content failure, we want to filter them because the cause of the missing content is not linked to the scenario. Only the missing content information are important for the scenario.
For other checks (like SMTP, IMAP, Collector, etc), the only check to do is to verify if, into the injects healthcheck, the failure exist, and because into the injects healthcheck all checks are not necessary related to the scenario (Missing body, subject, asset, etc) we can't simply add all the injects checks to the scenario, and instead, verify the match into the injects checks.
|
Haven’t tested that part yet — just doing some code review to understand the mechanisms in place. |
c4bf9ad to
5457f35
Compare
|
TO DO :
|
Proposed changes
Testing Instructions
Related issues