Configure revapi to run as part of the audits job#4258
Open
evanchooly wants to merge 2 commits into
Open
Conversation
- Move revapi out of the code-audits profile and into a dedicated audits profile in core/pom.xml, activated by -Daudits (matching audits.yml) - Remove the <phase>none</phase> lifecycle-suppression hack from root pluginManagement; let the profile-scoped execution control when it runs - Fix the config file element name to <file> per the revapi-maven-plugin docs - Rewrite config/revapi.json from scratch in the modern array format, keeping only revapi.filter with targeted package exclusions https://claude.ai/code/session_01GkmqCe8N2JvJB7tqCD3w3q
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reworks how RevAPI is configured and executed so that API compatibility checks run under the GitHub Actions “Audits” workflow (triggered via -Daudits) rather than being tied to the code-audits profile.
Changes:
- Removed the root
pluginManagementlifecycle-suppression execution for RevAPI and updated the configuration element to use<file>for the analysis config. - Added a new
auditsprofile incore/pom.xmlthat runsrevapi:checkwhen-Dauditsis set. - Simplified
config/revapi.jsonto a modern array-based format, keeping package/annotation exclusions.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pom.xml | Cleans up RevAPI plugin management configuration and points it at config/revapi.json. |
| core/pom.xml | Adds an audits profile that executes revapi:check under -Daudits. |
| config/revapi.json | Replaces prior config with a filter-only setup to exclude internal/experimental/codec APIs. |
| { | ||
| "matcher": "java-package", | ||
| "match": "dev.morphia.annotations.internal" | ||
| "match": "/.*\\.codec(\\..*)?/" |
The previous regex /.*\.codec(\..*)?/ missed plural forms like dev.morphia.aggregation.codecs and dev.morphia.aggregation.codecs.stages. Use /.*codec.*/ to cover all codec-related packages regardless of plurality. https://claude.ai/code/session_01GkmqCe8N2JvJB7tqCD3w3q
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.
Summary
revapi:checkout of thecode-auditsprofile and into a newauditsprofile incore/pom.xml, activated by-Daudits— the flag passed byaudits.yml<phase>none</phase>lifecycle-suppression trick from rootpluginManagement; the profile-scoped execution now controls when the check runs<analysisConfigurationFile>to<file>per the revapi-maven-plugin docsconfig/revapi.jsonfrom scratch in the modern array format, retaining onlyrevapi.filterwith package-level exclusions for internal, experimental, and codec packagesWhat changed and why
Before: RevAPI was wired into the
code-auditsprofile (triggered by-Dcode-audits), with a<phase>none</phase>hack in rootpluginManagementto suppress it everywhere else. Theaudits.ymlworkflow passes-Daudits, so revapi never actually ran there.After: RevAPI has a clean, self-contained execution inside an
auditsprofile incore/pom.xml. Running./mvnw -Daudits(or./mvnw install -Daudits) now bindsrevapi:checkto theverifyphase for the core module and fails the build on any API incompatibility.Test plan
./mvnw install -pl :morphia-core -Daudits -DskipTests -Ddeploy.skip=trueand confirmrevapi:checkexecutes./mvnw install -pl :morphia-core -DskipTests -Ddeploy.skip=true(no flag) does not run revapi./mvnw install -pl :morphia-core -Dcode-audits -DskipTests -Ddeploy.skip=truestill runs spotbugs (revapi should not run)https://claude.ai/code/session_01GkmqCe8N2JvJB7tqCD3w3q
Generated by Claude Code