Skip to content

Commit ac364fb

Browse files
authored
Fix Weekly Test Failures (#34823)
* fix attestation tests * create an isolated 1es entrypoint for python-analyze-weekly * swap standalone tests.ymls calls to isolated 1es entrypoint for python-analyze-weekly
1 parent b89c0a2 commit ac364fb

File tree

16 files changed

+190
-25
lines changed

16 files changed

+190
-25
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
resources:
2+
repositories:
3+
- repository: 1ESPipelineTemplates
4+
type: git
5+
name: 1ESPipelineTemplates/1ESPipelineTemplates
6+
ref: refs/tags/release
7+
- repository: azure-sdk-build-tools
8+
type: git
9+
name: internal/azure-sdk-build-tools
10+
ref: refs/tags/azure-sdk-build-tools_20230829.1
11+
12+
parameters:
13+
- name: stages
14+
type: stageList
15+
default: []
16+
- name: Use1ESOfficial
17+
type: boolean
18+
default: true
19+
20+
extends:
21+
${{ if and(parameters.Use1ESOfficial, eq(variables['System.TeamProject'], 'internal')) }}:
22+
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
23+
${{ else }}:
24+
template: v1/1ES.Unofficial.PipelineTemplate.yml@1ESPipelineTemplates
25+
parameters:
26+
settings:
27+
skipBuildTagsForGitHubPullRequests: true
28+
sdl:
29+
sourceAnalysisPool:
30+
name: azsdk-pool-mms-win-2022-general
31+
image: azsdk-pool-mms-win-2022-1espt
32+
os: windows
33+
sourceRepositoriesToScan:
34+
exclude:
35+
- repository: azure-sdk-build-tools
36+
credscan:
37+
suppressionsFile: '$(Build.SourcesDirectory)/eng/CredScanSuppression.json'
38+
toolVersion: '2.3.12.23'
39+
baselineFiles: $(Build.SourcesDirectory)/eng/python.gdnbaselines
40+
eslint:
41+
enabled: false
42+
justificationForDisabling: "ESLint injected task has failures because it uses an old version of mkdirp. We should not fail for tools not controlled by the repo. See: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=3556850"
43+
psscriptanalyzer:
44+
compiled: true
45+
break: true
46+
policy: M365
47+
stages: ${{ parameters.stages }}
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
parameters:
2+
- name: ServiceDirectory
3+
type: string
4+
default: ''
5+
- name: BuildTargetingString
6+
type: string
7+
default: 'azure-*'
8+
- name: JobName
9+
type: string
10+
default: 'Test'
11+
12+
extends:
13+
template: /eng/pipelines/templates/stages/1es-redirect.yml@self
14+
parameters:
15+
stages:
16+
- ${{ if contains(variables['Build.DefinitionName'], 'tests-weekly') }}:
17+
- stage:
18+
displayName: 'Analyze_${{ parameters.JobName }}'
19+
variables:
20+
- template: /eng/pipelines/templates/variables/image.yml
21+
dependsOn: []
22+
jobs:
23+
- job: 'Analyze'
24+
timeoutInMinutes: 90
25+
26+
variables:
27+
- name: PythonVersion
28+
value: '3.8'
29+
30+
pool:
31+
name: $(LINUXPOOL)
32+
image: $(LINUXVMIMAGE)
33+
os: linux
34+
35+
steps:
36+
- task: UsePythonVersion@0
37+
displayName: 'Use Python 3.8'
38+
inputs:
39+
versionSpec: '3.8'
40+
- script: |
41+
python -m pip install setuptools==58.3.0
42+
python -m pip install -r eng/ci_tools.txt
43+
displayName: 'Prep Environment'
44+
- task: PythonScript@0
45+
displayName: 'Run Pylint Next'
46+
continueOnError: true
47+
inputs:
48+
scriptPath: 'scripts/devops_tasks/dispatch_tox.py'
49+
arguments: >-
50+
${{ parameters.BuildTargetingString }}
51+
--service="${{ parameters.ServiceDirectory }}"
52+
--toxenv="next-pylint"
53+
--disablecov
54+
--filter-type="Omit_management"
55+
env:
56+
GH_TOKEN: $(azuresdk-github-pat)
57+
58+
- task: PythonScript@0
59+
displayName: 'Run MyPy Next'
60+
continueOnError: true
61+
inputs:
62+
scriptPath: 'scripts/devops_tasks/dispatch_tox.py'
63+
arguments: >-
64+
${{ parameters.BuildTargetingString }}
65+
--service="${{ parameters.ServiceDirectory }}"
66+
--toxenv="next-mypy"
67+
--disablecov
68+
env:
69+
GH_TOKEN: $(azuresdk-github-pat)
70+
71+
- task: PythonScript@0
72+
displayName: 'Run Pyright Next'
73+
continueOnError: true
74+
inputs:
75+
scriptPath: 'scripts/devops_tasks/dispatch_tox.py'
76+
arguments: >-
77+
${{ parameters.BuildTargetingString }}
78+
--service="${{ parameters.ServiceDirectory }}"
79+
--toxenv="next-pyright"
80+
--disablecov
81+
env:
82+
GH_TOKEN: $(azuresdk-github-pat)
83+
84+
- task: PythonScript@0
85+
displayName: 'Run Ruff'
86+
continueOnError: true
87+
inputs:
88+
scriptPath: 'scripts/devops_tasks/dispatch_tox.py'
89+
arguments: >-
90+
${{ parameters.BuildTargetingString }}
91+
--service="${{ parameters.ServiceDirectory }}"
92+
--toxenv="ruff"
93+
--disablecov
94+
env:
95+
GH_TOKEN: $(azuresdk-github-pat)
96+
97+
- task: UsePythonVersion@0
98+
displayName: 'Use Python 3.11 for docs generation'
99+
inputs:
100+
versionSpec: '3.11'
101+
102+
- script: |
103+
python -m pip install setuptools==58.3.0
104+
python -m pip install -r eng/ci_tools.txt
105+
displayName: 'Prep Environment'
106+
107+
- task: PythonScript@0
108+
displayName: 'Generate Docs'
109+
continueOnError: true
110+
inputs:
111+
scriptPath: 'scripts/devops_tasks/dispatch_tox.py'
112+
arguments: >-
113+
${{ parameters.BuildTargetingString }}
114+
--service="${{ parameters.ServiceDirectory }}"
115+
--toxenv="strict-sphinx"
116+
env:
117+
GH_TOKEN: $(azuresdk-github-pat)

eng/pipelines/templates/stages/python-analyze-weekly.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,20 @@ stages:
1313
- ${{ if contains(variables['Build.DefinitionName'], 'tests-weekly') }}:
1414
- stage:
1515
displayName: 'Analyze_${{ parameters.JobName }}'
16+
variables:
17+
- template: /eng/pipelines/templates/variables/image.yml
1618
dependsOn: []
1719
jobs:
1820
- job: 'Analyze'
1921
timeoutInMinutes: 90
2022

2123
variables:
22-
- template: /eng/pipelines/templates/variables/image.yml
2324
- name: PythonVersion
2425
value: '3.8'
2526

2627
pool:
2728
name: $(LINUXPOOL)
28-
vmImage: $(LINUXVMIMAGE)
29+
image: $(LINUXVMIMAGE)
2930
os: linux
3031

3132
steps:

sdk/ai/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
trigger: none
22

33
# NOTE: Service live tests are NOT enabled. This file only enables the analyze stage currently.
4-
stages:
5-
- template: /eng/pipelines/templates/stages/python-analyze-weekly.yml
4+
extends:
5+
template: /eng/pipelines/templates/stages/python-analyze-weekly-standalone.yml
66
parameters:
77
ServiceDirectory: ai

sdk/anomalydetector/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
trigger: none
22

33
# NOTE: Service live tests are NOT enabled. This file only enables the analyze stage currently.
4-
stages:
5-
- template: /eng/pipelines/templates/stages/python-analyze-weekly.yml
4+
extends:
5+
template: /eng/pipelines/templates/stages/python-analyze-weekly-standalone.yml
66
parameters:
77
ServiceDirectory: anomalydetector

sdk/attestation/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
trigger: none
22

3-
extend:
3+
extends:
44
template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml
55
parameters:
66
ServiceDirectory: attestation

sdk/batch/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
trigger: none
22

33
# NOTE: Service live tests are NOT enabled. This file only enables the analyze stage currently.
4-
stages:
5-
- template: /eng/pipelines/templates/stages/python-analyze-weekly.yml
4+
extends:
5+
template: /eng/pipelines/templates/stages/python-analyze-weekly-standalone.yml
66
parameters:
77
ServiceDirectory: batch

sdk/contentsafety/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
trigger: none
22

33
# NOTE: Service live tests are NOT enabled. This file only enables the analyze stage currently.
4-
stages:
5-
- template: /eng/pipelines/templates/stages/python-analyze-weekly.yml
4+
extends:
5+
template: /eng/pipelines/templates/stages/python-analyze-weekly-standalone.yml
66
parameters:
77
ServiceDirectory: contentsafety

sdk/devcenter/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
trigger: none
22

33
# NOTE: Service live tests are NOT enabled. This file only enables the analyze stage currently.
4-
stages:
5-
- template: /eng/pipelines/templates/stages/python-analyze-weekly.yml
4+
extends:
5+
template: /eng/pipelines/templates/stages/python-analyze-weekly-standalone.yml
66
parameters:
77
ServiceDirectory: devcenter

sdk/deviceupdate/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
trigger: none
22

33
# NOTE: Service live tests are NOT enabled. This file only enables the analyze stage currently.
4-
stages:
5-
- template: /eng/pipelines/templates/stages/python-analyze-weekly.yml
4+
extends:
5+
template: /eng/pipelines/templates/stages/python-analyze-weekly-standalone.yml
66
parameters:
77
ServiceDirectory: deviceupdate

0 commit comments

Comments
 (0)