Skip to content

Commit

Permalink
Merge branch 'Azure:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
JackTn authored Nov 5, 2024
2 parents 35a65fe + a0b2a34 commit 7b5d4fa
Show file tree
Hide file tree
Showing 754 changed files with 119,869 additions and 1,483 deletions.
2 changes: 1 addition & 1 deletion .github/actions/setup-node-npm-ci/action.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Setup Node 20 and run `npm ci`
name: Setup Node and run `npm ci`
description: Uses specified Node version and runs npm commands to set up the environment for REST API CI

inputs:
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/_reusable-eng-tools-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,15 @@ jobs:
- uses: actions/checkout@v4
with:
sparse-checkout: |
.github
eng
${{ inputs.sparse-checkout-paths }}
- name: Use Node ${{ matrix.node-version }}.x
uses: actions/setup-node@v4
- name: Setup Node ${{ matrix.node-version }} and run `npm ci`
uses: ./.github/actions/setup-node-npm-ci
with:
node-version: ${{ matrix.node-version }}.x

- run: npm ci
shell: pwsh

- run: npm ls -a
shell: pwsh
continue-on-error: true

- run: npm run build
shell: pwsh
working-directory: ./eng/tools/${{ inputs.package }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/protected-files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: pull_request

env:
# Users allowed to edit protected files without failing check
user-allowed: ${{ github.event.pull_request.user.login == 'azure-sdk' || github.event.pull_request.user.login == 'dependabot[bot]' }}
user-allowed: ${{ github.event.pull_request.user.login == 'azure-sdk' }}

jobs:
protected-files:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/suppressions-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
- eng/tools/package.json
- eng/tools/tsconfig.json
- eng/tools/suppressions/**
workflow_dispatch:

jobs:
suppressions:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tsp-client-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ on:
- specification/common-types
- specification/keyvault
- specification/sphere
workflow_dispatch:

jobs:
tsp-client:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/typespec-requirement-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
- eng/tools/package.json
- eng/tools/tsconfig.json
- eng/tools/typespec-requirement/**
workflow_dispatch:

jobs:
typespec-requirement:
Expand Down
11 changes: 2 additions & 9 deletions .github/workflows/typespec-requirement.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,8 @@ jobs:
# Required since "HEAD^" is passed to TypeSpec-Requirement.ps1
fetch-depth: 2

- name: Use Node 20.0
uses: actions/setup-node@v4
with:
node-version: 20.0

- run: npm ci

- run: npm ls -a
continue-on-error: true
- name: Setup Node and run `npm ci`
uses: ./.github/actions/setup-node-npm-ci

- run: |
eng/scripts/TypeSpec-Requirement.ps1 `
Expand Down
23 changes: 14 additions & 9 deletions .github/workflows/typespec-validation-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,26 @@ on:

jobs:
typespec-validation-all:
name: TypeSpec Validation All
# Use short name to maximize space for parameters in UI
name: TSV

strategy:
# Validate all specs, even if one job fails early
fail-fast: false
# Sort matrix elements from "most important" to "least important" for the best grouping and UI
# Keep matrix values short, to maximize number of parameters shown in UI
matrix:
os: [ubuntu-latest, windows-latest]
# When triggered by schedule, validate both the default branch and typespec-next
# Use the placeholder string "default" instead of passing "" directly, since the latter gets ignored by
# the GitHub Jobs UI.
ref: ${{ fromJSON(github.event_name == 'schedule' && '["default", "next"]' || '["default"]') }}
os: [ubuntu, windows]
# shards must start at 0 and increment by 1
shard: [0, 1, 2]
# total-shards must be an accurate count of the number of shards
total-shards: [3]
# When triggered by schedule, validate both the default branch and typespec-next
# Use the placeholder string "default" instead of passing "" directly, since the latter gets ignored by
# the GitHub Jobs UI.
ref: ${{ fromJSON(github.event_name == 'schedule' && '["default", "typespec-next"]' || '["default"]') }}

runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.os }}-latest

steps:
- name: Enable git long paths
Expand All @@ -58,9 +63,9 @@ jobs:
- uses: actions/checkout@v4
with:
# Convert placeholder string 'default' to '', which tells the action to checkout the default ref.
ref: ${{ matrix.ref != 'default' && matrix.ref || '' }}
ref: ${{ matrix.ref == 'next' && 'typespec-next' || '' }}

- name: Setup Node 20 and run `npm ci`
- name: Setup Node and run `npm ci`
uses: ./.github/actions/setup-node-npm-ci

- name: Validate All Specs
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/typespec-validation-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ on:
- eng/tools/tsconfig.json
- eng/tools/suppressions/**
- eng/tools/typespec-validation/**
workflow_dispatch:

jobs:
typespec-validation:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/typespec-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
with:
fetch-depth: 2

- name: Setup Node 20 and run `npm ci`
- name: Setup Node and run `npm ci`
uses: ./.github/actions/setup-node-npm-ci

- name: Validate Impacted Specs
Expand Down
9 changes: 8 additions & 1 deletion cSpell.json
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@
"PDBs",
"undrainable",
"Undrainable",
"acnstls"
"acnstls",
"kubeletIdentity"
]
},
{
Expand Down Expand Up @@ -1690,6 +1691,12 @@
"words": [
"SEVSNP"
]
},
{
"filename": "**/specification/connectedcache/resource-manager/Microsoft.ConnectedCache/preview/**/*.json",
"words": [
"Eflow"
]
}
],
"enableFiletypes": [
Expand Down
1 change: 1 addition & 0 deletions documentation/samplefiles/readme.java.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ These settings apply only when `--java` is specified on the command line.

``` yaml $(java)
client-flattened-annotation-target: disabled
uuid-as-string: true
```
136 changes: 86 additions & 50 deletions eng/common/pipelines/templates/jobs/generate-job-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ parameters:
- name: PreGenerationSteps
type: stepList
default: []
- name: EnablePRGeneration
type: boolean
default: false
- name: PRMatrixSetting
type: string
default: 'ArtifactPackageNames'
# Mappings to OS name required at template compile time by 1es pipeline templates
- name: Pools
type: object
Expand Down Expand Up @@ -84,57 +90,87 @@ jobs:

- ${{ parameters.PreGenerationSteps }}

- ${{ each config in parameters.MatrixConfigs }}:
- ${{ if eq(parameters.EnablePRGeneration, false) }}:
- ${{ each config in parameters.MatrixConfigs }}:
- ${{ each pool in parameters.Pools }}:
- ${{ if eq(config.GenerateVMJobs, 'true') }}:
- task: Powershell@2
inputs:
pwsh: true
filePath: eng/common/scripts/job-matrix/Create-JobMatrix.ps1
arguments: >
-ConfigPath ${{ config.Path }}
-Selection ${{ config.Selection }}
-DisplayNameFilter '$(displayNameFilter)'
-Filters '${{ join(''',''', parameters.MatrixFilters) }}', 'container=^$', 'SupportedClouds=^$|${{ parameters.CloudConfig.Cloud }}', 'Pool=${{ pool.filter }}'
-Replace '${{ join(''',''', parameters.MatrixReplace) }}'
-NonSparseParameters '${{ join(''',''', config.NonSparseParameters) }}'
displayName: Create ${{ pool.name }} Matrix ${{ config.Name }}
name: vm_job_matrix_${{ config.Name }}_${{ pool.name }}
- ${{ if eq(config.GenerateContainerJobs, 'true') }}:
- task: Powershell@2
inputs:
pwsh: true
filePath: eng/common/scripts/job-matrix/Create-JobMatrix.ps1
arguments: >
-ConfigPath ${{ config.Path }}
-Selection ${{ config.Selection }}
-DisplayNameFilter '$(displayNameFilter)'
-Filters '${{ join(''',''', parameters.MatrixFilters) }}', 'container=^$', 'SupportedClouds=^$|${{ parameters.CloudConfig.Cloud }}', 'Pool=${{ pool.filter }}'
-NonSparseParameters '${{ join(''',''', config.NonSparseParameters) }}'
displayName: Create ${{ pool.name }} Container Matrix ${{ config.Name }}
name: container_job_matrix_${{ config.Name }}_${{ pool.name }}

# This else being set also currently assumes that the $(Build.ArtifactStagingDirectory)/PackageInfo folder is populated by PreGenerationSteps.
# Not currently not hardcoded, so not doing the needful and populating this folder before we hit this step will result in generation errors.
- ${{ else }}:
- ${{ each pool in parameters.Pools }}:
- ${{ if eq(config.GenerateVMJobs, 'true') }}:
- task: Powershell@2
inputs:
pwsh: true
filePath: eng/common/scripts/job-matrix/Create-JobMatrix.ps1
arguments: >
-ConfigPath ${{ config.Path }}
-Selection ${{ config.Selection }}
-DisplayNameFilter '$(displayNameFilter)'
-Filters '${{ join(''',''', parameters.MatrixFilters) }}', 'container=^$', 'SupportedClouds=^$|${{ parameters.CloudConfig.Cloud }}', 'Pool=${{ pool.filter }}'
-Replace '${{ join(''',''', parameters.MatrixReplace) }}'
-NonSparseParameters '${{ join(''',''', config.NonSparseParameters) }}'
displayName: Create ${{ pool.name }} Matrix ${{ config.Name }}
name: vm_job_matrix_${{ config.Name }}_${{ pool.name }}
- pwsh: |
# dump the conglomerated CI matrix
'${{ convertToJson(parameters.MatrixConfigs) }}' | Set-Content matrix.json
- ${{ if eq(config.GenerateContainerJobs, 'true') }}:
- task: Powershell@2
inputs:
pwsh: true
filePath: eng/common/scripts/job-matrix/Create-JobMatrix.ps1
arguments: >
-ConfigPath ${{ config.Path }}
-Selection ${{ config.Selection }}
-DisplayNameFilter '$(displayNameFilter)'
-Filters '${{ join(''',''', parameters.MatrixFilters) }}', 'container=^$', 'SupportedClouds=^$|${{ parameters.CloudConfig.Cloud }}', 'Pool=${{ pool.filter }}'
-NonSparseParameters '${{ join(''',''', config.NonSparseParameters) }}'
displayName: Create ${{ pool.name }} Container Matrix ${{ config.Name }}
name: container_job_matrix_${{ config.Name }}_${{ pool.name }}
./eng/common/scripts/job-matrix/Create-PrJobMatrix.ps1 `
-PackagePropertiesFolder $(Build.ArtifactStagingDirectory)/PackageInfo `
-PRMatrixFile matrix.json `
-PRMatrixSetting ${{ parameters.PRMatrixSetting }} `
-DisplayNameFilter '$(displayNameFilter)' `
-Filters '${{ join(''',''', parameters.MatrixFilters) }}', 'container=^$', 'SupportedClouds=^$|${{ parameters.CloudConfig.Cloud }}', 'Pool=${{ pool.filter }}' `
-Replace '${{ join(''',''', parameters.MatrixReplace) }}'
displayName: Create ${{ pool.name }} PR Matrix
name: vm_job_matrix_pr_${{ pool.name }}
- ${{ each config in parameters.MatrixConfigs }}:
- ${{ each pool in parameters.Pools }}:
- ${{ if eq(config.GenerateVMJobs, 'true') }}:
- template: ${{ parameters.JobTemplatePath }}
parameters:
UsePlatformContainer: false
OSName: ${{ pool.os }}
Matrix: dependencies.${{ parameters.GenerateJobName }}.outputs['vm_job_matrix_${{ config.Name }}_${{ pool.name }}.matrix']
DependsOn: ${{ parameters.GenerateJobName }}
CloudConfig: ${{ parameters.CloudConfig }}
${{ each param in parameters.AdditionalParameters }}:
${{ param.key }}: ${{ param.value }}
- ${{ if eq(parameters.EnablePRGeneration, false) }}:
- ${{ each config in parameters.MatrixConfigs }}:
- ${{ each pool in parameters.Pools }}:
- ${{ if eq(config.GenerateVMJobs, 'true') }}:
- template: ${{ parameters.JobTemplatePath }}
parameters:
UsePlatformContainer: false
OSName: ${{ pool.os }}
Matrix: dependencies.${{ parameters.GenerateJobName }}.outputs['vm_job_matrix_${{ config.Name }}_${{ pool.name }}.matrix']
DependsOn: ${{ parameters.GenerateJobName }}
CloudConfig: ${{ parameters.CloudConfig }}
${{ each param in parameters.AdditionalParameters }}:
${{ param.key }}: ${{ param.value }}

- ${{ if eq(config.GenerateContainerJobs, 'true') }}:
- template: ${{ parameters.JobTemplatePath }}
parameters:
UsePlatformContainer: true
OSName: ${{ pool.os }}
Matrix: dependencies.${{ parameters.GenerateJobName }}.outputs['vm_job_matrix_${{ config.Name }}_${{ pool.name }}.matrix']
DependsOn: ${{ parameters.GenerateJobName }}
CloudConfig: ${{ parameters.CloudConfig }}
${{ each param in parameters.AdditionalParameters }}:
${{ param.key }}: ${{ param.value }}
- ${{ if eq(config.GenerateContainerJobs, 'true') }}:
- template: ${{ parameters.JobTemplatePath }}
parameters:
UsePlatformContainer: true
OSName: ${{ pool.os }}
Matrix: dependencies.${{ parameters.GenerateJobName }}.outputs['vm_job_matrix_${{ config.Name }}_${{ pool.name }}.matrix']
DependsOn: ${{ parameters.GenerateJobName }}
CloudConfig: ${{ parameters.CloudConfig }}
${{ each param in parameters.AdditionalParameters }}:
${{ param.key }}: ${{ param.value }}
- ${{ else }}:
- ${{ each pool in parameters.Pools }}:
- template: ${{ parameters.JobTemplatePath }}
parameters:
UsePlatformContainer: false
OSName: ${{ pool.os }}
Matrix: dependencies.${{ parameters.GenerateJobName }}.outputs['vm_job_matrix_pr_${{ pool.name }}.matrix']
DependsOn: ${{ parameters.GenerateJobName }}
CloudConfig: ${{ parameters.CloudConfig }}
${{ each param in parameters.AdditionalParameters }}:
${{ param.key }}: ${{ param.value }}
Loading

0 comments on commit 7b5d4fa

Please sign in to comment.