violations-plugin icon indicating copy to clipboard operation
violations-plugin copied to clipboard

Facelift plugin to make it testable in PCT (for JEP-200)

Open oleg-nenashev opened this issue 6 years ago • 13 comments

  • [x] Update Parent POM to a recent version
  • [x] Resolve issues reported by injected tests
  • [x] Add Jenkinsfile

oleg-nenashev avatar Feb 14 '18 11:02 oleg-nenashev

@reviewbybees @jglick

oleg-nenashev avatar Feb 14 '18 11:02 oleg-nenashev

@tomasbjerre IMHO it makes sense to ship the rewrite as a major 1.0 release. I tried the current alpha version in January, and it seems to work well for me. CC @uhafner

oleg-nenashev avatar Feb 14 '18 12:02 oleg-nenashev

I think we already discussed this in https://github.com/jenkinsci/violations-plugin/issues/88.

The conclusion was (from my point of view): the rewrite of the violations plug-in on top of analysis-core makes no sense since we then have a warnings plug-in Vol. 2 that has a subset of the features and parsers of the warnings plugin Vol. 1. For me, it makes more sense to discontinue support for the violations plugin and integrate any missing features into the warnings plug-in (are there any?).

In the meantime the warnings plugin and analysis-core has been undergoing a total rewrite in order to allow an integration of parsers of any external library, see https://issues.jenkins-ci.org/browse/JENKINS-40439 for details. What still needs to be done: integrate the parsers of Tomas' violations-lib into the warnings plug-in. I hope to provide a PR after my ski holidays.

uhafner avatar Feb 14 '18 12:02 uhafner

Yeah, I should have read threads first. Regarding the violations lib, make sure you test it on Jenkins 2.102+. There is a risk of JEP-200 regressions regressions if the classes from there get serialized over the channel or persisted on the disk

oleg-nenashev avatar Feb 14 '18 13:02 oleg-nenashev

Yes, that will be part of my PR. The parsers of the violations-lib are not yet serialisable at all making it impossible to use them on agents. (I'll run the tests using Jenkins 2.102+ too see if everything is running smooth)

uhafner avatar Feb 14 '18 13:02 uhafner

Any issues with the lib should not be discussed here... but just for the record. There has been no issues reported about problems running on agents. I also tried that now, using this plugin, and I see no problems.

Edit: also tried with an agent and 2.102 now. Also no problems.

tomasbjerre avatar Feb 14 '18 19:02 tomasbjerre

Looks like Violations plugin stopped to work on the recent stable Jenkins build 2.107.1 (I only use stable releases, it worked well with previous stable version).

Jobs that have Violations step simply stuck and never finish. Worst is that I can't even go to the job/projectname/configure URL as it simply timeouts. Jenkins utilizes 100% single CPU core all the time.

There are no problems with jobs that doesn't use Violations plugin.

Any ideas how to proceed? I tried to build and install this branch by @oleg-nenashev without any luck. Looks like I also can't revert to older version of Jenkins as this latest 2.107.1 migrated configs.

sauliusgrigaitis avatar Mar 19 '18 15:03 sauliusgrigaitis

@sauliusgrigaitis please see https://jenkins.io/doc/upgrade-guide/2.107/#known-issues

oleg-nenashev avatar Mar 19 '18 15:03 oleg-nenashev

Thanks @oleg-nenashev . I'm just wondering is it realistic to expect a fix soon or my best bet is to try to downgrade?

sauliusgrigaitis avatar Mar 19 '18 15:03 sauliusgrigaitis

@sauliusgrigaitis Violations plugin is deprecated, I would not anticipate a fix soon. Generally it depends on the #88 release I'd guess

oleg-nenashev avatar Mar 19 '18 15:03 oleg-nenashev

Thanks @oleg-nenashev . I'm just wondering should #88 solve the issue or it doesn't address it?

sauliusgrigaitis avatar Mar 19 '18 15:03 sauliusgrigaitis

No, this PR won't solve the issue. It's not even related to it

oleg-nenashev avatar Mar 19 '18 15:03 oleg-nenashev

Noting that any cleanup/modernization effort should fix https://github.com/jenkinsci/violations-plugin/blob/cab7103bd00057c8b97f7b5a2cd4cbb461af6603/src/main/java/hudson/plugins/violations/ViolationsCollector.java#L253-L256; see https://www.jenkins.io/doc/upgrade-guide/2.303/#SECURITY-2458

(This unreleased addition might actually introduce a security vulnerability in older releases of Jenkins)

daniel-beck avatar Nov 04 '21 17:11 daniel-beck