-
Notifications
You must be signed in to change notification settings - Fork 480
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
feat (jkube-kit) : Add health check enricher for SmallRye Health (#443) #1709
Conversation
Eclipse JKube CI ReportStarted new GH workflow run for #1709 (2022-11-04T14:29:53Z) ⚙️ JKube E2E Tests (3394103477)
|
Codecov Report
@@ Coverage Diff @@
## master #1709 +/- ##
============================================
+ Coverage 53.05% 53.06% +0.01%
- Complexity 3943 3951 +8
============================================
Files 464 467 +3
Lines 20750 20763 +13
Branches 2808 2807 -1
============================================
+ Hits 11009 11018 +9
- Misses 8613 8616 +3
- Partials 1128 1129 +1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
aa35cc6
to
bfb808d
Compare
bfb808d
to
efe08ae
Compare
Kudos, SonarCloud Quality Gate passed! |
e8de8de
to
6f95e3e
Compare
private static String getMicroProfileVersionFromArtifactId(JavaProject javaProject, String artifactId) { | ||
Dependency microProfileDep = JKubeProjectUtil.getDependency(javaProject, MICROPROFILE_GROUP, artifactId); | ||
private static String getMicroProfileVersionFromArtifactId(JavaProject javaProject, String groupId, String artifactId) { | ||
Dependency microProfileDep = JKubeProjectUtil.getTransitiveDependency(javaProject, groupId, artifactId); |
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.
Just to double check, this does work with Gradle right?
(The question is redundant since I see the IT, but it's best if we keep your confirmation to this comment as a record in case there are doubts in the future)
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.
I've checked again with my test projet. It seems to be working okay.
I'd expect this Enricher also affecting Quarkus, but I didn't see any changes in that module. |
Right now enrichers are executed in the order specified in profiles-default.yml:
I've placed SmallRyeHealthCheckEnricher at the bottom. Once an enricher adds liveness/readiness probes other health check enrichers would simply ignore it. The logic is to add probes only if they don't exist. |
This is very brittle (especially since there is no test right now to verify the possible permutations and their effects, or is there?) |
…ipse-jkube#443) + Add SmallRyeHealthCheckEnricher to add readiness, liveness and startup probes if `io.smallrye:smallrye-health` is present in project dependencies. + Moved common logic between SmallRyeHealthCheckEnricher and OpenLibertyHealthCheckEnricher to `jkube-kit-microprofile` module Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…alth Add SmallRyeIT to verify readiness, liveness and startup probes are generated when `io.smallrye:smallrye-health` dependency is present in project Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…cher Signed-off-by: Rohan Kumar <rohaan@redhat.com>
6f95e3e
to
4e6217b
Compare
I don't think there is any test to enforce enricher ordering. |
There isn't , but still relying just on the ordering of the config file is really dangerous. I'm not sure what the collisions between the new enricher and previous ones are, but we should make sure that only one of the applicable is applied via some sort of scoring system. |
Kudos, SonarCloud Quality Gate passed! |
I think we should tackle this in a separate issue. |
👍 Please create an issue with a summary and link to this PR+issue |
I've created #1890 |
Description
Related to #443
probes if
io.smallrye:smallrye-health
is present in projectdependencies.
OpenLibertyHealthCheckEnricher to
jkube-kit-microprofile
moduleSigned-off-by: Rohan Kumar rohaan@redhat.com
Type of change
test, version modification, documentation, etc.)
Checklist