Drop the stale animal-sniffer Java 1.7 API check from persistit#276
Open
vharseko wants to merge 2 commits into
Open
Drop the stale animal-sniffer Java 1.7 API check from persistit#276vharseko wants to merge 2 commits into
vharseko wants to merge 2 commits into
Conversation
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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
masteris 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:
persistit/pom.xmlpinned the signature toorg.codehaus.mojo.signature:java17:1.0— the Java 1.7 API surface — while four references to Java 8 APIs now exist inpersistit/core:com/persistit/Key.java:519-520ThreadLocal.withInitial(Supplier)+ lambda →java.util.function.Suppliercom/persistit/BufferPool.java:1364Long.hashCode(long)(×2)com/persistit/JournalManager.java:2192Long.hashCode(long)Why it surfaced only now
Three independent things lined up, and the commit the build broke on is not the cause:
mvn packagetomvn verify. animal-sniffer binds to theverifyphase, so it had never run in CI before that — there is not a singleanimal-snifferline in the logs of earlier builds.Long.hashCode) merged with green checks, but those checks had run days earlier undermvn packageand were never re-run after Run integration tests in the default CI build #270 landed.ThreadLocal.withInitial) merged withbuild-mavenred on all 9 jobs; its final run already showed exactly this animal-sniffer error.The intermediate
masterruns were all cancelled byconcurrency: cancel-in-progressas the PRs merged seconds apart, so the firstmasterrun 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=11makes javac reject newer APIs natively — which is precisely the job animal-sniffer existed to do beforereleasewas 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
coreanduimodules and the signature properties in the persistit parent. Nothing else refers to it — there are no@IgnoreJRERequirementannotations in the tree.Verification
Reproduced and fixed locally under JDK 11 (matching the
macos-latest, 11job),mvn -pl persistit/core -am verify:BUILD FAILURE, same fourUndefined referenceerrors as CIBUILD SUCCESS, and the goal no longer runsFull
verifyacrosspersistit/core+persistit/uipasses.