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 DB2 support for Docker Compose #42395

Closed
wants to merge 1 commit into from
Closed

Conversation

quaff
Copy link
Contributor

@quaff quaff commented Sep 20, 2024

No description provided.

@quaff quaff marked this pull request as draft September 20, 2024 08:56
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Sep 20, 2024
@quaff quaff force-pushed the patch-72 branch 3 times, most recently from ba97968 to e7b437f Compare September 25, 2024 01:48
@quaff
Copy link
Contributor Author

quaff commented Sep 25, 2024

Db2R2dbcDockerComposeConnectionDetailsFactory removed since com.ibm.db2:db2-r2dbc is not an actual driver.

Unable to create a ConnectionFactory for 'ConnectionFactoryOptions{options={database=testdb, host=127.0.0.1, driver=db2, password=REDACTED, port=50000, user=db2inst1}}'. Available drivers: [ oracle, sqlserver, postgresql ]
java.lang.IllegalStateException: Unable to create a ConnectionFactory for 'ConnectionFactoryOptions{options={database=testdb, host=127.0.0.1, driver=db2, password=REDACTED, port=50000, user=db2inst1}}'. Available drivers: [ oracle, sqlserver, postgresql ]
	at io.r2dbc.spi.ConnectionFactories.get(ConnectionFactories.java:143)

@quaff quaff marked this pull request as ready for review September 25, 2024 01:52
@quaff
Copy link
Contributor Author

quaff commented Sep 25, 2024

Need more disk space to run tests.

@quaff quaff force-pushed the patch-72 branch 3 times, most recently from c7bbd7d to 99e6757 Compare September 25, 2024 09:32
Copy link
Contributor

@mhalbritter mhalbritter left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, @quaff . I've left some comments for your consideration.

image: '{imageName}'
ports:
- '50000'
privileged: true
Copy link
Contributor

@mhalbritter mhalbritter Sep 25, 2024

Choose a reason for hiding this comment

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

I don't think you can run privileged containers on the CI. Why is that needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mhalbritter mhalbritter added the status: waiting-for-feedback We need additional information before we can continue label Sep 25, 2024
Copy link
Member

@snicoll snicoll left a comment

Choose a reason for hiding this comment

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

I've added some comment, please have a look when you get a chance.

- '50000'
privileged: true
environment:
- 'LICENSE=accept'
Copy link
Member

Choose a reason for hiding this comment

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

What does this mean in practice?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Which part?

Copy link
Member

Choose a reason for hiding this comment

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

The LICENSE=accept bit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

I understand that it's required, I am asking what it means in practice that our project starts accepting that license.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not for production use, I guess.

Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is resolved as we haven't determined if we can legally accept the license for testing purposes. Knowing that Testcontainers has support for accepting the license is useful but it's opt-in and doesn't tell us if we can do the same automatically on CI and dev machines for testing purposes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not opt-in, Testcontainers accept the license by default.

Copy link
Contributor

Choose a reason for hiding this comment

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

License is not accepted by default in Testcontainers. User must call acceptLicense(), which sets the env var, when defining Db2Container. See https://github.com/testcontainers/testcontainers-java/blob/main/modules/db2/src/test/java/org/testcontainers/junit/db2/SimpleDb2Test.java#L17

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My mistake, I forgot I added container-license-acceptance.txt.

@snicoll snicoll added the for: team-meeting An issue we'd like to discuss as a team to make progress label Oct 8, 2024
@wilkinsona
Copy link
Member

I've force-pushed this having rebased it on the latest main. That should mean the PR picks up some recent changes to the runner preparation that will make more free disk space available.

@wilkinsona wilkinsona added status: blocked An issue that's blocked on an external project change and removed for: team-meeting An issue we'd like to discuss as a team to make progress labels Oct 14, 2024
@wilkinsona
Copy link
Member

This is blocked until the questions regarding the licence acceptance have been resolved.

@philwebb
Copy link
Member

I looks like DB2 is also being removed from Docker Hub (see https://community.ibm.com/community/user/datamanagement/blogs/vijaya-katikireddy/2023/02/04/db2-community). Given that and the license issues, I'm not sure that we should try to support this.

@philwebb philwebb added the for: team-meeting An issue we'd like to discuss as a team to make progress label Oct 15, 2024
@quaff
Copy link
Contributor Author

quaff commented Oct 16, 2024

I looks like DB2 is also being removed from Docker Hub (see https://community.ibm.com/community/user/datamanagement/blogs/vijaya-katikireddy/2023/02/04/db2-community). Given that and the license issues, I'm not sure that we should try to support this.

This PR use new icr.io/db2_community/db2 for test.

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Oct 16, 2024
@wilkinsona
Copy link
Member

I believe that this is the relevant license.

It contains the following usage restriction:

1. Usage Restrictions

(a) The Program may use a maximum of 4 processor cores and 16 GB of memory on each physical or virtual server.

I think we could comply with the license by setting some CPU and memory limits in the compose files used for testing. Whether or not it's worth the trouble is another question.

@philwebb
Copy link
Member

I think unfortunately the usage restrictions, combined with the fact that the image isn't in Docker Hub means we probably shouldn't add support for this. Thanks anyway for the PR @quaff!

@philwebb philwebb closed this Oct 16, 2024
@philwebb philwebb added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged status: feedback-provided Feedback has been provided status: blocked An issue that's blocked on an external project change for: team-meeting An issue we'd like to discuss as a team to make progress labels Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants