-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Adding Installation Check in Pre-Release Stage #23575
Conversation
- pwsh: | ||
mkdir InstallationCheck |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- pwsh: | |
mkdir InstallationCheck | |
- pwsh: mkdir InstallationCheck |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nits but LGTM.
b7dda0e
to
4fbb886
Compare
4fbb886
to
8d660b4
Compare
@@ -43,6 +43,18 @@ stages: | |||
dependsOn: Signing | |||
condition: and(succeeded(), ne(variables['SetDevVersion'], 'true'), ne(variables['Skip.Release'], 'true'), ne(variables['Build.Repository.Name'], 'Azure/azure-sdk-for-net-pr')) | |||
jobs: | |||
- job: InstallationCheck |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason this is a separate job?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the installation check should be done before the other jobs and this just doesn't quite fit into the definition of "CreateReleaseTag." I thought about putting this as steps within PublishPackage. Do you think this approach would be better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like it to fail as early in the process as possible. I would probably put it with the tagging job as we do some other checks there as well. Doing just this in a separate job causes us to use another agent and also causes more overhead that probably isn't necessary just for the one check.
Write-Host "dotnet nuget add source $localFeed" | ||
dotnet nuget add source $localFeed | ||
|
||
$version = (Get-ChildItem "$localFeed/*.nupkg" -Exclude "*.symbols.nupkg" -Name).replace(".nupkg","").replace("$Artifact.","") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this might work in some cases it isn't the easiest or best way to get the version number. We always publish a packageinfo.json file in the artifacts as well that we generally use to read the metadata and version of the artifacts.
dotnet new console | ||
$localFeed = "$PipelineWorkspace/$ArtifactsDirectory-signed/$Artifact" | ||
Write-Host "dotnet nuget add source $localFeed" | ||
dotnet nuget add source $localFeed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the source need to e added given that you are explicitly pass it to the restore command?
} | ||
|
||
Write-Host "dotnet nuget locals all --clear" | ||
dotnet nuget locals all --clear |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you use --packages
to isolate the packages you shouldn't need to call this clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we still need to clear the cache? (especially when doing the retries here #23739
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you use an independent packages folder it should only uses packages from that path. For retries you can just delete that directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw ill just push those changes along with PR for this #23739
Doing a blank slate installation pre-release to make sure the dependencies are correct, and the package that's about to release is able to restore.
Pipeline Ref:
lines 961~979
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=1067279&view=logs&j=ba5a289f-2f09-530e-afa5-59b09a10fdf0&t=50abcb8c-011d-55a9-3c4a-d42bfcc3eecb&l=961
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=1067279&view=logs&j=8a59aa26-f1cb-5dea-999b-76ab4b63e138&t=009a8b76-fd91-58d4-0e63-224c4153136f&l=515
Issue described here Azure/azure-sdk-tools#1841
All SDK Contribution checklist:
This checklist is used to make sure that common guidelines for a pull request are followed.
Draft
mode if it is:General Guidelines and Best Practices
Testing Guidelines
SDK Generation Guidelines
*.csproj
andAssemblyInfo.cs
files have been updated with the new version of the SDK. Please double check nuget.org current release version.Additional management plane SDK specific contribution checklist:
Note: Only applies to
Microsoft.Azure.Management.[RP]
orAzure.ResourceManager.[RP]
Management plane SDK Troubleshooting
If this is very first SDK for a services and you are adding new service folders directly under /SDK, please add
new service
label and/or contact assigned reviewer.If the check fails at the
Verify Code Generation
step, please ensure:generate.ps1/cmd
to generate this PR instead of callingautorest
directly.Please pay attention to the @microsoft.csharp version output after running
generate.ps1
. If it is lower than current released version (2.3.82), please run it again as it should pull down the latest version.Note: We have recently updated the PSH module called by
generate.ps1
to emit additional data. This would help reduce/eliminate the Code Verification check error. Please run following command:Old outstanding PR cleanup
Please note:
If PRs (including draft) has been out for more than 60 days and there are no responses from our query or followups, they will be closed to maintain a concise list for our reviewers.