Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
virginiaho-ms committed Feb 11, 2025
2 parents f5006fd + 3975eff commit 0ecd129
Show file tree
Hide file tree
Showing 2,443 changed files with 268,226 additions and 15,365 deletions.
7 changes: 6 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,10 @@
/specification/iothub/ @rkmanda

# PRLabel: %KeyVault
/specification/keyvault/ @heaths @randallilama @jlichwa
/specification/keyvault/ @vickm @chen-karen @cheathamb36 @lgonsoulin

# PRLabel: %KeyVault
/specification/keyvault/data-plane/ @vickm @chen-karen @cheathamb36 @lgonsoulin @heaths

# PRLabel: %Load Test Service
/specification/loadtestservice/data-plane/ @Azure/api-stewardship-board
Expand Down Expand Up @@ -273,6 +276,8 @@
/specification/**/resource-manager/**/readme.go.md @tadelesh
/specification/**/resource-manager/**/readme.python.md @msyyc

/specification/contosowidgetmanager/ @mikeharder @raych1 @maririos

###########
# Eng Sys
###########
Expand Down
2 changes: 2 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ Switch to "Preview" on this description then select one of the choices below.
<a href="?expand=1&template=data_plane_template.md">Click here</a> to open a PR for a Data Plane API.

<a href="?expand=1&template=control_plane_template.md">Click here</a> to open a PR for a Control Plane (ARM) API.

<a href="?expand=1&template=sdk_configuration_template.md">Click here</a> to open a PR for only SDK configuration.
25 changes: 25 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/sdk_configuration_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# SDK configuration pull request

## Purpose of this PR

- [ ] Make changes to the SDK configuration only when there are no modifications to the API specification, eliminating the need for an ARM or Stewardship Board API review.

## Due diligence checklist

To merge this PR, you **must** go through the following checklist and confirm you understood
and followed the instructions by checking all the boxes:

- [ ] I confirm this PR is modifying only SDK configurations, and not API related specifications.
- [ ] I have reviewed and used the respective `tspconfig.yaml` templates:
- [ARM tspconfig template](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/contosowidgetmanager/Contoso.Management/tspconfig.yaml)
- [Data plane tspconfig template](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/contosowidgetmanager/Contoso.WidgetManager/tspconfig.yaml)

## Getting help

- First, carefully read through this PR description, from top to bottom. Fill out the `Purpose of this PR` and `Due diligence checklist`.
- If you don't have permissions to remove or add labels to the PR, request `write access` per [aka.ms/azsdk/access#request-access-to-rest-api-or-sdk-repositories](https://aka.ms/azsdk/access#request-access-to-rest-api-or-sdk-repositories)
- To understand what you must do next to merge this PR, see the `Next Steps to Merge` comment. It will appear within few minutes of submitting this PR and will continue to be up-to-date with current PR state.
- For guidance on fixing this PR CI check failures, see the hyperlinks provided in given failure and https://aka.ms/ci-fix.
- If the PR CI checks appear to be stuck in `queued` state, please add a comment with contents `/azp run`.
This should result in a new comment denoting a `PR validation pipeline` has started and the checks should be updated after few minutes.
- If the help provided by the previous points is not enough, post to https://aka.ms/azsdk/support/specreview-channel and link to this PR.
2 changes: 1 addition & 1 deletion .github/actions/setup-node-npm-ci/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Uses specified Node version and runs npm commands to set up the env
inputs:
node-version:
description: 'Node version to use'
default: 20.x
default: 22.x

runs:
using: "composite"
Expand Down
6 changes: 6 additions & 0 deletions .github/cspell.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: '0.2'
import:
- ../cspell.yaml
words:
- azsdk
- pwsh
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ updates:
- dependency-name: "minimatch"
versions: [ ">= 10.0.0"]
groups:
# Ships separately from other typespec packages
typespec-client-generator-cli:
patterns:
- "@azure-tools/typespec-client-generator-cli"
typespec:
patterns:
- "*typespec*"
Expand Down
107 changes: 107 additions & 0 deletions .github/workflows/SDK-Suppressions-Label.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: SDK Suppressions

on:
pull_request:
branches:
- main
- RPSaaSMaster
- release*

jobs:
process-sdk-suppressions-labels:
name: Sdk Suppressions
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# Required since "HEAD^" is passed to Get-ChangedFiles
fetch-depth: 2

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

- name: Get GitHub PullRequest Changed Files
shell: pwsh
id: get-changedFiles
run: |
. eng/scripts/ChangedFiles-Functions.ps1
$changedFiles = @(Get-ChangedFiles)
$changedFilesArray = $changedFiles -split ' '
$yamlFilesArray = $changedFilesArray | Where-Object { $_ -match 'sdk-suppressions\.yaml$' }
$yamlFiles = $yamlFilesArray -join ' '
echo "PR Changed sdk-suppressions.yaml files: $yamlFiles"
Add-Content -Path $env:GITHUB_OUTPUT -Value "changedFiles=$yamlFiles"
- name: Get GitHub PullRequest Context
uses: actions/github-script@v7
id: fetch-pullRequest-context
with:
script: |
const pr = context.payload.pull_request;
if (!pr) {
throw new Error("This workflow must run in the context of a pull request.");
}
console.log("This action trigger by ", context.eventName);
core.setOutput("prLabels", pr.labels.map(label => label.name));
result-encoding: string

- name: Run Get suppressions label script
id: run-suppressions-script
env:
OUTPUT_FILE: "output.json"
GITHUB_PULL_REQUEST_CHANGE_FILES: ${{ steps.get-changedFiles.outputs.changedFiles }}
GITHUB_PULL_REQUEST_LABELS: ${{ steps.fetch-pullRequest-context.outputs.prLabels }}
run: |
node eng/tools/sdk-suppressions/cmd/sdk-suppressions-label.js HEAD^ HEAD "$GITHUB_PULL_REQUEST_CHANGE_FILES" "$GITHUB_PULL_REQUEST_LABELS"
OUTPUT=$(cat $OUTPUT_FILE)
echo "Script output labels: $OUTPUT"
labelsToAdd=$(echo "$OUTPUT" | sed -n 's/.*"labelsToAdd":\[\([^]]*\)\].*/\1/p' | tr -d '" ')
labelsToRemove=$(echo "$OUTPUT" | sed -n 's/.*"labelsToRemove":\[\([^]]*\)\].*/\1/p' | tr -d '" ')
for label in $(echo $labelsToAdd | tr ',' '\n'); do
echo "Label to add: $label"
echo "$label=true" >> $GITHUB_OUTPUT
done
for label in $(echo $labelsToRemove | tr ',' '\n'); do
echo "Label to remove: $label"
echo "$label=false" >> $GITHUB_OUTPUT
done
# No Action or Add/Remove label ​​according to step run-suppressions-script output
# e.g.
# If the output of the step does not include the BreakingChange-Go-Sdk-Suppression, no action will be taken.
# If the step's output is "BreakingChange-Go-Sdk-Suppression='true'", the label "BreakingChange-Go-Sdk-Suppression" will be applied to the PR.
# If the step's output is "BreakingChange-Go-Sdk-Suppression='false'", the label "BreakingChange-Go-Sdk-Suppression" will be removed from the PR.
- uses: ./.github/actions/add-label-artifact
name: Upload artifact with results-go
if: ${{ steps.run-suppressions-script.outputs.BreakingChange-Go-Sdk-Suppression }}
with:
name: "BreakingChange-Go-Sdk-Suppression"
value: "${{ steps.run-suppressions-script.outputs.BreakingChange-Go-Sdk-Suppression == 'true' }}"

- uses: ./.github/actions/add-label-artifact
name: Upload artifact with results java
if: ${{ steps.run-suppressions-script.outputs.BreakingChange-Java-Sdk-Suppression }}
with:
name: "BreakingChange-Java-Sdk-Suppression"
value: "${{ steps.run-suppressions-script.outputs.BreakingChange-Java-Sdk-Suppression == 'true' }}"

- uses: ./.github/actions/add-label-artifact
name: Upload artifact with results js
if: ${{ steps.run-suppressions-script.outputs.BreakingChange-JavaScript-Sdk-Suppression }}
with:
name: "BreakingChange-JavaScript-Sdk-Suppression"
value: "${{ steps.run-suppressions-script.outputs.BreakingChange-JavaScript-Sdk-Suppression == 'true' }}"

- uses: ./.github/actions/add-label-artifact
name: Upload artifact with results python
if: ${{ steps.run-suppressions-script.outputs.BreakingChange-Python-Sdk-Suppression }}
with:
name: "BreakingChange-Python-Sdk-Suppression"
value: "${{ steps.run-suppressions-script.outputs.BreakingChange-Python-Sdk-Suppression == 'true' }}"
4 changes: 2 additions & 2 deletions .github/workflows/_reusable-eng-tools-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node-version: [18, 20]
node-version: [18, 22]
exclude:
- os: ubuntu-latest
node-version: 20
node-version: 22
- os: windows-latest
node-version: 18

Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/protected-files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ jobs:
run: |
. eng/scripts/ChangedFiles-Functions.ps1
$protectedFiles = @("package.json", "package-lock.json")
$protectedFiles = @("package.json", "package-lock.json", ".github/*", "eng/*")
$changedFiles = @(Get-ChangedFiles -baseCommitish HEAD^ -targetCommitish HEAD -diffFilter "")
$matchedFiles = @($protectedFiles | Where-Object { $changedFiles -contains $_})
$matchedFiles = @($changedFiles | Where-Object { $changedFile = $_; $protectedFiles | Where-Object { $changedFile -like $_ } })
if ($matchedFiles.Count -gt 0) {
foreach ($file in $matchedFiles) {
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/spelling-all.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: SpellCheck - All

on:
push:
branches:
- main
- RPSaaSMaster

schedule:
# Run every day at 12:06 UTC
- cron: "6 12 * * *"
workflow_dispatch:

jobs:
spellcheck:
name: SpellCheck
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Run spelling check
run: |
./eng/common/spelling/Invoke-Cspell.ps1 `
-ScanGlobs '**' `
-CSpellConfigPath './cspell.json' `
-SpellCheckRoot (Resolve-Path specification)
shell: pwsh
28 changes: 28 additions & 0 deletions .github/workflows/spelling.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: SpellCheck

on: pull_request

jobs:
spellcheck:
name: SpellCheck
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Run spelling check
run: |
./eng/common/scripts/check-spelling-in-changed-files.ps1 `
-CSpellConfigPath 'cspell.json' `
-SourceCommittish HEAD `
-TargetCommittish HEAD^ `
-SpellCheckRoot (Resolve-Path specification) `
-ExitWithError
if ($LASTEXITCODE) {
Write-Host "Spelling errors found in changed files. See https://aka.ms/ci-fix#spell-check"
exit $LASTEXITCODE
}
shell: pwsh
6 changes: 2 additions & 4 deletions .github/workflows/tsp-client-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ on:
- eng/tools/tsconfig.json
- eng/tools/tsp-client-tests/**
- specification/common-types
- specification/keyvault
- specification/sphere
- specification/contosowidgetmanager
workflow_dispatch:

jobs:
Expand All @@ -28,5 +27,4 @@ jobs:
package: tsp-client-tests
sparse-checkout-paths: |
specification/common-types
specification/keyvault
specification/sphere
specification/contosowidgetmanager
2 changes: 1 addition & 1 deletion .github/workflows/update-labels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
# types: [labeled, unlabeled]
# If an upstream workflow if completed, get only the artifacts from that workflow, and update labels
workflow_run:
workflows: ["TypeSpec Requirement"]
workflows: ["TypeSpec Requirement", "SDK Suppressions"]
types: [completed]
workflow_dispatch:
inputs:
Expand Down
Loading

0 comments on commit 0ecd129

Please sign in to comment.