Skip to content

Commit a6c33a1

Browse files
authored
Update Version.Details.xml and supporting tasks for coherency and package name audit. (#1525)
* Update Version.Details.xml and supporting tasks for coherency and package name audit. - Correct some package names to match the same ones upstream uses. - Arcade now exposes its dependency on XLiff - added the coherency parent. - Core-SDK does not use standard directly - make it coherent with core-setup instead. - Allow multiple RepoNames per Dependency to fix Maestro issue with multiple entries with the same package name. * Shorten unit test timeout and continue on failure
1 parent 6640ae2 commit a6c33a1

File tree

7 files changed

+89
-51
lines changed

7 files changed

+89
-51
lines changed

.vsts.pipelines/jobs/ci-linux.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ jobs:
108108
du -h $(rootDirectory) | sort -h | tail -n 50
109109
displayName: Run unit tests
110110
condition: and(succeeded(), eq(variables['runUnitTests'], true))
111-
timeoutInMinutes: 120
112-
continueOnError: false
111+
timeoutInMinutes: 45
112+
continueOnError: true
113113
114114
# Create tarball.
115115
- script: |

.vsts.pipelines/steps/run-bootstrap.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,21 @@ steps:
199199
displayName: Smoke-test final SDK
200200
condition: always()
201201

202+
# Copy log for the smoke-test
203+
- script: |
204+
set -ex
205+
df -h
206+
$(docker.run) $(docker.logs.map) $(docker.bst.map) $(docker.bst.work) $(imageName) /bin/bash -c "
207+
pushd /bst/bootstrap_dir/final-sdk
208+
find testing-smoke \( \
209+
-iname '*.log' -o -iname '*.binlog' \) \
210+
-exec cp {} --parents /logs/bootstrap \;
211+
popd"
212+
du -h $(rootDirectory) | sort -h | tail -n 50
213+
displayName: Copy smoke-test logs
214+
condition: always()
215+
continueOnError: true
216+
202217
# Remove bootstrap_dir
203218
- script: |
204219
set -ex

eng/Version.Details.xml

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -31,34 +31,22 @@
3131
<Uri>https://github.com/dotnet/coreclr</Uri>
3232
<Sha>c5d3d752260383fbed72ba2b4d86d82fea673c76</Sha>
3333
<RepoName>coreclr</RepoName>
34-
</Dependency>
35-
<Dependency Name="Microsoft.NETCore.Runtime.CoreCLR" Version="3.1.3-servicing.20118.3" CoherentParentDependency="Microsoft.Private.CoreFx.NETCoreApp">
36-
<Uri>https://github.com/dotnet/coreclr</Uri>
37-
<Sha>c5d3d752260383fbed72ba2b4d86d82fea673c76</Sha>
3834
<RepoName>coreclr-portable</RepoName>
3935
</Dependency>
40-
<Dependency Name="NETStandard.Library" Version="2.1.0" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
36+
<Dependency Name="NETStandard.Library" Version="2.1.0" CoherentParentDependency="Microsoft.NETCore.App.Runtime.linux-x64">
4137
<Uri>https://github.com/dotnet/standard</Uri>
4238
<Sha>a5b5f2e1e369972c8ff1e2183979fab6099f52ef</Sha>
4339
</Dependency>
44-
<Dependency Name="Microsoft.Private.CoreFx.NETCoreApp" Version="4.7.0-servicing.20120.1" CoherentParentDependency="Microsoft.NETCore.App">
40+
<Dependency Name="Microsoft.Private.CoreFx.NETCoreApp" Version="4.7.0-servicing.20120.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.linux-x64">
4541
<Uri>https://github.com/dotnet/corefx</Uri>
4642
<Sha>8a3ffed558ddf943c1efa87d693227722d6af094</Sha>
4743
<RepoName>corefx</RepoName>
48-
</Dependency>
49-
<Dependency Name="Microsoft.Private.CoreFx.NETCoreApp" Version="4.7.0-servicing.20120.1" CoherentParentDependency="Microsoft.NETCore.App">
50-
<Uri>https://github.com/dotnet/corefx</Uri>
51-
<Sha>8a3ffed558ddf943c1efa87d693227722d6af094</Sha>
5244
<RepoName>corefx-portable</RepoName>
5345
</Dependency>
54-
<Dependency Name="Microsoft.NETCore.App" Version="3.1.3-servicing.20128.1" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
46+
<Dependency Name="Microsoft.NETCore.App.Runtime.linux-x64" Version="3.1.3-servicing.20128.1" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
5547
<Uri>https://github.com/dotnet/core-setup</Uri>
5648
<Sha>4a9f85e9f89d7f686fef2ae2109d876b1e2eed2a</Sha>
5749
<RepoName>core-setup</RepoName>
58-
</Dependency>
59-
<Dependency Name="Microsoft.NETCore.App" Version="3.1.3-servicing.20128.1" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
60-
<Uri>https://github.com/dotnet/core-setup</Uri>
61-
<Sha>4a9f85e9f89d7f686fef2ae2109d876b1e2eed2a</Sha>
6250
<RepoName>core-setup-portable</RepoName>
6351
</Dependency>
6452
<Dependency Name="Microsoft.AspNetCore.Mvc.Razor.Extensions" Version="3.1.3" CoherentParentDependency="Microsoft.AspNetCore.App.Ref">
@@ -103,12 +91,11 @@
10391
<Sha>53b80940842204f78708a538628288ff5d741a1d</Sha>
10492
<RepoName>application-insights</RepoName>
10593
</Dependency>
106-
<!-- once https://github.com/dotnet/arcade/issues/3099 is fixed this should have a coherency parent. -->
107-
<Dependency Name="XliffTasks" Version="1.0.0-beta.19252.1">
94+
<Dependency Name="XliffTasks" Version="1.0.0-beta.19252.1" CoherentParentDependency="Microsoft.DotNet.Arcade.Sdk">
10895
<Uri>https://github.com/dotnet/xliff-tasks</Uri>
10996
<Sha>173ee3bd61c9549557eefa3cfb718bdef157cb87</Sha>
11097
</Dependency>
111-
<Dependency Name="Microsoft.AspNetCore.App.Ref" Version="3.1.3" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
98+
<Dependency Name="Microsoft.AspNetCore.App.Runtime.linux-x64" Version="3.1.3" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
11299
<Uri>https://github.com/dotnet/aspnetcore</Uri>
113100
<Sha>e81033e094d4663ffd227bb4aed30b76b0631e6d</Sha>
114101
<RepoName>aspnetcore</RepoName>
@@ -126,7 +113,7 @@
126113
<Uri>https://github.com/aspnet/websdk</Uri>
127114
<Sha>0152dfa567f877ee1c5da6e00033218002848956</Sha>
128115
</Dependency>
129-
<Dependency Name="Microsoft.TestPlatform.Build" Version="16.3.0" CoherentParentDependency="Microsoft.Dotnet.Toolset.Internal">
116+
<Dependency Name="Microsoft.NET.Test.Sdk" Version="16.3.0" CoherentParentDependency="Microsoft.Dotnet.Toolset.Internal">
130117
<Uri>https://github.com/microsoft/vstest</Uri>
131118
<Sha>55e7e45431c9c05656c999b902686e7402664573</Sha>
132119
</Dependency>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From 48c9b6640c268beaa71778cebf8097655e2ac8cd Mon Sep 17 00:00:00 2001
2+
From: Chris Rummel <crummel@microsoft.com>
3+
Date: Thu, 19 Mar 2020 09:37:25 -0500
4+
Subject: [PATCH 7/7] Disable warnAsError for source-build
5+
6+
---
7+
scripts/build.sh | 2 +-
8+
1 file changed, 1 insertion(+), 1 deletion(-)
9+
10+
diff --git a/scripts/build.sh b/scripts/build.sh
11+
index 39a04ada..53a475d4 100755
12+
--- a/scripts/build.sh
13+
+++ b/scripts/build.sh
14+
@@ -249,7 +249,7 @@ function invoke_build()
15+
if [[ $TP_USE_REPO_API = 0 ]]; then
16+
$dotnet build $TPB_Solution --configuration $TPB_Configuration -v:minimal -p:Version=$TPB_Version -p:CIBuild=$TPB_CIBuild -p:LocalizedBuild=$TPB_LocalizedBuild || failed=true
17+
else
18+
- $dotnet build $TPB_Build_From_Source_Solution /bl:build.binlog --configuration $TPB_Configuration -v:minimal -p:Version=$TPB_Version -p:CIBuild=$TPB_CIBuild -p:LocalizedBuild=$TPB_LocalizedBuild -p:DotNetBuildFromSource=true || failed=true
19+
+ $dotnet build $TPB_Build_From_Source_Solution /bl:build.binlog --configuration $TPB_Configuration -v:minimal -p:Version=$TPB_Version -p:CIBuild=$TPB_CIBuild -p:LocalizedBuild=$TPB_LocalizedBuild -p:DotNetBuildFromSource=true -p:TreatWarningsAsErrors=false || failed=true
20+
fi
21+
else
22+
find . -name "$PROJECT_NAME_PATTERNS" | xargs -L 1 $dotnet build --configuration $TPB_Configuration -v:minimal -p:Version=$TPB_Version -p:CIBuild=$TPB_CIBuild -p:LocalizedBuild=$TPB_LocalizedBuild
23+
--
24+
2.18.0
25+

tools-local/prebuilt-baseline-online.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,4 +405,4 @@
405405
<Usage Id="System.Xml.XPath.XDocument" Version="4.3.0" />
406406
<Usage Id="vswhere" Version="2.6.7" IsDirectDependency="true" IsAutoReferenced="true" />
407407
</Usages>
408-
</UsageData>
408+
</UsageData>

tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/Models/VersionDetailsXml.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,15 @@ public class Dependency
2121
public string Name { get; set; }
2222
[XmlAttribute]
2323
public string Version { get; set; }
24+
[XmlAttribute]
25+
public string CoherentParentDependency { get; set; }
26+
[XmlAttribute]
27+
public bool Pinned { get; set; }
2428
// Uri type isn't serializable, so use a string instead
2529
public string Uri { get; set; }
2630
public string Sha { get; set; }
27-
public string RepoName { get; set; }
31+
[XmlElement("RepoName")]
32+
public string[] RepoNames { get; set; }
2833

2934
public override string ToString()
3035
{

tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/WriteSourceRepoProperties.cs

Lines changed: 34 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public class WriteSourceRepoProperties : Task
3535
public override bool Execute()
3636
{
3737
var serializer = new XmlSerializer(typeof(VersionDetails));
38+
3839
VersionDetails versionDetails = null;
3940
using (var stream = File.OpenRead(VersionDetailsFile))
4041
{
@@ -50,22 +51,24 @@ public override bool Execute()
5051
string repoGitDir = DeriveRepoGitDirPath(ClonedSubmoduleGitRootDirectory, dep.Uri);
5152
if (Directory.Exists(repoGitDir))
5253
{
53-
string repoName = GetRepoNameOrDefault(dep);
54-
string safeRepoName = repoName.Replace("-", "");
55-
try
54+
foreach (string repoName in GetRepoNamesOrDefault(dep))
5655
{
57-
WriteMinimalMetadata(repoPath, dep.Uri, dep.Sha);
58-
WriteSourceBuildMetadata(SourceBuildMetadataDir, repoGitDir, dep);
59-
if (File.Exists(Path.Combine(repoPath, ".gitmodules")))
56+
string safeRepoName = repoName.Replace("-", "");
57+
try
6058
{
61-
HandleSubmodules(repoPath, repoGitDir, dep);
59+
WriteMinimalMetadata(repoPath, dep.Uri, dep.Sha);
60+
WriteSourceBuildMetadata(SourceBuildMetadataDir, repoGitDir, dep);
61+
if (File.Exists(Path.Combine(repoPath, ".gitmodules")))
62+
{
63+
HandleSubmodules(repoPath, repoGitDir, dep);
64+
}
65+
allRepoProps[$"{safeRepoName}GitCommitHash"] = dep.Sha;
66+
allRepoProps[$"{safeRepoName}OutputPackageVersion"] = dep.Version;
67+
}
68+
catch (Exception e)
69+
{
70+
Log.LogErrorFromException(e, true, true, null);
6271
}
63-
allRepoProps[$"{safeRepoName}GitCommitHash"] = dep.Sha;
64-
allRepoProps[$"{safeRepoName}OutputPackageVersion"] = dep.Version;
65-
}
66-
catch (Exception e)
67-
{
68-
Log.LogErrorFromException(e, true, true, null);
6972
}
7073
}
7174
else
@@ -82,20 +85,23 @@ public override bool Execute()
8285

8386
private void WriteSourceBuildMetadata(string sourceBuildMetadataPath, string repoGitDir, Dependency dependency)
8487
{
85-
string propsPath = Path.Combine(sourceBuildMetadataPath, $"{GetRepoNameOrDefault(dependency)}.props");
86-
string commitCount = GetCommitCount(repoGitDir, dependency.Sha);
87-
DerivedVersion derivedVersion = GetVersionInfo(dependency.Version, commitCount);
88-
var repoProps = new Dictionary<string, string>
88+
foreach (string repoName in GetRepoNamesOrDefault(dependency))
8989
{
90-
["GitCommitHash"] = dependency.Sha,
91-
["GitCommitCount"] = commitCount,
92-
["GitCommitDate"] = GetCommitDate(repoGitDir, dependency.Sha),
93-
["OfficialBuildId"] = derivedVersion.OfficialBuildId,
94-
["OutputPackageVersion"] = dependency.Version,
95-
["PreReleaseVersionLabel"] = derivedVersion.PreReleaseVersionLabel,
96-
["IsStable"] = string.IsNullOrWhiteSpace(derivedVersion.PreReleaseVersionLabel) ? "true" : "false",
97-
};
98-
WritePropsFile(propsPath, repoProps);
90+
string propsPath = Path.Combine(sourceBuildMetadataPath, $"{repoName}.props");
91+
string commitCount = GetCommitCount(repoGitDir, dependency.Sha);
92+
DerivedVersion derivedVersion = GetVersionInfo(dependency.Version, commitCount);
93+
var repoProps = new Dictionary<string, string>
94+
{
95+
["GitCommitHash"] = dependency.Sha,
96+
["GitCommitCount"] = commitCount,
97+
["GitCommitDate"] = GetCommitDate(repoGitDir, dependency.Sha),
98+
["OfficialBuildId"] = derivedVersion.OfficialBuildId,
99+
["OutputPackageVersion"] = dependency.Version,
100+
["PreReleaseVersionLabel"] = derivedVersion.PreReleaseVersionLabel,
101+
["IsStable"] = string.IsNullOrWhiteSpace(derivedVersion.PreReleaseVersionLabel) ? "true" : "false",
102+
};
103+
WritePropsFile(propsPath, repoProps);
104+
}
99105
}
100106

101107

@@ -158,9 +164,9 @@ private static string GetDefaultRepoNameFromUrl(string repoUrl)
158164
return repoUrl.Substring(repoUrl.LastIndexOf("/") + 1);
159165
}
160166

161-
private static string GetRepoNameOrDefault(Dependency dependency)
167+
private static IEnumerable<string> GetRepoNamesOrDefault(Dependency dependency)
162168
{
163-
return dependency.RepoName ?? GetDefaultRepoNameFromUrl(dependency.Uri);
169+
return dependency.RepoNames ?? new[] { GetDefaultRepoNameFromUrl(dependency.Uri) };
164170
}
165171

166172
private static string DeriveRepoGitDirPath(string gitDirPath, string repoUrl)

0 commit comments

Comments
 (0)