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

Hibernate ORM multi-tenancy quickstart is outdated (and broken) #41759

Open
yrodiere opened this issue Jul 8, 2024 · 8 comments
Open

Hibernate ORM multi-tenancy quickstart is outdated (and broken) #41759

yrodiere opened this issue Jul 8, 2024 · 8 comments
Labels
area/hibernate-orm Hibernate ORM area/housekeeping Issue type for generalized tasks not related to bugs or enhancements good first issue Good for newcomers

Comments

@yrodiere
Copy link
Member

yrodiere commented Jul 8, 2024

Description

There are several problems with this quickstart: https://github.com/quarkusio/quarkus-quickstarts/tree/main/hibernate-orm-multi-tenancy-quickstart

  1. It's hard to use. It uses schema multi-tenancy by default, and requires weird profile setting to use database multitenancy instead. Even when using the default, one needs to start the DB manually with docker compose instead of just using dev services.
  2. Database multitenancy is simply broken. Following instructions will result in dev services starting up for the default database, and failing to bind to port 5432.

Implementation ideas

  1. Let's split examples between schema multitenancy in one project, and database multi tenancy in the other.
  2. Let's use dev services everywhere. I'm pretty sure we don't need docker-compose nowadays, and can set DB init scripts in dev services instead. See how it's done in Quarkus integration tests, maybe?
  3. Maybe, let's also provide a quickstart for discriminator multi-tenancy.
  4. Let's link to these quickstarts from the documentation.
@yrodiere yrodiere added area/hibernate-orm Hibernate ORM area/housekeeping Issue type for generalized tasks not related to bugs or enhancements labels Jul 8, 2024
Copy link

quarkus-bot bot commented Jul 8, 2024

/cc @gsmet (hibernate-orm)

@tobHai
Copy link

tobHai commented Jan 3, 2025

Hi!

I would like to provide a PR for this issue.
I already started to clean up the quick-start here.

@yrodiere
Copy link
Member Author

yrodiere commented Jan 3, 2025

Hi! Thank you for contributing. Please send a PR when you're ready :)
I think you should be able to enable GitHub Actions in your fork, that way you can check the build actually passes even before sending the pull request.

@yrodiere
Copy link
Member Author

yrodiere commented Jan 3, 2025

By the way:

Let's split examples between schema multitenancy in one project, and database multi tenancy in the other.

This was not about removing the database multitenancy quickstart, but about keeping it in a separate project from schema multitenancy. Seems you removed it :)

@tobHai
Copy link

tobHai commented Jan 3, 2025

Alright, thanks 😄
Yes, my plan was to remove the database multi tenancy code from the current quick start first and then create a separate project for that - but thanks for pointing that out. 😄

@tobHai
Copy link

tobHai commented Jan 10, 2025

@yrodiere unfortunately I'm having some issues with the Github Actions in my fork.
For testing purposes I created a simple PR containing only a small change in the README file, but the build is failing:
tobHai/quarkus-quickstarts#2
I used the development branch as a base branch since the contribution guide states that all contributions should target the development branch, is that correct?

Thanks in advance!

@yrodiere
Copy link
Member Author

I used the development branch as a base branch since the contribution guide states that all contributions should target the development branch, is that correct?

Yes!

For testing purposes I created a simple PR containing only a small change in the README file, but the build is failing:
tobHai/quarkus-quickstarts#2

Your branch seems based on the development branch as of a few days ago, and it seems the build was failing then, but a few PRs have been merged recently to fix that.

Try rebasing on the current head of the development branch?

@tobHai
Copy link

tobHai commented Jan 19, 2025

@yrodiere thanks!

The MR is ready: quarkusio/quarkus-quickstarts#1493

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/hibernate-orm Hibernate ORM area/housekeeping Issue type for generalized tasks not related to bugs or enhancements good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants