Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Weekly Test Failures #34823

Merged
merged 8 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions eng/pipelines/templates/stages/1es-redirect.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
resources:
repositories:
- repository: 1ESPipelineTemplates
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
- repository: azure-sdk-build-tools
type: git
name: internal/azure-sdk-build-tools
ref: refs/tags/azure-sdk-build-tools_20230829.1

parameters:
- name: stages
type: stageList
default: []
- name: Use1ESOfficial
type: boolean
default: true

extends:
${{ if and(parameters.Use1ESOfficial, eq(variables['System.TeamProject'], 'internal')) }}:
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
${{ else }}:
template: v1/1ES.Unofficial.PipelineTemplate.yml@1ESPipelineTemplates
parameters:
settings:
skipBuildTagsForGitHubPullRequests: true
sdl:
sourceAnalysisPool:
name: azsdk-pool-mms-win-2022-general
image: azsdk-pool-mms-win-2022-1espt
os: windows
sourceRepositoriesToScan:
exclude:
- repository: azure-sdk-build-tools
credscan:
suppressionsFile: '$(Build.SourcesDirectory)/eng/CredScanSuppression.json'
toolVersion: '2.3.12.23'
baselineFiles: $(Build.SourcesDirectory)/eng/python.gdnbaselines
eslint:
enabled: false
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"
psscriptanalyzer:
compiled: true
break: true
policy: M365
stages: ${{ parameters.stages }}
117 changes: 117 additions & 0 deletions eng/pipelines/templates/stages/python-analyze-weekly-standalone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
parameters:
- name: ServiceDirectory
type: string
default: ''
- name: BuildTargetingString
type: string
default: 'azure-*'
- name: JobName
type: string
default: 'Test'

extends:
template: /eng/pipelines/templates/stages/1es-redirect.yml@self
parameters:
stages:
- ${{ if contains(variables['Build.DefinitionName'], 'tests-weekly') }}:
- stage:
displayName: 'Analyze_${{ parameters.JobName }}'
variables:
- template: /eng/pipelines/templates/variables/image.yml
dependsOn: []
jobs:
- job: 'Analyze'
timeoutInMinutes: 90

variables:
- name: PythonVersion
value: '3.8'

pool:
name: $(LINUXPOOL)
image: $(LINUXVMIMAGE)
os: linux

steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.8'
inputs:
versionSpec: '3.8'
- script: |
python -m pip install setuptools==58.3.0
python -m pip install -r eng/ci_tools.txt
displayName: 'Prep Environment'
- task: PythonScript@0
displayName: 'Run Pylint Next'
continueOnError: true
inputs:
scriptPath: 'scripts/devops_tasks/dispatch_tox.py'
arguments: >-
${{ parameters.BuildTargetingString }}
--service="${{ parameters.ServiceDirectory }}"
--toxenv="next-pylint"
--disablecov
--filter-type="Omit_management"
env:
GH_TOKEN: $(azuresdk-github-pat)

- task: PythonScript@0
displayName: 'Run MyPy Next'
continueOnError: true
inputs:
scriptPath: 'scripts/devops_tasks/dispatch_tox.py'
arguments: >-
${{ parameters.BuildTargetingString }}
--service="${{ parameters.ServiceDirectory }}"
--toxenv="next-mypy"
--disablecov
env:
GH_TOKEN: $(azuresdk-github-pat)

- task: PythonScript@0
displayName: 'Run Pyright Next'
continueOnError: true
inputs:
scriptPath: 'scripts/devops_tasks/dispatch_tox.py'
arguments: >-
${{ parameters.BuildTargetingString }}
--service="${{ parameters.ServiceDirectory }}"
--toxenv="next-pyright"
--disablecov
env:
GH_TOKEN: $(azuresdk-github-pat)

- task: PythonScript@0
displayName: 'Run Ruff'
continueOnError: true
inputs:
scriptPath: 'scripts/devops_tasks/dispatch_tox.py'
arguments: >-
${{ parameters.BuildTargetingString }}
--service="${{ parameters.ServiceDirectory }}"
--toxenv="ruff"
--disablecov
env:
GH_TOKEN: $(azuresdk-github-pat)

- task: UsePythonVersion@0
displayName: 'Use Python 3.11 for docs generation'
inputs:
versionSpec: '3.11'

- script: |
python -m pip install setuptools==58.3.0
python -m pip install -r eng/ci_tools.txt
displayName: 'Prep Environment'

- task: PythonScript@0
displayName: 'Generate Docs'
continueOnError: true
inputs:
scriptPath: 'scripts/devops_tasks/dispatch_tox.py'
arguments: >-
${{ parameters.BuildTargetingString }}
--service="${{ parameters.ServiceDirectory }}"
--toxenv="strict-sphinx"
env:
GH_TOKEN: $(azuresdk-github-pat)
5 changes: 3 additions & 2 deletions eng/pipelines/templates/stages/python-analyze-weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,20 @@ stages:
- ${{ if contains(variables['Build.DefinitionName'], 'tests-weekly') }}:
- stage:
displayName: 'Analyze_${{ parameters.JobName }}'
variables:
- template: /eng/pipelines/templates/variables/image.yml
dependsOn: []
jobs:
- job: 'Analyze'
timeoutInMinutes: 90

variables:
- template: /eng/pipelines/templates/variables/image.yml
- name: PythonVersion
value: '3.8'

pool:
name: $(LINUXPOOL)
vmImage: $(LINUXVMIMAGE)
image: $(LINUXVMIMAGE)
os: linux

steps:
Expand Down
4 changes: 2 additions & 2 deletions sdk/ai/tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
trigger: none

# NOTE: Service live tests are NOT enabled. This file only enables the analyze stage currently.
stages:
- template: /eng/pipelines/templates/stages/python-analyze-weekly.yml
extends:
template: /eng/pipelines/templates/stages/python-analyze-weekly-standalone.yml
parameters:
ServiceDirectory: ai
4 changes: 2 additions & 2 deletions sdk/anomalydetector/tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
trigger: none

# NOTE: Service live tests are NOT enabled. This file only enables the analyze stage currently.
stages:
- template: /eng/pipelines/templates/stages/python-analyze-weekly.yml
extends:
template: /eng/pipelines/templates/stages/python-analyze-weekly-standalone.yml
parameters:
ServiceDirectory: anomalydetector
2 changes: 1 addition & 1 deletion sdk/attestation/tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
trigger: none

extend:
extends:
template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml
parameters:
ServiceDirectory: attestation
Expand Down
4 changes: 2 additions & 2 deletions sdk/batch/tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
trigger: none

# NOTE: Service live tests are NOT enabled. This file only enables the analyze stage currently.
stages:
- template: /eng/pipelines/templates/stages/python-analyze-weekly.yml
extends:
template: /eng/pipelines/templates/stages/python-analyze-weekly-standalone.yml
parameters:
ServiceDirectory: batch
4 changes: 2 additions & 2 deletions sdk/contentsafety/tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
trigger: none

# NOTE: Service live tests are NOT enabled. This file only enables the analyze stage currently.
stages:
- template: /eng/pipelines/templates/stages/python-analyze-weekly.yml
extends:
template: /eng/pipelines/templates/stages/python-analyze-weekly-standalone.yml
parameters:
ServiceDirectory: contentsafety
4 changes: 2 additions & 2 deletions sdk/devcenter/tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
trigger: none

# NOTE: Service live tests are NOT enabled. This file only enables the analyze stage currently.
stages:
- template: /eng/pipelines/templates/stages/python-analyze-weekly.yml
extends:
template: /eng/pipelines/templates/stages/python-analyze-weekly-standalone.yml
parameters:
ServiceDirectory: devcenter
4 changes: 2 additions & 2 deletions sdk/deviceupdate/tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
trigger: none

# NOTE: Service live tests are NOT enabled. This file only enables the analyze stage currently.
stages:
- template: /eng/pipelines/templates/stages/python-analyze-weekly.yml
extends:
template: /eng/pipelines/templates/stages/python-analyze-weekly-standalone.yml
parameters:
ServiceDirectory: deviceupdate
4 changes: 2 additions & 2 deletions sdk/easm/tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
trigger: none

# NOTE: Service live tests are NOT enabled. This file only enables the analyze stage currently.
stages:
- template: /eng/pipelines/templates/stages/python-analyze-weekly.yml
extends:
template: /eng/pipelines/templates/stages/python-analyze-weekly-standalone.yml
parameters:
ServiceDirectory: easm
4 changes: 2 additions & 2 deletions sdk/iothub/tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
trigger: none

# NOTE: Service live tests are NOT enabled. This file only enables the analyze stage currently.
stages:
- template: /eng/pipelines/templates/stages/python-analyze-weekly.yml
extends:
template: /eng/pipelines/templates/stages/python-analyze-weekly-standalone.yml
parameters:
ServiceDirectory: iothub
4 changes: 2 additions & 2 deletions sdk/loadtesting/tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
trigger: none

# NOTE: Service live tests are NOT enabled. This file only enables the analyze stage currently.
stages:
- template: /eng/pipelines/templates/stages/python-analyze-weekly.yml
extends:
template: /eng/pipelines/templates/stages/python-analyze-weekly-standalone.yml
parameters:
ServiceDirectory: loadtesting
4 changes: 2 additions & 2 deletions sdk/purview/tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
trigger: none

# NOTE: Service live tests are NOT enabled. This file only enables the analyze stage currently.
stages:
- template: /eng/pipelines/templates/stages/python-analyze-weekly.yml
extends:
template: /eng/pipelines/templates/stages/python-analyze-weekly-standalone.yml
parameters:
ServiceDirectory: purview
2 changes: 1 addition & 1 deletion sdk/servicefabric/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ trigger: none

# NOTE: Service live tests are NOT enabled. This file only enables the analyze stage currently.
extends:
template: /eng/pipelines/templates/stages/python-analyze-weekly.yml
template: /eng/pipelines/templates/stages/python-analyze-weekly-standalone.yml
parameters:
ServiceDirectory: servicefabric
2 changes: 1 addition & 1 deletion sdk/synapse/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ trigger: none

# NOTE: Service live tests are NOT enabled. This file only enables the analyze stage currently.
extends:
template: /eng/pipelines/templates/stages/python-analyze-weekly.yml
template: /eng/pipelines/templates/stages/python-analyze-weekly-standalone.yml
parameters:
ServiceDirectory: synapse
Loading