Skip to content

Commit

Permalink
Merge branch 'Azure:main' into feature-add-ali-api-version-2024-04-10
Browse files Browse the repository at this point in the history
  • Loading branch information
8Gitbrix authored Jun 27, 2024
2 parents 7b81c2c + 8b8426c commit 8e2aee6
Show file tree
Hide file tree
Showing 944 changed files with 217,520 additions and 187,082 deletions.
2 changes: 2 additions & 0 deletions .azure-pipelines/templates/azdev_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ steps:
pip install azdev
azdev --version
azdev setup -c $CLI_REPO_PATH -r $CLI_EXT_REPO_PATH --debug
# Installing setuptools with a version higher than 70.0.0 will not generate metadata.json
pip install setuptools==70.0.0
pip list -v
az --version
displayName: 'azdev setup'
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@

/src/alb/ @jaishals

/src/aosm/ @sunnycarter
/src/aosm/ @priyavj08

/src/managedccfs/ @msftsettiy

Expand Down
24 changes: 24 additions & 0 deletions .github/policies/resourceManagement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5114,6 +5114,8 @@ configuration:
reviewer: jsntcy
- requestReview:
reviewer: bebound
- requestReview:
reviewer: Pan-Qi
- assignTo:
users:
- wangzelin007
Expand Down Expand Up @@ -6365,5 +6367,27 @@ configuration:
- kairu-ms
- AllyW
description: '[PowerBI] Auto assign labels and reviewers based on PR title/description.'
- if:
- payloadType: Pull_Request
- isAction:
action: Opened
- or:
- titleContains:
pattern: 'k8s-runtime'
isRegex: True
- bodyContains:
pattern: 'k8s-runtime'
isRegex: True
then:
- addLabel:
label: Auto-Assign
- requestReview:
reviewer: yonzhan
- requestReview:
reviewer: ReaNAiveD
- assignTo:
users:
- ReaNAiveD
description: '[k8s-runtime] Auto assign labels and reviewers based on PR title/description.'
onFailure:
onSuccess:
115 changes: 115 additions & 0 deletions .github/workflows/ProcessCodeReview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
name: Auto Review PR

on:
pull_request_target:
types: [opened, synchronize]
branches:
- main

permissions: {}

jobs:
pr-code-review:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-code-review') }}
runs-on: ubuntu-latest
permissions:
pull-requests: read
contents: read
steps:
- name: Check Init Event
env:
action: ${{ toJSON(github.event.action) }}
label: ${{ toJSON(github.event.label) }}
run: |
echo start review module changed
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Checkout CLI extension repo
uses: actions/checkout@master
with:
fetch-depth: 0 # checkout all branches
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }} # checkout pull request branch
- name: Show workdirectory after site cloned
run: |
pwd
ls
- name: Get Diff Modules
env:
bash_sha: ${{ github.event.pull_request.base.sha }}
base_branch: ${{ github.event.pull_request.base.ref }}
base_branch_pre: "upstream"
diff_sha: ${{ github.event.pull_request.head.sha }}
diff_branch: ${{ github.event.pull_request.head.ref }}
repo_full_name: ${{ github.event.pull_request.head.repo.full_name }}
run: |
set -x
git --version
git log --oneline | head -n 30
git branch -a
git fetch https://github.com/Azure/azure-cli-extensions.git "$base_branch":"$base_branch_pre"/"$base_branch"
git checkout "$base_branch_pre"/"$base_branch"
git log --oneline | head -n 30
git checkout "$diff_branch"
git log --oneline | head -n 30
git --no-pager diff --name-only --diff-filter=ACMRT "$base_branch_pre"/"$base_branch"..."$diff_branch" > changed_files
cat changed_files
echo "changed_module_list=$(cat changed_files | grep azext_ | awk -F"azext_" '{print $1}'| awk -F"/" '{print $2}' | sort | uniq | xargs)" >> $GITHUB_ENV
- name: Display Diff Modules
run: |
for mod in "$changed_module_list"
do
echo changed module: "${mod}"
done
- name: Check whether aaz-related Module
id: check_if_aaz_used
env:
pr_label_list: ${{ toJson(github.event.pull_request.labels.*.name) }}
result_path: "./review_result"
output_file: "is_aaz_check.txt"
survey_comment_file: "aaz_survey_comment.txt"
base_branch: ${{ github.event.pull_request.base.ref }}
base_branch_pre: "upstream"
run: |
set -ev
mkdir ${result_path}
git checkout "$base_branch_pre"/"$base_branch" -- scripts
python scripts/ci/codegen_cal.py --job check
ls ${result_path}
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: review-code-output
path: |
review_result
retention-days: 1
action-on-output:
needs: pr-code-review
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: read
steps:
- name: Download code review result
uses: actions/download-artifact@v4
with:
name: review-code-output
- name: Show workdirectory after result downloaded
run: |
pwd
ls
- name: Check comment file existence
id: check_survey_comment_file
uses: andstor/file-existence-action@v3
with:
files: "./aaz_survey_comment.txt"
- name: Comment survey on the pull request
if: steps.check_survey_comment_file.outputs.files_exists == 'true'
uses: mshick/add-pr-comment@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
message-id: aazSurveyCommentBot
message-path: |
aaz_survey_comment.txt
10 changes: 10 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Microsoft Open Source Code of Conduct

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).

Resources:

- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
- Contact [[email protected]](mailto:[email protected]) with questions or concerns
- Employees can reach out at [aka.ms/opensource/moderation-support](https://aka.ms/opensource/moderation-support)
23 changes: 10 additions & 13 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,18 @@ jobs:
pool:
name: 'pool-windows-2019'
steps:
# - task: ms-codeanalysis.vss-microsoft-security-code-analysis-devops.build-task-credscan.CredScan@2
# displayName: 'Run Credential Scanner'
# inputs:
# toolMajorVersion: V2
# suppressionsFile: './scripts/ci/credscan/CredScanSuppressions.json'
# toolVersionV2: '2.1.17'
- task: ms-codeanalysis.vss-microsoft-security-code-analysis-devops.build-task-postanalysis.PostAnalysis@1
- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@3
displayName: 'Run Credential Scanner'
inputs:
toolVersion: latest
suppressionsFile: './scripts/ci/credscan/CredScanSuppressions.json'

- task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@2
displayName: 'Post Analysis'
inputs:
AllTools: false
BinSkim: false
CredScan: true
RoslynAnalyzers: false
TSLint: false
ToolLogsNotFoundAction: 'Standard'
GdnBreakAllTools: false
GdnBreakGdnToolCredScan: true
GdnBreakGdnToolCredScanSeverity: Error

- job: PolicyCheck
displayName: "Policy Check"
Expand Down
65 changes: 52 additions & 13 deletions linter_exclusions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,23 @@ arcdata ad-connector update:
secondary_domain_controllers:
rule_exclusions:
- option_length_too_long
sql server-arc availability-group create:
parameters:
automated_backup_preference:
rule_exclusions:
- option_length_too_long
failure_condition_level:
rule_exclusions:
- option_length_too_long
listener_ipv4_addresses:
rule_exclusions:
- option_length_too_long
listener_ipv6_addresses:
rule_exclusions:
- option_length_too_long
required_synchronized_secondaries:
rule_exclusions:
- option_length_too_long
sql mi-arc update:
parameters:
preferred_primary_replica:
Expand Down Expand Up @@ -2116,7 +2133,7 @@ networkcloud cluster create:
rule_exclusions:
- option_length_too_long
networkcloud cluster update:
parameters:
parameters:
aggregator_or_single_rack_definition:
rule_exclusions:
- option_length_too_long
Expand All @@ -2130,26 +2147,26 @@ networkcloud cluster update:
rule_exclusions:
- option_length_too_long
networkcloud cluster deploy:
parameters:
parameters:
skip_validations_for_machines:
rule_exclusions:
- option_length_too_long
networkcloud clustermanager create:
parameters:
parameters:
managed_resource_group_configuration:
rule_exclusions:
- option_length_too_long
networkcloud l3network create:
parameters:
parameters:
hybrid_aks_ipam_enabled:
rule_exclusions:
- option_length_too_long
networkcloud virtualmachine create:
parameters:
parameters:
isolate_emulator_thread:
rule_exclusions:
- option_length_too_long
networkcloud kubernetescluster create:
networkcloud kubernetescluster create:
parameters:
control_plane_node_configuration:
rule_exclusions:
Expand All @@ -2160,40 +2177,40 @@ networkcloud kubernetescluster create:
managed_resource_group_configuration:
rule_exclusions:
- option_length_too_long
networkcloud kubernetescluster update:
networkcloud kubernetescluster update:
parameters:
control_plane_node_configuration:
rule_exclusions:
- option_length_too_long
networkcloud kubernetescluster agentpool create:
networkcloud kubernetescluster agentpool create:
parameters:
attached_network_configuration:
rule_exclusions:
- option_length_too_long
kubernetes_cluster_name:
rule_exclusions:
- option_length_too_long
networkcloud kubernetescluster agentpool delete:
networkcloud kubernetescluster agentpool delete:
parameters:
kubernetes_cluster_name:
rule_exclusions:
- option_length_too_long
networkcloud kubernetescluster agentpool update:
networkcloud kubernetescluster agentpool update:
parameters:
kubernetes_cluster_name:
rule_exclusions:
- option_length_too_long
networkcloud kubernetescluster agentpool list:
networkcloud kubernetescluster agentpool list:
parameters:
kubernetes_cluster_name:
rule_exclusions:
- option_length_too_long
networkcloud kubernetescluster agentpool show:
networkcloud kubernetescluster agentpool show:
parameters:
kubernetes_cluster_name:
rule_exclusions:
- option_length_too_long
networkcloud kubernetescluster agentpool wait:
networkcloud kubernetescluster agentpool wait:
parameters:
kubernetes_cluster_name:
rule_exclusions:
Expand Down Expand Up @@ -2832,6 +2849,28 @@ stack-hci cluster create:
aad_service_principal_object_id:
rule_exclusions:
- option_length_too_long
stack-hci-vm network nsg rule create:
parameters:
destination_address_prefixes:
rule_exclusions:
- option_length_too_long
destination_port_ranges:
rule_exclusions:
- option_length_too_long
source_address_prefixes:
rule_exclusions:
- option_length_too_long
stack-hci-vm network nsg rule update:
parameters:
destination_address_prefixes:
rule_exclusions:
- option_length_too_long
destination_port_ranges:
rule_exclusions:
- option_length_too_long
source_address_prefixes:
rule_exclusions:
- option_length_too_long
storage account create:
parameters:
hierarchical_namespace:
Expand Down
Loading

0 comments on commit 8e2aee6

Please sign in to comment.