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

HSEARCH-4403 Support ORM's discriminator-based multi-tenancy in the outbox-polling module #3610

Merged
merged 6 commits into from
Sep 20, 2023

Conversation

marko-bekhta
Copy link
Member

https://hibernate.atlassian.net/browse/HSEARCH-4403

Opening as a draft as this won't work for now while the changes are not applied to ORM

@yrodiere yrodiere changed the title HSEARCH-4403 Add tenant id to outbox event/agent entities HSEARCH-4403 Support ORM's discriminator-based multi-tenancy in the outbox-polling module Aug 3, 2023
Copy link
Member

@yrodiere yrodiere left a comment

Choose a reason for hiding this comment

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

Some early comments while we're waiting for the necessary changes to be merged in Hibernate ORM :)

And BTW, you might want to ping someone so that it's merged before 6.3.0.Final gets released...

@marko-bekhta marko-bekhta force-pushed the feat/HSEARCH-4403-multi-tenancy branch from d79771a to 758e9e0 Compare August 11, 2023 17:52
@marko-bekhta
Copy link
Member Author

waiting for the fix from hibernate/hibernate-orm#7171

@marko-bekhta marko-bekhta force-pushed the feat/HSEARCH-4403-multi-tenancy branch 3 times, most recently from e597f9c to 053fbb0 Compare September 4, 2023 08:59
@yrodiere
Copy link
Member

yrodiere commented Sep 5, 2023

Looks like it's failing:

[ERROR] --[ Constraint Violation ]-----------------------------------------

[ERROR] Constraint: hsearch:TypesMayNotDependOnImplementationTypeFromOtherModules

[ERROR] Severity: MAJOR

[ERROR] Number of rows: 2

[ERROR]             Main (non-test) types must not depend on implementation types from other modules.

[ERROR]             SPIs must be used for such dependencies.

[ERROR]             Exceptions are allowed only when the dependency type is in a util module,

[ERROR]             or the depending type is a test type.

[ERROR]         

[ERROR]   artifact1=org.hibernate.search:hibernate-search-mapper-orm-coordination-outbox-polling:jar:7.0.0-SNAPSHOT, type1=org.hibernate.search.mapper.orm.coordination.outboxpolling.cluster.impl.OutboxPollingAgentAdditionalJaxbMappingProducer, artifact2=org.hibernate.search:hibernate-search-mapper-orm:jar:7.0.0-SNAPSHOT, type2=org.hibernate.search.mapper.orm.common.impl.HibernateOrmUtils

[ERROR]   artifact1=org.hibernate.search:hibernate-search-mapper-orm-coordination-outbox-polling:jar:7.0.0-SNAPSHOT, type1=org.hibernate.search.mapper.orm.coordination.outboxpolling.event.impl.OutboxPollingOutboxEventAdditionalJaxbMappingProducer, artifact2=org.hibernate.search:hibernate-search-mapper-orm:jar:7.0.0-SNAPSHOT, type2=org.hibernate.search.mapper.orm.common.impl.HibernateOrmUtils

I guess you can have separate utils directly in the outbox-polling module if necessary

@marko-bekhta marko-bekhta force-pushed the feat/HSEARCH-4403-multi-tenancy branch 2 times, most recently from a499040 to 3e24d47 Compare September 6, 2023 15:23
@marko-bekhta
Copy link
Member Author

will need ORM 6.3.1 for this one 🙈

@yrodiere
Copy link
Member

will need ORM 6.3.1 for this one 🙈

That's... annoying. We may have to postpone to Search 7.1 then. We'll see.

@marko-bekhta
Copy link
Member Author

I've added a patch to ORM; the info on the preferred id JDBC type wasn't passed further from the XML....
But there's also a difference in behaviour with long32varbinary.. maybe let's talk about that today

@marko-bekhta marko-bekhta force-pushed the feat/HSEARCH-4403-multi-tenancy branch 2 times, most recently from 38c27a8 to e0175ad Compare September 14, 2023 05:47
Copy link
Member

@yrodiere yrodiere left a comment

Choose a reason for hiding this comment

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

Thanks. A few comments on the latest version :)

@marko-bekhta marko-bekhta force-pushed the feat/HSEARCH-4403-multi-tenancy branch 2 times, most recently from b31ce6c to f0dcf12 Compare September 18, 2023 09:51
@marko-bekhta marko-bekhta force-pushed the feat/HSEARCH-4403-multi-tenancy branch from f0dcf12 to a8ac419 Compare September 20, 2023 06:54
@marko-bekhta marko-bekhta marked this pull request as ready for review September 20, 2023 08:02
@sonarcloud
Copy link

sonarcloud bot commented Sep 20, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 6 Code Smells

86.9% 86.9% Coverage
0.0% 0.0% Duplication

@yrodiere yrodiere merged commit c0efe80 into hibernate:main Sep 20, 2023
11 of 13 checks passed
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.

2 participants