-
Notifications
You must be signed in to change notification settings - Fork 522
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
log application configuration file used in generators and health check enrichers #2880
Conversation
Eclipse JKube CI ReportStarted new GH workflow run for #2880 (2024-10-21T11:28:46Z) ⚙️ JKube E2E Tests (11438752360)
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2880 /- ##
=============================================
Coverage 59.36% 70.62% 11.26%
- Complexity 4586 5012 426
=============================================
Files 500 486 -14
Lines 21211 19453 -1758
Branches 2830 2505 -325
=============================================
Hits 12591 13739 1148
Misses 7370 4491 -2879
Partials 1250 1223 -27 ☔ View full report in Codecov by Sentry. |
0c6dd01
to
4f19318
Compare
Let's discuss this on the issue first. |
2bd807b
to
57f9e2a
Compare
Quality Gate passedIssues Measures |
...generator/api/src/test/java/org/eclipse/jkube/generator/api/DefaultGeneratorManagerTest.java
Outdated
Show resolved
Hide resolved
...kit/generator/api/src/main/java/org/eclipse/jkube/generator/api/DefaultGeneratorManager.java
Outdated
Show resolved
Hide resolved
jkube-kit/common/src/main/java/org/eclipse/jkube/kit/common/PropertiesExtender.java
Outdated
Show resolved
Hide resolved
import java.net.URL; | ||
import java.util.Properties; | ||
|
||
public class PropertiesExtender extends Properties { |
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'm not sure about the motivation behind using this POJO. Why not use a URL
field directly?
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.
Hello,
Sorry for delayed response, I was preparing for certification exam.
java.util.Properties
class is returned by SpringBootUtil.getSpringBootApplicationProperties()
, however that class doesn't have necessary fields which might be used for storing URL/File object so I decided to extend it to bring properties file location together with its properties list:
public static SpringBootConfiguration from(JavaProject project) {
final PropertiesExtender properties = SpringBootUtil.getSpringBootApplicationProperties(
SpringBootUtil.getSpringBootActiveProfile(project),
JKubeProjectUtil.getClassLoader(project));
project.setPropertiesFile(properties.getPropertiesFile());
@arsenalzp : We discussed this internally and decided that we do not want to add this much complication to tackling this issue. I think the simplest approach would be to log a message (see #2832 (comment)) Would it be possible for you to update it to make this a bit simpler? |
Hello, |
Fixed. |
Quality Gate passedIssues Measures |
@arsenalzp : Is it possible to just have log statements without relying on |
Technically it is possible to show the message somewhere in |
Hello colleagues, |
@arsenalzp : Hello, I took a look at your changes again. However, it's a bit of a complex change for just logging the used properties file. I think you can extract the property file getting used from this method here (maybe create a separate method that receives JavaProject, KitLogger) and log the relative path of the jkube/jkube-kit/common/src/main/java/org/eclipse/jkube/kit/common/util/SpringBootUtil.java Lines 67 to 70 in e1cde0b
Could you please check if this approach would work out? |
0b28296
to
bfa28f5
Compare
b4f831c
to
319bd03
Compare
319bd03
to
c5cf279
Compare
36f49ae
to
c7e0c96
Compare
Quality Gate passedIssues Measures |
c7e0c96
to
c0623e9
Compare
Signed-off-by: Oleksandr Krutko <[email protected]> fix typo of resourcesDirectory javadoc in JavaProject class Signed-off-by: Oleksandr Krutko <[email protected]>
Signed-off-by: Oleksandr Krutko <[email protected]>
Signed-off-by: Oleksandr Krutko <[email protected]>
Signed-off-by: Oleksandr Krutko <[email protected]>
…erties file Signed-off-by: Oleksandr Krutko <[email protected]>
Add a debug log statement in generators of these frameworks: - Spring Boot - Thorntail - Helidon - Quarkus - Micronaut Signed-off-by: Rohan Kumar <[email protected]>
…chers Signed-off-by: Marc Nuri <[email protected]>
c0623e9
to
b7b8e5c
Compare
Quality Gate passedIssues Measures |
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.
LGTM, thx!
Description
Fixes #2832
jkube.internal.application-config-file.path
jkube.internal.application-config-file.path
property to log application config file path:Type of change
test, version modification, documentation, etc.)
Checklist