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

wait-for-it / handle several databases if needed (primary/secondary/etc) #278

Merged
merged 2 commits into from
Jan 3, 2024

Conversation

nesies
Copy link
Contributor

@nesies nesies commented Jul 27, 2023

Fixes camunda/camunda-bpm-platform#3555

If you specify several database in your JDBC_URL, you might want to start if at latest on of them is responding.

camunda/camunda-bpm-platform#3555

@tasso94
Copy link
Member

tasso94 commented Jul 28, 2023

Hi @nesies,

Thank you for your pull request.

My colleague @yanavasileva will look into it after the summer break.

Stay tuned!

Best,
Tassilo

Copy link
Member

@yanavasileva yanavasileva left a comment

Choose a reason for hiding this comment

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

Overall the implementation looks good to me. I added suggestions for the wording in the run script, please consider them for all of the three scripts.
Meantime, I would ask for a second reviewer in case I overlooked something.

camunda-run.sh Outdated Show resolved Hide resolved
camunda-run.sh Outdated Show resolved Hide resolved
camunda-run.sh Outdated Show resolved Hide resolved
camunda-run.sh Outdated Show resolved Hide resolved
@yanavasileva
Copy link
Member

@tasso94, could you please have a look at this feature request contribution in case I overlooked some aspect.

@nesies
Copy link
Contributor Author

nesies commented Sep 5, 2023

thanks, i made the changes

@tasso94
Copy link
Member

tasso94 commented Sep 5, 2023

@yanavasileva, I had a brief look, and here is my input:

  • Can we consolidate the code into a single file so that we don't need to change it at multiple places in the future? When fixing something, we might miss changing it everywhere in the future, which is not as maintainable as it could be.
  • I haven't checked it in detail, but we must ensure this doesn't change how it previously worked (backwards compatibility). Can you double-check that?

@yanavasileva
Copy link
Member

@nesies, thank you for applying the review hints so far.
Could you also consolidate the code into a single file as suggested by tasso94 above?

@nesies nesies force-pushed the wait-for-it_several_databases branch 2 times, most recently from f6e8830 to 8e1aada Compare September 13, 2023 13:36
Copy link
Member

@yanavasileva yanavasileva left a comment

Choose a reason for hiding this comment

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

Hi @nesies,

The current implementation is failing and I think a few components are missing:

  • ensure the correct name is passed for the "common-lib"
  • ensure the file is present when a docker image is created
  • test the docker image with the following scenarios:
    • the WAIT_FOR argument not passed
    • WAIT_FOR argument given with one db connection
    • WAIT_FOR argument given with two or more db connections

camunda-run.sh Outdated Show resolved Hide resolved
@nesies nesies force-pushed the wait-for-it_several_databases branch from 8e1aada to 90e7d29 Compare November 16, 2023 09:23
Copy link
Member

@yanavasileva yanavasileva left a comment

Choose a reason for hiding this comment

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

👍 @nesies, looks good. Thank you for implementing our feedback.

Before I merge the request, could you please also adjust the readme with the new option specifying the syntax when the user passes multiple host:port to wait for.

@yanavasileva yanavasileva merged commit cf15703 into camunda:next Jan 3, 2024
3 of 9 checks passed
@yanavasileva
Copy link
Member

@nesies, I merged the code with (cf15703) after adjusting the readme. The feature will be available with Camunda 7.21 and next 7.21.0-alpha3. Once again, thank you for the contribution.

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.

Docker wait-for-it.sh for several hosts
3 participants