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

[DartLab B2B feature] dropname for base VS should be retrieved using the baseline. #5283

Merged
merged 13 commits into from
Jul 13, 2023

Conversation

vishavpandhi
Copy link
Contributor

@vishavpandhi vishavpandhi commented Jun 27, 2023

Bug

Fixes: https://github.com/NuGet/Client.Engineering/issues/2380

Regression? Last working version: N/A

Description

@kartheekp-ms noticed that B2B upgrade is disabled in almost 4 PR build logs. When B2B is disabled, DartLab installs VS from scratch instead of upgrading. To enable B2B upgrade, the base VS drop name needs to be retrieved from the baseline. Otherwise, if the base and target VS use the same drop, their versions will be identical, resulting in the disabling B2B upgrade.

PR Checklist

  • PR has a meaningful title

  • PR has a linked issue.

  • Described changes

  • Tests

    • N/A
  • Documentation

    • N/A

@vishavpandhi vishavpandhi requested a review from a team as a code owner June 27, 2023 18:18
@ghost ghost added the Community PRs created by someone not in the NuGet team label Jun 27, 2023
@kartheekp-ms kartheekp-ms marked this pull request as draft June 27, 2023 18:32
@kartheekp-ms kartheekp-ms self-assigned this Jun 27, 2023
@vishavpandhi vishavpandhi marked this pull request as ready for review July 5, 2023 18:02
@kartheekp-ms kartheekp-ms marked this pull request as draft July 5, 2023 18:13
@vishavpandhi vishavpandhi changed the title Update Apex_Tests_On_Windows.yml dropname for base VS should be retrieved using the baseline Jul 5, 2023
candidateBaselineBuilds: $(BaselineBuildCommitIds)
visualStudioBootstrapperURI: $(bootstrapperUrl)
visualStudioInstallationParameters: $(VisualStudio.InstallationUnderTest.SetupParameters)
testLabPoolName: VS-Platform
dartLabEnvironment: ${{parameters.DartLabEnvironment}}
visualStudioSigning: Test
testMachineConfigurationJobTimeoutInMinutes: 30
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this timeout setting required?

Copy link
Contributor Author

@vishavpandhi vishavpandhi Jul 6, 2023

Choose a reason for hiding this comment

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

yes, because of the additional tasks, it will take ~1-2 minutes extra. But occasionally Azure DevOps might be slow, that's why I have set timeout to 30

@kartheekp-ms kartheekp-ms changed the title dropname for base VS should be retrieved using the baseline [DartLab B2B feature] dropname for base VS should be retrieved using the baseline. Jul 6, 2023
@kartheekp-ms kartheekp-ms marked this pull request as ready for review July 6, 2023 01:40
jeffkl
jeffkl previously approved these changes Jul 6, 2023
@vishavpandhi
Copy link
Contributor Author

Apex tests on Windows failed because of Azure DevOps issue which is not related to the changes in this PR.
To overcome this I have added retries.

- task: PowerShell@2
name: SetVisualStudioBaseBuildID
displayName: Set 'VisualStudio.BaseBuild.ID'
retryCountOnTaskFailure: 3
Copy link
Contributor

Choose a reason for hiding this comment

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

checked with @vishavpandhi offline. This parameter only enables retries for the following steps. Apex/End to end tests will not be rerun upon failure.

  • Get Baseline build commit ids
  • Set 'VisualStudio.BaseBuild.ID'
  • Set 'VisualStudio.BaseBuild.ProductsDropName
  • Set 'VisualStudio.BaseBuild.ProductsDropName' to drop from target build

candidateBaselineBuilds: $(BaselineBuildCommitIds)
testLabPoolName: VS-Platform
dartLabEnvironment: ${{parameters.DartLabEnvironment}}
visualStudioSigning: Test
testMachineConfigurationJobTimeoutInMinutes: 30
Copy link
Contributor

Choose a reason for hiding this comment

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

targetType: 'inline'
script: |
$buildDrop = "${{parameters.baseBuildDrop}}" -split "/"
$dropName = "Products/DevDiv/VS/$($buildDrop[-2])/$($buildDrop[-1])"
Copy link
Contributor

Choose a reason for hiding this comment

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

If my understanding is correct, if there is format in the build drop URL then we should tweak these indexes, correct? Do you anticipate any changes to the build drop in the near future?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

these changes can be breaking changes, so they aren't generally made.

@kartheekp-ms
Copy link
Contributor

kartheekp-ms commented Jul 11, 2023

The deploy machine step for End to End tests part 1 job for this PR build took only 17 minutes which is a significant improvement. As you can see from the log, Visual Studio was upgraded instead of installing from scratch because of B2B feature.

image

@zivkan
Copy link
Member

zivkan commented Jul 12, 2023

Why did only 1 of the 3 dartlab jobs get the benefit? They're all requesting the same build of VS.

@kartheekp-ms
Copy link
Contributor

kartheekp-ms commented Jul 12, 2023

Why did only 1 of the 3 dartlab jobs get the benefit? They're all requesting the same build of VS.

For the remaining 2 jobs, DartLab was unable to find a machine in the pool hence it ended up creating a machine for these runs. The following logs also suggest that Visual Studio was upgraded instead of installing from scratch (Deploying artifact 1/3: Upgrade Visual Studio Under Test). The time it took creates the machine caused delay in completing the deploy machine job. Whereas in the best-case scenario, as shown in the screenshot, DartLab found a machine in the pool and hence the job took less time.

No machines were found in the pool that match the checkpoint's filter. Attempting to create another machine for this run...
Successfully created machine 'dtl-kkdxt302' for this run.
[dtl-kkdxt302] Click here to view the machine's activity logs: 
##[debug][dtl-kkdxt302] Updating 8 tag(s)...
##[debug][dtl-kkdxt302] Waiting until machine is ready to deploy artifacts...
[dtl-kkdxt302] Machine is ready to deploy artifacts.
##[debug][dtl-kkdxt302] Deploying 3 artifact(s)...
##[debug][dtl-kkdxt302] Waiting for artifact deployment to begin...
[dtl-kkdxt302] Artifact deployment has successfully began. Click the following link for more details: 
##[debug][dtl-kkdxt302] Waiting for 3 artifact(s) to deploy...
##[debug][dtl-kkdxt302] **Deploying artifact 1/3: Upgrade Visual Studio Under Test**
##[debug][dtl-kkdxt302] Deploying artifact 2/3: Restart Machine
[dtl-kkdxt302] Successfully deployed 3 artifact(s).
##[debug][dtl-kkdxt302] Machine is ready, notifying caller.
##[debug]A deploy machine task has completed, 0 task(s) remaining...
Successfully deployed machine 'dtl-kkdxt302'.
1/1 machine(s) deployed successfully, 0/1 machine(s) still in progress...
Successfully deployed 1 machine(s): dtl-kkdxt302

@kartheekp-ms kartheekp-ms merged commit 0cf8fb8 into NuGet:dev Jul 13, 2023
zivkan added a commit that referenced this pull request Dec 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community PRs created by someone not in the NuGet team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants