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

fix: use default for DATAHUB_GMS_PROTOCOL #61

Merged
merged 2 commits into from
Dec 4, 2022
Merged

fix: use default for DATAHUB_GMS_PROTOCOL #61

merged 2 commits into from
Dec 4, 2022

Conversation

hsheth2
Copy link
Contributor

@hsheth2 hsheth2 commented Dec 1, 2022

No description provided.

Copy link
Collaborator

@anshbansal anshbansal left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions
Copy link

github-actions bot commented Dec 1, 2022

Unit Test Results (build & test)

0 tests   - 61   0 ✔️  - 61   0s ⏱️ -3s
0 suites  -   1   0 💤 ±  0 
0 files    -   1   0 ±  0 

Results for commit 55a9ac0. ± Comparison against base commit 8004d65.

♻️ This comment has been updated with latest results.

@@ -44,4 +44,4 @@ USER datahub
RUN curl -s "https://get.sdkman.io" | bash
RUN /bin/bash -c "source /$HOME/.sdkman/bin/sdkman-init.sh; sdk version; sdk install java 8.0.332-zulu"
ENV DATAHUB_GMS_PROTOCOL http
CMD dockerize -wait $DATAHUB_GMS_PROTOCOL://$DATAHUB_GMS_HOST:$DATAHUB_GMS_PORT/health -timeout 240s /start_datahub_actions.sh
CMD dockerize -wait ${DATAHUB_GMS_PROTOCOL:-http}://$DATAHUB_GMS_HOST:$DATAHUB_GMS_PORT/health -timeout 240s /start_datahub_actions.sh
Copy link
Contributor

Choose a reason for hiding this comment

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

was tempting to do this, but then we lose the option to CMD ["..", ] for proper signal handling.

Copy link
Contributor

Choose a reason for hiding this comment

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

the current line works because it uses "sh -c" in the background that resolves the default env var. if we want to use CMD [".."] in the future then we cannot do this afaik. (I couldn't make it work dockerize, but that's an independent problem)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As per https://stackoverflow.com/questions/40454470/how-can-i-use-a-variable-inside-a-dockerfile-cmd, CMD [".."] doesn't do any env expansion

Given that we have DATAHUB_GMS_HOST and DATAHUB_GMS_PORT in the command, we already require a shell, and hence it's probably ok to rely on the env var expansion of sh -c for DATAHUB_GMS_PROTOCOL too

Copy link
Contributor

Choose a reason for hiding this comment

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

tried to make CMD [".."], so the container can handle signals (e.g ctrl-C), but dockerize doesn't work for some reason that way. This shouldn't block you merging this.

Co-authored-by: Peter Szalai  <szalaipeti.vagyok@gmail.com>
@shirshanka shirshanka merged commit 83aa213 into main Dec 4, 2022
@hsheth2 hsheth2 deleted the gms-http branch December 5, 2022 03:18
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.

None yet

4 participants