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 DevServices support for DB2 and MSSQL #15561

Merged
merged 1 commit into from
Mar 12, 2021

Conversation

stuartwdouglas
Copy link
Member

@stuartwdouglas stuartwdouglas commented Mar 9, 2021

This allows them to be automatically started if the license
is accepted.

No tests as I am not sure if we want to be accepting the
license as part of our build.

Fixes: #15540

@quarkus-bot quarkus-bot bot added area/dependencies Pull requests that update a dependency file area/documentation area/persistence OBSOLETE, DO NOT USE labels Mar 9, 2021
@geoand geoand requested a review from gsmet March 9, 2021 08:08
Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

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

Overall, it looks good, that's very nice to support all the databases we have around. I added some minor comments and a question.


If you want to use DevServices then all you need to do is include the relevant extension for the type of database you want (either reactive or
JDBC, or both), and don't configure a database URL, username and password, Quarkus will provide the database and you can just start
coding without worrying about config.

If you are using a proprietary database such as DB2 or MSSQL you will need to accept the license agreement. To do this
create a `src/main/resources/container-license-acceptance.txt` files in your project and add a line with the image
name and tag of the database. By default Quarkus uses the default image for the current version of testcontainers, if
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
name and tag of the database. By default Quarkus uses the default image for the current version of testcontainers, if
name and tag of the database. By default Quarkus uses the default image for the current version of Testcontainers, if

create a `src/main/resources/container-license-acceptance.txt` files in your project and add a line with the image
name and tag of the database. By default Quarkus uses the default image for the current version of testcontainers, if
you attempt to start Quarkus the resulting failure will tell you the exact image name in use for you to add to the
file.
Copy link
Member

Choose a reason for hiding this comment

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

Even with that, I would have added a small example.

</dependency>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
Copy link
Member

Choose a reason for hiding this comment

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

Do we really need the JDBC driver dependency? Asking that because we really need the user to use the extension.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is on the -deployment side, the user still needs the extension to actually use it.

We need the driver because testcontainers uses it to create a connection and run a query to determine when the DB is ready to accept requests.

Copy link
Member

Choose a reason for hiding this comment

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

Ah OK, that's what I was unsure of. Thanks for the explanation!

This allows them to be automatically started if the license
is accepted.

No tests as I am not sure if we want to be accepting the
license as part of our build.
@stuartwdouglas
Copy link
Member Author

Done

@gsmet gsmet merged commit 2b7d1f0 into quarkusio:master Mar 12, 2021
@quarkus-bot quarkus-bot bot added this to the 1.13 - master milestone Mar 12, 2021
@gsmet gsmet changed the title Add support for DB2 and MSSQL Add DevServices support for DB2 and MSSQL Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dependencies Pull requests that update a dependency file area/documentation area/persistence OBSOLETE, DO NOT USE
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SQL Server support in DevServices
2 participants