Skip to content

M6 FIX: Require a username and password on the spring-boot-starter-security User - #16291

Merged
borinquenkid merged 3 commits into
apache:8.0.xfrom
codeconsole:fix/forge-security-user-nullable-8.0.x
Sep 2, 2026
Merged

borinquenkid merged 3 commits into
apache:8.0.xfrom
codeconsole:fix/forge-security-user-nullable-8.0.x

Conversation

@codeconsole

@codeconsole codeconsole commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Two defects in the spring-boot-starter-security User template, both of which only show up once you generate an app and run it.

1. The credentials were not actually required

Grails 8 makes an unconstrained persistent property nullable by default (documented in upgrading80x.adoc, "GORM Properties Are Nullable by Default"). The template was never updated for that flip, so its blank: false constraints no longer make the credentials required — a User with a null username and a null password validates clean, and the scaffolded user admin will save one.

Every other domain template in the forge already declares nullable: false, which is what makes this look like a miss rather than a choice:

Template Constraint
role.rocker.raw authority unique: true, nullable: false
userClassic.rocker.raw username unique: true, nullable: false / password nullable: false
userRole.rocker.raw user nullable: false / role nullable: false, unique: 'user'
user.rocker.raw username blank: false, unique: true ← missing
static constraints = {
    username nullable: false, blank: false, unique: true
    password nullable: false, blank: false, password: true
}

The generated spec failed out of the box

Creating an app with this feature produced a red build on the very first ./gradlew test:

UserSpec > username and password are required FAILED
    Condition not satisfied:
    !new User(username: '', password: '').validate()
    ||                                    |
    |example.User : (unsaved)             true
    false

The assertion exercised neither constraint it appeared to test. The domain map constructor binds through data binding with convertEmptyStringsToNull, so username: '' arrives as null — the blank constraint never sees an empty string — and nullable-by-default then let the nulls through.

The spec now covers the two constraints as separate features, assigning the blank values directly since that is the only way a blank string actually reaches the property:

void 'a user whose username and password are blank is rejected'() {
    given: 'the values are assigned directly, since the map constructor binds an empty string to null'
    User user = new User()
    user.username = ''
    user.password = ''

    expect:
    !user.validate()

    and:
    with(user.errors) {
        getFieldError('username').code == 'blank'
        getFieldError('password').code == 'blank'
    }
}

2. The mapping directive did not match the data store

The template emitted table 'users' for every data implementation, but table is a Hibernate directive. On MongoDB it is silently ignored, so the reason it is there — don't name the persistence unit user, a reserved word in PostgreSQL, H2 and SQL Server — was lost exactly where nothing warns about it. Reading the embedded MongoDB of a generated app, before and after:

Directive Collections created docs in users docs in user
table 'users' ["user.next_id", "user"] 0 2
collection 'users' ["users.next_id", "users"] 2 0

The directive is now chosen from the selected features, the way GrailsBase and DatabaseMigrationPlugin already do, rather than from the gorm option — so it holds whether the implementation was picked with --data or by naming the feature:

@if (features.contains("gorm-mongodb")) {
    static mapping = {
        collection 'users'
    }

} else if (features.contains("gorm-hibernate5") || features.contains("gorm-hibernate7")) {
    static mapping = {
        table 'users'
    }

}

Hibernate 5 and 7 keep table 'users', so the default app is unchanged. Neo4j gets no mapping block rather than a directive it does not understand.

Verification

Generated a real app (create-app --data mongodb --features spring-boot-starter-security --jdk 25) and ran it, rather than only asserting on template text:

  • :grails-forge-core:test — 347 tests, 0 failures
  • grails-forge codeStyle — clean
  • Generated app's UserSpec — 4/4 pass
  • Reverting nullable: false and re-running makes the nullable feature fail, so the new spec is not vacuous. The blank feature passes either way — blank: false was always correct; the nullable gap was the whole defect.
  • Each rendered variant is parsed to Phases.CONVERSION to confirm it is valid Groovy; that check caught a swallowed blank line before static constraints that the contains assertions did not.
  • New tests unroll across HIBERNATE5 / HIBERNATE7 / MONGODB, asserting both the expected directive and that the other one does not leak in, plus a Neo4j case asserting no mapping block.

The app was also exercised end to end on embedded MongoDB: / anonymous 200, /user anonymous redirects to login, form login succeeds, /user as ROLE_ADMIN 200, /user as ROLE_USER 403.

Grails 8 makes an unconstrained persistent property nullable by default
(upgrading80x.adoc, "GORM Properties Are Nullable by Default"), so the
template's `blank: false` constraints stopped making the credentials
required: a User with a null username and a null password validated
clean, and the scaffolded admin would happily save one. Every other
domain template in the forge -- role, userClassic, userRole -- already
declares `nullable: false`; this one was missed when the default flipped.

The generated UserSpec failed out of the box for the same reason. Its
`!new User(username: '', password: '').validate()` never exercised the
blank constraint at all: the map constructor binds through data binding
with convertEmptyStringsToNull, so both values arrived as null and then
passed. Assign the blank values directly, which is the only way a blank
string reaches the property, and cover the nullable case as its own
feature so the two constraints are asserted separately.
The template emitted `table 'users'` for every data implementation, but
`table` is a Hibernate directive. On MongoDB it was silently ignored, so
the intent behind it -- don't name the persistence unit `user`, which is
a reserved word in PostgreSQL, H2 and SQL Server -- was lost exactly
where nothing warned about it. Booting a generated mongodb app showed
the documents landing in a `user` collection; with `collection 'users'`
they land in `users`.

Pick the directive from the selected features, the way GrailsBase and
DatabaseMigrationPlugin already do, rather than from the gorm option, so
it holds whether the implementation was chosen with --data or by naming
the feature. Hibernate 5 and 7 keep `table 'users'`, MongoDB gets
`collection 'users'`, and a store that uses neither -- Neo4j -- gets no
mapping block at all rather than a directive it does not understand.
@codeconsole codeconsole changed the title Require a username and password on the spring-boot-starter-security User M6 FIX: Require a username and password on the spring-boot-starter-security User Sep 1, 2026
@codecov

codecov Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.7484%. Comparing base (b0c351b) to head (efb3310).
⚠️ Report is 2 commits behind head on 8.0.x.

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                 @@
##                8.0.x     #16291        +/-   ##
==================================================
+ Coverage     54.7060%   54.7484%   +0.0424%     
- Complexity      20427      20475        +48     
==================================================
  Files            2101       2103         +2     
  Lines          100978     101077        +99     
  Branches        17907      17928        +21     
==================================================
+ Hits            55241      55338        +97     
+ Misses          37872      37861        -11     
- Partials         7865       7878        +13     

see 9 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…derstands

The classic User/Role/UserRole domain model shared by grails-spring-security
and grails-spring-security-ui hardcoded a Hibernate-only `table` mapping
directive, same defect this PR already fixes for the spring-boot-starter-security
User template. Neither feature is restricted to Hibernate, so selecting
gorm-mongodb alongside either one silently dropped the directive.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K4Wxz1HXEyfVWGm52jzvpR
@testlens-app

testlens-app Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

🚨 TestLens detected 9 failed tests 🚨

Here is what you can do:

  1. Inspect the test failures carefully.
  2. If you are convinced that some of the tests are flaky, you can mute them below.
  3. Finally, trigger a rerun by checking the rerun checkbox.

Test Summary

CI / Build Grails Forge (Java 21, indy=false) > :grails-forge-cli:test [grails-forge]

Test Runs Flakiness
CreateControllerCommandSpec > test app with controller ❌ 1% 🟡
CreateDomainClassCommandSpec > test app with domain ❌ 1% 🟡
CreateInterceptorCommandSpec > test app with interceptor ❌ 1% 🟡
CreateServiceCommandSpec > test app with service ❌ 1% 🟡
CreateTagLibCommandSpec > test app with taglib ❌ 1% 🟡

CI / Build Grails Forge (Java 21, indy=false) > :test-core:test [grails-forge]

Test Runs Flakiness
CreateAppSpec > test basic create-app build task ❌ 1% 🟡
CreateRestApiSpec > test rest-api app with default json-views ❌ 1% 🟡
ScaffoldingSpec > test generate-controller command ❌ 1% 🟡

Groovy Snapshot Canary Build / Build Grails (shard 2) > :grails-test-examples-scaffolding:integrationTest

Test Runs Flakiness
UserControllerSpec > User list ❌ 4% 🟡

🏷️ Commit: efb3310
▶️ Tests: 58986 executed
🟡 Checks: 63/84 completed

Test Failures

UserControllerSpec > User list (:grails-test-examples-scaffolding:integrationTest in Groovy Snapshot Canary Build / Build Grails (shard 2))
geb.waiting.WaitTimeoutException: condition did not pass in 30 seconds (failed with exception)
	at geb.waiting.Wait.waitFor(Wait.groovy:128)
	at geb.waiting.DefaultWaitingSupport.doWaitFor(DefaultWaitingSupport.groovy:55)
	at geb.waiting.DefaultWaitingSupport.waitFor(DefaultWaitingSupport.groovy:41)
	at geb.Page.waitFor(Page.groovy:120)
	at com.example.pages.LoginPage.login(LoginPage.groovy:39)
	at com.example.UserControllerSpec.User list(UserControllerSpec.groovy:48)
Caused by: Assertion failed: 

title != pageTitle && $('input', name: 'username').empty
|     |  |         |
|     |  |         false
|     |  'Please sign in'
|     false
'Please sign in'

	at com.example.pages.LoginPage.login_closure1(LoginPage.groovy:39)
	at com.example.pages.LoginPage.login_closure1(LoginPage.groovy)
	at geb.waiting.Wait.waitFor(Wait.groovy:117)
	... 5 more
CreateAppSpec > test basic create-app build task (:test-core:test [grails-forge] in CI / Build Grails Forge (Java 21, indy=false))
org.gradle.testkit.runner.UnexpectedBuildFailure: Unexpected build execution failure in /tmp/test-app6061168876148425516 with arguments [build, -x, integrationTest]

Output:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'test-app6061168876148425516'.
> Could not resolve all artifacts for configuration 'classpath'.
   > Could not find cloud.wondrify:asset-pipeline-gradle:.
     Required by:
         buildscript of root project 'test-app6061168876148425516'
   > Could not resolve org.apache.grails:grails-bom:8.0.0-SNAPSHOT.
     Required by:
         buildscript of root project 'test-app6061168876148425516'
      > Could not resolve org.apache.grails:grails-bom:8.0.0-SNAPSHOT.
         > Could not parse POM /home/runner/work/grails-core/grails-core/build/local-maven/org/apache/grails/grails-bom/8.0.0-SNAPSHOT/grails-bom-8.0.0-20260902.021600-1.pom
            > Could not resolve org.apache.grails:grails-base-bom:8.0.0-SNAPSHOT.
               > Could not resolve org.apache.grails:grails-base-bom:8.0.0-SNAPSHOT.
                  > Could not parse POM /home/runner/work/grails-core/grails-core/build/local-maven/org/apache/grails/grails-base-bom/8.0.0-SNAPSHOT/grails-base-bom-8.0.0-20260902.021600-1.pom
                     > Could not resolve org.springframework.boot:spring-boot-dependencies:4.1.1.
                        > Could not resolve org.springframework.boot:spring-boot-dependencies:4.1.1.
                           > Could not get resource 'https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-dependencies/4.1.1/spring-boot-dependencies-4.1.1.pom'.
                              > Could not GET 'https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-dependencies/4.1.1/spring-boot-dependencies-4.1.1.pom'. Received status code 429 from server: Too Many Requests
   > Could not find org.apache.grails:grails-data-hibernate5:.
     Required by:
         buildscript of root project 'test-app6061168876148425516'
   > Could not find org.apache.grails:grails-gradle-plugins:.
     Required by:
         buildscript of root project 'test-app6061168876148425516'
> There are 2 more failures with identical causes.

* 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 from a Build Scan (powered by Develocity).
> Get more help at https://help.gradle.org.

BUILD FAILED in 18s

	at org.gradle.testkit.runner.internal.DefaultGradleRunner.lambda$build$2(DefaultGradleRunner.java:275)
	at org.gradle.testkit.runner.internal.DefaultGradleRunner.run(DefaultGradleRunner.java:374)
	at org.gradle.testkit.runner.internal.DefaultGradleRunner.build(DefaultGradleRunner.java:273)
	at org.grails.forge.utils.CommandSpec.executeGradle(CommandSpec.groovy:79)
	at org.grails.forge.create.CreateAppSpec.test basic create-app build task(CreateAppSpec.groovy:49)
CreateControllerCommandSpec > test app with controller (:grails-forge-cli:test [grails-forge] in CI / Build Grails Forge (Java 21, indy=false))
Condition failed with Exception:

testOutputContains('BUILD SUCCESSFUL')
|
java.lang.AssertionError: Timed out after 600s waiting for the generated build to produce [BUILD SUCCESSFUL]; the build was still running.
Build output:
To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/9.6.0/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.
Daemon will be stopped at the end of the build 
gradle/actions: Writing build results to /home/runner/work/_temp/.gradle-actions/build-results/__run_3-1788317257166.json
 
	at org.grails.forge.cli.CommandSpec.testOutputContains(CommandSpec.groovy:105)
	at org.grails.forge.cli.command.CreateControllerCommandSpec.test app with controller(CreateControllerCommandSpec.groovy:73)

	at org.grails.forge.cli.command.CreateControllerCommandSpec.test app with controller(CreateControllerCommandSpec.groovy:73)
Caused by: java.lang.AssertionError: Timed out after 600s waiting for the generated build to produce [BUILD SUCCESSFUL]; the build was still running.
Build output:
To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/9.6.0/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.
Daemon will be stopped at the end of the build 
gradle/actions: Writing build results to /home/runner/work/_temp/.gradle-actions/build-results/__run_3-1788317257166.json

	at org.grails.forge.cli.CommandSpec.testOutputContains(CommandSpec.groovy:105)
	... 1 more
CreateDomainClassCommandSpec > test app with domain (:grails-forge-cli:test [grails-forge] in CI / Build Grails Forge (Java 21, indy=false))
Condition failed with Exception:

testOutputContains("BUILD SUCCESSFUL")
|
java.lang.AssertionError: Timed out after 600s waiting for the generated build to produce [BUILD SUCCESSFUL]; the build was still running.
Build output:
To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/9.6.0/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.
Daemon will be stopped at the end of the build 
gradle/actions: Writing build results to /home/runner/work/_temp/.gradle-actions/build-results/__run_3-1788317255310.json
 
	at org.grails.forge.cli.CommandSpec.testOutputContains(CommandSpec.groovy:105)
	at org.grails.forge.cli.command.CreateDomainClassCommandSpec.test app with domain(CreateDomainClassCommandSpec.groovy:86)

	at org.grails.forge.cli.command.CreateDomainClassCommandSpec.test app with domain(CreateDomainClassCommandSpec.groovy:86)
Caused by: java.lang.AssertionError: Timed out after 600s waiting for the generated build to produce [BUILD SUCCESSFUL]; the build was still running.
Build output:
To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/9.6.0/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.
Daemon will be stopped at the end of the build 
gradle/actions: Writing build results to /home/runner/work/_temp/.gradle-actions/build-results/__run_3-1788317255310.json

	at org.grails.forge.cli.CommandSpec.testOutputContains(CommandSpec.groovy:105)
	... 1 more
CreateInterceptorCommandSpec > test app with interceptor (:grails-forge-cli:test [grails-forge] in CI / Build Grails Forge (Java 21, indy=false))
Condition failed with Exception:

testOutputContains("BUILD SUCCESSFUL")
|
java.lang.AssertionError: Timed out after 600s waiting for the generated build to produce [BUILD SUCCESSFUL]; the build was still running.
Build output:
To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/9.6.0/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.
Daemon will be stopped at the end of the build 
gradle/actions: Writing build results to /home/runner/work/_temp/.gradle-actions/build-results/__run_3-1788317259028.json
 
	at org.grails.forge.cli.CommandSpec.testOutputContains(CommandSpec.groovy:105)
	at org.grails.forge.cli.command.CreateInterceptorCommandSpec.test app with interceptor(CreateInterceptorCommandSpec.groovy:84)

	at org.grails.forge.cli.command.CreateInterceptorCommandSpec.test app with interceptor(CreateInterceptorCommandSpec.groovy:84)
Caused by: java.lang.AssertionError: Timed out after 600s waiting for the generated build to produce [BUILD SUCCESSFUL]; the build was still running.
Build output:
To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/9.6.0/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.
Daemon will be stopped at the end of the build 
gradle/actions: Writing build results to /home/runner/work/_temp/.gradle-actions/build-results/__run_3-1788317259028.json

	at org.grails.forge.cli.CommandSpec.testOutputContains(CommandSpec.groovy:105)
	... 1 more
CreateRestApiSpec > test rest-api app with default json-views (:test-core:test [grails-forge] in CI / Build Grails Forge (Java 21, indy=false))
org.gradle.testkit.runner.UnexpectedBuildFailure: Unexpected build execution failure in /tmp/testrestapi7079986006037761513 with arguments [build]

Output:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'testrestapi7079986006037761513'.
> Could not resolve all artifacts for configuration 'classpath'.
   > Could not resolve org.apache.grails:grails-bom:8.0.0-SNAPSHOT.
     Required by:
         buildscript of root project 'testrestapi7079986006037761513'
      > Could not resolve org.apache.grails:grails-bom:8.0.0-SNAPSHOT.
         > Could not parse POM /home/runner/work/grails-core/grails-core/build/local-maven/org/apache/grails/grails-bom/8.0.0-SNAPSHOT/grails-bom-8.0.0-20260902.021600-1.pom
            > Could not resolve org.apache.grails:grails-base-bom:8.0.0-SNAPSHOT.
               > Could not resolve org.apache.grails:grails-base-bom:8.0.0-SNAPSHOT.
                  > Could not parse POM /home/runner/work/grails-core/grails-core/build/local-maven/org/apache/grails/grails-base-bom/8.0.0-SNAPSHOT/grails-base-bom-8.0.0-20260902.021600-1.pom
                     > Could not resolve org.springframework.boot:spring-boot-dependencies:4.1.1.
                        > Could not resolve org.springframework.boot:spring-boot-dependencies:4.1.1.
                           > Could not get resource 'https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-dependencies/4.1.1/spring-boot-dependencies-4.1.1.pom'.
                              > Could not GET 'https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-dependencies/4.1.1/spring-boot-dependencies-4.1.1.pom'. Received status code 429 from server: Too Many Requests
   > Could not find org.apache.grails:grails-data-hibernate5:.
     Required by:
         buildscript of root project 'testrestapi7079986006037761513'
   > Could not find org.apache.grails:grails-gradle-plugins:.
     Required by:
         buildscript of root project 'testrestapi7079986006037761513'
> There are 2 more failures with identical causes.

* 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 from a Build Scan (powered by Develocity).
> Get more help at https://help.gradle.org.

BUILD FAILED in 18s

	at org.gradle.testkit.runner.internal.DefaultGradleRunner.lambda$build$2(DefaultGradleRunner.java:275)
	at org.gradle.testkit.runner.internal.DefaultGradleRunner.run(DefaultGradleRunner.java:374)
	at org.gradle.testkit.runner.internal.DefaultGradleRunner.build(DefaultGradleRunner.java:273)
	at org.grails.forge.utils.CommandSpec.executeGradle(CommandSpec.groovy:79)
	at org.grails.forge.create.CreateRestApiSpec.test rest-api app with default json-views(CreateRestApiSpec.groovy:30)
CreateServiceCommandSpec > test app with service (:grails-forge-cli:test [grails-forge] in CI / Build Grails Forge (Java 21, indy=false))
Condition failed with Exception:

testOutputContains("TestServiceSpec > test something FAILED")
|
java.lang.AssertionError: Timed out after 600s waiting for the generated build to produce [TestServiceSpec > test something FAILED]; the build was still running.
Build output:
To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/9.6.0/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.
Daemon will be stopped at the end of the build 
gradle/actions: Writing build results to /home/runner/work/_temp/.gradle-actions/build-results/__run_3-1788317848128.json
 
	at org.grails.forge.cli.CommandSpec.testOutputContains(CommandSpec.groovy:105)
	at org.grails.forge.cli.command.CreateServiceCommandSpec.test app with service(CreateServiceCommandSpec.groovy:73)

	at org.grails.forge.cli.command.CreateServiceCommandSpec.test app with service(CreateServiceCommandSpec.groovy:73)
Caused by: java.lang.AssertionError: Timed out after 600s waiting for the generated build to produce [TestServiceSpec > test something FAILED]; the build was still running.
Build output:
To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/9.6.0/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.
Daemon will be stopped at the end of the build 
gradle/actions: Writing build results to /home/runner/work/_temp/.gradle-actions/build-results/__run_3-1788317848128.json

	at org.grails.forge.cli.CommandSpec.testOutputContains(CommandSpec.groovy:105)
	... 1 more
CreateTagLibCommandSpec > test app with taglib (:grails-forge-cli:test [grails-forge] in CI / Build Grails Forge (Java 21, indy=false))
Condition failed with Exception:

testOutputContains("SimpleTagLibSpec > test simple tag as method FAILED")
|
java.lang.AssertionError: Timed out after 600s waiting for the generated build to produce [SimpleTagLibSpec > test simple tag as method FAILED]; the build was still running.
Build output:
To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/9.6.0/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.
Daemon will be stopped at the end of the build 
gradle/actions: Writing build results to /home/runner/work/_temp/.gradle-actions/build-results/__run_3-1788317853737.json
 
	at org.grails.forge.cli.CommandSpec.testOutputContains(CommandSpec.groovy:105)
	at org.grails.forge.cli.command.CreateTagLibCommandSpec.test app with taglib(CreateTagLibCommandSpec.groovy:79)

	at org.grails.forge.cli.command.CreateTagLibCommandSpec.test app with taglib(CreateTagLibCommandSpec.groovy:79)
Caused by: java.lang.AssertionError: Timed out after 600s waiting for the generated build to produce [SimpleTagLibSpec > test simple tag as method FAILED]; the build was still running.
Build output:
To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/9.6.0/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.
Daemon will be stopped at the end of the build 
gradle/actions: Writing build results to /home/runner/work/_temp/.gradle-actions/build-results/__run_3-1788317853737.json

	at org.grails.forge.cli.CommandSpec.testOutputContains(CommandSpec.groovy:105)
	... 1 more
ScaffoldingSpec > test generate-controller command (:test-core:test [grails-forge] in CI / Build Grails Forge (Java 21, indy=false))
org.gradle.testkit.runner.UnexpectedBuildFailure: Unexpected build execution failure in /tmp/testapp14319169338435500906 with arguments [runCommand, -Pargs=generate-controller example.grails.Bird]

Output:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'testapp14319169338435500906'.
> Could not resolve all artifacts for configuration 'classpath'.
   > Could not find cloud.wondrify:asset-pipeline-gradle:.
     Required by:
         buildscript of root project 'testapp14319169338435500906'
   > Could not resolve org.apache.grails:grails-bom:8.0.0-SNAPSHOT.
     Required by:
         buildscript of root project 'testapp14319169338435500906'
      > Could not resolve org.apache.grails:grails-bom:8.0.0-SNAPSHOT.
         > Could not parse POM /home/runner/work/grails-core/grails-core/build/local-maven/org/apache/grails/grails-bom/8.0.0-SNAPSHOT/grails-bom-8.0.0-20260902.021600-1.pom
            > Could not resolve org.apache.grails:grails-base-bom:8.0.0-SNAPSHOT.
               > Could not resolve org.apache.grails:grails-base-bom:8.0.0-SNAPSHOT.
                  > Could not parse POM /home/runner/work/grails-core/grails-core/build/local-maven/org/apache/grails/grails-base-bom/8.0.0-SNAPSHOT/grails-base-bom-8.0.0-20260902.021600-1.pom
                     > Could not resolve org.springframework.boot:spring-boot-dependencies:4.1.1.
                        > Could not resolve org.springframework.boot:spring-boot-dependencies:4.1.1.
                           > Could not get resource 'https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-dependencies/4.1.1/spring-boot-dependencies-4.1.1.pom'.
                              > Could not GET 'https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-dependencies/4.1.1/spring-boot-dependencies-4.1.1.pom'. Received status code 429 from server: Too Many Requests
   > Could not find org.apache.grails:grails-data-hibernate5:.
     Required by:
         buildscript of root project 'testapp14319169338435500906'
   > Could not find org.apache.grails:grails-gradle-plugins:.
     Required by:
         buildscript of root project 'testapp14319169338435500906'
> There are 2 more failures with identical causes.

* 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 from a Build Scan (powered by Develocity).
> Get more help at https://help.gradle.org.

BUILD FAILED in 18s

	at org.gradle.testkit.runner.internal.DefaultGradleRunner.lambda$build$2(DefaultGradleRunner.java:275)
	at org.gradle.testkit.runner.internal.DefaultGradleRunner.run(DefaultGradleRunner.java:374)
	at org.gradle.testkit.runner.internal.DefaultGradleRunner.build(DefaultGradleRunner.java:273)
	at org.grails.forge.utils.CommandSpec.executeGradle(CommandSpec.groovy:84)
	at org.grails.forge.features.scaffolding.ScaffoldingSpec.test generate-controller command(ScaffoldingSpec.groovy:41)

Rerun Controls

Note

Checks are currently running using the configuration below.

Select tests to mute in this pull request:

🔲 CreateAppSpec > test basic create-app build task
🔲 CreateControllerCommandSpec > test app with controller
🔲 CreateDomainClassCommandSpec > test app with domain
🔲 CreateInterceptorCommandSpec > test app with interceptor
🔲 CreateRestApiSpec > test rest-api app with default json-views
🔲 CreateServiceCommandSpec > test app with service
🔲 CreateTagLibCommandSpec > test app with taglib
🔲 ScaffoldingSpec > test generate-controller command
🔲 UserControllerSpec > User list

Reuse successful test results:

🔲 ♻️ Only rerun the tests that failed or were muted before

Click the checkbox to trigger a rerun:

🔲 Rerun jobs


Learn more about TestLens at testlens.app/docs.

@borinquenkid borinquenkid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the nullable/blank constraint fix and the Hibernate/MongoDB mapping-directive fix for spring-boot-starter-security's User template.

Also pushed a follow-up commit extending the same mapping-directive fix to the classic User/Role/UserRole model shared by grails-spring-security and grails-spring-security-ui (userClassic.rocker.raw), which had the identical Hibernate-only table directive and no validator restricting it from MongoDB. Added matching test coverage in GrailsSpringSecuritySpec for Hibernate5/7, MongoDB, and Neo4j. All targeted tests pass and codeStyle is clean.

@borinquenkid
borinquenkid merged commit c1b532a into apache:8.0.x Sep 2, 2026
77 of 79 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants