GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||
GeezerVison is showing github.com — Fix #13230: add --skip-phases and --skip-tests CLI options; fix lifecycle DAG by gnodet · Pull Request #13233 · apache/maven Conversation
|
|
Missing tests (blocking) The feature touches two independent code paths — At minimum needed:
Without tests, the next rebase that changes the phase resolution order or the This review was generated by an AI agent, Hermès on behalf of @gnodet. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Re-review after new commits.
Previous findings — status:
BuildPlanExecutor.plan() — addressed: session.getRequest() != null ? ... : Set.of() added, consistent with the sequential path.MavenExecutionRequest interface methods — addressed: full Javadoc with @param, @return, and @since added to both setSkippedPhases() and getSkippedPhases().DefaultLifecycleExecutionPlanCalculatorTest (sequential path). However BuildPlanExecutorTest was not modified — the concurrent path in BuildPlanExecutor.plan() has zero test coverage for the skip-phases filtering logic.Two new issues found:
This review was generated by an AI agent, Hermès on behalf of @gnodet.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Correction: Please add a test to
This review was generated by an AI agent, Hermès on behalf of @gnodet. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Addressed the two findings from the re-review (commit e4a0513):
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Re-review after new commits.
Previous findings — status:
CommonsCliMavenOptions.skippedPhases() — fixed: Arrays.stream(...).map(String::strip).toList() correctly strips each token.BuildPlanExecutor.plan() — already addressed in a previous round.MavenExecutionRequest — already addressed in a previous round.DefaultLifecycleExecutionPlanCalculatorTest) — already addressed in a previous round.BuildPlanExecutorTest) — tests added, but skippedPhasesMojoIsNotAddedToPlan has a weak assertion (see inline).This review was generated by an AI agent, Hermès on behalf of @gnodet.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Fixed in f784a25: moved the skipped-phases check before |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Re-review after new commits.
Previous findings — status:
BuildPlanExecutor.plan() — addressed in prior round.MavenExecutionRequest interface methods — addressed in prior round.CommonsCliMavenOptions.skippedPhases() — addressed in prior round.DefaultLifecycleExecutionPlanCalculatorTest) — addressed in prior round.BuildPlanExecutorTest) — skippedPhasesMojoIsNotAddedToPlan now has verify(pluginManager, never()).getMojoDescriptor(...) — the assertion is behavioral, not just exception-free. Addressed by commit 2ce1f45e.No new issues found. The implementation is correct across both execution paths (sequential DefaultLifecycleExecutionPlanCalculator and concurrent BuildPlanExecutor). The CLI wiring, layered options delegation, copy() propagation, and null-safety are all solid. Test coverage is adequate for a unit-level review.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
f784a25 to
832dba2
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Re-review after force-push (new HEAD: 832dba24).
Previous findings — status:
BuildPlanExecutor.plan() — addressed in prior round.MavenExecutionRequest interface methods — addressed in prior round.CommonsCliMavenOptions.skippedPhases() — addressed in prior round.New content in this squash (not in the previously approved commit f784a25):
skipTests() API + --skip-tests/-st CLI optioninstall/deploy → after(verify), integration-test → after(BUILD) (from #13232)New findings:
This review was generated by an AI agent, Hermès on behalf of @gnodet.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
…p-tests - CommonsCliMavenOptionsTest: unit tests for --skip-phases option parsing, including comma-separated values, whitespace stripping, and --skip-tests flag - MavenITmng13230SkipPhasesTest: integration tests verifying that --skip-phases=test suppresses maven-surefire-plugin, --skip-tests does the same via phase expansion, and that the baseline (no skip) still runs surefire - Add mng-13230 IT resources (minimal 4.1.0 jar project)
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Re-review after new commits (HEAD: e2de348d).
Previous findings — status:
--skip-tests expansion test — addressed: CommonsCliMavenOptionsTest covers option parsing, MavenITmng13230SkipPhasesTest.skipTestsIsIdempotentWhenTestAlreadyInSkipPhases() covers the idempotency case end-to-end, and skipTestsOptionSuppressesTestPhase() covers the phase-expansion behavior via IT.BuildPlanExecutor.plan() — addressed in prior rounds.MavenExecutionRequest interface methods — addressed in prior rounds.CommonsCliMavenOptions.skippedPhases() — addressed in prior rounds.DefaultLifecycleRegistry) — partially addressed: ITs cover --skip-phases behavior, but the behavioral change introduced by install→after(VERIFY) and integration-test→after(BUILD) still has no dedicated IT. #13232 (which covers this topology change) remains open.One remaining gap:
The MavenITmng13230SkipPhasesTest covers the skip-phases / skip-tests behavior correctly. However, the lifecycle DAG change (install/deploy → after(VERIFY)) bundled in this squash — a behavioral breaking change for users who previously ran mvn install expecting to skip verify — is not covered by any IT in this PR. The three tests in MavenITmng13230SkipPhasesTest all use verify as the target lifecycle phase. An IT asserting that mvn install on a minimal project now runs verify (and that mvn install --skip-phases=verify does not skip install) is missing.
This gap belongs in #13232 if that PR is still the owner of the DAG change. If the intent is to merge the DAG change here, an IT should be added to this PR before merge.
Everything else looks solid. The CLI wiring, layered delegation, copy() propagation, null-safety, and unit/IT test coverage for the skip-phases feature are all correct. The CommonsCliMavenOptionsTest properly exercises whitespace stripping, comma-separated parsing, and option coexistence. The BuildPlanExecutorTest additions use behavioral assertions (verify(pluginManager, never()).getMojoDescriptor(...)) rather than just exception-free checks.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Re-review after e2de348d.
Previous findings — status:
BuildPlanExecutor.plan() — addressed in prior round.MavenExecutionRequest interface methods — addressed in prior round.CommonsCliMavenOptions.skippedPhases() — addressed in prior round.--skip-tests expansion logic — addressed: CommonsCliMavenOptionsTest (9 tests) covers single value, comma-separated, whitespace stripping, short option, and all combinations of --skip-phases/--skip-tests. MavenITmng13230SkipPhasesTest adds 4 ITs covering the full CLI-to-execution path.Remaining issue:
DefaultLifecycleRegistry.java. Requires a design decision from @gnodet: bundle the DAG fix here (close #13232) or keep them separate (revert the DefaultLifecycleRegistry hunk here). Either way, an IT verifying that mvn install now runs verify is needed.The skip-phases core feature is solid. This one open item needs resolution before merge.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Add two integration tests to MavenITmng13230SkipPhasesTest covering the lifecycle DAG change bundled in this PR: - installPhaseRunsVerifyWithNewDag: verifies that 'mvn install' now triggers the verify phase (and thus surefire) because install now depends on after(VERIFY) in the v4 lifecycle DAG. - installWithSkipVerifySkipsVerifyMojos: verifies that users can opt out via '--skip-phases=verify' — install still succeeds but surefire is suppressed. Also updates the class Javadoc to mention the DAG change coverage.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Re-review after new commit ea92e8327b.
Previous findings — status:
BuildPlanExecutor.plan() — addressed in prior rounds.MavenExecutionRequest interface methods — addressed in prior rounds.CommonsCliMavenOptions.skippedPhases() — addressed in prior rounds.--skip-tests expansion test — addressed in prior rounds.installPhaseRunsVerifyWithNewDag correctly verifies that mvn install now runs surefire. However installWithSkipVerifySkipsVerifyMojos has a wrong assertion (see inline).One new issue in installWithSkipVerifySkipsVerifyMojos:
The test skips verify but asserts surefire does not appear in the log. Surefire is bound to the test phase — not verify — so it will still execute and the assertion will fail at runtime.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
When a user specifies --skip-phases=verify, mojos bound to sub-phases of verify (e.g. test, unit-test, integration-test) must also be skipped since those phases are children of verify in the lifecycle DAG. Previously, BuildPlanExecutor only did exact phase name matching against the skipped-phases set, so --skip-phases=verify would only suppress mojos explicitly bound to 'verify', but not those bound to 'test' (which is a child of verify in the Maven 4 lifecycle DAG). Fix: expand the skipped-phases set in BuildPlanExecutor.plan() to include all descendant phases of each explicitly listed phase by walking the lifecycle registry. Adds a unit test (skippingParentPhaseAlsoSkipsSubPhases) that binds a mojo to 'test', skips 'verify', and verifies getMojoDescriptor is never called. Fixes: MavenITmng13230SkipPhasesTest.installWithSkipVerifySkipsVerifyMojos
…y phases
Surefire is bound to the 'test' phase, not 'verify'. The previous test
used --skip-phases=verify which does not suppress surefire, making the
verifyTextNotInLog("maven-surefire-plugin") assertion incorrect at runtime.
Fix: skip both 'test' and 'verify' phases so that surefire (test phase)
and verify-phase mojos are both suppressed, matching the test intent.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Re-review after new commit 8c5cf895.
Previous findings — status:
BuildPlanExecutor.plan() — addressed in prior rounds.MavenExecutionRequest interface methods — addressed in prior rounds.CommonsCliMavenOptions.skippedPhases() — addressed in prior rounds.--skip-tests expansion test — addressed in prior rounds.installWithSkipVerifySkipsVerifyMojos wrong assertion — fixed: test now uses --skip-phases=test,verify so surefire (bound to test) is explicitly skipped. The assertion verifyTextNotInLog("maven-surefire-plugin") is now correct.One new issue: behavioral asymmetry between single-threaded and concurrent builds.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Re-review after new commits (8c5cf895, 46b7d894ef).
Previous findings — status:
BuildPlanExecutor.plan() — addressed in prior rounds.MavenExecutionRequest interface methods — addressed in prior rounds.CommonsCliMavenOptions.skippedPhases() — addressed in prior rounds.--skip-tests expansion test — addressed in prior rounds.installPhaseRunsVerifyWithNewDag and installWithSkipVerifySkipsVerifyMojos added.installWithSkipVerifySkipsVerifyMojos — fixed in 46b7d894ef: now skips test,verify.New issues found in 8c5cf895 (expandSkippedPhases):
One correctness gap — see inline.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
The sequential builder (DefaultLifecycleExecutionPlanCalculator) filtered skipped phases using exact-match only, while the concurrent builder (BuildPlanExecutor) already called expandSkippedPhases() to include all descendant sub-phases. This meant --skip-phases=verify would skip verify mojos in a -T build but not in the default single-threaded build. Fix: inject LifecycleRegistry into DefaultLifecycleExecutionPlanCalculator and apply the same expandSkippedPhases() logic before filtering, making both builders symmetric. Also fix typo: skipPhasesSupressesMojosForSkippedPhase → skipPhasesSuppressesMojosForSkippedPhase (missing second 'p'). Add unit test: skipParentPhaseAlsoFiltersSubPhases verifies that --skip-phases=verify also suppresses mojos bound to sub-phases (e.g. 'test') in the sequential path.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Re-review after new commit 72b8d24c.
Previous findings — status:
BuildPlanExecutor.plan() — addressed in prior rounds.MavenExecutionRequest interface methods — addressed in prior rounds.CommonsCliMavenOptions.skippedPhases() — addressed in prior rounds.--skip-tests expansion test — addressed in prior rounds.installWithSkipVerifySkipsVerifyMojos — addressed in prior rounds.expandSkippedPhases correctness gap — addressed in prior rounds.expandSkippedPhases only in concurrent path — fixed in 72b8d24c: DefaultLifecycleExecutionPlanCalculator now injects LifecycleRegistry and applies the same sub-phase expansion as BuildPlanExecutor. Both builders are now symmetric.skipPhasesSupressesMojosForSkippedPhase — fixed in 72b8d24c: renamed to skipPhasesSuppressesMojosForSkippedPhase.No new issues found. The implementation is correct across all code paths:
CommonsCliMavenOptions, LayeredMavenOptions, MavenInvoker) — solid.DefaultMavenExecutionRequest.copy() propagation — correct.expandSkippedPhases in both DefaultLifecycleExecutionPlanCalculator and BuildPlanExecutor — identical logic, both backed by the API LifecycleRegistry, includes self in phase.allPhases() so explicit phases are never accidentally dropped from the expanded set.skipParentPhaseAlsoFiltersSubPhases is logically sound: uses a real DefaultLifecycleRegistry(emptyList) to drive expansion and a mocked mapping delegate, correctly verifying that --skip-phases=verify suppresses mojos bound to the test sub-phase in the sequential path.MavenITmng13230SkipPhasesTest) is complete: skip-phases, skip-tests, idempotency, DAG change (install→after(VERIFY)), and skip-verify escape hatch are all exercised end-to-end.This review was generated by an AI agent, Hermès on behalf of @gnodet.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Closing as superseded by #13249, which covers the same feature set with a broader scope. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.