Skip to content

Drop the stale animal-sniffer Java 1.7 API check from persistit#276

Open
vharseko wants to merge 2 commits into
OpenIdentityPlatform:masterfrom
vharseko:features/persistit-drop-animal-sniffer
Open

Drop the stale animal-sniffer Java 1.7 API check from persistit#276
vharseko wants to merge 2 commits into
OpenIdentityPlatform:masterfrom
vharseko:features/persistit-drop-animal-sniffer

Conversation

@vharseko

Copy link
Copy Markdown
Member

Problem

master is red: run 29520187688. Every matrix job fails, on all OSes and JDKs.

The tests are fine — all 569 persistit tests pass. The build is failing on animal-sniffer:

[ERROR] Failed to execute goal org.codehaus.mojo:animal-sniffer-maven-plugin:1.20:check
        (enforce-java-api-compatibility) on project core: Signature errors found.

persistit/pom.xml pinned the signature to org.codehaus.mojo.signature:java17:1.0 — the Java 1.7 API surface — while four references to Java 8 APIs now exist in persistit/core:

Location Reference
com/persistit/Key.java:519-520 ThreadLocal.withInitial(Supplier) + lambda → java.util.function.Supplier
com/persistit/BufferPool.java:1364 Long.hashCode(long) (×2)
com/persistit/JournalManager.java:2192 Long.hashCode(long)

Why it surfaced only now

Three independent things lined up, and the commit the build broke on is not the cause:

  1. Run integration tests in the default CI build #270 switched CI from mvn package to mvn verify. animal-sniffer binds to the verify phase, so it had never run in CI before that — there is not a single animal-sniffer line in the logs of earlier builds.
  2. Declare equals/hashCode consistent with compareTo (CodeQL java/inconsistent-compareto-and-equals) #232 (Long.hashCode) merged with green checks, but those checks had run days earlier under mvn package and were never re-run after Run integration tests in the default CI build #270 landed.
  3. Make the shared Key.SDF date formatter thread-safe (CodeQL java/thread-unsafe-dateformat) #228 (ThreadLocal.withInitial) merged with build-maven red on all 9 jobs; its final run already showed exactly this animal-sniffer error.

The intermediate master runs were all cancelled by concurrency: cancel-in-progress as the PRs merged seconds apart, so the first master run to reach completion is the one that reported the failure.

Fix

The signature config was stale, inherited from the upstream Akiban Persistit build. The repository compiles at maven.compiler.release=11 (pom.xml), so the check was enforcing a baseline three releases below the declared one. Since JDK 9, release=11 makes javac reject newer APIs natively — which is precisely the job animal-sniffer existed to do before release was available. The check was both redundant and wrong, so this removes it rather than bumping the signature to a value that would still be below the real baseline.

Removed: the plugin declarations in the core and ui modules and the signature properties in the persistit parent. Nothing else refers to it — there are no @IgnoreJRERequirement annotations in the tree.

Verification

Reproduced and fixed locally under JDK 11 (matching the macos-latest, 11 job), mvn -pl persistit/core -am verify:

  • beforeBUILD FAILURE, same four Undefined reference errors as CI
  • afterBUILD SUCCESS, and the goal no longer runs

Full verify across persistit/core + persistit/ui passes.

The persistit modules pinned animal-sniffer to the signature
org.codehaus.mojo.signature:java17:1.0 — the Java 1.7 API surface —
inherited from the upstream Akiban Persistit build. The project compiles
at maven.compiler.release=11, so the check enforced a baseline three
releases below the declared one, and javac already enforces the real
baseline natively via `release`. The check was redundant and wrong.

It never ran in CI until OpenIdentityPlatform#270 switched the build from `mvn package` to
`mvn verify`: animal-sniffer binds to the verify phase. Once it started
running it failed on Java 8 APIs merged earlier under `mvn package` —
ThreadLocal.withInitial (OpenIdentityPlatform#228) and Long.hashCode(long) (OpenIdentityPlatform#232).

Remove the plugin declarations from the core and ui modules along with
the signature properties in the parent. Nothing else refers to it: there
are no @IgnoreJRERequirement annotations in the tree.
@vharseko vharseko added ci Build, CI/CD, JDK matrix and workflow changes bug labels Jul 16, 2026
@vharseko
vharseko requested a review from maximthomas July 16, 2026 20:31
The three persistit poms carried no license header. They are not
upstream Akiban files: they were added in OpenIdentityPlatform#12 when the build artifacts
were reorganized, so there is no upstream owner to preserve.

Use the CDDL block of the root pom, which is their parent, with a
standalone 3A Systems copyright covering 2020 (when the files were
added) through the current year.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug ci Build, CI/CD, JDK matrix and workflow changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant