Skip to content

feat: wire Neo4j adapter to GormRegistry O(M+N) scaling#15784

Closed
borinquenkid wants to merge 1 commit into
feat/gorm-registry-mongodbfrom
feat/gorm-registry-neo4j
Closed

feat: wire Neo4j adapter to GormRegistry O(M+N) scaling#15784
borinquenkid wants to merge 1 commit into
feat/gorm-registry-mongodbfrom
feat/gorm-registry-neo4j

Conversation

@borinquenkid

Copy link
Copy Markdown
Member

Summary

Wires the Neo4j adapter into the GormRegistry introduced in #15780.

  • Neo4jGormEnhancer — registers Neo4j GORM APIs with GormRegistry via the standard factory pattern
  • Updated Neo4j TCK specs and affected tests to use the registry-based API path
  • Unit test: Neo4jTenantContextProfilingSpec

Test plan

  • ./gradlew :grails-data-neo4j:test passes
  • TCK suite passes with Neo4j datastore

Stack

🤖 Generated with Claude Code

@borinquenkid borinquenkid force-pushed the feat/gorm-registry-mongodb branch from 59e2f00 to 371b1c9 Compare June 27, 2026 17:36
@borinquenkid borinquenkid force-pushed the feat/gorm-registry-neo4j branch from a5b4e3c to 2895797 Compare June 27, 2026 17:37
@borinquenkid borinquenkid force-pushed the feat/gorm-registry-mongodb branch from 371b1c9 to cf60629 Compare June 27, 2026 18:14
@borinquenkid borinquenkid force-pushed the feat/gorm-registry-neo4j branch from 2895797 to 6196ff4 Compare June 27, 2026 18:15
@borinquenkid borinquenkid force-pushed the feat/gorm-registry-mongodb branch from cf60629 to 6d7070a Compare June 27, 2026 20:46
@borinquenkid borinquenkid force-pushed the feat/gorm-registry-neo4j branch from 6196ff4 to c9dcec4 Compare June 27, 2026 20:47
@borinquenkid borinquenkid force-pushed the feat/gorm-registry-mongodb branch from 6d7070a to a597040 Compare June 27, 2026 22:03
@borinquenkid borinquenkid force-pushed the feat/gorm-registry-neo4j branch from c9dcec4 to ebf332f Compare June 27, 2026 22:03
@borinquenkid borinquenkid force-pushed the feat/gorm-registry-mongodb branch from a597040 to 4e0ed09 Compare June 27, 2026 22:23
@borinquenkid borinquenkid force-pushed the feat/gorm-registry-neo4j branch from ebf332f to 29b8210 Compare June 27, 2026 22:23
@borinquenkid borinquenkid force-pushed the feat/gorm-registry-mongodb branch from 4e0ed09 to 6504e90 Compare June 27, 2026 22:58
@borinquenkid borinquenkid force-pushed the feat/gorm-registry-neo4j branch 2 times, most recently from acf540c to f6cae14 Compare June 28, 2026 00:19
@borinquenkid borinquenkid force-pushed the feat/gorm-registry-mongodb branch from 6504e90 to 84a342e Compare June 28, 2026 00:53
@borinquenkid borinquenkid force-pushed the feat/gorm-registry-neo4j branch from f6cae14 to 465c3bd Compare June 28, 2026 00:53
Register Neo4j GORM APIs with GormRegistry in Neo4jGormEnhancer and update
affected Neo4j tests and TCK specs to use the registry-based API path.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@borinquenkid borinquenkid force-pushed the feat/gorm-registry-mongodb branch from 84a342e to d4c2ea1 Compare June 28, 2026 01:36
@borinquenkid borinquenkid force-pushed the feat/gorm-registry-neo4j branch from 465c3bd to fe887a3 Compare June 28, 2026 01:36
@testlens-app

testlens-app Bot commented Jun 28, 2026

Copy link
Copy Markdown

🚨 TestLens detected 49 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-Core (macos-latest, 21) > :grails-data-graphql-core:test

Test Runs
CreateEntityDataFetcherSpec > test get
DeleteEntityDataFetcherSpec > test get
DeleteEntityDataFetcherSpec > test get invalid
EntityDataFetcherSpec
SingleEntityDataFetcherSpec
SoftDeleteEntityDataFetcherSpec
UpdateEntityDataFetcherSpec > test get
UpdateEntityDataFetcherSpec > test optimistic locking
UpdateEntityDataFetcherSpec > test optimistic locking with null version

CI / Build Grails-Core (macos-latest, 21) > :grails-datamapping-core:test

Test Runs
GormEnhancerAllQualifiersSpec > registerEntity can resolve through injected registry without touching global singleton
GormRegistrySpec > test withTenant and exists with multi-tenant entity in DISCRIMINATOR mode
TenantContextProfilingSpec > profile tenant wrapping overhead

CI / Build Grails-Core (ubuntu-latest, 21) > :grails-data-graphql-core:test

Test Runs
CreateEntityDataFetcherSpec > test get
DeleteEntityDataFetcherSpec > test get
DeleteEntityDataFetcherSpec > test get invalid
EntityDataFetcherSpec
SingleEntityDataFetcherSpec
SoftDeleteEntityDataFetcherSpec
UpdateEntityDataFetcherSpec > test get
UpdateEntityDataFetcherSpec > test optimistic locking
UpdateEntityDataFetcherSpec > test optimistic locking with null version

CI / Build Grails-Core (ubuntu-latest, 21) > :grails-datamapping-core:test

Test Runs
GormEnhancerAllQualifiersSpec > registerEntity can resolve through injected registry without touching global singleton

CI / Build Grails-Core (ubuntu-latest, 25) > :grails-data-graphql-core:test

Test Runs
CreateEntityDataFetcherSpec > test get
DeleteEntityDataFetcherSpec > test get
DeleteEntityDataFetcherSpec > test get invalid
EntityDataFetcherSpec
SingleEntityDataFetcherSpec
SoftDeleteEntityDataFetcherSpec
UpdateEntityDataFetcherSpec > test get
UpdateEntityDataFetcherSpec > test optimistic locking
UpdateEntityDataFetcherSpec > test optimistic locking with null version

CI / Build Grails-Core (windows-latest, 25) > :grails-data-graphql-core:test

Test Runs
CreateEntityDataFetcherSpec > test get
DeleteEntityDataFetcherSpec > test get
DeleteEntityDataFetcherSpec > test get invalid
EntityDataFetcherSpec
SingleEntityDataFetcherSpec
SoftDeleteEntityDataFetcherSpec
UpdateEntityDataFetcherSpec > test get
UpdateEntityDataFetcherSpec > test optimistic locking
UpdateEntityDataFetcherSpec > test optimistic locking with null version

CI / Build Grails-Core Rerunning all Tasks (ubuntu-latest, 21) > :grails-data-graphql-core:test

Test Runs
CreateEntityDataFetcherSpec > test get
DeleteEntityDataFetcherSpec > test get
DeleteEntityDataFetcherSpec > test get invalid
EntityDataFetcherSpec
SingleEntityDataFetcherSpec
SoftDeleteEntityDataFetcherSpec
UpdateEntityDataFetcherSpec > test get
UpdateEntityDataFetcherSpec > test optimistic locking
UpdateEntityDataFetcherSpec > test optimistic locking with null version

🏷️ Commit: fe887a3
▶️ Tests: 7106 executed
⚪️ Checks: 39/39 completed

Test Failures (first 10 of 49)

CreateEntityDataFetcherSpec > test get (:grails-data-graphql-core:test in CI / Build Grails-Core (macos-latest, 21))
java.lang.NullPointerException: Cannot invoke "org.grails.datastore.mapping.services.ServiceRegistry.getService(java.lang.Class)" because "datastore" is null
	at org.grails.gorm.graphql.fetcher.DefaultGormDataFetcher.withTransaction(DefaultGormDataFetcher.groovy:133)
	at org.grails.gorm.graphql.fetcher.impl.CreateEntityDataFetcher.get(CreateEntityDataFetcher.groovy:46)
	at org.grails.gorm.graphql.fetcher.impl.CreateEntityDataFetcherSpec.test get(CreateEntityDataFetcherSpec.groovy:42)
DeleteEntityDataFetcherSpec > test get (:grails-data-graphql-core:test in CI / Build Grails-Core (macos-latest, 21))
java.lang.NullPointerException: Cannot invoke "org.grails.orm.hibernate.AbstractHibernateDatastore.getConnectionSources()" because the return value of "groovy.lang.Reference.get()" is null
	at org.grails.orm.hibernate.AbstractHibernateGormStaticApi.withNewSession(AbstractHibernateGormStaticApi.groovy:118)
	at org.grails.datastore.gorm.GormEntity$Trait$Helper.withNewSession(GormEntity.groovy:1140)
	at org.grails.gorm.graphql.fetcher.impl.DeleteEntityDataFetcherSpec.test get(DeleteEntityDataFetcherSpec.groovy:53)
DeleteEntityDataFetcherSpec > test get invalid (:grails-data-graphql-core:test in CI / Build Grails-Core (macos-latest, 21))
Too few invocations for:

1 * getArgument('id') >> 95   (0 invocations)

Unmatched invocations (ordered by similarity):

None

Too few invocations for:

1 * getMergedField()   (0 invocations)

Unmatched invocations (ordered by similarity):

None


	at org.spockframework.mock.runtime.InteractionScope.verifyInteractions(InteractionScope.java:110)
	at org.spockframework.mock.runtime.MockController.leaveScope(MockController.java:95)
	at org.grails.gorm.graphql.fetcher.impl.DeleteEntityDataFetcherSpec.test get invalid(DeleteEntityDataFetcherSpec.groovy:74)
EntityDataFetcherSpec (:grails-data-graphql-core:test in CI / Build Grails-Core (macos-latest, 21))
java.lang.IllegalStateException: No PlatformTransactionManager set
	at org.springframework.util.Assert.state(Assert.java:80)
	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)
	at grails.gorm.transactions.GrailsTransactionTemplate.execute(GrailsTransactionTemplate.groovy:115)
	at org.grails.datastore.gorm.GormStaticApi.withTransaction(GormStaticApi.groovy:687)
	at org.grails.datastore.gorm.GormStaticApi.withNewTransaction(GormStaticApi.groovy:649)
	at org.grails.datastore.gorm.GormEntity$Trait$Helper.withNewTransaction(GormEntity.groovy:1063)
	at org.grails.gorm.graphql.fetcher.impl.EntityDataFetcherSpec.setupSpec(EntityDataFetcherSpec.groovy:32)
GormEnhancerAllQualifiersSpec > registerEntity can resolve through injected registry without touching global singleton (:grails-datamapping-core:test in CI / Build Grails-Core (macos-latest, 21))
Condition not satisfied:

injectedRegistry.resolveStaticApi(NonMultiTenantDefaultEntity) != null
|                |                |                            |
|                null             |                            false
|                                 class org.grails.datastore.gorm.GormEnhancerAllQualifiersSpec$NonMultiTenantDefaultEntity
<org.grails.datastore.gorm.GormRegistry@175a0f81 defaultApiFactory=org.grails.datastore.gorm.DefaultGormApiFactory@f308a2f apiResolver=org.grails.datastore.gorm.GormApiResolver@10fec61 staticApiRegistry=org.grails.datastore.gorm.GormStaticApiRegistry@466eddc6 instanceApiRegistry=org.grails.datastore.gorm.GormInstanceApiRegistry@6ee60495 validationApiRegistry=org.grails.datastore.gorm.GormValidationApiRegistry@650c9a94 datastoresByQualifier=[default:Mock for type 'Datastore' named 'datastore'] entityDatastores=[org.grails.datastore.gorm.GormEnhancerAllQualifiersSpec$NonMultiTenantDefaultEntity:[default:Mock for type 'Datastore' named 'datastore']] normalizedEntityKeysByClass=[class org.grails.datastore.gorm.GormEnhancerAllQualifiersSpec$NonMultiTenantDefaultEntity:org.grails.datastore.gorm.GormEnhancerAllQualifiersSpec$NonMultiTenantDefaultEntity] normalizedEntityKeysByName=[org.grails.datastore.gorm.GormEnhancerAllQualifiersSpec$NonMultiTenantDefaultEntity:org.grails.datastore.gorm.GormEnhancerAllQualifiersSpec$NonMultiTenantDefaultEntity] normalizedQualifiers=[default:default] datastoresByType=[class jdk.proxy3.$Proxy82:Mock for type 'Datastore' named 'datastore'] apiFactoriesByDatastoreType=[:] allDatastores=[Mock for type 'Datastore' named 'datastore']>

	at org.grails.datastore.gorm.GormEnhancerAllQualifiersSpec.registerEntity can resolve through injected registry without touching global singleton(GormEnhancerAllQualifiersSpec.groovy:229)
GormRegistrySpec > test withTenant and exists with multi-tenant entity in DISCRIMINATOR mode (:grails-datamapping-core:test in CI / Build Grails-Core (macos-latest, 21))
Condition not satisfied:

capturedTenantId == "tenant1"
|                |
initial          false
                 7 differences (0% similarity)
                 (i-)n(i-)t(ial)
                 (te)n(an)t(1--)

	at org.grails.datastore.gorm.GormRegistrySpec.test withTenant and exists with multi-tenant entity in DISCRIMINATOR mode(GormRegistrySpec.groovy:266)
expected actual
tenant1 initial
SingleEntityDataFetcherSpec (:grails-data-graphql-core:test in CI / Build Grails-Core (macos-latest, 21))
java.lang.IllegalStateException: No PlatformTransactionManager set
	at org.springframework.util.Assert.state(Assert.java:80)
	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)
	at grails.gorm.transactions.GrailsTransactionTemplate.execute(GrailsTransactionTemplate.groovy:115)
	at org.grails.datastore.gorm.GormStaticApi.withTransaction(GormStaticApi.groovy:687)
	at org.grails.datastore.gorm.GormStaticApi.withNewTransaction(GormStaticApi.groovy:649)
	at org.grails.datastore.gorm.GormEntity$Trait$Helper.withNewTransaction(GormEntity.groovy:1063)
	at org.grails.gorm.graphql.fetcher.impl.SingleEntityDataFetcherSpec.setupSpec(SingleEntityDataFetcherSpec.groovy:35)
SoftDeleteEntityDataFetcherSpec (:grails-data-graphql-core:test in CI / Build Grails-Core (macos-latest, 21))
java.lang.IllegalStateException: No PlatformTransactionManager set
	at org.springframework.util.Assert.state(Assert.java:80)
	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)
	at grails.gorm.transactions.GrailsTransactionTemplate.execute(GrailsTransactionTemplate.groovy:115)
	at org.grails.datastore.gorm.GormStaticApi.withTransaction(GormStaticApi.groovy:687)
	at org.grails.datastore.gorm.GormStaticApi.withNewTransaction(GormStaticApi.groovy:649)
	at org.grails.datastore.gorm.GormEntity$Trait$Helper.withNewTransaction(GormEntity.groovy:1063)
	at org.grails.gorm.graphql.fetcher.impl.SoftDeleteEntityDataFetcherSpec.setupSpec(SoftDeleteEntityDataFetcherSpec.groovy:36)
TenantContextProfilingSpec > profile tenant wrapping overhead (:grails-datamapping-core:test in CI / Build Grails-Core (macos-latest, 21))
groovy.lang.GroovyRuntimeException: Could not find matching constructor for: org.grails.datastore.gorm.GormStaticApi(Class, null, ArrayList, org.grails.datastore.gorm.TenantContextProfilingSpec$DummyStaticApi$1)
	at org.grails.datastore.gorm.TenantContextProfilingSpec$DummyStaticApi.<init>(TenantContextProfilingSpec.groovy:96)
	at org.grails.datastore.gorm.TenantContextProfilingSpec.profile tenant wrapping overhead(TenantContextProfilingSpec.groovy:51)
UpdateEntityDataFetcherSpec > test get (:grails-data-graphql-core:test in CI / Build Grails-Core (macos-latest, 21))
java.lang.NullPointerException: Cannot invoke "org.grails.datastore.mapping.services.ServiceRegistry.getService(java.lang.Class)" because "datastore" is null
	at org.grails.gorm.graphql.fetcher.DefaultGormDataFetcher.withTransaction(DefaultGormDataFetcher.groovy:133)
	at org.grails.gorm.graphql.fetcher.impl.UpdateEntityDataFetcher.get(UpdateEntityDataFetcher.groovy:48)
	at org.grails.gorm.graphql.fetcher.impl.UpdateEntityDataFetcherSpec.test get(UpdateEntityDataFetcherSpec.groovy:48)

Muted Tests (first 20 of 49)

Select tests to mute in this pull request:

  • CreateEntityDataFetcherSpec > test get
  • DeleteEntityDataFetcherSpec > test get
  • DeleteEntityDataFetcherSpec > test get invalid
  • EntityDataFetcherSpec
  • GormEnhancerAllQualifiersSpec > registerEntity can resolve through injected registry without touching global singleton
  • GormRegistrySpec > test withTenant and exists with multi-tenant entity in DISCRIMINATOR mode
  • SingleEntityDataFetcherSpec
  • SoftDeleteEntityDataFetcherSpec
  • TenantContextProfilingSpec > profile tenant wrapping overhead
  • UpdateEntityDataFetcherSpec > test get
  • UpdateEntityDataFetcherSpec > test optimistic locking
  • UpdateEntityDataFetcherSpec > test optimistic locking with null version

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.

@borinquenkid

Copy link
Copy Markdown
Member Author

Closing as part of consolidating the GormRegistry work into #15780. Neo4j is a separate Gradle build that resolves GORM via published artifacts, so its GormRegistry wiring will be a separate follow-up once core publishes — it cannot be built/verified within this stack. Closing as superseded here; the branch is retained for reference (not deleted).

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.

1 participant