Skip to content

Conversation

kingg22
Copy link
Contributor

@kingg22 kingg22 commented Sep 3, 2025

close #2492

@kingg22
Copy link
Contributor Author

kingg22 commented Sep 3, 2025

@DavideD Hey, need to check with codeql because it need pass the flag --no-configuration-cache and maybe --no-build-cache, but don't have manual workflow dispatch and is auto configure.
Where can I put the documentation about these changes in release pipeline? TLDR maven publish need pass no-configuration-cache and all task related to publish need a fresh build without cache.

If anyone have problem with the module documentation do clean and assemble, if still failing ascii, pass the flag, I mark as incompatible, but gradle can fail inclusive with this mark.

In documentation/build.gradle I recommend put dependsOn on other task (no assemble) because when a no cacheable task is in the pipeline, gradle don't store configuration cache, maybe task build or other.

@kingg22
Copy link
Contributor Author

kingg22 commented Sep 3, 2025

Current CI action fail in session example test is not related with my changes.

@DavideD
Copy link
Member

DavideD commented Sep 24, 2025

Thanks @kingg22,

Could you rebase this to the latest changes, please?
I just came back from the holidays and catching up with things. But I will start to review it soon

@DavideD
Copy link
Member

DavideD commented Sep 24, 2025

Current CI action fail in session example test is not related with my changes.

I think it is related. It only fails when I apply your PR.

This is the error I'm seeing locally:

5: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':hibernate-reactive-core:test'.
> class org.gradle.internal.serialize.codecs.core.ClosureCodec$BrokenScript cannot be cast to class precompiled_HrTestContainers (org.gradle.internal.serialize.codecs.core.ClosureCodec$BrokenScript is in unnamed module of loader org.gradle.initialization.MixInLegacyTypesClassLoader @76b07f29; precompiled_HrTestContainers is in unnamed module of loader org.gradle.internal.classloader.VisitableURLClassLoader$InstrumentingVisitableURLClassLoader @45fadde3)

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
==============================================================================

@kingg22
Copy link
Contributor Author

kingg22 commented Sep 24, 2025

Hey @DavideD good to read u again!

The error you see locally can be solved with gradlew clean hibernate-core:test --no-configuration-cache --no-build-cache

The error is because your cache of previous builds and first time with configuration cache have problems. If you have similar errors, use the flag. ASCII doctor task as I mentioned, is a problem because it is incompatible.

The error the CI has is a NPE in a unit test of session PostgreSQL, I think the docker database is dirty between tests.

Going to do rebase in a few hours 👋🏻

@kingg22 kingg22 force-pushed the 2492-build-configuration-cache branch from 533c040 to daa1316 Compare September 24, 2025 14:25
@kingg22 kingg22 force-pushed the 2492-build-configuration-cache branch 2 times, most recently from 663dca3 to cdc01e9 Compare October 2, 2025 00:41
@kingg22
Copy link
Contributor Author

kingg22 commented Oct 2, 2025

Hey @DavideD fixed the problem with examples checks, can u verify this? Rerun CI because only jdk 20 have problem this time ://

Remember use gradlew clean before and after clone. Your local cache can be broken/dirty.
If all is okey, remember use --no-configuration-cache --no-build-cache when publish releases and codeQL in CI, those tasks need complete build without cache. If u have problem with something, the same flag can help because ascii doctor plugin and groovy closures are not supported for cache.

Let me know any problems.

@DavideD
Copy link
Member

DavideD commented Oct 2, 2025

Hey @DavideD fixed the problem with examples checks, can u verify this? Rerun CI because only jdk 20 have problem this time ://

THanks, I will have a look at it soon.
It seems GitHub wasn't able to download the docker image, it can happen sometimes. I restarted the job

…with a custom test task

configuration of properties is set up before execute test and print a summary after suite. Without use of project is cacheable
… on demand, caching

run parallel don't have perfect support with test containers, have problems with ports
…re and explicit get input of properties

Gradle need to know all input and prevent side effect with dynamic behaviors
…ationTask with cache of inputs after [hibernate#2560]

Mark as incompatible with configuration cache because is AsciiDoctorTask
@kingg22 kingg22 force-pushed the 2492-build-configuration-cache branch from cdc01e9 to c0c2cea Compare October 2, 2025 15:11
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

Successfully merging this pull request may close these issues.

Enable Gradle Configuration Cache for Faster Builds
2 participants