Skip to content

Add option to create partial Gradle Wrapper pull requests when the wrapper task fails #13597

@yeikel

Description

@yeikel

Is there an existing issue for this?

  • I have searched the existing issues

Feature description

Background

In #12891, we introduced the ability to update the Gradle Wrapper

The workflow to upgrade the wrapper is the following:

  1. Update gradle/wrapper/gradle-wrapper.properties with the new version
  2. Run Gradle's wrapper task to regenerate the wrapper files ./gradlew wrapper

This second step does the following:

  • Download the Gradle version defined in gradle-wrapper.properties
  • Execute the wrapper task within the build context using the newly downloaded Gradle version
    • If successful: Updated wrapper files may be regenerated (note: not every Gradle upgrade changes these files)
    • If unsuccessful: The build process fails completely

For the initial release, if any step in the wrapper generation process fails, the whole Dependabot's Wrapper update fails, and users will not receive a partial or incomplete pull request. This approach was chosen to avoid creating incomplete pull requests for the initial release

Request

Dependabot should provide an option to create pull requests when it is able to update the gradle/wrapper/gradle-wrapper.properties file but the generation of the wrapper binaries fails

Ideally, when this partial upgrade happens, Dependabot should issue a warning in the pull request description so that users are aware that the update is partial. For example:

⚠️ Note: Dependabot tried to update the wrapper files but the Gradle build failed. See the logs for more details

Example use case

Many teams use Dependabot to gain awareness of new upstream releases, not necessarily to receive a fully complete and ready-to-merge pull request.

For Gradle, major upgrades (e.g., from 8.x to 9.x) can introduce breaking changes that prevent the gradle wrapper task from successfully regenerating the wrapper binaries (gradle-wrapper.jar, etc.). However, Dependabot is still able to update the properties files, such as gradle/wrapper/gradle-wrapper.properties, to reference the new Gradle version.

Benefits

  • Notify maintainers of the new Gradle releases
  • Allow maintainers to manually resolve build issues and regenerate binaries.
  • Avoid missing important updates due to transient or breaking changes.

Additional Context

The pull request #13501 is an active discussion about why we believe that this feature should exist

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions