Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
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 NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<clear />
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
<!-- Begin: Package sources from dotnet-dotnet -->
<add key="darc-pub-dotnet-dotnet-156ff45" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-dotnet-156ff457/nuget/v3/index.json" />
<add key="darc-pub-dotnet-dotnet-f8e4f7d" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-dotnet-f8e4f7d3/nuget/v3/index.json" />
<!-- End: Package sources from dotnet-dotnet -->
<!-- Begin: Package sources from dotnet-runtime -->
<!-- End: Package sources from dotnet-runtime -->
Expand Down
10 changes: 5 additions & 5 deletions eng/Version.Details.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ This file should be imported by eng/Versions.props
<Project>
<PropertyGroup>
<!-- dotnet/dotnet dependencies -->
<MicrosoftDotNetArcadeSdkPackageVersion>10.0.0-beta.26121.102</MicrosoftDotNetArcadeSdkPackageVersion>
<MicrosoftDotNetBuildTasksTemplatingPackageVersion>10.0.0-beta.26121.102</MicrosoftDotNetBuildTasksTemplatingPackageVersion>
<MicrosoftDotNetHelixSdkPackageVersion>10.0.0-beta.26121.102</MicrosoftDotNetHelixSdkPackageVersion>
<MicrosoftDotNetArcadeSdkPackageVersion>10.0.0-beta.26123.124</MicrosoftDotNetArcadeSdkPackageVersion>
<MicrosoftDotNetBuildTasksTemplatingPackageVersion>10.0.0-beta.26123.124</MicrosoftDotNetBuildTasksTemplatingPackageVersion>
<MicrosoftDotNetHelixSdkPackageVersion>10.0.0-beta.26123.124</MicrosoftDotNetHelixSdkPackageVersion>
<MicrosoftExtensionsCachingMemoryPackageVersion>10.0.5</MicrosoftExtensionsCachingMemoryPackageVersion>
<MicrosoftExtensionsConfigurationPackageVersion>10.0.5</MicrosoftExtensionsConfigurationPackageVersion>
<MicrosoftExtensionsConfigurationAbstractionsPackageVersion>10.0.5</MicrosoftExtensionsConfigurationAbstractionsPackageVersion>
<MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>10.0.5</MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>
<MicrosoftExtensionsConfigurationJsonPackageVersion>10.0.5</MicrosoftExtensionsConfigurationJsonPackageVersion>
<MicrosoftExtensionsDependencyInjectionPackageVersion>10.0.5</MicrosoftExtensionsDependencyInjectionPackageVersion>
<MicrosoftExtensionsDependencyModelPackageVersion>10.0.5</MicrosoftExtensionsDependencyModelPackageVersion>
<MicrosoftExtensionsHostFactoryResolverSourcesPackageVersion>10.0.5-servicing.26121.102</MicrosoftExtensionsHostFactoryResolverSourcesPackageVersion>
<MicrosoftExtensionsHostFactoryResolverSourcesPackageVersion>10.0.5-servicing.26123.124</MicrosoftExtensionsHostFactoryResolverSourcesPackageVersion>
<MicrosoftExtensionsLoggingPackageVersion>10.0.5</MicrosoftExtensionsLoggingPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>10.0.5</MicrosoftNETCoreAppRefPackageVersion>
<MicrosoftNETCorePlatformsPackageVersion>10.0.5-servicing.26121.102</MicrosoftNETCorePlatformsPackageVersion>
<MicrosoftNETCorePlatformsPackageVersion>10.0.5-servicing.26123.124</MicrosoftNETCorePlatformsPackageVersion>
<SystemFormatsAsn1PackageVersion>10.0.5</SystemFormatsAsn1PackageVersion>
<SystemRuntimeCachingPackageVersion>10.0.5</SystemRuntimeCachingPackageVersion>
<SystemTextEncodingsWebPackageVersion>10.0.5</SystemTextEncodingsWebPackageVersion>
Expand Down
48 changes: 24 additions & 24 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,80 +1,80 @@
<?xml version="1.0" encoding="utf-8"?>
<Dependencies>
<Source Uri="https://github.com/dotnet/dotnet" Mapping="efcore" Sha="156ff45774adb003ed6fce76aa3ddbbe93b6e3ad" BarId="302824" />
<Source Uri="https://github.com/dotnet/dotnet" Mapping="efcore" Sha="f8e4f7d30c6813e5fb21e641f1b323fb67921108" BarId="303150" />
<ProductDependencies>
<Dependency Name="Microsoft.Extensions.Caching.Memory" Version="10.0.5">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>156ff45774adb003ed6fce76aa3ddbbe93b6e3ad</Sha>
<Sha>f8e4f7d30c6813e5fb21e641f1b323fb67921108</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="10.0.5">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>156ff45774adb003ed6fce76aa3ddbbe93b6e3ad</Sha>
<Sha>f8e4f7d30c6813e5fb21e641f1b323fb67921108</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.Abstractions" Version="10.0.5">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>156ff45774adb003ed6fce76aa3ddbbe93b6e3ad</Sha>
<Sha>f8e4f7d30c6813e5fb21e641f1b323fb67921108</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.Json" Version="10.0.5">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>156ff45774adb003ed6fce76aa3ddbbe93b6e3ad</Sha>
<Sha>f8e4f7d30c6813e5fb21e641f1b323fb67921108</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration" Version="10.0.5">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>156ff45774adb003ed6fce76aa3ddbbe93b6e3ad</Sha>
<Sha>f8e4f7d30c6813e5fb21e641f1b323fb67921108</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.DependencyInjection" Version="10.0.5">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>156ff45774adb003ed6fce76aa3ddbbe93b6e3ad</Sha>
<Sha>f8e4f7d30c6813e5fb21e641f1b323fb67921108</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.DependencyModel" Version="10.0.5">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>156ff45774adb003ed6fce76aa3ddbbe93b6e3ad</Sha>
<Sha>f8e4f7d30c6813e5fb21e641f1b323fb67921108</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.HostFactoryResolver.Sources" Version="10.0.5-servicing.26121.102">
<Dependency Name="Microsoft.Extensions.HostFactoryResolver.Sources" Version="10.0.5-servicing.26123.124">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>156ff45774adb003ed6fce76aa3ddbbe93b6e3ad</Sha>
<Sha>f8e4f7d30c6813e5fb21e641f1b323fb67921108</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging" Version="10.0.5">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>156ff45774adb003ed6fce76aa3ddbbe93b6e3ad</Sha>
<Sha>f8e4f7d30c6813e5fb21e641f1b323fb67921108</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Ref" Version="10.0.5">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>156ff45774adb003ed6fce76aa3ddbbe93b6e3ad</Sha>
<Sha>f8e4f7d30c6813e5fb21e641f1b323fb67921108</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.Platforms" Version="10.0.5-servicing.26121.102">
<Dependency Name="Microsoft.NETCore.Platforms" Version="10.0.5-servicing.26123.124">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>156ff45774adb003ed6fce76aa3ddbbe93b6e3ad</Sha>
<Sha>f8e4f7d30c6813e5fb21e641f1b323fb67921108</Sha>
</Dependency>
<Dependency Name="System.Text.Json" Version="10.0.5">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>156ff45774adb003ed6fce76aa3ddbbe93b6e3ad</Sha>
<Sha>f8e4f7d30c6813e5fb21e641f1b323fb67921108</Sha>
</Dependency>
<Dependency Name="System.Text.Encodings.Web" Version="10.0.5">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>156ff45774adb003ed6fce76aa3ddbbe93b6e3ad</Sha>
<Sha>f8e4f7d30c6813e5fb21e641f1b323fb67921108</Sha>
</Dependency>
<Dependency Name="System.Formats.Asn1" Version="10.0.5">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>156ff45774adb003ed6fce76aa3ddbbe93b6e3ad</Sha>
<Sha>f8e4f7d30c6813e5fb21e641f1b323fb67921108</Sha>
</Dependency>
<Dependency Name="System.Runtime.Caching" Version="10.0.5">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>156ff45774adb003ed6fce76aa3ddbbe93b6e3ad</Sha>
<Sha>f8e4f7d30c6813e5fb21e641f1b323fb67921108</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.26121.102">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.26123.124">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>156ff45774adb003ed6fce76aa3ddbbe93b6e3ad</Sha>
<Sha>f8e4f7d30c6813e5fb21e641f1b323fb67921108</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="10.0.0-beta.26121.102">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="10.0.0-beta.26123.124">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>156ff45774adb003ed6fce76aa3ddbbe93b6e3ad</Sha>
<Sha>f8e4f7d30c6813e5fb21e641f1b323fb67921108</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="10.0.0-beta.26121.102">
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="10.0.0-beta.26123.124">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>156ff45774adb003ed6fce76aa3ddbbe93b6e3ad</Sha>
<Sha>f8e4f7d30c6813e5fb21e641f1b323fb67921108</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
21 changes: 0 additions & 21 deletions eng/common/templates/steps/vmr-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,27 +38,6 @@ steps:
displayName: Label PR commit
workingDirectory: $(Agent.BuildDirectory)/repo

- script: |
vmr_sha=$(grep -oP '(?<=Sha=")[^"]*' $(Agent.BuildDirectory)/repo/eng/Version.Details.xml)
echo "##vso[task.setvariable variable=vmr_sha]$vmr_sha"
displayName: Obtain the vmr sha from Version.Details.xml (Unix)
condition: ne(variables['Agent.OS'], 'Windows_NT')
workingDirectory: $(Agent.BuildDirectory)/repo

- powershell: |
[xml]$xml = Get-Content -Path $(Agent.BuildDirectory)/repo/eng/Version.Details.xml
$vmr_sha = $xml.SelectSingleNode("//Source").Sha
Write-Output "##vso[task.setvariable variable=vmr_sha]$vmr_sha"
displayName: Obtain the vmr sha from Version.Details.xml (Windows)
condition: eq(variables['Agent.OS'], 'Windows_NT')
workingDirectory: $(Agent.BuildDirectory)/repo

- script: |
git fetch --all
git checkout $(vmr_sha)
displayName: Checkout VMR at correct sha for repo flow
workingDirectory: ${{ parameters.vmrPath }}

- script: |
git config --global user.name "dotnet-maestro[bot]"
git config --global user.email "dotnet-maestro[bot]@users.noreply.github.com"
Expand Down
1 change: 1 addition & 0 deletions eng/common/templates/vmr-build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ resources:
type: github
name: dotnet/dotnet
endpoint: dotnet
ref: refs/heads/main # Set to whatever VMR branch the PR build should insert into

stages:
- template: /eng/pipelines/templates/stages/vmr-build.yml@vmr
Expand Down
5 changes: 5 additions & 0 deletions eng/common/tools.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -824,6 +824,11 @@ function MSBuild-Core() {

$cmdArgs = "$($buildTool.Command) /m /nologo /clp:Summary /v:$verbosity /nr:$nodeReuse /p:ContinuousIntegrationBuild=$ci"

# Add -mt flag for MSBuild multithreaded mode if enabled via environment variable
if ($env:MSBUILD_MT_ENABLED -eq "1") {
$cmdArgs += ' -mt'
}

if ($warnAsError) {
$cmdArgs += ' /warnaserror /p:TreatWarningsAsErrors=true'
}
Expand Down
8 changes: 7 additions & 1 deletion eng/common/tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,13 @@ function MSBuild-Core {
}
}

RunBuildTool "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch /p:TreatWarningsAsErrors=$warn_as_error /p:ContinuousIntegrationBuild=$ci "$@"
# Add -mt flag for MSBuild multithreaded mode if enabled via environment variable
local mt_switch=""
if [[ "${MSBUILD_MT_ENABLED:-}" == "1" ]]; then
mt_switch="-mt"
fi

RunBuildTool "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch $mt_switch /p:TreatWarningsAsErrors=$warn_as_error /p:ContinuousIntegrationBuild=$ci "$@"
}

function GetDarc {
Expand Down
38 changes: 32 additions & 6 deletions eng/common/vmr-sync.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,20 @@ Set-StrictMode -Version Latest
Highlight 'Installing .NET, preparing the tooling..'
. .\eng\common\tools.ps1
$dotnetRoot = InitializeDotNetCli -install:$true
$env:DOTNET_ROOT = $dotnetRoot
$darc = Get-Darc
$dotnet = "$dotnetRoot\dotnet.exe"

Highlight "Starting the synchronization of VMR.."

# Synchronize the VMR
$versionDetailsPath = Resolve-Path (Join-Path $PSScriptRoot '..\Version.Details.xml') | Select-Object -ExpandProperty Path
[xml]$versionDetails = Get-Content -Path $versionDetailsPath
$repoName = $versionDetails.SelectSingleNode('//Source').Mapping
if (-not $repoName) {
Fail "Failed to resolve repo mapping from $versionDetailsPath"
exit 1
}

$darcArgs = (
"vmr", "forwardflow",
"--tmp", $tmpDir,
Expand All @@ -130,9 +138,27 @@ if ($LASTEXITCODE -eq 0) {
Highlight "Synchronization succeeded"
}
else {
Fail "Synchronization of repo to VMR failed!"
Fail "'$vmrDir' is left in its last state (re-run of this script will reset it)."
Fail "Please inspect the logs which contain path to the failing patch file (use -debugOutput to get all the details)."
Fail "Once you make changes to the conflicting VMR patch, commit it locally and re-run this script."
exit 1
Highlight "Failed to flow code into the local VMR. Falling back to resetting the VMR to match repo contents..."
git -C $vmrDir reset --hard

$resetArgs = (
"vmr", "reset",
"${repoName}:HEAD",
"--vmr", $vmrDir,
"--tmp", $tmpDir,
"--additional-remotes", "${repoName}:${repoRoot}"
)

& "$darc" $resetArgs

if ($LASTEXITCODE -eq 0) {
Highlight "Successfully reset the VMR using 'darc vmr reset'"
}
else {
Fail "Synchronization of repo to VMR failed!"
Fail "'$vmrDir' is left in its last state (re-run of this script will reset it)."
Fail "Please inspect the logs which contain path to the failing patch file (use -debugOutput to get all the details)."
Fail "Once you make changes to the conflicting VMR patch, commit it locally and re-run this script."
exit 1
}
}
30 changes: 25 additions & 5 deletions eng/common/vmr-sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,13 @@ fi

# Synchronize the VMR

version_details_path=$(cd "$scriptroot/.."; pwd -P)/Version.Details.xml
repo_name=$(grep -m 1 '<Source ' "$version_details_path" | sed -n 's/.*Mapping="\([^"]*\)".*/\1/p')
if [[ -z "$repo_name" ]]; then
fail "Failed to resolve repo mapping from $version_details_path"
exit 1
fi

export DOTNET_ROOT="$dotnetDir"

"$darc_tool" vmr forwardflow \
Expand All @@ -199,9 +206,22 @@ export DOTNET_ROOT="$dotnetDir"
if [[ $? == 0 ]]; then
highlight "Synchronization succeeded"
else
fail "Synchronization of repo to VMR failed!"
fail "'$vmr_dir' is left in its last state (re-run of this script will reset it)."
fail "Please inspect the logs which contain path to the failing patch file (use --debug to get all the details)."
fail "Once you make changes to the conflicting VMR patch, commit it locally and re-run this script."
exit 1
highlight "Failed to flow code into the local VMR. Falling back to resetting the VMR to match repo contents..."
git -C "$vmr_dir" reset --hard

"$darc_tool" vmr reset \
"$repo_name:HEAD" \
--vmr "$vmr_dir" \
--tmp "$tmp_dir" \
--additional-remotes "$repo_name:$repo_root"

if [[ $? == 0 ]]; then
highlight "Successfully reset the VMR using 'darc vmr reset'"
else
fail "Synchronization of repo to VMR failed!"
fail "'$vmr_dir' is left in its last state (re-run of this script will reset it)."
fail "Please inspect the logs which contain path to the failing patch file (use --debug to get all the details)."
fail "Once you make changes to the conflicting VMR patch, commit it locally and re-run this script."
exit 1
fi
fi
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26121.102",
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.26121.102"
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26123.124",
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.26123.124"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ protected override Expression VisitExtension(Expression expression)
var navigation = collectionResultExpression.StructuralProperty switch
{
INavigationBase n => n,
null => null,
null or IComplexProperty => null,
_ => throw new UnreachableException()
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,14 @@ FROM root c

#region Subquery

public override async Task Select_subquery_FirstOrDefault_complex_collection(QueryTrackingBehavior queryTrackingBehavior)
{
if (queryTrackingBehavior is not QueryTrackingBehavior.TrackAll)
{
await AssertTranslationFailed(() => base.Select_subquery_FirstOrDefault_complex_collection(queryTrackingBehavior));
}
}

public override async Task Select_subquery_required_related_FirstOrDefault(QueryTrackingBehavior queryTrackingBehavior)
{
if (queryTrackingBehavior is not QueryTrackingBehavior.TrackAll)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,18 @@ public virtual Task Select_subquery_optional_related_FirstOrDefault(QueryTrackin
.FirstOrDefault()!.RequiredNestedAssociate),
queryTrackingBehavior: queryTrackingBehavior);

[ConditionalTheory, MemberData(nameof(TrackingData))]
public virtual Task Select_subquery_FirstOrDefault_complex_collection(QueryTrackingBehavior queryTrackingBehavior)
=> AssertQuery(
ss => ss.Set<RootEntity>()
.OrderBy(x => x.Id)
.Select(x => ss.Set<RootEntity>()
.OrderBy(e => e.Id)
.FirstOrDefault()!.AssociateCollection),
assertOrder: true,
elementAsserter: (e, a) => AssertCollection(e, a, elementSorter: r => r.Id),
queryTrackingBehavior: queryTrackingBehavior);

// [ConditionalTheory]
// [MemberData(nameof(TrackingData))]
// public virtual Task Select_subquery_root_set_trunk_FirstOrDefault_collection(QueryTrackingBehavior queryTrackingBehavior)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ public override Task SelectMany_nested_collection_on_optional_associate(QueryTra

#region Subquery

public override Task Select_subquery_FirstOrDefault_complex_collection(QueryTrackingBehavior queryTrackingBehavior)
=> AssertOwnedTrackingQuery(
queryTrackingBehavior, () => base.Select_subquery_FirstOrDefault_complex_collection(queryTrackingBehavior));

public override Task Select_subquery_required_related_FirstOrDefault(QueryTrackingBehavior queryTrackingBehavior)
=> AssertOwnedTrackingQuery(
queryTrackingBehavior, () => base.Select_subquery_required_related_FirstOrDefault(queryTrackingBehavior));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,23 @@ FROM [RootEntity] AS [r]

#region Subquery

public override async Task Select_subquery_FirstOrDefault_complex_collection(QueryTrackingBehavior queryTrackingBehavior)
{
await base.Select_subquery_FirstOrDefault_complex_collection(queryTrackingBehavior);

AssertSql(
"""
SELECT [r1].[c], [r1].[c0]
FROM [RootEntity] AS [r]
OUTER APPLY (
SELECT TOP(1) [r0].[AssociateCollection] AS [c], 1 AS [c0]
FROM [RootEntity] AS [r0]
ORDER BY [r0].[Id]
) AS [r1]
ORDER BY [r].[Id]
""");
}

public override async Task Select_subquery_required_related_FirstOrDefault(QueryTrackingBehavior queryTrackingBehavior)
{
await base.Select_subquery_required_related_FirstOrDefault(queryTrackingBehavior);
Expand Down
Loading