Skip to content

Commit 2a878b9

Browse files
Eliminate remaining source-build poisons (#16631)
1 parent 68f7361 commit 2a878b9

File tree

9 files changed

+40
-63
lines changed

9 files changed

+40
-63
lines changed

eng/pipelines/templates/jobs/vmr-build.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -230,14 +230,8 @@ jobs:
230230
231231
dockerVolumeArgs="-v $(sourcesPath):/vmr"
232232
dockerEnvArgs="-e SMOKE_TESTS_EXCLUDE_OMNISHARP=${{ parameters.excludeOmniSharpTests }} -e SMOKE_TESTS_WARN_SDK_CONTENT_DIFFS=true -e SMOKE_TESTS_RUNNING_IN_CI=true"
233-
poisonArg=''
234233
235-
if [[ '${{ parameters.enablePoison }}' == 'True' ]]; then
236-
poisonArg='--poison'
237-
dockerEnvArgs+=" -e SMOKE_TESTS_WARN_POISON_DIFFS=true"
238-
fi
239-
240-
docker run --rm $dockerVolumeArgs -w /vmr $dockerEnvArgs ${{ parameters.container }} ./build.sh $poisonArg --run-smoke-test $(additionalBuildArgs) -- -p:SmokeTestConsoleVerbosity=detailed
234+
docker run --rm $dockerVolumeArgs -w /vmr $dockerEnvArgs ${{ parameters.container }} ./build.sh --run-smoke-test $(additionalBuildArgs) -- -p:SmokeTestConsoleVerbosity=detailed
241235
displayName: Run Tests
242236
243237
# Don't use CopyFiles@2 as it encounters permissions issues because it indexes all files in the source directory graph.

src/SourceBuild/content/build.proj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@
7070
HashCatalogFilePath="$(PoisonReportDataFile)"
7171
MarkerFileName="$(PoisonMarkerFile)"
7272
PoisonReportOutputFilePath="$(PoisonUsageReportFile)"
73-
NonShippingPackagesListFiles="@(NonShippingPackagesList)" />
73+
NonShippingPackagesListFiles="@(NonShippingPackagesList)"
74+
FailOnPoisonFound="true" />
7475

7576
<WriteLinesToFile File="$(CompletedSemaphorePath)ReportPoisonUsage.complete" Overwrite="true" />
7677
<Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Done checking for poison." />
@@ -93,7 +94,6 @@
9394
</ItemGroup>
9495

9596
<PropertyGroup>
96-
<CustomTestEnvVars Condition="'$(EnablePoison)' == 'true'">SMOKE_TESTS_POISON_REPORT_PATH=$(PoisonUsageReportFile);</CustomTestEnvVars>
9797
<SdkTarballPath>%(SdkTarballItem.Identity)</SdkTarballPath>
9898
<SourceBuiltArtifactsPath>%(SourceBuiltArtifactsItem.Identity)</SourceBuiltArtifactsPath>
9999
<SmokeTestConsoleVerbosity Condition="'$(SmokeTestConsoleVerbosity)' == ''">normal</SmokeTestConsoleVerbosity>

src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/CheckForPoison.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,6 @@ public override bool Execute()
160160
{
161161
Log.LogWarning($"{poisons.Count()} marked files leaked to output. See complete report '{PoisonReportOutputFilePath}' for details.");
162162
}
163-
else
164-
{
165-
Log.LogError($"No leaked files found in output. Either something is broken or it is the future and we have fixed all leaks - please verify and remove this error if so (and default {nameof(FailOnPoisonFound)} to true).");
166-
return false;
167-
}
168163

169164
return !Log.HasLoggedErrors;
170165
}

src/SourceBuild/content/repo-projects/dotnet.proj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
<RepositoryReference Include="command-line-api" />
2121
<RepositoryReference Include="diagnostics" />
2222
<RepositoryReference Include="emsdk" />
23-
<RepositoryReference Include="razor" />
2423
<RepositoryReference Include="xliff-tasks" />
2524
<RepositoryReference Include="cecil" />
2625
<RepositoryReference Include="symreader" />
@@ -31,6 +30,7 @@
3130
<RepositoryReference Include="msbuild" />
3231
<RepositoryReference Include="roslyn-analyzers" />
3332
<RepositoryReference Include="aspnetcore" />
33+
<RepositoryReference Include="razor" />
3434
<RepositoryReference Include="deployment-tools" />
3535
<RepositoryReference Include="format" />
3636
<RepositoryReference Include="nuget-client" />

src/SourceBuild/content/repo-projects/razor.proj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
<ItemGroup>
1414
<RepositoryReference Include="arcade" />
15+
<RepositoryReference Include="runtime" />
16+
<RepositoryReference Include="aspnetcore" />
1517
</ItemGroup>
1618

1719
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Config.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,18 @@ internal static class Config
1212
public const string DotNetDirectoryEnv = "SMOKE_TESTS_DOTNET_DIR";
1313
public const string ExcludeOmniSharpEnv = "SMOKE_TESTS_EXCLUDE_OMNISHARP";
1414
public const string MsftSdkTarballPathEnv = "SMOKE_TESTS_MSFT_SDK_TARBALL_PATH";
15-
public const string PoisonReportPathEnv = "SMOKE_TESTS_POISON_REPORT_PATH";
1615
public const string PortableRidEnv = "SMOKE_TESTS_PORTABLE_RID";
1716
public const string PrereqsPathEnv = "SMOKE_TESTS_PREREQS_PATH";
1817
public const string CustomPackagesPathEnv = "SMOKE_TESTS_CUSTOM_PACKAGES_PATH";
1918
public const string SdkTarballPathEnv = "SMOKE_TESTS_SDK_TARBALL_PATH";
2019
public const string SourceBuiltArtifactsPathEnv = "SMOKE_TESTS_SOURCEBUILT_ARTIFACTS_PATH";
2120
public const string TargetRidEnv = "SMOKE_TESTS_TARGET_RID";
22-
public const string WarnPoisonDiffsEnv = "SMOKE_TESTS_WARN_POISON_DIFFS";
2321
public const string WarnSdkContentDiffsEnv = "SMOKE_TESTS_WARN_SDK_CONTENT_DIFFS";
2422
public const string RunningInCIEnv = "SMOKE_TESTS_RUNNING_IN_CI";
2523

2624
public static string DotNetDirectory { get; } =
2725
Environment.GetEnvironmentVariable(DotNetDirectoryEnv) ?? Path.Combine(Directory.GetCurrentDirectory(), ".dotnet");
2826
public static string? MsftSdkTarballPath { get; } = Environment.GetEnvironmentVariable(MsftSdkTarballPathEnv);
29-
public static string? PoisonReportPath { get; } = Environment.GetEnvironmentVariable(PoisonReportPathEnv);
3027
public static string PortableRid { get; } = Environment.GetEnvironmentVariable(PortableRidEnv) ??
3128
throw new InvalidOperationException($"'{Config.PortableRidEnv}' must be specified");
3229
public static string? PrereqsPath { get; } = Environment.GetEnvironmentVariable(PrereqsPathEnv);
@@ -37,8 +34,6 @@ internal static class Config
3734
public static string TargetRid { get; } = Environment.GetEnvironmentVariable(TargetRidEnv) ??
3835
throw new InvalidOperationException($"'{Config.TargetRidEnv}' must be specified");
3936
public static string TargetArchitecture { get; } = TargetRid.Split('-')[1];
40-
public static bool WarnOnPoisonDiffs { get; } =
41-
bool.TryParse(Environment.GetEnvironmentVariable(WarnPoisonDiffsEnv), out bool excludeOnlineTests) && excludeOnlineTests;
4237
public static bool WarnOnSdkContentDiffs { get; } =
4338
bool.TryParse(Environment.GetEnvironmentVariable(WarnSdkContentDiffsEnv), out bool excludeOnlineTests) && excludeOnlineTests;
4439

src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/PoisonTests.cs

Lines changed: 0 additions & 35 deletions
This file was deleted.

src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/PoisonUsage.txt

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: Nikola Milosavljevic <[email protected]>
3+
Date: Thu, 8 Jun 2023 18:39:26 +0000
4+
Subject: [PATCH] Add System.Collections.Immutable package dependency
5+
6+
Backport: https://github.com/dotnet/razor/pull/8817
7+
---
8+
eng/Version.Details.xml | 10 +++++++---
9+
1 file changed, 7 insertions(+), 3 deletions(-)
10+
11+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
12+
index 3d75f97f3..c52b0a554 100644
13+
--- a/eng/Version.Details.xml
14+
+++ b/eng/Version.Details.xml
15+
@@ -105,12 +105,16 @@
16+
<Sha>9e7fbcab4e5275f63c0cd37553ba426de9194309</Sha>
17+
<SourceBuild RepoName="xliff-tasks" ManagedOnly="true" />
18+
</Dependency>
19+
- <!-- Necessary for source-build. This allows the package to be retrieved from previously-source-built artifacts
20+
- and flow in as dependencies of the packages produced by razor. Without this entry an SBRP version of the
21+
- dependency would be bundled together with the produced package, causing issues for the consumer. -->
22+
+ <!-- Necessary for source-build. This allows Microsoft.Extensions.ObjectPool and System.Collections.Immutable packages
23+
+ to be retrieved from live source-build and their content consumed by packages produced by razor.
24+
+ Without these entries, due to PVP flow work, SBRP packages would be consumed causing runtime issue. -->
25+
<Dependency Name="Microsoft.Extensions.ObjectPool" Version="6.0.0">
26+
<Uri>https://github.com/dotnet/aspnetcore</Uri>
27+
<Sha>ae1a6cbe225b99c0bf38b7e31bf60cb653b73a52</Sha>
28+
</Dependency>
29+
+ <Dependency Name="System.Collections.Immutable" Version="6.0.0">
30+
+ <Uri>https://github.com/dotnet/runtime</Uri>
31+
+ <Sha>4822e3c3aa77eb82b2fb33c9321f923cf11ddde6</Sha>
32+
+ </Dependency>
33+
</ToolsetDependencies>
34+
</Dependencies>

0 commit comments

Comments
 (0)