Skip to content

Commit d3dc3fd

Browse files
authored
Merge pull request #155 from hanxizh9910/feature/automated-test-failure-detector
Feature/automated test failure detector
2 parents ea9467d + f3eaf5a commit d3dc3fd

2 files changed

Lines changed: 113 additions & 111 deletions

File tree

.github/workflows/daily.yml

Lines changed: 106 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -622,108 +622,108 @@ jobs:
622622
uses: ./.github/actions/upload-test-failures
623623
with:
624624
job-name: ${{ github.job }}
625-
test-ubuntu-io-threads:
626-
runs-on: ubuntu-latest
627-
if: |
628-
(github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' ||
629-
(github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') ||
630-
(github.event_name == 'pull_request' &&
631-
(github.event.pull_request.base.ref != 'unstable' ||
632-
contains(github.event.pull_request.labels.*.name, 'run-extra-tests')) &&
633-
(github.event.action != 'labeled' ||
634-
(github.event.pull_request.base.ref == 'unstable' && github.event.label.name == 'run-extra-tests'))
635-
)) &&
636-
!contains(github.event.inputs.skipjobs, 'iothreads')
637-
timeout-minutes: 1440
638-
steps:
639-
- name: prep
640-
if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call'
641-
run: |
642-
echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV
643-
echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV
644-
echo "skipjobs: ${{github.event.inputs.skipjobs}}"
645-
echo "skiptests: ${{github.event.inputs.skiptests}}"
646-
echo "test_args: ${{github.event.inputs.test_args}}"
647-
echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}"
648-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
649-
with:
650-
repository: ${{ inputs.use_repo || github.event.inputs.use_repo || github.repository }}
651-
ref: ${{ inputs.use_git_ref || github.event.inputs.use_git_ref || github.ref }}
652-
- name: Install libbacktrace
653-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
654-
with:
655-
repository: ianlancetaylor/libbacktrace
656-
ref: b9e40069c0b47a722286b94eb5231f7f05c08713
657-
path: libbacktrace
658-
- run: cd libbacktrace && ./configure && make && sudo make install
659-
- name: make
660-
run: make SERVER_CFLAGS='-Werror' USE_LIBBACKTRACE=yes
661-
- name: testprep
662-
run: sudo apt-get install tcl8.6 tclx
663-
- name: test
664-
if: true && !contains(github.event.inputs.skiptests, 'valkey')
665-
run: ./runtest --io-threads --accurate --failures-output test-failures/valkey.json --verbose --tags network --dump-logs ${{github.event.inputs.test_args}}
666-
- name: cluster tests
667-
if: true && !contains(github.event.inputs.skiptests, 'cluster')
668-
run: ./runtest-cluster --failures-output test-failures/cluster.json --io-threads ${{github.event.inputs.cluster_test_args}}
669-
- name: Upload test failures
670-
if: always()
671-
uses: ./.github/actions/upload-test-failures
672-
with:
673-
job-name: ${{ github.job }}
674-
test-ubuntu-tls-io-threads:
675-
runs-on: ubuntu-latest
676-
if: |
677-
(github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' ||
678-
(github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') ||
679-
(github.event_name == 'pull_request' &&
680-
(github.event.pull_request.base.ref != 'unstable' ||
681-
contains(github.event.pull_request.labels.*.name, 'run-extra-tests')) &&
682-
(github.event.action != 'labeled' ||
683-
(github.event.pull_request.base.ref == 'unstable' && github.event.label.name == 'run-extra-tests'))
684-
)) &&
685-
!contains(github.event.inputs.skipjobs, 'tls') && !contains(github.event.inputs.skipjobs, 'iothreads')
686-
timeout-minutes: 1440
687-
steps:
688-
- name: prep
689-
if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call'
690-
run: |
691-
echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV
692-
echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV
693-
echo "skipjobs: ${{github.event.inputs.skipjobs}}"
694-
echo "skiptests: ${{github.event.inputs.skiptests}}"
695-
echo "test_args: ${{github.event.inputs.test_args}}"
696-
echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}"
697-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
698-
with:
699-
repository: ${{ inputs.use_repo || github.event.inputs.use_repo || github.repository }}
700-
ref: ${{ inputs.use_git_ref || github.event.inputs.use_git_ref || github.ref }}
701-
- name: Install libbacktrace
702-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
703-
with:
704-
repository: ianlancetaylor/libbacktrace
705-
ref: b9e40069c0b47a722286b94eb5231f7f05c08713
706-
path: libbacktrace
707-
- run: cd libbacktrace && ./configure && make && sudo make install
708-
- name: make
709-
run: make BUILD_TLS=yes SERVER_CFLAGS='-Werror' USE_LIBBACKTRACE=yes
710-
- name: testprep
711-
run: |
712-
sudo apt-get install tcl8.6 tclx tcl-tls
713-
./utils/gen-test-certs.sh
714-
- name: test
715-
if: true && !contains(github.event.inputs.skiptests, 'valkey')
716-
run: |
717-
./runtest --io-threads --tls --accurate --failures-output test-failures/valkey.json --verbose --tags network --dump-logs ${{github.event.inputs.test_args}}
718-
- name: cluster tests
719-
if: true && !contains(github.event.inputs.skiptests, 'cluster')
720-
run: |
721-
./runtest-cluster --failures-output test-failures/cluster.json --io-threads --tls ${{github.event.inputs.cluster_test_args}}
722-
- name: Upload test failures
723-
if: always()
724-
uses: ./.github/actions/upload-test-failures
725-
with:
726-
job-name: ${{ github.job }}
625+
# test-ubuntu-io-threads:
626+
# runs-on: ubuntu-latest
627+
# if: |
628+
# (github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' ||
629+
# (github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') ||
630+
# (github.event_name == 'pull_request' &&
631+
# (github.event.pull_request.base.ref != 'unstable' ||
632+
# contains(github.event.pull_request.labels.*.name, 'run-extra-tests')) &&
633+
# (github.event.action != 'labeled' ||
634+
# (github.event.pull_request.base.ref == 'unstable' && github.event.label.name == 'run-extra-tests'))
635+
# )) &&
636+
# !contains(github.event.inputs.skipjobs, 'iothreads')
637+
# timeout-minutes: 1440
638+
# steps:
639+
# - name: prep
640+
# if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call'
641+
# run: |
642+
# echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV
643+
# echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV
644+
# echo "skipjobs: ${{github.event.inputs.skipjobs}}"
645+
# echo "skiptests: ${{github.event.inputs.skiptests}}"
646+
# echo "test_args: ${{github.event.inputs.test_args}}"
647+
# echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}"
648+
# - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
649+
# with:
650+
# repository: ${{ inputs.use_repo || github.event.inputs.use_repo || github.repository }}
651+
# ref: ${{ inputs.use_git_ref || github.event.inputs.use_git_ref || github.ref }}
652+
# - name: Install libbacktrace
653+
# uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
654+
# with:
655+
# repository: ianlancetaylor/libbacktrace
656+
# ref: b9e40069c0b47a722286b94eb5231f7f05c08713
657+
# path: libbacktrace
658+
# - run: cd libbacktrace && ./configure && make && sudo make install
659+
# - name: make
660+
# run: make SERVER_CFLAGS='-Werror' USE_LIBBACKTRACE=yes
661+
# - name: testprep
662+
# run: sudo apt-get install tcl8.6 tclx
663+
# - name: test
664+
# if: true && !contains(github.event.inputs.skiptests, 'valkey')
665+
# run: ./runtest --io-threads --accurate --failures-output test-failures/valkey.json --verbose --tags network --dump-logs ${{github.event.inputs.test_args}}
666+
# - name: cluster tests
667+
# if: true && !contains(github.event.inputs.skiptests, 'cluster')
668+
# run: ./runtest-cluster --failures-output test-failures/cluster.json --io-threads ${{github.event.inputs.cluster_test_args}}
669+
# - name: Upload test failures
670+
# if: always()
671+
# uses: ./.github/actions/upload-test-failures
672+
# with:
673+
# job-name: ${{ github.job }}
674+
# test-ubuntu-tls-io-threads:
675+
# runs-on: ubuntu-latest
676+
# if: |
677+
# (github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' ||
678+
# (github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') ||
679+
# (github.event_name == 'pull_request' &&
680+
# (github.event.pull_request.base.ref != 'unstable' ||
681+
# contains(github.event.pull_request.labels.*.name, 'run-extra-tests')) &&
682+
# (github.event.action != 'labeled' ||
683+
# (github.event.pull_request.base.ref == 'unstable' && github.event.label.name == 'run-extra-tests'))
684+
# )) &&
685+
# !contains(github.event.inputs.skipjobs, 'tls') && !contains(github.event.inputs.skipjobs, 'iothreads')
686+
# timeout-minutes: 1440
687+
# steps:
688+
# - name: prep
689+
# if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call'
690+
# run: |
691+
# echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV
692+
# echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV
693+
# echo "skipjobs: ${{github.event.inputs.skipjobs}}"
694+
# echo "skiptests: ${{github.event.inputs.skiptests}}"
695+
# echo "test_args: ${{github.event.inputs.test_args}}"
696+
# echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}"
697+
# - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
698+
# with:
699+
# repository: ${{ inputs.use_repo || github.event.inputs.use_repo || github.repository }}
700+
# ref: ${{ inputs.use_git_ref || github.event.inputs.use_git_ref || github.ref }}
701+
# - name: Install libbacktrace
702+
# uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
703+
# with:
704+
# repository: ianlancetaylor/libbacktrace
705+
# ref: b9e40069c0b47a722286b94eb5231f7f05c08713
706+
# path: libbacktrace
707+
# - run: cd libbacktrace && ./configure && make && sudo make install
708+
# - name: make
709+
# run: make BUILD_TLS=yes SERVER_CFLAGS='-Werror' USE_LIBBACKTRACE=yes
710+
# - name: testprep
711+
# run: |
712+
# sudo apt-get install tcl8.6 tclx tcl-tls
713+
# ./utils/gen-test-certs.sh
714+
# - name: test
715+
# if: true && !contains(github.event.inputs.skiptests, 'valkey')
716+
# run: |
717+
# ./runtest --io-threads --tls --accurate --failures-output test-failures/valkey.json --verbose --tags network --dump-logs ${{github.event.inputs.test_args}}
718+
# - name: cluster tests
719+
# if: true && !contains(github.event.inputs.skiptests, 'cluster')
720+
# run: |
721+
# ./runtest-cluster --failures-output test-failures/cluster.json --io-threads --tls ${{github.event.inputs.cluster_test_args}}
722+
# - name: Upload test failures
723+
# if: always()
724+
# uses: ./.github/actions/upload-test-failures
725+
# with:
726+
# job-name: ${{ github.job }}
727727
test-ubuntu-reclaim-cache:
728728
runs-on: ubuntu-latest
729729
if: |
@@ -2085,8 +2085,8 @@ jobs:
20852085
- test-ubuntu-32bit
20862086
- test-ubuntu-tls
20872087
- test-ubuntu-tls-no-tls
2088-
- test-ubuntu-io-threads
2089-
- test-ubuntu-tls-io-threads
2088+
# - test-ubuntu-io-threads
2089+
# - test-ubuntu-tls-io-threads
20902090
- test-valgrind-test
20912091
- test-valgrind-misc
20922092
- test-valgrind-no-malloc-usable-size-test
@@ -2185,8 +2185,8 @@ jobs:
21852185
- test-ubuntu-32bit
21862186
- test-ubuntu-tls
21872187
- test-ubuntu-tls-no-tls
2188-
- test-ubuntu-io-threads
2189-
- test-ubuntu-tls-io-threads
2188+
# - test-ubuntu-io-threads
2189+
# - test-ubuntu-tls-io-threads
21902190
- test-ubuntu-reclaim-cache
21912191
- test-valgrind-test
21922192
- test-valgrind-misc

.github/workflows/test-failure-detector.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,13 @@ jobs:
135135
"error": entry.get("error", ""),
136136
"jobs": []
137137
}
138-
grouped[name]["jobs"].append({
139-
"job": job_name,
140-
"suite": suite_name,
141-
"url": job_urls.get(job_name, "")
142-
})
138+
# Deduplicate: skip if this job already recorded for this test
139+
if job_name not in [j["job"] for j in grouped[name]["jobs"]]:
140+
grouped[name]["jobs"].append({
141+
"job": job_name,
142+
"suite": suite_name,
143+
"url": job_urls.get(job_name, "")
144+
})
143145
print(f"{name} in {job_name}/{suite_name}")
144146
145147
unique_failures = list(grouped.values())

0 commit comments

Comments
 (0)