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

add flywaydb postgre dependency #2024

Closed
wants to merge 1 commit into from

Conversation

samos667
Copy link

Since 0.6.1, hawkbit with postgre is not yet support if not specified it in dependency flyway/flyway#3909 (comment)

We only have postgre databases in our infra and we will want to keep it that way.

Thanks in advance !

Copy link

@hawkbit-bot hawkbit-bot left a comment

Choose a reason for hiding this comment

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

Thanks @samos667 for taking the time to contribute to hawkBit! We really appreciate this. Make yourself comfortable while I'm looking for a committer to help you with your contribution.
Please make sure you read the contribution guide and signed the Eclipse Contributor Agreement (ECA).

Copy link

sonarcloud bot commented Nov 13, 2024

@hawkbit-bot
Copy link

Can one of the admins verify this patch?

@avgustinmm
Copy link
Contributor

Hi @samos667,

we could not accept your contribution because you haven't signed ECA, @see the failed check.

Then I wonder if we shall add flyway optional dependencies in into hawkbit-repository-jpa.
If you are using hawkbit as dependency in your project you could just add postgres support jar into your dependencies.
If you are using hawkbit runtimes - as a jar or as dockers - then I suppose this dependency shall be added into monolith hawkbit runtime only.

Could you share more about how are you using hawkbit?

@samos667
Copy link
Author

samos667 commented Nov 13, 2024

Hi @avgustinmm
thanks for your response.

Sorry I didn't see about ECA.

We use docker image for now. We started using it at 0.5.0 with postgre 16.4. But when trying to upgrade, when using hawkbit-server image 0.6.1, there is flyway error about postgre version but this a about postgre usage itself and seems related to flyway deps declaration.

Is there a way to easily enable postgre support for docker images ?

Edit:
I'm was asking myself about the difference between mysql and standard images.

standard - hawkBit images without mysql driver

There is not database connector on standard image, so we need to build some kind of postgre image by yourself, right ?

@avgustinmm
Copy link
Contributor

Hi,
the standard docker images contain H2, Postgresql, and MSSQL drivers. The one with MySQL has explicitly added MySQL driver.
So, having that they already have Postgresql and MSSQL drivers, I suppose, we should add there (maybe via monolith runtime jar) also flyway-database-postgresql and flyway-sqlserver (?).

For now, to make 0.6.1 work with PostgreSQL you could create a docker image with flyway-database-postgresql by yourself. There are two easy ways I see:

  • create a docker image FROM the official hawkbit 0.6.1 by adding into /BOOT-INF/lib/ the flyway-database-postgresql
  • or to create a docker image from scratch. You could check how Dockerfile-mysql adds MySQL driver to the hawkbit-update-server and add flyway-database-postgresql instead.

@samos667
Copy link
Author

samos667 commented Nov 14, 2024

Thanks for the info, I really appreciate it !

We'll build our postgre image from the official one, that's the best option at the moment.

So I will close this PR as I think my change is not the way. And I'm not really sure (as a deploy manager) how to do it right.

@samos667 samos667 closed this Nov 14, 2024
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.

3 participants