Skip to content

Commit f173513

Browse files
committed
Squashed commit of the following:
commit 9824165 Author: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Mon Sep 27 11:32:24 2021 -0700 Use stress-test-resources file naming to avoid live test auto-discovery (#20828) Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com> commit 99ab168 Author: Rakshith Bhyravabhotla <sabhyrav@microsoft.com> Date: Mon Sep 27 11:17:48 2021 -0700 Fix live tests (#20886) * Fix tests * Update sdk/monitor/azure-monitor-query/azure/monitor/query/_models.py commit 5697a75 Author: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Mon Sep 27 10:47:44 2021 -0700 Sync eng/common directory with azure-sdk-tools for PR 2027 (#20798) * Handle assembly already loaded errors in deploy stress test script * Add dependency checks and installation links to deploy-stress-tests.ps1 Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com> commit 883bdae Author: Rakshith Bhyravabhotla <sabhyrav@microsoft.com> Date: Mon Sep 27 10:14:42 2021 -0700 Query - samples + README + docstrings (#20869) * Samples fix * README * docstrings * mypy * lint * test fix * lint commit 559840c Author: Rakshith Bhyravabhotla <sabhyrav@microsoft.com> Date: Mon Sep 27 10:00:26 2021 -0700 Metrics should be gettable by name (#20878) * Metrics should be gettable by name * lint commit e6db587 Author: Xiang Yan <xiangsjtu@gmail.com> Date: Mon Sep 27 09:56:37 2021 -0700 update changelog (#20810) commit d32de70 Author: swathipil <76007337+swathipil@users.noreply.github.com> Date: Mon Sep 27 08:24:14 2021 -0700 [SchemaRegistry] update positional args to req kwargs (#20763) * make params required kwargs * update changelog * adams comments * update avro tests + samples * fix samples * pylint error * adams comments commit 55526df Author: Jiefeng Chen <51037443+BigCat20196@users.noreply.github.com> Date: Mon Sep 27 09:40:16 2021 +0800 [auto-issue-status]auto-assign and refactor (#20722) * release_iseus_status_auto_reply * issue_aoto_close_revert * Update main.py * Update main.py * Update update_issue_body.py * Update reply_generator.py * Update reply_generator.py * Update update_issue_body.py * Update main.py * Update update_issue_body.py * Update update_issue_body.py * Update main.py * Update reply_generator.py * Update main.py * Update update_issue_body.py * Update main.py * Update scripts/release_issue_status/update_issue_body.py * Update update_issue_body.py * Update main.py * Update reply_generator.py * Update update_issue_body.py * Update main.py * Update scripts/release_issue_status/main.py * Update main.py * Update scripts/release_issue_status/main.py * Update scripts/release_issue_status/main.py * Update scripts/release_issue_status/main.py * Update scripts/release_issue_status/update_issue_body.py * Update scripts/release_issue_status/main.py * Update scripts/release_issue_status/update_issue_body.py * Update reply_generator.py * Update main.py * Update scripts/release_issue_status/update_issue_body.py Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> * Update scripts/release_issue_status/update_issue_body.py Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> * Update reply_generator.py * Update update_issue_body.py * Update main.py * Update main.py * Update update_issue_body.py * Update main.py * Update scripts/release_issue_status/main.py * Update main.py * Update reply_generator.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update update_issue_body.py * Update main.py * Update update_issue_body.py * Update reply_generator.py * Update update_issue_body.py * Update main.py * Update update_issue_body.py * Update update_issue_body.py * Update update_issue_body.py * Update update_issue_body.py * Update update_issue_body.py * Update main.py * Update main.py * Update release_issue_status.yml for Azure Pipelines * Update main.py * Update reply_generator.py * Add files via upload * Update reply_generator.py * Update update_issue_body.py * Update reply_generator.py * Update auto_pipeline_run.py * Update auto_pipeline_run.py * add auto-close * Update release_issue_status.yml for Azure Pipelines * Update auto_close.py * Update main.py * Update release_issue_status.yml for Azure Pipelines * Update auto_pipeline_run.py * fix bug * Update main.py * Update auto_close.py * Update auto_close.py * Update main.py * Update reply_generator.py * Update main.py * Update main.py * Update auto_close.py * Update main.py * Update auto-close * Update auto_pipeline_run.py * Update update_issue_body.py * Update auto_pipeline_run.py * Update release_issue_status.yml for Azure Pipelines * Update auto_pipeline_run.py * Update release_issue_status.yml for Azure Pipelines * Update auto_pipeline_run.py * Update auto_pipeline_run.py * Add pipeline link * Update pipeline link * Update auto_pipeline_run.py * Update release_issue_status.yml for Azure Pipelines * Update auto_pipeline_run.py * Update requirement.txt * Update auto_pipeline_run.py * Add get_python_pipeline * Update auto_pipeline_run.py * test * test * add outputfolder * add label * Update main.py * Update get_python_pipeline.py * Update main.py * Update auto_pipeline_run.py * Add utils * Update main.py * Update main.py * Delete old py * Update reply_generator.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update utils.py * Update utils.py * Update main.py * Update main.py * Update reply_generator.py * Update utils.py * Add get_changelog function * Update utils.py * Update reply_generator.py * Update main.py * Update reply_generator.py * Update function * del useless code * Update utils.py * Update main.py * Update reply_generator.py * Update main.py * Update utils.py * Update utils.py * Update utils.py * Update utils.py * Update reply_generator.py * Update main.py * Update main.py * Update main.py * Update release_issue_status.yml for Azure Pipelines * Update main.py * Update release_issue_status.yml for Azure Pipelines * Update release_issue_status.yml for Azure Pipelines * Update main.py * Update utils.py Co-authored-by: Zed <601306339@qq.com> Co-authored-by: Zed Lei <59104634+RAY-316@users.noreply.github.com> Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> commit 6bba532 Author: msyyc <70930885+msyyc@users.noreply.github.com> Date: Sun Sep 26 15:09:42 2021 +0800 Update dev_requirements.txt (#20873) commit dc98de4 Author: Azure CLI Bot <azclibot@microsoft.com> Date: Sun Sep 26 14:17:56 2021 +0800 [AutoRelease] t2-authorization-2021-09-26-80124 (#20872) * CodeGen from PR 15973 in Azure/azure-rest-api-specs Update readme and readme.python (#15973) * Update readme and readme.python * Update readme python * Update readme python * Update readme.python.md * Update readme python Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> * version,CHANGELOG * test * Update test_cli_mgmt_authorization.py Co-authored-by: SDKAuto <sdkautomation@microsoft.com> Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> Co-authored-by: PythonSdkPipelines <PythonSdkPipelines> Co-authored-by: Jiefeng Chen <51037443+BigCat20196@users.noreply.github.com> commit d345d9d Author: catalinaperalta <catalinaperaltah@hotmail.com> Date: Fri Sep 24 21:28:15 2021 -0400 Cat & Krista FR beta work (#20834) commit 35ee2fa Author: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri Sep 24 16:38:13 2021 -0700 Add common policheck steps (#20832) Co-authored-by: Chidozie Ononiwu <chononiw@microsoft.com> commit cce4b29 Author: Rakshith Bhyravabhotla <sabhyrav@microsoft.com> Date: Fri Sep 24 15:33:24 2021 -0700 Rename Query APIs (#20830) commit f2b2cea Author: Adam Ling (MSFT) <adam_ling@outlook.com> Date: Fri Sep 24 13:20:36 2021 -0700 [EventHubs] Fix livetest (#20820) * fix livetest * rm bicep file * rename stress test file commit 650943c Author: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri Sep 24 13:11:08 2021 -0700 Sync eng/common directory with azure-sdk-tools for PR 2035 (#20825) * Add * Add more description to docs of where the variable is consumed Co-authored-by: Daniel Jurek <djurek@microsoft.com> commit 0475f51 Author: Rakshith Bhyravabhotla <sabhyrav@microsoft.com> Date: Fri Sep 24 12:35:04 2021 -0700 Update handling error in query (#20765) * samples * hide row * Handle errors * lint * lint * extract inner message * lint * lint * lint * api view fixes * more changes * Update sdk/monitor/azure-monitor-query/CHANGELOG.md * Apply suggestions from code review Co-authored-by: Krista Pratico <krpratic@microsoft.com> * changes Co-authored-by: Krista Pratico <krpratic@microsoft.com> commit 1a9b633 Author: iscai-msft <43154838+iscai-msft@users.noreply.github.com> Date: Fri Sep 24 12:53:45 2021 -0400 [rest] switch base responses to ABCs (#20448) * switch to protocol * update changelog * add initial tests * switch from protocol to abc * improve HttpResponse docstrings * lint * HeadersType -> MutableMapping[str, str] * remove iter_text and iter_lines * update tests * improve docstrings * have base impls handle more code * add set_read_checks * commit to restart pipelines * address xiang's comments * lint * clear json cache when encoding is updated * make sure content type is empty string if doesn't exist * update content_type to be None if there is no content type header * fix passing encoding to text method error * update is_stream_consumed docs * remove erroneous committed code commit cc7e454 Author: Azure CLI Bot <azclibot@microsoft.com> Date: Fri Sep 24 09:35:39 2021 +0800 [AutoRelease] t2-cosmosdb-2021-09-17-34565 (#20737) * CodeGen from PR 16052 in Azure/azure-rest-api-specs Update cosmos-db.json (#16052) Added viewDefinition as required property * version,CHANGELOG Co-authored-by: SDKAuto <sdkautomation@microsoft.com> Co-authored-by: PythonSdkPipelines <PythonSdkPipelines> commit 04df600 Author: swathipil <76007337+swathipil@users.noreply.github.com> Date: Thu Sep 23 17:37:07 2021 -0700 [SchemaRegistry] renaming from archboard feedback (#20766) addressing part of #20703 commit c94b8a6 Author: Xiang Yan <xiangsjtu@gmail.com> Date: Thu Sep 23 16:33:50 2021 -0700 fix test_aiohttp_loop (#20811) * fix test_aiohttp_loop * fix collections import issue commit 1380e05 Author: Sima Zhu <48036328+sima-zhu@users.noreply.github.com> Date: Thu Sep 23 10:39:39 2021 -0700 Writing dev version into package json file. (#20778) commit 424c3c7 Author: Xiang Yan <xiangsjtu@gmail.com> Date: Thu Sep 23 09:17:27 2021 -0700 integrate logs (#20300) * integrate logs * update * update * update * update * Update _universal.py * update commit cbdaf08 Author: iscai-msft <43154838+iscai-msft@users.noreply.github.com> Date: Thu Sep 23 11:26:16 2021 -0400 [qna] regenerate with 2021-07-15-preview (#20764) commit 8a7ae28 Author: Azure CLI Bot <azclibot@microsoft.com> Date: Thu Sep 23 13:48:32 2021 +0800 [AutoRelease] t2-servicebus-2021-09-23-30017(Do not merge) (#20801) * CodeGen from PR 16114 in Azure/azure-rest-api-specs [servicebus]Update readme.python.md (#16114) * Update readme.python.md * Update readme.python.md * version,CHANGELOG * test Co-authored-by: SDKAuto <sdkautomation@microsoft.com> Co-authored-by: PythonSdkPipelines <PythonSdkPipelines> commit ef7fc5e Author: Azure CLI Bot <azclibot@microsoft.com> Date: Thu Sep 23 09:55:28 2021 +0800 [AutoRelease] t2-kusto-2021-09-22-40032 (#20790) * CodeGen from PR 16115 in Azure/azure-rest-api-specs Update readme.python.md (#16115) * version,CHANGELOG Co-authored-by: SDKAuto <sdkautomation@microsoft.com> Co-authored-by: PythonSdkPipelines <PythonSdkPipelines> commit f4679b9 Author: Scott Beddall <45376673+scbedd@users.noreply.github.com> Date: Wed Sep 22 12:20:07 2021 -0700 Add 3.10 to Nightly Edge Build (#20623) * update nightly edge build to run python 3.10 on both windows and linux agents * conditionally update `pytest` requirements in both ci_tools.txt and test_tools.txt for python 3.10 * conditionally add some necessary python 3.10 windows wheels to test_tools.txt. These additions only affect python 3.10, which is not currently part of the test matrix commit 30b196e Author: iscai-msft <43154838+iscai-msft@users.noreply.github.com> Date: Wed Sep 22 12:32:29 2021 -0400 [rest] add backcompat mixin to rest requests (#20599) commit 4b3397d Author: Adam Ling (MSFT) <adam_ling@outlook.com> Date: Wed Sep 22 09:09:32 2021 -0700 [EventHubs] Stress test refactor (#20389) * init commit for stress * add dotenv dep * docker, helm, k8s * apply changes * run forever * add chaos * update chaos jos * Apply suggestions from code review Co-authored-by: Ben Broderick Phillips <ben@benbp.net> * minor fixes * revert external targets Co-authored-by: Ben Broderick Phillips <ben@benbp.net> commit eca1c81 Author: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue Sep 21 19:58:17 2021 -0700 Clean-up changelog scripts (#20779) Co-authored-by: Wes Haggard <Wes.Haggard@microsoft.com> commit 518af90 Author: Azure CLI Bot <azclibot@microsoft.com> Date: Wed Sep 22 09:31:05 2021 +0800 [AutoRelease] t2-containerinstance-2021-09-17-04542 (#20733) * CodeGen from PR 15721 in Azure/azure-rest-api-specs [Hub Generated] Review request for Microsoft.ContainerInstance to add version stable/2021-07-01 (#15721) * Adds base for updating Microsoft.ContainerInstance from version stable/2021-03-01 to version 2021-07-01 * Updates readme * Updates API version in new specs and examples * Adding subnet IDs * Adding fixes from pending 03-01 update * Changing definition name to match convention * Adding network dependencies API * Adding MSI+ACR properties * Removing network profile * Updating example * Fixing JSON error * Removing network profile reference * Adding Integer format where missing * Removing comma * Fixing example * Fixing example * Ran Prettier to resolve check failure * Running prettier again for format * version,CHANGELOG * test Co-authored-by: SDKAuto <sdkautomation@microsoft.com> Co-authored-by: PythonSdkPipelines <PythonSdkPipelines> commit f3144dc Author: swathipil <76007337+swathipil@users.noreply.github.com> Date: Tue Sep 21 17:13:31 2021 -0700 [SchemaRegistry] remove cache from client (#20760) * remove cache from client * changelog commit f8ff686 Author: McCoy Patiño <39780829+mccoyp@users.noreply.github.com> Date: Tue Sep 21 11:08:50 2021 -0700 Update add_sanitizer and doc (#20769) commit 0e20469 Author: Wes Haggard <weshaggard@users.noreply.github.com> Date: Tue Sep 21 08:27:38 2021 -0700 Enable release stage selection at queue time (#20767) commit da36d30 Author: McCoy Patiño <39780829+mccoyp@users.noreply.github.com> Date: Mon Sep 20 17:21:33 2021 -0700 [Key Vault] Add certificate import sample (#20641) commit e7d3348 Author: Franko Morales <67804607+cochi2@users.noreply.github.com> Date: Mon Sep 20 16:51:38 2021 -0700 Fixing VCR redirection (#20747) Using the location passed as part of the redirection response if it is an absolute URL. commit 856f247 Author: Scott Addie <10702007+scottaddie@users.noreply.github.com> Date: Mon Sep 20 15:10:54 2021 -0500 Link to Log Analytics throttling guidance from Monitor Query README (#20759) commit ee9d553 Author: Chidozie Ononiwu (His Righteousness) <31145988+chidozieononiwu@users.noreply.github.com> Date: Mon Sep 20 11:15:59 2021 -0700 Fix broken anchor tags (#20751) commit 6d84c3a Author: Scott Beddall <45376673+scbedd@users.noreply.github.com> Date: Mon Sep 20 09:08:23 2021 -0700 avroserializer pins its dependency, which makes regression testing a … (#20735) …bit iffy @swathipil This will resolve your nightly failure. Still not understanding the specific repro I'm seeing when I run this thing locally though.
1 parent 720ef1b commit f173513

File tree

1,349 files changed

+193442
-100851
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,349 files changed

+193442
-100851
lines changed

doc/dev/docstring_typehint.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ All public methods should have docstrings to document the parameters, keywords,
44

55
* [Docstrings](#docstrings)
66
* [Method Docstrings](#method_docstrings)
7-
* [Model and Client Docstrings](#model_and_Client_Docstrings)
7+
* [Model and Client Docstrings](#model_and_client_docstrings)
88
* [Type Hints](#type_hints)
99
* [Type Hints for Python 2.7 and 3.5+](#type_hints_for_python_2.7_and_3.5+)
1010
* [Type Hints for Python 3.5+](#type_hints_for_python_3.5+)

doc/dev/test_proxy_migration_guide.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ adding something like the following in the package's `conftest.py` file:
108108
```python
109109
from devtools_testutils import add_sanitizer
110110

111-
@pytest.fixture(scope="session")
111+
# autouse=True will trigger this fixture on each pytest run, even if it's not explicitly used by a test method
112+
@pytest.fixture(scope="session", autouse=True)
112113
def sanitize_uris():
113114
add_sanitizer(ProxyRecordingSanitizer.URI, value="fakeendpoint")
114115
```

eng/.docsettings.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ known_content_issues:
7878
- ['sdk/servicebus/azure-servicebus/tests/perf_tests/README.md', '#4554']
7979
- ['sdk/servicefabric/azure-servicefabric/README.md', '#4554']
8080
- ['sdk/storage/azure-storage-blob/swagger/README.md', '#4554']
81+
- ['cognitivelanguage/azure-ai-language-questionanswering/swagger/README.md', '#4554']
8182
- ['sdk/storage/azure-storage-file-datalake/swagger/README.md', '#4554']
8283
- ['sdk/storage/azure-storage-file-share/swagger/README.md', '#4554']
8384
- ['sdk/storage/azure-storage/README.md', '#4554']

eng/ci_tools.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ json-delta==2.0
2828
ConfigArgParse==1.2.3
2929
six==1.14.0
3030
pyyaml==5.3.1
31-
pytest==5.4.2; python_version >= '3.5'
3231
pytest==4.6.9; python_version == '2.7'
32+
pytest==5.4.2; python_version >= '3.5' and python_version <= '3.9'
33+
pytest==6.2.4; python_version >= '3.10'
3334
pytest-cov==2.8.1
3435

3536
# local dev packages
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
parameters:
2+
ExclusionDataBaseFileName: ''
3+
TargetDirectory: ''
4+
PublishAnalysisLogs: false
5+
PoliCheckBlobSAS: "$(azuresdk-policheck-blob-SAS)"
6+
ExclusionFilePath: "$(Build.SourcesDirectory)/eng/guardian-tools/policheck/PolicheckExclusions.xml"
7+
8+
steps:
9+
- pwsh: |
10+
azcopy copy "https://azuresdkartifacts.blob.core.windows.net/policheck/${{ parameters.ExclusionDataBaseFileName }}.mdb?${{ parameters.PoliCheckBlobSAS }}" `
11+
"$(Build.BinariesDirectory)"
12+
displayName: 'Download PoliCheck Exclusion Database'
13+
14+
- task: securedevelopmentteam.vss-secure-development-tools.build-task-policheck.PoliCheck@2
15+
displayName: 'Run PoliCheck'
16+
inputs:
17+
targetType: F
18+
targetArgument: "$(Build.SourcesDirectory)/${{ parameters.TargetDirectory }}"
19+
result: PoliCheck.sarif
20+
optionsFC: 0
21+
optionsXS: 1
22+
optionsPE: 1|2|3|4
23+
optionsRulesDBPath: "$(Build.BinariesDirectory)/${{ parameters.ExclusionDataBaseFileName }}.mdb"
24+
optionsUEPATH: ${{ parameters.ExclusionFilePath }}
25+
26+
- task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@2
27+
displayName: 'Post Analysis (PoliCheck)'
28+
inputs:
29+
GdnBreakAllTools: false
30+
GdnBreakGdnToolPoliCheck: true
31+
GdnBreakGdnToolPoliCheckSeverity: Warning
32+
continueOnError: true
33+
34+
- ${{ if eq(parameters.PublishAnalysisLogs, 'true') }}:
35+
- task: securedevelopmentteam.vss-secure-development-tools.build-task-publishsecurityanalysislogs.PublishSecurityAnalysisLogs@3
36+
displayName: 'Publish Security Analysis Logs'

eng/common/scripts/Collect-ChangeLogs.ps1

Lines changed: 0 additions & 61 deletions
This file was deleted.

eng/common/scripts/Update-ChangeLog.ps1

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# Unreleased: Default is true. If it is set to false, then today's date will be set in verion title. If it is True then title will show "Unreleased"
66
# ReplaceLatestEntryTitle: Replaces the latest changelog entry title.
77

8+
[CmdletBinding()]
89
param (
910
[Parameter(Mandatory = $true)]
1011
[String]$Version,
@@ -74,21 +75,21 @@ if ($ChangeLogEntries.Contains($Version))
7475
{
7576
if ($ChangeLogEntries[$Version].ReleaseStatus -eq $ReleaseStatus)
7677
{
77-
LogWarning "Version [$Version] is already present in change log with specificed ReleaseStatus [$ReleaseStatus]. No Change made."
78+
LogDebug "Version [$Version] is already present in change log with specificed ReleaseStatus [$ReleaseStatus]. No Change made."
7879
exit(0)
7980
}
8081

8182
if ($Unreleased -and ($ChangeLogEntries[$Version].ReleaseStatus -ne $ReleaseStatus))
8283
{
83-
LogWarning "Version [$Version] is already present in change log with a release date. Please review [$ChangelogPath]. No Change made."
84+
LogDebug "Version [$Version] is already present in change log with a release date. Please review [$ChangelogPath]. No Change made."
8485
exit(0)
8586
}
8687

8788
if (!$Unreleased -and ($ChangeLogEntries[$Version].ReleaseStatus -ne $CHANGELOG_UNRELEASED_STATUS))
8889
{
8990
if ((Get-Date ($ChangeLogEntries[$Version].ReleaseStatus).Trim("()")) -gt (Get-Date $ReleaseStatus.Trim("()")))
9091
{
91-
LogWarning "New ReleaseDate for version [$Version] is older than existing release date in changelog. Please review [$ChangelogPath]. No Change made."
92+
LogDebug "New ReleaseDate for version [$Version] is older than existing release date in changelog. Please review [$ChangelogPath]. No Change made."
9293
exit(0)
9394
}
9495
}

eng/common/scripts/Update-DocsMsPackages.ps1

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,19 @@ packages which have not released to a central package manager.
1818
.PARAMETER DocRepoLocation
1919
Location of the docs.microsoft.com reference docs repo.
2020
21+
.PARAMETER PackageSourceOverride
22+
Optional parameter to supply a different package source (useful for daily dev
23+
docs generation from pacakges which are not published to the default feed). This
24+
variable is meant to be used in the domain-specific business logic in
25+
&$UpdateDocsMsPackagesFn
26+
2127
#>
2228
param (
2329
[Parameter(Mandatory = $true)]
24-
$DocRepoLocation # the location of the cloned doc repo
30+
[string] $DocRepoLocation, # the location of the cloned doc repo
31+
32+
[Parameter(Mandatory = $false)]
33+
[string] $PackageSourceOverride
2534
)
2635

2736
. (Join-Path $PSScriptRoot common.ps1)

eng/common/scripts/Verify-ChangeLog.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Wrapper Script for ChangeLog Verification
2+
[CmdletBinding()]
23
param (
34
[String]$ChangeLogLocation,
45
[String]$VersionString,

eng/common/scripts/stress-testing/deploy-stress-tests.ps1

Lines changed: 47 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@ $ErrorActionPreference = 'Stop'
2121
$FailedCommands = New-Object Collections.Generic.List[hashtable]
2222

2323
. (Join-Path $PSScriptRoot "../Helpers" PSModule-Helpers.ps1)
24-
Install-ModuleIfNotInstalled "powershell-yaml" "0.4.1" | Import-Module
25-
Install-ModuleIfNotInstalled "az" "6.4.0" | Import-Module
2624

2725
# Powershell does not (at time of writing) treat exit codes from external binaries
2826
# as cause for stopping execution, so do this via a wrapper function.
2927
# See https://github.com/PowerShell/PowerShell-RFC/pull/277
30-
function Run() {
28+
function Run()
29+
{
3130
Write-Host "`n==> $args`n" -ForegroundColor Green
3231
$command, $arguments = $args
3332
& $command $arguments
@@ -37,14 +36,16 @@ function Run() {
3736
}
3837
}
3938

40-
function RunOrExitOnFailure() {
39+
function RunOrExitOnFailure()
40+
{
4141
run @args
4242
if ($LASTEXITCODE) {
4343
exit $LASTEXITCODE
4444
}
4545
}
4646

47-
function Login([string]$subscription, [string]$clusterGroup, [boolean]$pushImages) {
47+
function Login([string]$subscription, [string]$clusterGroup, [boolean]$pushImages)
48+
{
4849
Write-Host "Logging in to subscription, cluster and container registry"
4950
az account show *> $null
5051
if ($LASTEXITCODE) {
@@ -120,8 +121,8 @@ function DeployStressPackage(
120121
Run helm dependency update $pkg.Directory
121122
if ($LASTEXITCODE) { return }
122123

123-
if (Test-Path "$($pkg.Directory)/test-resources.bicep") {
124-
Run az bicep build -f "$($pkg.Directory)/test-resources.bicep"
124+
if (Test-Path "$($pkg.Directory)/stress-test-resources.bicep") {
125+
Run az bicep build -f "$($pkg.Directory)/stress-test-resources.bicep"
125126
if ($LASTEXITCODE) { return }
126127
}
127128

@@ -165,7 +166,7 @@ function DeployStressPackage(
165166
Write-Warning "The issue may be fixable by first running 'helm rollback -n $($pkg.Namespace) $($pkg.ReleaseName)'"
166167
return
167168
}
168-
169+
169170
# Helm 3 stores release information in kubernetes secrets. The only way to add extra labels around
170171
# specific releases (thereby enabling filtering on `helm list`) is to label the underlying secret resources.
171172
# There is not currently support for setting these labels via the helm cli.
@@ -177,7 +178,45 @@ function DeployStressPackage(
177178
Run kubectl label secret -n $pkg.Namespace --overwrite $helmReleaseConfig deployId=$deployId
178179
}
179180

181+
function CheckDependencies()
182+
{
183+
$deps = @(
184+
@{
185+
Command = "docker";
186+
Help = "Docker must be installed: https://docs.docker.com/get-docker/";
187+
}
188+
@{
189+
Command = "kubectl";
190+
Help = "kubectl must be installed: https://kubernetes.io/docs/tasks/tools/#kubectl";
191+
},
192+
@{
193+
Command = "helm";
194+
Help = "helm must be installed: https://helm.sh/docs/intro/install/";
195+
},
196+
@{
197+
Command = "az";
198+
Help = "Azure CLI must be installed: https://docs.microsoft.com/en-us/cli/azure/install-azure-cli";
199+
}
200+
)
201+
202+
Install-ModuleIfNotInstalled "powershell-yaml" "0.4.1" | Import-Module
203+
204+
$shouldError = $false
205+
foreach ($dep in $deps) {
206+
if (!(Get-Command $dep.Command -ErrorAction SilentlyContinue)) {
207+
$shouldError = $true
208+
Write-Error $dep.Help
209+
}
210+
}
211+
212+
if ($shouldError) {
213+
exit 1
214+
}
215+
216+
}
217+
180218
# Don't call functions when the script is being dot sourced
181219
if ($MyInvocation.InvocationName -ne ".") {
220+
CheckDependencies
182221
DeployStressTests @PSBoundParameters
183222
}

0 commit comments

Comments
 (0)