Page MenuHomePhabricator

Standardize Java build for metrics-platform
Open, Needs TriagePublic

Description

The metrics-platform project is a mix of multiple languages, including Java. Up to now, the Java build was custom and not relying on our usual template. To ensure coherence and benefit from the same features (SonarQube integration, publication of docs, etc...), we want this project to use the usual templates for building Java projects.

A minimal attempt at configuration is available at https://gerrit.wikimedia.org/r/c/integration/config/+/820396, but it conflicts with the existing configuration.

Event Timeline

Change 820396 had a related patch set uploaded (by Gehel; author: Gehel):

[integration/config@master] Java build for mediawiki/libs/metrics-platform

https://gerrit.wikimedia.org/r/820396

Change 820764 had a related patch set uploaded (by Jforrester; author: Jforrester):

[integration/config@master] Zuul: [mediawiki/libs/metrics-platform] Add experimental regular java jobs

https://gerrit.wikimedia.org/r/820764

Change 820396 merged by jenkins-bot:

[integration/config@master] jjb: Add Java build jobs for mediawiki/libs/metrics-platform

https://gerrit.wikimedia.org/r/820396

Change 820764 merged by jenkins-bot:

[integration/config@master] Zuul: [mediawiki/libs/metrics-platform] Add experimental regular java jobs

https://gerrit.wikimedia.org/r/820764

Mentioned in SAL (#wikimedia-releng) [2022-08-05T15:33:44Z] <James_F> Zuul: [mediawiki/libs/metrics-platform] Add experimental regular java jobs for T314630

I ran the experimental jobs on https://gerrit.wikimedia.org/r/c/mediawiki/libs/metrics-platform/+/820088/8 but they errored:

00:00:14.424 [FATAL tini (7)] exec /src/mvnw failed: No such file or directory

Change 820834 had a related patch set uploaded (by Gehel; author: Gehel):

[mediawiki/libs/metrics-platform@master] Move Maven wrapper to project root dir.

https://gerrit.wikimedia.org/r/820834

I ran the experimental jobs on https://gerrit.wikimedia.org/r/c/mediawiki/libs/metrics-platform/+/820088/8 but they errored:

00:00:14.424 [FATAL tini (7)] exec /src/mvnw failed: No such file or directory

Corrected in https://gerrit.wikimedia.org/r/c/mediawiki/libs/metrics-platform/+/820834

Change 821219 had a related patch set uploaded (by Jforrester; author: Jforrester):

[integration/config@master] Zuul: [mediawiki/libs/metrics-platform] Run Java jobs on maven file paths

https://gerrit.wikimedia.org/r/821219

Change 821219 merged by jenkins-bot:

[integration/config@master] Zuul: [mediawiki/libs/metrics-platform] Run Java jobs on maven file paths

https://gerrit.wikimedia.org/r/821219

Mentioned in SAL (#wikimedia-releng) [2022-08-08T13:23:00Z] <James_F> Zuul: [mediawiki/libs/metrics-platform] Run Java jobs on maven file paths for T314630

Change 820834 had a related patch set uploaded (by Gehel; author: Gehel):

[mediawiki/libs/metrics-platform@master] Move Maven wrapper to project root dir.

https://gerrit.wikimedia.org/r/820834

The experimental build seems to be passing on https://gerrit.wikimedia.org/r/c/mediawiki/libs/metrics-platform/+/820834. At least metrics-platform-maven-java8-docker is green. metrics-platform-maven-java8-docker-site-publish is failing, but that is due to a known flaky test (which will be corrected at some future point). The current build (trigger-metrics-platform-pipeline-test-java) is now failing, since it expects Maven wrapper (mvnw) to be in the java directory, but that's expected.

What's left to do:

  • deactivate the current build (trigger-metrics-platform-pipeline-test-java) since it is being replaced by the standard java builds (and maybe cleanup some templates if this isn't used anymore)
  • have metrics-platform-maven-java8-docker run on every CR
  • have metrics-platform-maven-java8-docker run on every CR pre-merge (is that gate-and-submit?)
  • have metrics-platform-maven-java8-docker-site-publish run post merge on the main branch (master at this point)
  • maybe adapt some of the zuul triggers (but that's something that I entirely don't understand)