Skip to content

Commit 48688b8

Browse files
Don't create duplicate issues on workflow failures (#8441)
Co-authored-by: opentelemetrybot <[email protected]>
1 parent 7fb487a commit 48688b8

13 files changed

+98
-52
lines changed

.github/workflows/build-daily-no-build-cache.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ jobs:
2727
# markdown-link-check and misspell-check are not included here because they don't use gradle cache
2828
# anyway and so are already covered by the normal daily build
2929

30-
open-issue-on-failure:
30+
workflow-notification:
3131
needs:
3232
- common
3333
- test-latest-deps
34-
if: failure() && github.run_attempt == 1
35-
uses: ./.github/workflows/reusable-open-issue-on-failure.yml
34+
if: always()
35+
uses: ./.github/workflows/reusable-workflow-notification.yml
36+
with:
37+
success: needs.common.result == 'success' && needs.test-latest-deps.result == 'success'

.github/workflows/build-daily.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,19 @@ jobs:
3636
misspell-check:
3737
uses: ./.github/workflows/reusable-misspell-check.yml
3838

39-
open-issue-on-failure:
39+
workflow-notification:
4040
needs:
4141
- common
4242
- test-latest-deps
4343
- muzzle
4444
- markdown-link-check
4545
- misspell-check
46-
if: failure() && github.run_attempt == 1
47-
uses: ./.github/workflows/reusable-open-issue-on-failure.yml
46+
if: always()
47+
uses: ./.github/workflows/reusable-workflow-notification.yml
48+
with:
49+
success: |
50+
needs.common.result == 'success' &&
51+
needs.test-latest-deps.result == 'success' &&
52+
needs.muzzle.result == 'success' &&
53+
needs.markdown-link-check.result == 'success' &&
54+
needs.misspell-check.result == 'success'

.github/workflows/codeql-daily.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ jobs:
3535
- name: Perform CodeQL analysis
3636
uses: github/codeql-action/analyze@v2
3737

38-
open-issue-on-failure:
39-
# open an issue on failure because it can be easy to miss CI failure notifications
38+
workflow-notification:
4039
needs:
4140
- analyze
42-
if: failure() && github.run_attempt == 1
43-
uses: ./.github/workflows/reusable-open-issue-on-failure.yml
41+
if: always()
42+
uses: ./.github/workflows/reusable-workflow-notification.yml
43+
with:
44+
success: needs.analyze.result == 'success'

.github/workflows/overhead-benchmark-daily.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ jobs:
4545
committer_name: opentelemetrybot
4646
committer_email: [email protected]
4747

48-
open-issue-on-failure:
48+
workflow-notification:
4949
needs:
5050
- run-overhead-tests
51-
if: failure() && github.run_attempt == 1
52-
uses: ./.github/workflows/reusable-open-issue-on-failure.yml
51+
if: always()
52+
uses: ./.github/workflows/reusable-workflow-notification.yml
53+
with:
54+
success: needs.run-overhead-tests.result == 'success'

.github/workflows/publish-smoke-test-fake-backend-images.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,12 @@ jobs:
6868
with:
6969
arguments: ":smoke-tests:images:fake-backend:dockerPush -PextraTag=${{ env.TAG }}"
7070

71-
open-issue-on-failure:
71+
workflow-notification:
7272
needs:
7373
- publishLinux
7474
- publishWindows
75-
if: failure() && github.run_attempt == 1
76-
uses: ./.github/workflows/reusable-open-issue-on-failure.yml
75+
if: always()
76+
uses: ./.github/workflows/reusable-workflow-notification.yml
77+
with:
78+
success: needs.publishLinux.result == 'success' && needs.publishWindows.result == 'success'
79+

.github/workflows/publish-smoke-test-grpc-images.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ jobs:
1616
project: ":smoke-tests:images:grpc"
1717
publish: true
1818

19-
open-issue-on-failure:
19+
workflow-notification:
2020
needs:
2121
- publish
22-
if: failure() && github.run_attempt == 1
23-
uses: ./.github/workflows/reusable-open-issue-on-failure.yml
22+
if: always()
23+
uses: ./.github/workflows/reusable-workflow-notification.yml
24+
with:
25+
success: ${{ needs.publish.result == 'success' }}

.github/workflows/publish-smoke-test-play-images.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ jobs:
2020
skip-java-17: true
2121
skip-java-19: true
2222

23-
open-issue-on-failure:
23+
workflow-notification:
2424
needs:
2525
- publish
26-
if: failure() && github.run_attempt == 1
27-
uses: ./.github/workflows/reusable-open-issue-on-failure.yml
26+
if: always()
27+
uses: ./.github/workflows/reusable-workflow-notification.yml
28+
with:
29+
success: ${{ needs.publish.result == 'success' }}

.github/workflows/publish-smoke-test-quarkus-images.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ jobs:
1818
# Quarkus 2.0+ does not support Java 8
1919
skip-java-8: true
2020

21-
open-issue-on-failure:
21+
workflow-notification:
2222
needs:
2323
- publish
24-
if: failure() && github.run_attempt == 1
25-
uses: ./.github/workflows/reusable-open-issue-on-failure.yml
24+
if: always()
25+
uses: ./.github/workflows/reusable-workflow-notification.yml
26+
with:
27+
success: ${{ needs.publish.result == 'success' }}

.github/workflows/publish-smoke-test-security-manager-images.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ jobs:
1616
project: ":smoke-tests:images:security-manager"
1717
publish: true
1818

19-
open-issue-on-failure:
19+
workflow-notification:
2020
needs:
2121
- publish
22-
if: failure() && github.run_attempt == 1
23-
uses: ./.github/workflows/reusable-open-issue-on-failure.yml
22+
if: always()
23+
uses: ./.github/workflows/reusable-workflow-notification.yml
24+
with:
25+
success: ${{ needs.publish.result == 'success' }}

.github/workflows/publish-smoke-test-servlet-images.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,10 @@ jobs:
7676
if: matrix.os == 'windows-latest'
7777
run: ./gradlew :smoke-tests:images:servlet:buildWindowsTestImages pushMatrix -PextraTag=${{ needs.prepare.outputs.tag }} -PsmokeTestServer=${{ matrix.smoke-test-server }}
7878

79-
open-issue-on-failure:
79+
workflow-notification:
8080
needs:
8181
- publish
82-
if: failure() && github.run_attempt == 1
83-
uses: ./.github/workflows/reusable-open-issue-on-failure.yml
82+
if: always()
83+
uses: ./.github/workflows/reusable-workflow-notification.yml
84+
with:
85+
success: ${{ needs.publish.result == 'success' }}

0 commit comments

Comments
 (0)