Skip to content

Remove the Gradle Wrapper validation workflow in favour of setup-gradle - #744

Merged
alexander-yevsyukov merged 1 commit into
masterfrom
remove-gradle-wrapper-validation
Aug 7, 2026
Merged

Remove the Gradle Wrapper validation workflow in favour of setup-gradle#744
alexander-yevsyukov merged 1 commit into
masterfrom
remove-gradle-wrapper-validation

Conversation

@alexander-yevsyukov

Copy link
Copy Markdown
Contributor

Closes #743.

Why

gradle/actions/wrapper-validation is redundant when
setup-gradle is already in use. Its README states:

If you are using setup-gradle in your workflows, it is unlikely that you will
need to use the wrapper-validation action.

Every distributed workflow that actually runs Gradle already uses
gradle/actions/setup-gradle@v6, which validates the wrapper JAR checksum
itself:

Workflow Runs Gradle Uses setup-gradle@v6
build-on-ubuntu.yml yes
build-on-windows.yml yes
increment-guard.yml yes
publish.yml yes
detekt-code-analysis.yml yes
ensure-reports-updated.yml no n/a
revalidate-versions.yml no n/a

So no repository loses wrapper verification.

What changed

  • Deleted .github/workflows/gradle-wrapper-validation.yml.
  • migrate now removes the workflow from consumers. Deleting it here is not
    enough on its own: migrate overlays files with cp and never deletes, so
    every repository that received the workflow earlier would keep running it.
  • README.md gained a "Retiring a distributed workflow" section documenting
    that two-step requirement, and the neighbouring paragraph was reworded so it
    no longer reads as if it covered retirement too.

Two details of the removal block are deliberate:

  • It runs after the cd ... For its first ~360 lines migrate executes
    with the working directory inside the config submodule, where any git
    command would address config rather than the consumer.
  • It uses git rm, not rm. The workflow is a tracked file, so staging the
    deletion makes the pull's own commit carry it instead of leaving it dangling
    in the working tree. This matches the existing pom.xml / dependencies.md
    cleanup right below it.

The Hugo-only branch had its own rm -f for this workflow; that line is now
redundant and was dropped.

Verification

The new block was exercised in throwaway repositories covering all three states,
each run twice to confirm idempotency:

State Result
Tracked file removed, deletion staged (D )
Untracked file removed, nothing staged
Absent quiet no-op

bash -n migrate passes. No .kt/.java/.kts/proto/dependency files
changed, so no Gradle build applies; config has no root version.gradle.kts,
so the version gate is not applicable.

⚠️ Follow-up outside this PR

Per the issue, branch protection must be updated in each consumer
repository
to drop the now-absent Validate Gradle Wrapper required check.
GitHub keeps waiting for a status that no workflow will ever report again, which
blocks every pull request in that repository. This PR cannot do that — it is a
repository setting, not a file.

config's own master is not branch-protected, so this PR is unaffected.

🤖 Generated with Claude Code

…dle`

`gradle/actions/setup-gradle` validates the wrapper JAR checksum itself, so
the dedicated `gradle/actions/wrapper-validation` action is redundant. Its
README states as much:

> If you are using setup-gradle in your workflows, it is unlikely that you
> will need to use the wrapper-validation action.

Every workflow that runs Gradle here already uses `setup-gradle@v6`; the two
that do not (`ensure-reports-updated`, `revalidate-versions`) never invoke
Gradle at all.

Deleting the file from `config` is not enough on its own: `migrate` overlays
files with `cp` and never deletes, so consumers that received the workflow
earlier would keep running it. `migrate` therefore removes it explicitly,
after the `cd ..` so `git` addresses the consumer rather than the `config`
submodule, and via `git rm` so the deletion is staged into the pull's own
commit. The Hugo-only branch's copy of that removal is now redundant and
dropped.

Closes #743

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 74e30e2fe9

ℹ️ 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".

Comment thread .github/workflows/gradle-wrapper-validation.yml

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

This PR retires the standalone “Gradle Wrapper validation” GitHub Actions workflow from the config repository, relying instead on gradle/actions/setup-gradle@v6’s built-in wrapper validation in the workflows that actually run Gradle. It also updates consumer migration behavior and documentation so the retired workflow is removed from repositories that previously received it via migrate.

Changes:

  • Deleted .github/workflows/gradle-wrapper-validation.yml from config.
  • Updated migrate to explicitly remove (and, when tracked, stage deletion of) the workflow in consumer repositories for idempotent cleanup.
  • Documented the two-step “retire a distributed workflow” process in README.md (delete in config + explicit removal in migrate), including a note about branch protection required checks.

Reviewed changes

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

File Description
README.md Documents the two-step retirement process for distributed workflows and notes branch protection implications.
migrate Adds explicit, idempotent removal (tracked via git rm, otherwise rm -f) for the retired workflow in consumer repos.
.github/workflows/gradle-wrapper-validation.yml Removes the redundant wrapper-validation workflow from this repository.

@alexander-yevsyukov
alexander-yevsyukov merged commit 8156499 into master Aug 7, 2026
3 checks passed
@alexander-yevsyukov
alexander-yevsyukov deleted the remove-gradle-wrapper-validation branch August 7, 2026 10:02
@github-project-automation github-project-automation Bot moved this from In Review to ✅ Done in v2.0 Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Remove Gradle Wrapper validation workflow in favour of setup-gradle action

3 participants