Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,23 @@ jobs:
working-directory: examples
run: docker compose up -d

- name: Wait for services to be healthy
Copy link
Contributor

Choose a reason for hiding this comment

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

@Guikingone if this works, we can get rid of the 10sec sleep?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes.

I'm not sure it will solve the Opensearch, when launched locally, it can be considered as "healthy" and not be fully operational, to test on this one to ensure that we're not missing it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Guikingone I am looking into OpenSearch and ElasticSearch locally in more detail. You are right that this does not remove the OS issue for now, but from my local work, it was a necessary step to rule out that the container was up an running before trying out the tests.

working-directory: examples
run: |
echo "Waiting for all services to be healthy..."
for i in {1..60}; do
if docker compose ps --format json | jq -s -e 'all(.[]; .Health == "healthy" or .Health == "")' > /dev/null 2>&1; then
echo "All services are healthy!"
exit 0
fi
echo "Attempt $i/60: Some services are still starting..."
docker compose ps
sleep 5
done
echo "Timeout waiting for services to be healthy"
docker compose ps
exit 1

- name: Configure environment
run: |
echo COLUMNS=120 >> $GITHUB_ENV
Expand Down
Loading