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(CI): Add docker build and curl check #214

Merged
merged 8 commits into from
Dec 13, 2024

Conversation

epociask
Copy link
Collaborator

@epociask epociask commented Dec 11, 2024

Changes proposed

Introduces a new CI job which asserts that the server can be built into a docker container. The job also ensures that the health endpoint can be successfully pinged. This is done to avoid regressions where container builds fail on main when publishing to ghcr.

@epociask epociask changed the title fix: Add docker docker build and curl check fix(CI): Add docker docker build and curl check Dec 12, 2024
@epociask epociask requested review from samlaf and litt3 December 12, 2024 16:27
@epociask epociask changed the title fix(CI): Add docker docker build and curl check fix(CI): Add docker build and curl check Dec 12, 2024
Copy link
Collaborator

@litt3 litt3 left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Collaborator

@samlaf samlaf left a comment

Choose a reason for hiding this comment

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

LGTM though I think we should lower the sleep and timeout

if curl -X GET 'http://localhost:6666/health'; then
exit 0
else
sleep 20
Copy link
Collaborator

Choose a reason for hiding this comment

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

sleep 2 is prob better? otherwise the ci takes minimum 20seconds given Id assume the first ping is not going to work because container is still being spun up.

Comment on lines 2 to 3
# poll the proxy endpoint until we get a 0 return code or 5mins have passed, in that case exit 1
timeout_time=$(($(date +%s) + 300))
Copy link
Collaborator

Choose a reason for hiding this comment

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

prob 2 mins is enough? I personally prefer cis to crash fast and I can restart them manually (restarting on a separate machine might also fix a problem if it was github/azure related)

@epociask epociask merged commit bd3de3a into main Dec 13, 2024
8 checks passed
@epociask epociask deleted the epociask--fix-docker-build-ci-check branch December 13, 2024 12:28
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.

3 participants