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

Update stress test template to handle Scenario name and group deployments #1866

Merged
merged 6 commits into from
Aug 11, 2021

Conversation

benbp
Copy link
Member

@benbp benbp commented Jul 31, 2021

This contains incremental updates to the stress-test-addons helm library:

  • Adds an optionally injected scenario name to the global scope, to address unique resource naming conflicts when multiple jobs are deployed as part of a single stress test package
  • Changes the azure-deployer deployment model to use az deployment group instead of az deployment sub

Starting as a draft PR because I'm about to go on vacation and I don't want to lose track of changes that Azure/azure-sdk-for-js#16689 is dependent on. However, there is currently a bug where the templates break if Scenario is not specified (I think the printf function is causing it to evaluate despite the use of default).

@benbp benbp added the Central-EngSys This issue is owned by the Engineering System team. label Jul 31, 2021
@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@check-enforcer-staging
Copy link

This pull request is protected by Check Enforcer.

What is Check Enforcer?

Check Enforcer helps ensure all pull requests are covered by at least one check-run (typically an Azure Pipeline). When all check-runs associated with this pull request pass then Check Enforcer itself will pass.

Why am I getting this message?

You are getting this message because Check Enforcer did not detect any check-runs being associated with this pull request within five minutes. This may indicate that your pull request is not covered by any pipelines and so Check Enforcer is correctly blocking the pull request being merged.

What should I do now?

If the check-enforcer check-run is not passing and all other check-runs associated with this PR are passing (excluding license-cla) then you could try telling Check Enforcer to evaluate your pull request again. You can do this by adding a comment to this pull request as follows:
/check-enforcer evaluate
Typically evaulation only takes a few seconds. If you know that your pull request is not covered by a pipeline and this is expected you can override Check Enforcer using the following command:
/check-enforcer override
Note that using the override command triggers alerts so that follow-up investigations can occur (PRs still need to be approved as normal).

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@@ -131,13 +136,13 @@ function DeployStressPackage(
$imageTag = "${registry}.azurecr.io/$($repository.ToLower())/$($imageName):$deployId"
Write-Host "Building and pushing stress test docker image '$imageTag'"
Run docker build -t $imageTag -f $dockerFile.FullName $dockerFile.DirectoryName
if ($LASTEXITCODE) { return $LASTEXITCODE }
if ($LASTEXITCODE) { return }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to make errors a no-op now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realized this returned exit code isn't used anywhere. The Run function will handle adding the failures to a failures array which is then checked and reported after all stress tests have been deployed. I still want the return statements for control flow to stop execution on a per-test basis.

@weshaggard weshaggard requested a review from hallipr August 10, 2021 23:14
@benbp benbp force-pushed the benbp/stress-test-ref branch from 06a2bfe to 5dde4b0 Compare August 11, 2021 00:21
groupName='{{ lower .Scenario }}-{{ .Release.Name }}-{{ .Release.Revision }}'
az group create -l westus2 -g $groupName &&
group=$(az group show -g $groupName -o tsv --query "id") &&
az tag create --resource-id $group --tags DeleteAfter="$(date -d '+192:00:00' -Iseconds -u)" &&
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this is growing in complexity, I plan to converge with our common deployment scripts for live tests: Azure/azure-sdk#3211

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@ghost
Copy link

ghost commented Aug 11, 2021

Hello @azure-sdk!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@benbp
Copy link
Member Author

benbp commented Aug 11, 2021

/check-enforcer override

@benbp benbp merged commit fde2de9 into main Aug 11, 2021
@benbp benbp deleted the benbp/stress-test-ref branch August 11, 2021 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Central-EngSys This issue is owned by the Engineering System team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants