Skip to content

Commit d0e2fdf

Browse files
authored
fix: ignore policy-only E2E warnings (#4736)
* fix: ignore policy-only E2E warnings * fix: cover all E2E warning handlers
1 parent a69398c commit d0e2fdf

5 files changed

Lines changed: 33 additions & 2 deletions

File tree

.pipelines/singletenancy/aks/e2e-job-template.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,17 @@ stages:
119119
hybridWin: true
120120
service: true
121121
hostport: true
122+
# Auto-injected policy tasks can mark an otherwise healthy job as
123+
# SucceededWithIssues. This output proves all product test steps ran.
124+
- bash: echo "##vso[task.setvariable variable=completed;isOutput=true]true"
125+
name: markE2ECompleted
126+
displayName: Mark E2E completed
122127

123128
# can only succeed with issues in linux
124129
- template: ../../templates/warning-handler-job-template.yaml
125130
parameters:
126131
dependsOnToEmitWarning: ${{ parameters.name }}
132+
completionOutput: markE2ECompleted.completed
127133
clusterName: ${{ parameters.clusterName }}-$(commitID)
128134
fileSearchPattern: "azure-vnet*.log"
129135
# continue on error only in linux case to workaround known cniv1 issue where we leak an ip

.pipelines/singletenancy/azure-cni-overlay-stateless/azure-cni-overlay-stateless-e2e-job-template.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,17 @@ stages:
118118
hostport: true
119119
service: true
120120
hybridWin: true
121+
# Auto-injected policy tasks can mark an otherwise healthy job as
122+
# SucceededWithIssues. This output proves all product test steps ran.
123+
- bash: echo "##vso[task.setvariable variable=completed;isOutput=true]true"
124+
name: markE2ECompleted
125+
displayName: Mark E2E completed
121126

122127
# can only succeed with issues in windows
123128
- template: ../../templates/warning-handler-job-template.yaml
124129
parameters:
125130
dependsOnToEmitWarning: ${{ parameters.name }}_windows
131+
completionOutput: markE2ECompleted.completed
126132
clusterName: ${{ parameters.clusterName }}-$(commitID)
127133
fileSearchPattern: "azure-vnet*.log"
128134
# known windows issues that occur only in testing:

.pipelines/singletenancy/azure-cni-overlay/azure-cni-overlay-e2e-job-template.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,18 @@ stages:
138138
hostport: true
139139
service: true
140140
hybridWin: ${{ eq(parameters.os, 'windows') }}
141+
# Auto-injected policy tasks can mark an otherwise healthy job as
142+
# SucceededWithIssues. This output proves all product test steps ran.
143+
- bash: echo "##vso[task.setvariable variable=completed;isOutput=true]true"
144+
name: markE2ECompleted
145+
displayName: Mark E2E completed
141146

142147
# can only succeed with issues in windows
143148
- ${{ if eq(parameters.os, 'windows') }}:
144149
- template: ../../templates/warning-handler-job-template.yaml
145150
parameters:
146151
dependsOnToEmitWarning: ${{ parameters.name }}_${{ parameters.os }}
152+
completionOutput: markE2ECompleted.completed
147153
clusterName: ${{ parameters.clusterName }}-$(commitID)
148154
fileSearchPattern: "azure-vnet*.log"
149155
# known windows issues that occur only in testing:

.pipelines/singletenancy/dualstack-overlay/dualstackoverlay-e2e-job-template.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,18 @@ stages:
136136
service: ${{ eq(parameters.os, 'linux') }} # RUN IN LINUX NOT WINDOWS Currently broken for scenario and blocking releases, HNS is investigating.
137137
hostport: true
138138
hybridWin: ${{ eq(parameters.os, 'windows') }}
139+
# Auto-injected policy tasks can mark an otherwise healthy job as
140+
# SucceededWithIssues. This output proves all product test steps ran.
141+
- bash: echo "##vso[task.setvariable variable=completed;isOutput=true]true"
142+
name: markE2ECompleted
143+
displayName: Mark E2E completed
139144

140145
# can only succeed with issues in windows
141146
- ${{ if eq(parameters.os, 'windows') }}:
142147
- template: ../../templates/warning-handler-job-template.yaml
143148
parameters:
144149
dependsOnToEmitWarning: ${{ parameters.name }}_${{ parameters.os }}
150+
completionOutput: markE2ECompleted.completed
145151
clusterName: ${{ parameters.clusterName }}-$(commitID)
146152
fileSearchPattern: "azure-vnet*.log"
147153
# known windows issues that occur only in testing:
@@ -169,4 +175,3 @@ stages:
169175
os: ${{ parameters.os }}
170176
cni: cniv2
171177
dependsOnJob: failedE2ELogs_${{ parameters.os }}
172-

.pipelines/templates/warning-handler-job-template.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,20 @@ parameters:
55
searchPattern: ""
66
cni: ""
77
os: ""
8+
completionOutput: ""
89

910
jobs:
1011
- job: warningHandler
1112
displayName: "Handle E2E Warning"
1213
dependsOn: ${{ parameters.dependsOnToEmitWarning }}
13-
condition: eq(dependencies.${{ parameters.dependsOnToEmitWarning }}.result, 'SucceededWithIssues')
14+
condition: |
15+
and(
16+
eq(dependencies.${{ parameters.dependsOnToEmitWarning }}.result, 'SucceededWithIssues'),
17+
or(
18+
eq('${{ parameters.completionOutput }}', ''),
19+
ne(dependencies.${{ parameters.dependsOnToEmitWarning }}.outputs['${{ parameters.completionOutput }}'], 'true')
20+
)
21+
)
1422
pool:
1523
name: $(BUILD_POOL_NAME_DEFAULT)
1624
demands:

0 commit comments

Comments
 (0)