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

Fixing nightly run smoke test #17791

Merged
merged 4 commits into from
Sep 27, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common/smoke-test/Initialize-SmokeTests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function Set-EnvironmentVariables {

function New-DeployManifest {
Write-Verbose "Detecting samples..."
$packageDir = Get-ChildItem -Directory -Path "$repoRoot/sdk/$ServiceDirectory/*"
$packageDir = Get-ChildItem -Directory -Path "$repoRoot/sdk/$ServiceDirectory/*" | Where-Object { Test-Path "$_/samples/*/javascript/package.json" }

$javascriptSamples = @()
$packageDir.ForEach{
Expand Down
23 changes: 11 additions & 12 deletions eng/pipelines/templates/jobs/smoke.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ jobs:
displayName: Install dev-tool

- download: current
artifact: ${{parameters.ArtifactName}}
Copy link
Member

Choose a reason for hiding this comment

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

This means it will download all the artifacts. Is that the intention?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, because for the nightly run, there will be no ArtifactName being passed in and we'll have to grab the entire thing

Copy link
Member

Choose a reason for hiding this comment

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

for the daily I assume we don't need this download at all so perhaps we should condition it out for those jobs instead?

Copy link
Member

Choose a reason for hiding this comment

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

Not that we have the condition we probably should scope the the artifactName again.

- pwsh: |
$(Build.SourcesDirectory)/eng/common/scripts/Import-AzModules.ps1

Expand All @@ -141,17 +140,6 @@ jobs:
$packageOverrides = @()
$packageOverrides += (dir env: | Where-Object { $_.Name.StartsWith("SMOKE_PACKAGE_") }).Value
Copy link
Member

Choose a reason for hiding this comment

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

Do we ever end up setting any SMOKE_PACKAGE_ override any more?

Copy link
Member

Choose a reason for hiding this comment

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

If we remove this we should also clean up the setting of the SMOKE_PACKAGE_ env variables below.


$packageArtifact = Get-ChildItem $(Pipeline.Workspace)/${{parameters.ArtifactName}}/${{parameters.Artifact.name}}/*.tgz
if ($packageArtifact.name -notmatch "${{parameters.Artifact.name}}") {
Write-Error "Package name mismatch: expecting ${{parameters.Artifact.name}}, found $packageArtifact.name"
exit 1
}
if ($packageArtifact.count -ne 1) {
Write-Error "Got $packageArtifact.count packages, expecting 1."
exit 1
}
$result = $(System.DefaultWorkingDirectory)/eng/scripts/get-npm-tags.ps1 -packageArtifact $packageArtifact -workingDirectory $(System.DefaultWorkingDirectory)/temp

if ([System.Convert]::ToBoolean("${{ parameters.Daily }}")) {
./Initialize-SmokeTests.ps1 `
-CI `
Expand All @@ -161,6 +149,17 @@ jobs:
@subscriptionConfiguration `
-AdditionalParameters $(ArmTemplateParameters)
} else {
$packageArtifact = Get-ChildItem $(Pipeline.Workspace)/${{parameters.ArtifactName}}/${{parameters.Artifact.name}}/*.tgz
if ($packageArtifact.name -notmatch "${{parameters.Artifact.name}}") {
Write-Error "Package name mismatch: expecting ${{parameters.Artifact.name}}, found $packageArtifact.name"
exit 1
}
if ($packageArtifact.count -ne 1) {
Write-Error "Got $packageArtifact.count packages, expecting 1."
exit 1
}
$result = $(System.DefaultWorkingDirectory)/eng/scripts/get-npm-tags.ps1 -packageArtifact $packageArtifact -workingDirectory $(System.DefaultWorkingDirectory)/temp

./Initialize-SmokeTests.ps1 `
-CI `
-Verbose `
Expand Down
6 changes: 5 additions & 1 deletion sdk/appconfiguration/app-configuration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@
],
"requiredResources": {
"Azure App Configuration account": "https://docs.microsoft.com/azure/azure-app-configuration/quickstart-aspnet-core-app?tabs=core5x#create-an-app-configuration-store"
}
},
"skip": [
"featureFlag.js",
"secretReference.js"
]
}
}
5 changes: 4 additions & 1 deletion sdk/communication/communication-sms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@
],
"requiredResources": {
"Azure Communication Services account": "https://docs.microsoft.com/azure/communication-services/quickstarts/create-communication-resource"
}
},
"skip": [
"sendSmsWithOptions.js"
]
}
}
3 changes: 2 additions & 1 deletion sdk/search/search-documents/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
],
"requiredResources": {
"Azure Search Documents instance": "https://docs.microsoft.com/azure/search/search-create-service-portal"
}
},
"skipFolder": true
Copy link
Member Author

@ckairen ckairen Sep 22, 2021

Choose a reason for hiding this comment

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

skip doesn't seem to handle export const variables well. Below is the pipeline run where "export const" still errored out despite the file being added to skip. Therefore using skipFolder for now.

Pipeline: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=1108822&view=logs&j=8a044361-f13b-57ee-1142-5d5c4f6a8fd2&t=69a37eb1-ba53-5cbe-d4c5-97ba05de502b&l=412
Corresponding commit: 2ab3548

}
}