-
Notifications
You must be signed in to change notification settings - Fork 70
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
Check container is ready in e2e-test ci job #223
Conversation
- run: docker run -d -p 8000:8000 stellar/quickstart:soroban-dev --standalone --enable-soroban-rpc --enable-core-artificially-accelerate-time-for-testing --protocol-version 20 && sleep 15 | ||
- run: while ! [ "$(curl -s --fail localhost:8000 | jq '.history_latest_ledger')" -gt 0 ]; do echo waiting; sleep 1; done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you may want to merge this with the prior command
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather keep it separate so that it is clear in the GitHub Action when the container has started vs the build is waiting for the container to be ready. That seemed to work well here:
https://github.com/stellar/starlight/blob/919096552e44eec5ec3fd6278922396926239874/.github/workflows/sdk.yml#L59-L62
What do we get out of merging it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No strong opinions, I think it's easier to read if done in the same step (spawn the docker container and make sure it's working).
Co-authored-by: Alfonso Acosta <[email protected]>
What
Check container is ready in e2e-test ci job by checking if the history ledgers is greater than 0.
Why
I noticed a TODO in here when working in the same file. We did this in the starlight project by adding a simple curl and check on the number of history ledgers ingested. Not sure if that is sufficient here, but I think it might be sufficient.