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

Regressions when upgrading from 1.13.6 to 1.14.3 #561

Closed
realdadfish opened this issue Nov 30, 2022 · 4 comments
Closed

Regressions when upgrading from 1.13.6 to 1.14.3 #561

realdadfish opened this issue Nov 30, 2022 · 4 comments

Comments

@realdadfish
Copy link

I'm testing with Gradle 7.5.1 and 7.6 and see several regressions after the update. This is my configuration:

configure<VersionConfig> {
        localOnly.set(true)

        repository {
            // I'm in a multi-component build, this wraps the search for a parent directory containing a .git subdir 
            directory.set(layout.dir(provider { getGitRoot() }))
        }

        tag {
            prefix.set("my-release-")
            versionSeparator.set("")
        }

        versionCreator(PredefinedVersionCreator.VERSION_WITH_BRANCH.versionCreator)
        branchVersionCreator.putAll(
            mapOf(
                // do not add branch names to versions of release and nightly builds
                "release/.*" to "simple",
                "develop" to "simple"
            )
        )

        snapshotCreator { _, scmPosition ->
            "-dev.${scmPosition.shortRevision}"
        }

        checks {
            // Can't rely on that because of JGit (https://github.com/allegro/axion-release-plugin/issues/316)
            uncommittedChanges.set(false)
        }
}

I'm seeing two issues:

  • SNAPSHOTs don't seem to be recognized anymore and versioning is off. If I have a my-release-1.1.0 tag in the parent branch and on branch foo I previously got 1.1.1-foo-dev.abcd1234, now I'm only getting 1.1.0-foo
  • More importantly, the execution time of the currentVersion task is enormous (several minutes), where the task previously executed within seconds. If I execute the build then with --debug, Gradle spits out tons of debug messages like Waiting to acquire shared lock on daemon addresses registry.. The internets tell me that this is probably because of a memory issue (HEAP too low, etc.), but nothing changed in this regard. My gradle.properties is unchanged:
org.gradle.caching=true
org.gradle.parallel=true
org.gradle.jvmargs=-Xmx8g -XX:MaxPermSize=8g -XX:+HeapDumpOnOutOfMemoryError -Dkotlin.daemon.jvm.options\="-Xmx2048M"

I can provide a build scan (before / after) if this is of any use.

@bgalek
Copy link
Member

bgalek commented Jan 26, 2023

@realdadfish I'm a bit worried about task is enormous (several minutes), would you like to try and dig into the problem?

@bgalek
Copy link
Member

bgalek commented Jan 26, 2023

about the snapshot problem, it should be easy to add such unit test - it would be easier to fix it then ;)

@mpern
Copy link
Contributor

mpern commented Jul 27, 2023

I have the same issue (currentVersion taking forever and/or dying with OOM exception).

My suspicion is on the @InputDirectory in RepositoryConfig.

@InputDirectory caused issues for me with recent Gradle versions, because Gradle starts to track all files in the InputDirectory for changes. What I did is change the DirectoryProperty to a dumb Property<String>, so Gradle doesn't do any magic.

So instead of ...

    @InputDirectory
    @Optional
    abstract DirectoryProperty getDirectory()

use

    @Input
    @Optional
    abstract Property<String> getDirectory()

... and you avoid any memory leaks.

related:
https://docs.gradle.org/8.0.1/userguide/validation_problems.html#incorrect_use_of_input_annotation

@bgalek
Copy link
Member

bgalek commented Jul 28, 2023

@mpern thx for the fix!, new version was just released

@bgalek bgalek closed this as completed Jul 28, 2023
david0 pushed a commit to david0/axion-release-plugin that referenced this issue Feb 12, 2024
bgalek pushed a commit that referenced this issue Feb 15, 2024
Co-authored-by: Markus Perndorfer <mpern@users.noreply.github.com>
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

3 participants