Skip to content

Report build validation failures with Problems API#881

Open
alvarosanchez wants to merge 2 commits into
8.1.xfrom
DEV-335-report-micronaut-build-validation-failures-with-gradle-problems-api
Open

Report build validation failures with Problems API#881
alvarosanchez wants to merge 2 commits into
8.1.xfrom
DEV-335-report-micronaut-build-validation-failures-with-gradle-problems-api

Conversation

@alvarosanchez

Copy link
Copy Markdown
Member

Summary

  • Add an internal Micronaut Build Problems API helper with stable micronaut-build > validation group and covered validation IDs.
  • Report structured Gradle problems for selected configuration/resolution and task-action validation failures while preserving existing fail-fast exception messages and guidance.
  • Sanitize and bound Maven Central response diagnostics before logging/problem reporting, and document the generated Problems report path.

Tests

  • ./gradlew --rerun-tasks :micronaut-gradle-plugins:functionalTest --tests 'io.micronaut.build.ProblemsApiFunctionalTest' :micronaut-gradle-plugins:test --tests 'io.micronaut.build.MavenCentralPublishTaskTest' --tests 'io.micronaut.build.problems.MicronautBuildProblemsTest'
  • git diff --check origin/8.0.x...HEAD

Paperclip Handoff

  • Paperclip issue: DEV-335.
  • Linked GitHub issue: none; this was a manual-origin issue, so no GitHub closing keyword or issue-creator reviewer request applies.
  • Type label: type: enhancement.
  • Micronaut organization projects selected during QA intake: 5.0.0-M3 and 5.0.0 Release.
  • Ambiguity note preserved: open public boards also include 5.0.1 Release, 5.1.0 Release, and 6.0.0 Release; QA selected both the matching milestone and GA release boards for the default 8.0.x line.

✨ This message was AI-generated using gpt-5

Copilot AI review requested due to automatic review settings May 8, 2026 19:39
@alvarosanchez alvarosanchez added the type: enhancement New feature or request label May 8, 2026
@github-project-automation github-project-automation Bot moved this to Backlog in 5.0.0-M3 May 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds structured reporting of selected Micronaut Build validation failures via Gradle’s Problems API (targeting the Gradle 9 line), while preserving existing fail-fast exception messages and improving sanitization of diagnostic output.

Changes:

  • Introduce MicronautBuildProblems helper to define stable problem groups/IDs and to report failures via Problems reporter.
  • Emit Problems API entries for common validation failures across plugins/tasks (BOM enforcement, version mismatch, unsupported test framework, POM checks, Asciidoc output validation, Maven Central publishing).
  • Add documentation and new unit/functional tests, including sanitization + bounded diagnostics and Problems report assertions.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
README.md Documents Problems API diagnostics behavior, report path, and stable IDs.
micronaut-gradle-plugins/src/main/java/io/micronaut/build/problems/MicronautBuildProblems.java New helper for problem groups/IDs, reporting, and diagnostic sanitization.
micronaut-gradle-plugins/src/main/groovy/io/micronaut/build/MicronautBuildCommonPlugin.groovy Report enforced platform + Micronaut version mismatch validations via Problems API.
micronaut-gradle-plugins/src/main/groovy/io/micronaut/build/MicronautModulePlugin.groovy Report unsupported test framework validation via Problems API.
micronaut-gradle-plugins/src/main/groovy/io/micronaut/build/pom/PomChecker.groovy Report invalid coordinates + POM verification failures via Problems API.
micronaut-gradle-plugins/src/main/groovy/io/micronaut/build/MavenCentralPublishTask.java Sanitize/bound Maven Central diagnostics and report failures via Problems API; add deployment id extraction/encoding helpers.
micronaut-gradle-plugins/src/main/groovy/io/micronaut/build/docs/ValidateAsciidocOutputTask.java Report generated Asciidoc output validation failures via Problems API.
micronaut-gradle-plugins/src/test/groovy/io/micronaut/build/problems/MicronautBuildProblemsTest.groovy Unit tests for sanitization and truncation behavior.
micronaut-gradle-plugins/src/test/groovy/io/micronaut/build/MavenCentralPublishTaskTest.groovy Unit tests for deployment id extraction + URL encoding + credential-like response rejection.
micronaut-gradle-plugins/src/functionalTest/groovy/io/micronaut/build/ProblemsApiFunctionalTest.groovy Functional tests asserting Gradle Problems report contains expected IDs/groups.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread micronaut-gradle-plugins/src/main/groovy/io/micronaut/build/pom/PomChecker.groovy Outdated
Co-Authored-By: Paperclip <noreply@paperclip.ing>
@alvarosanchez alvarosanchez removed this from 5.0.0-M3 May 12, 2026
@alvarosanchez alvarosanchez changed the base branch from 8.0.x to 8.1.x May 21, 2026 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement New feature or request

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants