-
Notifications
You must be signed in to change notification settings - Fork 148
feature : support warnings-ng plugin [JENKINS-57427] #221
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: master
Are you sure you want to change the base?
Conversation
...lugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/publishers/WarningsNgPublisher.java
Outdated
Show resolved
Hide resolved
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 @jglick Yes I know. I also really want to do this integration and to remove deprecated dependencies. It is on my top level TODO list. For now, I only do bug fixing to discover the plugin internals, and next then I will work on this |
0c58ff3
to
8107b01
Compare
e8c7d56
to
22de135
Compare
...e-maven/src/main/java/org/jenkinsci/plugins/pipeline/maven/publishers/WarningsPublisher.java
Dismissed
Show dismissed
Hide dismissed
...e-maven/src/main/java/org/jenkinsci/plugins/pipeline/maven/publishers/WarningsPublisher.java
Dismissed
Show dismissed
Hide dismissed
c3fa2a1
to
7421bc5
Compare
...e-maven/src/main/java/org/jenkinsci/plugins/pipeline/maven/publishers/WarningsPublisher.java
Dismissed
Show dismissed
Hide dismissed
33a4c2b
to
1cf7485
Compare
1cf7485
to
855662d
Compare
855662d
to
ad80822
Compare
ad80822
to
6b568ab
Compare
6b568ab
to
aa33b1c
Compare
3166ac9
to
16b3f97
Compare
Sorry, I do not have much capacity for reviews. |
private String globalMavenSettingsFilePath = ""; | ||
private String maven; | ||
private String mavenOpts = ""; | ||
private String mavenOpts = |
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.
do I understand correctly every build will now use this per default?
looks like some breaking changes. If used per default this will override pom properties from users
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.
Yeah. I did that because without, the maven build will fail at first problem, the integration won't run and you will not have the reports in Jenkins, and the build as unstable but failed without knowing why, only the logs will help
But you are right, it is too intrusive, it is usefull at most if you rely on automatic integrations, will change that.
and good catch for pom properties, will take care of that too
Thanks !
@bguerin no much time for a very detailed review. I added a question about what looks to be the new default |
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 code will not work correct if the warnings plugin is not installed.
Additionally this breaks existing installations by remove support without providing a time to migrate.
private final Control skipDownstreamTriggers = control("skipDownstreamTriggers"); | ||
private final Control ignoreUpstreamTriggers = control("ignoreUpstreamTriggers"); | ||
|
||
private Control sourceCodeEncoding = control("sourceCodeEncoding"); |
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 would have this page should be generic for all publishers and specific publisher functionality / options should be in a sepearate page area for that Publisher. (e.g. see Credentials -> https://github.com/jenkinsci/acceptance-test-harness/blob/master/src/main/java/org/jenkinsci/test/acceptance/plugins/credentials/StringCredentials.java)
...e-maven-ui-tests/src/test/java/org/jenkinsci/plugins/maven/GlobalSnippetGeneratorUiTest.java
Show resolved
Hide resolved
|
||
assertThat(snippetGenerator.generateScript()) | ||
.isEqualTo(""" | ||
withMaven(options: [warningsPublisher()], traceability: true) { |
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.
this would appear incorrect.
you have used the defaults but with a specific publisher and yet traceability: true
is present. if this is a default it should not have been generated by the snippet generator.
...e-maven-ui-tests/src/test/java/org/jenkinsci/plugins/maven/GlobalSnippetGeneratorUiTest.java
Show resolved
Hide resolved
pipeline-maven-ui-tests/src/main/java/org/jenkinsci/plugins/maven/WithMaven.java
Show resolved
Hide resolved
...urces/org/jenkinsci/plugins/pipeline/maven/publishers/FindbugsAnalysisPublisher/help_fr.html
Show resolved
Hide resolved
...urces/org/jenkinsci/plugins/pipeline/maven/publishers/FindbugsAnalysisPublisher/help_fr.html
Show resolved
Hide resolved
...ain/resources/org/jenkinsci/plugins/pipeline/maven/publishers/InvokerRunsPublisher/help.html
Show resolved
Hide resolved
...in/resources/org/jenkinsci/plugins/pipeline/maven/publishers/JacocoReportPublisher/help.html
Show resolved
Hide resolved
|
||
<st:include page="maven-publisher" class="${descriptor.clazz}"/> | ||
|
||
<f:section title="${%cource_code}"> |
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.
please don;t break existing setups for no reason without time to migrate.
I have some general concerns with this PR. One the one hand, it would make more sense to remove all those deprecated publisher totally (maybe in a separate PR). It makes no sense to report some logger warnings that users need to update now. Those steps are deprecated for years now, and most of the referenced plugins even do not exist anymore. It would simplify your development when you delete this code. One the other hand, I am not convinced that the overall approach makes sense. You are remodeling the options of the warnings and coverage plugins. This seems to be redundant. And very fragile when one of those plugins change. I wonder why you do not simply publish the corresponding reports with the default values without any user configuration (just enable/disable). And if users need additional options, they still can use the correct warnings and coverage steps of the corresponding plugins. BTW: you are also using a lot of code of the warnings and coverage plugins that are not meant to be used as API. This might break in the future as well... |
What I like about not having to configure the (old publishers) is that the configuration was correctly obtained and specific to a build without human intervention or mundane maintainance. For example if is have a multi-project maven setup but have some modules that are not part of the build I would not want any of their TODOs to show up. Obtaining the source paths from maven means this is handled and I can then reuse common pipelines across many different projects. (e.g. If I have to use warnings-ng to do this then I can not have a generic pipeline for my jobs. So there is a use case here - and I think it is an important one. As for using the internals of warnings-ng that could change and break, perhaps the integration should move the warnings-ng plugin so that any changes/refactoring can happen in a single repository (although that also has some downsides for split maintenance) and that would be something that Ulli would need to be OK with. |
Many many thanks @jtnord for your review, will handle all your points
Why ? It should by the way ...
Agree, I saw https://issues.jenkins.io/browse/JENKINS-76003 and https://issues.jenkins.io/browse/JENKINS-76032 I think about reverting to |
I have the same opinion than James, I am trying to follow Maven philosophy : convention about configuration.
I think this is not the job of warnings-ng to have this integration. It would need warnings-ng to know Maven world ... this is the job of this plugin. |
Does not have to be the |
for clarity -> #221 (comment) |
support warnings-ng plugin, and remove deprecated findbugs and tasks plugins support
See JENKINS-57427
Testing done
Submitter checklist