Skip to content

Commit

Permalink
Merge branch 'dev' into obsolete-x509certificate2
Browse files Browse the repository at this point in the history
  • Loading branch information
zivkan authored Jul 31, 2024
2 parents 085f2ff + 50907a2 commit 8e1a46c
Show file tree
Hide file tree
Showing 291 changed files with 12,565 additions and 3,668 deletions.
3 changes: 2 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -282,4 +282,5 @@ dotnet_diagnostic.VSTHRD102.severity = none
dotnet_diagnostic.VSTHRD103.severity = none
dotnet_diagnostic.VSTHRD104.severity = none
dotnet_diagnostic.VSTHRD105.severity = none
dotnet_diagnostic.VSTHRD106.severity = none
dotnet_diagnostic.VSTHRD106.severity = none
dotnet_diagnostic.IDE0055.severity = warning
31 changes: 8 additions & 23 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,16 @@
<!-- DO NOT MODIFY OR DELETE THIS TEMPLATE. IT IS USED IN AUTOMATION. -->
## Bug

<!-- Search https://github.com/NuGet/Home/issues, and create one if you can't find a suitable issue. -->
<!-- Paste the full link, like https://github.com/nuget/home/issues/1000. GitHub will render is neatly. -->
Fixes:
# Bug

Regression? Last working version:
<!-- If this is an engineering change or test change only, you do not need an issue. -->
<!-- Find or create an issue in NuGet/Home and paste the full url. -->
<!-- At the maintainers discretion, multiple changes may apply to a single issue, but only when the PRs are all created within a short period of time. -->
Fixes:

## Description
<!-- Add details about the fix. Include any information that would help the maintainer review this change effective. -->

## PR Checklist

- [ ] PR has a meaningful title
- [ ] PR has a linked issue.
- [ ] Described changes

- **Tests**
- [ ] Automated tests added
- **OR**
<!-- Describe why you haven't added automation. -->
- [ ] Test exception
- **OR**
- [ ] N/A <!-- Infrastructure, documentation etc. -->

- **Documentation**
<!-- Please link the PR/issue if appropriate -->
- [ ] Documentation PR or issue filled
- **OR**
- [ ] N/A
- [ ] Meaningful title, helpful description and a linked NuGet/Home issue
- [ ] Added tests
- [ ] Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc.
13 changes: 2 additions & 11 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,10 @@
<PackageVersion Include="FluentAssertions" Version="6.12.0" />
<PackageVersion Include="ILMerge" Version="3.0.41" />
<PackageVersion Include="Lucene.Net" Version="3.0.3" />
<PackageVersion Include="MessagePack" Version="2.5.108" />
<PackageVersion Include="Microsoft.Build" Version="$(MicrosoftBuildVersion)" />
<PackageVersion Include="Microsoft.Build.Artifacts" Version="4.2.0" />
<PackageVersion Include="Microsoft.Build.Framework" Version="$(MicrosoftBuildVersion)" />
<PackageVersion Include="Microsoft.Build.Locator" Version="1.5.5" />
<PackageVersion Include="Microsoft.Build.Runtime" Version="$(MicrosoftBuildVersion)" />
<PackageVersion Include="Microsoft.Build.Tasks.Core" Version="$(MicrosoftBuildVersion)" />
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildVersion)" />
<PackageVersion Include="Microsoft.CodeAnalysis" Version="4.3.1" />
Expand All @@ -58,17 +56,13 @@
<PackageVersion Include="Microsoft.Extensions.FileProviders.Abstractions" Version="$(MicrosoftExtensionsFileProvidersAbstractionsPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.FileSystemGlobbing" Version="$(MicrosoftExtensionsFileSystemGlobbingPackageVersion)" />
<PackageVersion Include="Microsoft.Internal.VisualStudio.Shell.Framework" Version="17.10.40173" />
<PackageVersion Include="Microsoft.Net.Compilers.netcore" Version="3.0.0-dev-61717-03" />
<PackageVersion Include="Microsoft.Net.Compilers.Toolset" Version="3.9.0" />
<PackageVersion Include="Microsoft.NET.StringTools" Version="$(MicrosoftBuildVersion)" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageVersion Include="Microsoft.PowerShell.3.ReferenceAssemblies" Version="1.0.0" />
<PackageVersion Include="Microsoft.TeamFoundationServer.ExtendedClient" Version="16.153.0" />
<PackageVersion Include="Microsoft.Test.Apex.VisualStudio" Version="17.11.35005.70" />
<PackageVersion Include="Microsoft.TestPlatform.Portable" Version="17.1.0" />
<PackageVersion Include="Microsoft.VisualStudio.LanguageServices" Version="4.3.1" />
<PackageVersion Include="Microsoft.VisualStudio.ProjectSystem" Version="17.4.221-pre" />
<PackageVersion Include="Microsoft.VisualStudio.ProjectSystem.Interop" Version="17.4.221-pre" />
<PackageVersion Include="Microsoft.VisualStudio.ProjectSystem.Managed" Version="17.2.0-beta1-20502-01" />
<PackageVersion Include="Microsoft.VisualStudio.ProjectSystem.Managed.VS" Version="17.2.0-beta1-20502-01" />
<PackageVersion Include="Microsoft.VisualStudio.ProjectSystem.VS" Version="17.4.221-pre" />
Expand All @@ -87,13 +81,11 @@
<PackageVersion Include="NuGet.Client.EndToEnd.TestData" Version="1.0.0" />
<PackageVersion Include="NuGet.Core" Version="2.14.0-rtm-832" />
<PackageVersion Include="NuGetValidator" version="2.1.1" />
<PackageVersion Include="Portable.BouncyCastle" Version="1.9.0" />
<PackageVersion Include="SharpZipLib" Version="1.4.2" />
<PackageVersion Include="System.Collections" Version="$(SystemPackagesVersion)" />
<PackageVersion Include="System.CommandLine" Version="$(SystemCommandLineVersion)" />
<PackageVersion Include="System.ComponentModel.Composition" Version="$(SystemComponentModelCompositionPackageVersion)" />
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="4.4.0" />
<PackageVersion Include="System.Diagnostics.Debug" Version="$(SystemPackagesVersion)" />
<PackageVersion Include="System.Formats.Asn1" Version="8.0.1" />
<PackageVersion Include="System.IO.FileSystem.Primitives" Version="$(SystemPackagesVersion)" />
<PackageVersion Include="System.Memory" Version="4.5.5" />
<PackageVersion Include="System.Resources.ResourceManager" Version="$(SystemPackagesVersion)" />
Expand All @@ -116,7 +108,6 @@
<PackageVersion Include="xunit" Version="2.6.3" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.4.5" />
<PackageVersion Include="Xunit.StaFact" Version="1.1.11" />

</ItemGroup>

<!--
Expand Down Expand Up @@ -185,7 +176,7 @@
<_allowBuildFromSourcePackage Include="Newtonsoft.Json" />
<_allowBuildFromSourcePackage Include="System.CommandLine" />
<_allowBuildFromSourcePackage Include="System.ComponentModel.Composition" />
<_allowBuildFromSourcePackage Include="System.Diagnostics.Debug" />
<_allowBuildFromSourcePackage Include="System.Formats.Asn1" />
<_allowBuildFromSourcePackage Include="System.Security.Cryptography.Cng" />
<_allowBuildFromSourcePackage Include="System.Security.Cryptography.Pkcs" />
<_allowBuildFromSourcePackage Include="System.Security.Cryptography.ProtectedData" />
Expand Down
2 changes: 1 addition & 1 deletion build/DotNetSdkVersions.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Each line represents arguments for the .NET SDK installer script (https://learn.microsoft.com/dotnet/core/tools/dotnet-install-script)
-Channel 8.0.2xx
-Channel 8.0.3xx
-Channel 3.1 -Runtime dotnet
27 changes: 27 additions & 0 deletions docs/feature-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,33 @@ These considerations are also useful for smaller changes that might not require
* World readiness considerations
* User documentation

#### Warnings and defaults

The .NET 9 SDK introduces a new [`SdkAnalysisLevel` property](https://github.com/dotnet/designs/blob/main/proposed/sdk-analysis-level.md), which is intended to allow customers to avoid breaking changes while still upgrading to new versions of the build tools.
Going forward, any in-scope change to NuGet must compare `SdkAnalysisLevel` to the version of the .NET SDK that corresponds to NuGet's dev branch is going to be inserted into.
For example, NuGet 6.12 will ship in the .NET 9.0.100 SDK.
Therefore, any in-scope change to NuGet in NuGet 6.12 must retain existing/previous behavior when `SdkAnalysisVersion` is lower than this version, and the new behavior applies only when it's equal or higher.

Since `SdkAnalysisLevel` will apply to many features, including features that are not part of NuGet, it is not a substitute for having a feature specific configuration.
`SdkAnalysisLevel` should just be used to decide what the default is for that configuration value.

A non-exhaustive list of examples of in-scope changes to NuGet include:

* New restore warning
* New pack validation
* Change a warning to an error
* Changes to feature opt-in/out, or other changes to configuration defaults

Note that `SdkAnalysisLevel` is only set by the .NET SDK, and only starting from the .NET 9.0.100 SDK.
Therefore the following logic should apply anywhere NuGet needs to make a decision based on the `SdkAnalysisLevel`:

1. If `SdkAnalysisLevel` is set, regardless of project type, always use that value.
1. Otherwise, if `UsingMicrosoftNETSdk` has the value `true`, then assume that the `SdkAnalysisLevel` is 8.0.400.
1. Otherwise, assume `SdkAnalysisLevel` is equal to the highest version that the feature compares to, so always use the latest defaults.

This means that `SdkAnalysisLevel` is used as intended for SDK style projects, but non-SDK style project always use the latest defaults.
All project types use the same configuration, so that customers can set a single property in a *Directory.Build.props* file, or environment variable.

#### Restore considerations

* NuGet tool parity, ensure all products work as expected
Expand Down
3 changes: 2 additions & 1 deletion docs/workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ In here we describe the general workflow guidelines the NuGet developer/contribu

To help ensure that only the highest quality code makes its way into the project, all code changes need to be submitted to GitHub as PRs.

In general a PR should be approved by the Subject Matter Expert (SME) of that code. For example, a change to the Banana project should be signed off by `@Monkey`, and not by `@Giraffe`. If you don't know the SME, someone on the team will help you identify them. Of course, sometimes it's the SME who is making a change, in which case a secondary person will have to sign off on the change (e.g. `@JuniorMonkey`).
In general a PR should be approved by a Subject Matter Expert (SME) of that code. For example, a change to the Banana project should be signed off by `@Monkey`, and not by `@Giraffe`. If you don't know the SME, someone on the team will help you identify them. Of course, sometimes it's the SME who is making a change, in which case a secondary person will have to sign off on the change (e.g. `@JuniorMonkey`).

To commit the PR to the repo use the GitHub `Squash and Merge` button. We can't stress this enough. Always use `Squash and Merge` unless an exception is explicitly stated in this document.

This repo has bots that manage all stale PRs. Stale PRs will be autoclosed.

- *Do* follow the pull request template, as it helps the maintainers drive quality across the product.
- *Do* favor having more than 1 reviewer.
- *Do not* merge too quickly. Wait for at least 24h after the last significant changes before merging unless the change is urgent.
- *Do* address all feedback. Not necessarily by accepting it, but by reaching a resolution with the reviewer. All comments need to be marked as resolved before merging.
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ parameters:
type: boolean
default: false
- name: RunCrossFrameworkTestsOnWindows
displayName: Run cross framweork tests on Windows
displayName: Run cross framework tests on Windows
type: boolean
default: false
- name: RunFunctionalTestsOnWindows
Expand All @@ -41,7 +41,7 @@ parameters:
- name: RunMonoTestsOnMac
displayName: Run Mono tests on Mac
type: boolean
default: true
default: false

resources:
pipelines:
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ parameters:
type: boolean
default: true
- name: RunCrossFrameworkTestsOnWindows
displayName: Run cross framweork tests on Windows
displayName: Run cross framework tests on Windows
type: boolean
default: true
- name: RunFunctionalTestsOnWindows
Expand All @@ -26,7 +26,7 @@ parameters:
- name: RunMonoTestsOnMac
displayName: Run Mono tests on Mac
type: boolean
default: true
default: false

resources:
repositories:
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ parameters:
type: boolean
default: true
- name: RunCrossFrameworkTestsOnWindows
displayName: Run cross framweork tests on Windows
displayName: Run cross framework tests on Windows
type: boolean
default: false
- name: RunUnitTestsOnWindows
Expand All @@ -37,7 +37,7 @@ parameters:
- name: RunMonoTestsOnMac
displayName: Run Mono tests on Mac
type: boolean
default: true
default: false
- name: RunStaticAnalysis
displayName: Run static analysis
type: boolean
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/templates/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ parameters:
type: boolean
default: true
- name: RunCrossFrameworkTestsOnWindows
displayName: Run cross framweork tests on Windows
displayName: Run cross framework tests on Windows
type: boolean
default: true
- name: RunUnitTestsOnWindows
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ stages:
- ${{if gt(length(parameters.variables), 0)}}:
- ${{parameters.variables}}
runSettingsURI: ${{parameters.runSettingsURI}}
visualStudioBootstrapperURI: $(bootstrapperUrl)
visualStudioBootstrapperURI: $(bootstrapperUrl)
baseVisualStudioBootstrapperURI: https://vsdrop.microsoft.com/file/v1/$(VisualStudio.BaseBuild.ProductsDropName);bootstrappers/Enterprise/vs_enterprise.exe
candidateBaselineBuilds: $(BaselineBuildCommitIds)
testLabPoolName: VS-Platform
Expand All @@ -56,14 +56,18 @@ stages:
testExecutionJobTimeoutInMinutes: ${{parameters.testExecutionJobTimeoutInMinutes}}
testMachineCleanUpStrategy: ${{parameters.testMachineCleanUpStrategy}}
testAgentElevated: true

##############################
## preTestMachineConfigurationStepList
##############################
preTestMachineConfigurationStepList:
- template: \steps\powershell\execute-script.yml@DartLabTemplates
parameters:
displayName: Get Baseline Build ID using CloudBuild Session ID
continueOnError: true
filePath: $(DartLab.Path)\Scripts\AzureDevOps\Build\Get-BuildIdFromCloudBuildSessionID.ps1
arguments: -ClientSecret (ConvertTo-SecureString '$(CloudBuild-ClientSecret)' -AsPlainText -Force) -ClientID '$(CloudBuild-ClientID)' -SessionID '${{ parameters.QBuildSessionId }}' -OutVariableName 'BaselineBuildID'

- task: PowerShell@2
displayName: "Get Baseline build commit ids"
name: "getbaselinebuildcommitids"
Expand All @@ -74,7 +78,7 @@ stages:
script: |
try {
Write-Host "Getting Baseline build commit ids for build: '$(BaselineBuildID)'"
$artifactName = 'BuildArtifacts'
$baselineBuildsFile = Join-Path $(Agent.TempDirectory) "BaselineBuilds.json"
Expand Down Expand Up @@ -117,6 +121,10 @@ stages:
$buildDrop = "${{parameters.baseBuildDrop}}" -split "/"
$dropName = "Products/DevDiv/VS/$($buildDrop[-2])/$($buildDrop[-1])"
Write-Host "##vso[task.setvariable variable=VisualStudio.BaseBuild.ProductsDropName]$dropName"
##############################
## preDeployAndRunTestsStepList
##############################
preDeployAndRunTestsStepList:
- task: PowerShell@1
displayName: "Print Environment Variables"
Expand All @@ -125,32 +133,13 @@ stages:
inlineScript: |
Get-ChildItem Env: | Sort-Object Name | Format-Table -Wrap -AutoSize
- task: DownloadPipelineArtifact@0
displayName: "Download Pipeline artifacts"
- task: DownloadPipelineArtifact@2
displayName: "Download scripts"
inputs:
artifactName: "VS15"
downloadPath: "$(Build.Repository.LocalPath)/artifacts"

- powershell: |
$zipPath = "$(Build.Repository.Localpath)/artifacts/VS15/EndToEnd.zip"
$dest = "$(System.DefaultWorkingDirectory)/artifacts/EndToEnd/"
Write-Output "Extracting '$zipPath' to '$dest'"
Expand-Archive -Path "$zipPath" -DestinationPath "$dest"
$nugetExePath = "$(Build.Repository.Localpath)/artifacts/VS15/NuGet.exe"
Write-Output "Copying '$nugetExePath' to '$dest'"
Copy-Item -Path "$nugetExePath" -Destination "$dest"
displayName: "Extract EndToEnd.zip"
artifactName: "scripts"
downloadPath: "$(Build.StagingDirectory)/scripts"

- task: PowerShell@1
displayName: "SetupFunctionalTests.ps1"
inputs:
scriptName: "$(System.DefaultWorkingDirectory)/artifacts/EndToEnd/scripts/SetupFunctionalTests.ps1"
postDeployAndRunTestsStepList:
- task: PowerShell@1
displayName: "Initialize Git Commit Status on GitHub"
inputs:
scriptType: "inlineScript"
inlineScript: |
. $(System.DefaultWorkingDirectory)\\artifacts\\EndToEnd\\scripts\\PostGitCommitStatus.ps1
SetCommitStatusForTestResult -PersonalAccessToken $(NuGetLurkerPersonalAccessToken) -VstsPersonalAccessToken $(System.AccessToken) -CommitSha $(Build.SourceVersion) -TestName "$(GitHubStatusName)"
condition: "not(eq(variables['ManualGitHubChecks'], 'false'))"
scriptName: "$(Build.StagingDirectory)/scripts/e2etests/SetupFunctionalTests.ps1"
Loading

0 comments on commit 8e1a46c

Please sign in to comment.