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 host for sql waiter URL function. #166

Closed
wants to merge 3 commits into from

Conversation

a-urth
Copy link

@a-urth a-urth commented Mar 6, 2020

Issue:
In case container is started in docker which is not in localhost (ci environment with tests already running in container), mapped port is not enough to establish connection to a database.

Solution:
Add host parameter for url function, which is part of wait.ForSQL strategy, so it will be possible to construct connection url with docker host and mapped port.

@gianarb gianarb added the breaking change Causing compatibility issues. label Mar 6, 2020
@gianarb
Copy link
Collaborator

gianarb commented Mar 6, 2020

Thanks @a-urth This is a BC break but I actually like it. @mdelapenya what do yo think?

@a-urth
Copy link
Author

a-urth commented Apr 30, 2020

Hey @gianarb is there any progress for this PR? Is it going to be merged?

@gianarb
Copy link
Collaborator

gianarb commented Jun 16, 2020

this is way easier to merge if we can figure out a way to avoid a bc-break. I think we can using the a with function. Like a WithHost(string). wdyt @a-urth ?

@gianarb gianarb self-requested a review June 16, 2020 08:54
@@ -1,2 +1,3 @@
.idea
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you revert this? it should be placed in your global gitignore

gianarb pushed a commit that referenced this pull request Jun 16, 2020
The wait.ForSQL wait strategy does not have a testcase and I forgot
about how to use it as well.

I decided to write it in preparation for the work/discussion ongoing
here: #166
gianarb pushed a commit that referenced this pull request Jun 16, 2020
The wait.ForSQL wait strategy does not have a testcase and I forgot
about how to use it as well.

I decided to write it in preparation for the work/discussion ongoing
here: #166
gianarb pushed a commit that referenced this pull request Jun 16, 2020
The wait.ForSQL wait strategy does not have a testcase and I forgot
about how to use it as well.

I decided to write it in preparation for the work/discussion ongoing
here: #166
@mdelapenya
Copy link
Collaborator

this is way easier to merge if we can figure out a way to avoid a bc-break. I think we can using the a with function. Like a WithHost(string). wdyt @a-urth ?

Yes, I like the idea of not forcing a breaking change too

👍

@mdelapenya
Copy link
Collaborator

I'd waitForMerge("#214") </joke> before merging this.

wdyt?

@michielboekhoff
Copy link
Contributor

Hey guys, sorry to bring this back from the dead, but I was running into a similar situation. I'd love to get this merged so I can avoid having to revert to what testcontainers-java is doing (waiting for log messages).

If we can change this PR to preserve backwards compatibility, can we merge? I'm willing to invest some time into this unless @a-urth wants to apply the suggested changes?

@michielboekhoff
Copy link
Contributor

michielboekhoff commented Apr 13, 2021

I just took a little stab at a backward-compatible way in #310. The reason I didn't just create a With method is because the URL function itself is also exposed to the calling code. Changing the way it constructs the URL (i.e. changing the URL function to be an interface) might break BC.

@mdelapenya
Copy link
Collaborator

I'm closing this PR, as it's already been implemented in #524

Thanks!

@mdelapenya mdelapenya closed this Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Causing compatibility issues.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants