Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:verifyRelease - No signature of method - After updating from 1.18.8 to 1.18.9 #827

Closed
greenjoe opened this issue Oct 1, 2024 · 28 comments

Comments

@greenjoe
Copy link

greenjoe commented Oct 1, 2024

Hello, in one of our libraries the "release" step fails after updating the plugin from 1.18.8 to 1.18.9. The error message is:


> Task :verifyRelease FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':verifyRelease'.
> Failed to calculate the value of task ':verifyRelease' property 'snapshotDependencies'.
   > No signature of method: java.lang.String.positive() is applicable for argument types: () values: []
     Possible solutions: notify(), size(), tokenize()

The update works in our other gradle projects, but fails in one multi-module gradle project. I'm not sure if this is some kind of bug in the plugin or possibly we have an incorrect configuration. Could you please give me any hints?

@bgalek
Copy link
Member

bgalek commented Oct 1, 2024

Hi, that's really strange, take a look:
v1.18.8...v1.18.9

The only thing released in 1.18.9 was the fix for concurrent map modification and runtimeOnly("net.java.dev.jna:jna-platform:5.15.0")

Could you check if forcing a downgrade of jna helps?

@greenjoe
Copy link
Author

greenjoe commented Oct 1, 2024

It doesn't seem to help, I've tried

buildscript {
    configurations.all {
        resolutionStrategy {
            force 'net.java.dev.jna:jna-platform:5.14.0' // desired older version
        }
    }
}

and then
./gradlew buildEnvironment
to verify that the version was downgraded. But I'm still getting an error.

The concurrent map modification changes you mentioned are touching "SnapshotDependenciesChecker" and the error mentions "snapshotDependencies" so I thought perhaps it is related? Adding --stacktrace I'm getting

Caused by: groovy.lang.MissingMethodException: No signature of method: java.lang.String.positive() is applicable for argument types: () values: []
Possible solutions: notify(), tokenize(), size()
        at pl.allegro.tech.build.axion.release.domain.SnapshotDependenciesChecker.snapshotVersions(SnapshotDependenciesChecker.groovy:20)
        at pl.allegro.tech.build.axion.release.domain.SnapshotDependenciesChecker$snapshotVersions.call(Unknown Source)

@hetzijzo
Copy link

hetzijzo commented Oct 1, 2024

We have exact the same issue with the axion-release-plugin and traced it down to the 1.18.9 version.

@bgalek
Copy link
Member

bgalek commented Oct 1, 2024

@hetzijzo or @greenjoe could you share your repo link? I'll could take a look

@greenjoe
Copy link
Author

greenjoe commented Oct 1, 2024

Hello, I couldn't share the link to the actual repository I'm working on but I've found a way to create an almost empty gradle project from scratch that seems to replicate the issue
https:/greenjoe/axion-test

./gradlew release

@bgalek
Copy link
Member

bgalek commented Oct 1, 2024

@greenjoe, thx, I've confirmed that this bug was introduced in #819 I'll try to fix it ASAP

@bgalek
Copy link
Member

bgalek commented Oct 1, 2024

It seems to be working on the project you provided

The project uses snapshot versions - can't release. Snapshots found: [test:test:1.0.1-SNAPSHOT]

and all other tests are passing, so I hope it will resolve the issue

@bgalek
Copy link
Member

bgalek commented Oct 1, 2024

v1.18.10 was just released, I hope it will work as expected now

@ksiczek
Copy link

ksiczek commented Oct 2, 2024

With v1.18.10 we're getting

Execution failed for task ':verifyRelease'.
> The project uses snapshot versions - can't release. Snapshots found: [***.**.*:commons-service:3.2.300-SNAPSHOT, ***.**.*:commons-test:3.2.300-SNAPSHOT, ***.**.*:commons-rest:3.2.300-SNAPSHOT, ***.**.*:commons-processor:3.2.300-SNAPSHOT, ***.**.*:commons-kafka:3.2.300-SNAPSHOT, ***.**.*:commons-security:3.2.300-SNAPSHOT]

which seems similar to the 330. Is it a new issue/a regression?

@bgalek
Copy link
Member

bgalek commented Oct 2, 2024

@ksiczek could you share your Gradle project layout? I assume your Gradle module referenced in another module is detected as snapshot?

@ksiczek
Copy link

ksiczek commented Oct 2, 2024

Sure @bgalek. This is a multi-module project with the directory structure as follows:

commons-java
├── CODEOWNERS
├── README.md
├── build.gradle
├── commons-bom
├── commons-kafka
├── commons-processor
├── commons-rest
├── commons-security
├── commons-service
├── commons-test
├── gradle
├── gradle.properties
├── gradlew
├── libs.versions.toml
├── renovate.json
└── settings.gradle

We release everything as a single version.

/build.gradle

subprojects {
    apply plugin: 'maven-publish'
    project.version = scmVersion.version
    publishing {
        repositories {
...
        }
    }

The sub-projects are not related to the axion or release. I jumped in here because we also faced the issue with 1.18.9 despite having had a smooth release for months. Now there is the 1.18.10 which traded one problem for the other :)

Edit: we also release locally -Prelease.localOnly and push tags manually.

@bgalek
Copy link
Member

bgalek commented Oct 2, 2024

Thanks! I'll look into this today, I hope to resolve it so you'll get back on track!

@greenjoe
Copy link
Author

greenjoe commented Oct 2, 2024

I would like to confirm that 1.18.10 works correctly in my repository. Thank you for fixing it so quickly :)

@marcopacurariu3
Copy link

@bgalek, in the project that I'm working on, I have the same issue as mentioned by @ksiczek, please let me know when there's a fix for it, it appeared indeed in version 1.18.10

@bgalek bgalek reopened this Oct 2, 2024
@bgalek
Copy link
Member

bgalek commented Oct 2, 2024

@hetzijzo did the last release resolved your problem too?

@bgalek
Copy link
Member

bgalek commented Oct 2, 2024

@marcopacurariu3 @ksiczek I need more information, to reproduce the issue. How does your plugin configuration work, and what are your tags/submodules configurations.

Could you prepare a repository like @greenjoe did or a PR with failing test?
In case of https:/greenjoe/axion-test it works the same as the previous versions (v1.18.8 and v1.18.10 results is the same - the problem was only with v1.18.9).

@hetzijzo
Copy link

hetzijzo commented Oct 3, 2024

@bgalek Thanks for the fast fix. Version 1.8.10 fixed the issue.

@danielnicinski
Copy link

@bgalek I prepared a repository which reflects the configuration we have with @ksiczek
https:/danielnicinski/axion-demo-1

@marcindabrowski
Copy link

marcindabrowski commented Oct 4, 2024

@bgalek I used 1.18.11 in my project with multiple modules and got error:

> Task :verifyRelease FAILED
Looking for uncommitted changes.. 
Checking if branch is ahead of remote.. 
Checking for snapshot versions.. FAILED
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':verifyRelease'.
> The project uses snapshot versions - can't release. Snapshots found: [com.example:example-core:1.1.3-SNAPSHOT, com.example:example-json:1.1.3-SNAPSHOT]

The project has 11 modules, but snapshots where found in 5 of them.
It worked when I downgraded plugin to 1.18.8.

Release was performed by GitHub Action and Gradle 8.10.2.

@bgalek
Copy link
Member

bgalek commented Oct 4, 2024

@marcindabrowski I assume you have one version for every submodule?

@bgalek
Copy link
Member

bgalek commented Oct 4, 2024

@danielnicinski in your demo, you want to version all modules the same version, right?

@bgalek
Copy link
Member

bgalek commented Oct 4, 2024

ok, i think i see the bug, thanks for your examples, I'll need to prepare a test in repo for that

bgalek added a commit that referenced this issue Oct 4, 2024
…t should not be detected as snapshots | fixes #827
bgalek added a commit that referenced this issue Oct 4, 2024
…t should not be detected as snapshots | fixes #827
@bgalek
Copy link
Member

bgalek commented Oct 4, 2024

this should do the trick: https:/allegro/axion-release-plugin/pull/831/files
I'll test this snapshot in provided repositories

bgalek added a commit that referenced this issue Oct 4, 2024
…t should not be detected as snapshots | fixes #827
bgalek added a commit that referenced this issue Oct 4, 2024
…t should not be detected as snapshots | fixes #827
bgalek added a commit that referenced this issue Oct 4, 2024
…t should not be detected as snapshots | fixes #827
@marcindabrowski
Copy link

@marcindabrowski I assume you have one version for every submodule?

Yes, and I have one tag for whole repository.

bgalek added a commit that referenced this issue Oct 4, 2024
…t should not be detected as snapshots | fixes #827
@bgalek bgalek closed this as completed in 394045f Oct 4, 2024
@bgalek bgalek reopened this Oct 4, 2024
@bgalek
Copy link
Member

bgalek commented Oct 4, 2024

@marcindabrowski @danielnicinski @ksiczek I'll release a fix today, please get back to me if this helped - provided tests reposities are working from snapshot

@marcindabrowski
Copy link

@bgalek version 1.18.12 is working with my projects.
Thanks!

@danielnicinski
Copy link

@marcindabrowski @danielnicinski @ksiczek I'll release a fix today, please get back to me if this helped - provided tests reposities are working from snapshot

I confirm it fixed the issue we had. Thanks

@ksiczek
Copy link

ksiczek commented Oct 14, 2024

That works great for us too. It was blazing fast, thanks a ton.

@bgalek bgalek closed this as completed Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants