Repository navigation
Conversation
Resolve validation tasks lazily through `TaskDependency`, so only selected projects perform planning. Remove task-name parsing and the CI-specific extension flag. Cache registration results and failures to prevent repeated lookups from registering tasks twice. Cover custom aggregates, nested task paths and CI slot selection.
This comment has been minimized.
This comment has been minimized.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
🟡 Java Benchmark SLOs — Performance SLO warning (near threshold)
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2954da1f19
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
More details
Task-graph-driven Muzzle planning preserves the validation finalizer chain and CI slot filtering. Build logic compiled, but targeted execution tests were blocked by dependencies unavailable offline.
🤖 Bits Code Review · Commit 2954da1
Supply planned finalizers through a plain `Provider` instead of a custom `TaskDependency`. Keep task registration deferred and memoise both successful and failed registration attempts. Document how this differs from task-backed providers. Verify that excluding a module avoids resolving its validation directives. The works like `TaskDependency`, but it appears that `TaskDependency` could get side-lined, see gradle/gradle#30534 (comment)
What Does This Do
Builds on #12800 by planning Muzzle checks only for modules whose
muzzletask is included in Gradle's execution graph.Now a
Provider<Set<Task>>whose role to provide the computed plan; it is passed to the main muzzle task'sfinalizedBy. The use of the provider allow to defer the directive checks planning and registration until Gradle resolves its task finalizers during task graph assembly.Concretely, this remove the need to parse the task path parsing and
MuzzleExtension.includeInAggregate. And keeps the CI convention handlingrunMuzzleand slots.Motivation
#12800 avoids planning modules outside the selected CI slot. This change lets the task graph determine which modules need planning, without requiring the Muzzle plugin to understand the CI aggregate or its selection rules.
There are other lazy mechanisms available, but they have different roles or properties:
TaskProviderreferences an already registered task. Muzzle needs completed directives and resolved versions to know the check names and count. Registering every check up front would still incur discovery costs for unused modules, and a task configuration action cannot register sibling tasks. See task configuration avoidance.TaskCollectionconnects registered tasks, but does not discover versions or register missing checks.Task-output providers connect values and infer producer dependencies. In particular, dependency lookup can follow a task-backed
mapprovider's producer without evaluating its mapped value, so registering checks as a mapping side effect is unsuitable. See Provider dependency information.A plain
ProviderorCallablecould defer the same registration work. A live provider can be queried repeatedly, so it would need the same protection to happen only once.TaskDependencygives this operation an explicit task-set resolution contract during graph construction. In this PR, the wrapper caches success and failure to prevent duplicate registration after partial failure.TaskDependency, whose role is precisely to provide concrete tasks at execution graph assembly.Finally the planned execution order remains the same:
muzzle -> directive checks as emitted by planner -> muzzle-end.Tip
Resolving the finalizers after project evaluation incidentally removes the need for the dreaded
afterEvaluate, which also happens to be one of the long term goal to remove legacy APIs.Additional Notes
muzzletask with-xis supported and avoids planning it. However excluding individual generated checks by name remains unsupported because they are registered after CLI task selection. Workaround exists, but do not feel usefulexclusion support patch
Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issue. Usesolvesinstead, and assign the PR milestone to the issue