Skip to content

Configure revapi to run as part of the audits job#4258

Open
evanchooly wants to merge 2 commits into
masterfrom
claude/configure-revapi-audits-edXQl
Open

Configure revapi to run as part of the audits job#4258
evanchooly wants to merge 2 commits into
masterfrom
claude/configure-revapi-audits-edXQl

Conversation

@evanchooly
Copy link
Copy Markdown
Member

Summary

  • Move revapi:check out of the code-audits profile and into a new audits profile in core/pom.xml, activated by -Daudits — the flag passed by audits.yml
  • Remove the <phase>none</phase> lifecycle-suppression trick from root pluginManagement; the profile-scoped execution now controls when the check runs
  • Fix the config file element name from <analysisConfigurationFile> to <file> per the revapi-maven-plugin docs
  • Rewrite config/revapi.json from scratch in the modern array format, retaining only revapi.filter with package-level exclusions for internal, experimental, and codec packages

What changed and why

Before: RevAPI was wired into the code-audits profile (triggered by -Dcode-audits), with a <phase>none</phase> hack in root pluginManagement to suppress it everywhere else. The audits.yml workflow passes -Daudits, so revapi never actually ran there.

After: RevAPI has a clean, self-contained execution inside an audits profile in core/pom.xml. Running ./mvnw -Daudits (or ./mvnw install -Daudits) now binds revapi:check to the verify phase for the core module and fails the build on any API incompatibility.

Test plan

  • Run ./mvnw install -pl :morphia-core -Daudits -DskipTests -Ddeploy.skip=true and confirm revapi:check executes
  • Confirm ./mvnw install -pl :morphia-core -DskipTests -Ddeploy.skip=true (no flag) does not run revapi
  • Confirm ./mvnw install -pl :morphia-core -Dcode-audits -DskipTests -Ddeploy.skip=true still runs spotbugs (revapi should not run)

https://claude.ai/code/session_01GkmqCe8N2JvJB7tqCD3w3q


Generated by Claude Code

- 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
Copilot AI review requested due to automatic review settings May 20, 2026 05:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 pluginManagement lifecycle-suppression execution for RevAPI and updated the configuration element to use <file> for the analysis config.
  • Added a new audits profile in core/pom.xml that runs revapi:check when -Daudits is set.
  • Simplified config/revapi.json to 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.

Comment thread config/revapi.json Outdated
{
"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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants