Reenabling animal-sniffer check on oVirt Engine

Hi Infra, In oVirt Engine we use Java 8 and build against JDK 8. GWT (or at least the version we use), however, does not support neither Java 8 syntax nor the JDK 8 classes or methods. While this is easily caught by just building the GWT, it makes it way too easy to introduce code today that will break something tomorrow. And this is where animal-sniffer[1] comes in. It checks (for our usecase), the JDK usages and makes sure we comply to JDK 7's signature even though we're building with JDK 8. I recall we used to have such a job in Jenkins, but now I cannot find it, and recent patches [2] have proven it's indeed needed (I have a vague recollection we disabled it when we were still using JDK 7 and upgraded to a GWT version that supports JDK 7, but I can't even find the disabled job on Jenkins - which could either mean it doesn't exist or that I don't know how to look, of course). TL;DR - we need this job re-enabled: - What to run - "mvn animal-sniffer:check" on a directory that already has the built targets. If you're triggering it on sources that haven't been built yet, or on a directory you're not sure about the status, use "mvn clean install animal-sniffer:check -DskipTests" instead - When to run - trigger per verified patch in gerrit (similar to findbugs) on a patch that touches one of the following directories: - backend/manager/modules/compat - backend/manager/modules/common - backend/manager/modules/searchbackend - backend/manager/modules/aaa Thanks! [1] http://www.mojohaus.org/animal-sniffer/ [2] https://gerrit.ovirt.org/#/q/topic:animal-sniffer+project:ovirt-engine

TL;DR - we need this job re-enabled:
What to run - "mvn animal-sniffer:check" on a directory that already has the built targets. If you're triggering it on sources that haven't been built yet, or on a directory you're not sure about the status, use "mvn clean install animal-sniffer:check -DskipTests" instead When to run - trigger per verified patch in gerrit (similar to findbugs) on a patch that touches one of the following directories:
backend/manager/modules/compat backend/manager/modules/common backend/manager/modules/searchbackend backend/manager/modules/aaa
This can be easily added to check_patch.sh in the engine repo, you don't need us (infra) to enable this at all. -- Barak Korren bkorren@redhat.com RHEV-CI Team

I agree, this is one of the advantages of the standard CI [1]. You can update 'check-patch.sh' or 'check-merged' with the maven command you'd like to add via a commit to gerrit, and we can help with the review. I think the best way will be to add it either as a new Make goal (like validations) and then add a line to the check-patch.sh to run the goal, You can also add a new maven profile for animal sniffer so just running mvn test -Panimal will do the trick. I think Juan sent already something for it.. [1] http://ovirt-infra-docs.readthedocs.org/en/latest/CI/Build_and_test_standard... On Mon, Mar 21, 2016 at 6:27 AM, Barak Korren <bkorren@redhat.com> wrote:
TL;DR - we need this job re-enabled:
What to run - "mvn animal-sniffer:check" on a directory that already has the built targets. If you're triggering it on sources that haven't been built yet, or on a directory you're not sure about the status, use "mvn clean install animal-sniffer:check -DskipTests" instead When to run - trigger per verified patch in gerrit (similar to findbugs) on a patch that touches one of the following directories:
backend/manager/modules/compat backend/manager/modules/common backend/manager/modules/searchbackend backend/manager/modules/aaa
This can be easily added to check_patch.sh in the engine repo, you don't need us (infra) to enable this at all.
-- Barak Korren bkorren@redhat.com RHEV-CI Team _______________________________________________ Infra mailing list Infra@ovirt.org http://lists.ovirt.org/mailman/listinfo/infra
-- Eyal Edri Associate Manager RHEV DevOps EMEA ENG Virtualization R&D Red Hat Israel phone: +972-9-7692018 irc: eedri (on #tlv #rhev-dev #rhev-integ)

Merged a patch to the build itself to run it [1] - no need to mess around with an additional script for this, it should just be a part of the maven build. [1] https://gerrit.ovirt.org/#/c/54997/ On Mon, Mar 21, 2016 at 10:45 AM, Eyal Edri <eedri@redhat.com> wrote:
I agree, this is one of the advantages of the standard CI [1]. You can update 'check-patch.sh' or 'check-merged' with the maven command you'd like to add via a commit to gerrit, and we can help with the review.
I think the best way will be to add it either as a new Make goal (like validations) and then add a line to the check-patch.sh to run the goal, You can also add a new maven profile for animal sniffer so just running mvn test -Panimal will do the trick.
I think Juan sent already something for it..
[1] http://ovirt-infra-docs.readthedocs.org/en/latest/CI/Build_and_test_standard...
On Mon, Mar 21, 2016 at 6:27 AM, Barak Korren <bkorren@redhat.com> wrote:
TL;DR - we need this job re-enabled:
What to run - "mvn animal-sniffer:check" on a directory that already has the built targets. If you're triggering it on sources that haven't been built yet, or on a directory you're not sure about the status, use "mvn clean install animal-sniffer:check -DskipTests" instead When to run - trigger per verified patch in gerrit (similar to findbugs) on a patch that touches one of the following directories:
backend/manager/modules/compat backend/manager/modules/common backend/manager/modules/searchbackend backend/manager/modules/aaa
This can be easily added to check_patch.sh in the engine repo, you don't need us (infra) to enable this at all.
-- Barak Korren bkorren@redhat.com RHEV-CI Team _______________________________________________ Infra mailing list Infra@ovirt.org http://lists.ovirt.org/mailman/listinfo/infra
-- Eyal Edri Associate Manager RHEV DevOps EMEA ENG Virtualization R&D Red Hat Israel
phone: +972-9-7692018 irc: eedri (on #tlv #rhev-dev #rhev-integ)
participants (3)
-
Allon Mureinik
-
Barak Korren
-
Eyal Edri