openrewrite / rewrite-jenkins

OpenRewrite recipes to continuously modernize Jenkins plugins.
Apache License 2.0
9 stars 8 forks source link

refactor: Update Gradle wrapper #58

Closed shanman190 closed 7 months ago

shanman190 commented 8 months ago

Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.gradle.UpdateGradleWrapper?organizationId=T3BlblJld3JpdGU%3D

shanman190 commented 8 months ago

On this one, it looks like some recipe behavior has been broken since the last push to main.

sghill commented 8 months ago

Thanks for the PR!

I think published versions the recipe tests rely on may have changed around March 13 - that's when I got the first broken build notification. Added to my list to look into, but happy for any contributions as well.

sghill commented 8 months ago

Started looking into this today and wanted to capture a quick note - it looks like there is an issue with the way latest.release is applied now. A few of the errors are 404s from a repository where the artifact does exist:

    -            <dependency>
    +            <!--~~(io.jenkins.tools.bom:bom-2.361.x:latest.release failed. Unable to download POM: io.jenkins.tools.bom:bom-2.361.x:latest.release. Tried repositories:
    +https://repo.jenkins-ci.org/public/: HTTP 404
    +https://repo.maven.apache.org/maven2: HTTP 404)~~>--><dependency>
                     <groupId>io.jenkins.tools.bom</groupId>
                     <artifactId>bom-2.361.x</artifactId>
    -                <version>2102.v854b_fec19c92</version>
    +                <version>latest.release</version>

The recipe is meant to put the current latest release in the pom, but it's putting the literal latest.release.

sghill commented 7 months ago

Fixed by https://github.com/openrewrite/rewrite/commit/e201902f45f6c95a4a88958c7dd70ff1e60d947c and https://github.com/openrewrite/rewrite-jenkins/commit/efe87e77b75cd14df08eba8de088908472760a35 🎉

Thanks for the PR Shannon and thanks for diving into this with me Sam!