Skip to content

Commit

Permalink
[v2] Dump storage docker logs in Github CI if e2e test failed (#5433)
Browse files Browse the repository at this point in the history
## Which problem is this PR solving?
- Helps debugging unstable e2e tests in #5418

## Description of the changes
- Add more visibility to CI workflows by dumping related storage docker
logs if the tests failed.
- Made changes to Cassandra, Elasticsearch, and Opensearch.

## How was this change tested?
- Not tested, unable to test locally.

## Checklist
- [x] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [x] I have signed all commits
- [ ] I have added unit tests for the new functionality
- [x] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `yarn lint` and `yarn test`

---------

Signed-off-by: James Ryans <james.ryans2012@gmail.com>
  • Loading branch information
james-ryans authored May 8, 2024
1 parent 7d21f49 commit 12aa9da
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/ci-cassandra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,13 @@ jobs:
go-version: 1.22.x

- name: Run cassandra integration tests
id: test-execution
run: bash scripts/cassandra-integration-test.sh ${{ matrix.version.image }} ${{ matrix.version.schema }} ${{ matrix.jaeger-version }}

- name: Output Cassandra logs
run: docker logs ${{ steps.test-execution.outputs.cid }}
if: ${{ failure() }}

- name: Upload coverage to codecov
uses: ./.github/actions/upload-codecov
with:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ci-elasticsearch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,13 @@ jobs:
- uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0

- name: Run elasticsearch integration tests
id: test-execution
run: bash scripts/es-integration-test.sh ${{ matrix.version.distribution }} ${{ matrix.version.image }}

- name: Output Elasticsearch logs
run: docker logs ${{ steps.test-execution.outputs.cid }}
if: ${{ failure() }}

- name: Upload coverage to codecov
uses: ./.github/actions/upload-codecov
with:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ci-opensearch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,13 @@ jobs:
- uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0

- name: Run opensearch integration tests
id: test-execution
run: bash scripts/es-integration-test.sh ${{ matrix.version.distribution }} ${{ matrix.version.image }}

- name: Output Opensearch logs
run: docker logs ${{ steps.test-execution.outputs.cid }}
if: ${{ failure() }}

- name: Upload coverage to codecov
uses: ./.github/actions/upload-codecov
with:
Expand Down
2 changes: 1 addition & 1 deletion scripts/cassandra-integration-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ setup_cassandra() {
local tag=$1
local image=cassandra
local params=(
--rm
--detach
--publish 9042:9042
--publish 9160:9160
)
local cid
cid=$(docker run "${params[@]}" "${image}:${tag}")
echo "cid=${cid}" >> "$GITHUB_OUTPUT"
echo "${cid}"
}

Expand Down
2 changes: 2 additions & 0 deletions scripts/es-integration-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ setup_es() {

local cid
cid=$(docker run "${params[@]}" "${image}:${tag}")
echo "cid=${cid}" >> "$GITHUB_OUTPUT"
echo "${cid}"
}

Expand All @@ -57,6 +58,7 @@ setup_opensearch() {
)
local cid
cid=$(docker run "${params[@]}" "${image}:${tag}")
echo "cid=${cid}" >> "$GITHUB_OUTPUT"
echo "${cid}"
}

Expand Down

0 comments on commit 12aa9da

Please sign in to comment.