-
Notifications
You must be signed in to change notification settings - Fork 80
Do not ignore non-updated dependencies at version merger #5332
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
Changes from all commits
ffd7737
4b39e8f
f905823
481d575
24f058a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -235,19 +235,19 @@ .. GetExpectedVersionFiles(ProductRepoPath), | |
| new DependencyDetail | ||
| { | ||
| Name = "Package.D3", | ||
| Version = "1.0.2", // Not part of the last 2 builds | ||
| RepoUri = build2.GitHubRepository, | ||
| Commit = build2.Commit, | ||
| Version = "1.0.3", // Not part of the last 2 builds | ||
| RepoUri = build1.GitHubRepository, | ||
| Commit = build1.Commit, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why did it have to be downgraded? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we will have to understand this because maybe we just introduced a bug? |
||
| Type = DependencyType.Product, | ||
| Pinned = false, | ||
| }, | ||
|
|
||
| new DependencyDetail | ||
| { | ||
| Name = DependencyFileManager.ArcadeSdkPackageName, | ||
| Version = "1.0.2", | ||
| RepoUri = build2.GitHubRepository, | ||
| Commit = build2.Commit, | ||
| Version = "1.0.1", | ||
| RepoUri = build1.GitHubRepository, | ||
| Commit = build1.Commit, | ||
| Type = DependencyType.Toolset, | ||
| Pinned = false, | ||
| }, | ||
|
|
@@ -263,7 +263,7 @@ .. GetExpectedVersionFiles(ProductRepoPath), | |
| DependencyFileManager dependencyFileManager = GetDependencyFileManager(); | ||
| JObject globalJson = await dependencyFileManager.ReadGlobalJsonAsync(ProductRepoPath, branchName + "-pr", relativeBasePath: null); | ||
| JToken? arcadeVersion = globalJson.SelectToken($"msbuild-sdks.['{DependencyFileManager.ArcadeSdkPackageName}']", true); | ||
| arcadeVersion?.ToString().Should().Be("1.0.2"); | ||
| arcadeVersion?.ToString().Should().Be("1.0.1"); | ||
|
|
||
| var dotnetVersion = await dependencyFileManager.ReadToolsDotnetVersionAsync(ProductRepoPath, branchName + "-pr", relativeBasePath: null); | ||
| dotnetVersion.ToString().Should().Be(Constants.VmrBaseDotnetSdkVersion); | ||
|
|
@@ -319,9 +319,9 @@ .. GetExpectedVersionFiles(ProductRepoPath), | |
| new DependencyDetail | ||
| { | ||
| Name = DependencyFileManager.ArcadeSdkPackageName, | ||
| Version = "1.0.2", | ||
| RepoUri = build2.GitHubRepository, | ||
| Commit = build2.Commit, | ||
| Version = "1.0.1", | ||
| RepoUri = build1.GitHubRepository, | ||
| Commit = build1.Commit, | ||
| Type = DependencyType.Toolset, | ||
| Pinned = false, | ||
| }, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -185,7 +185,7 @@ public async Task MergeVersionDetails_BackFlow_UsesPreviousVmrDependencies() | |
| result.Additions.Should().HaveCount(2); | ||
| // there should only be one removal because Package.That.Is.Already.Removed.In.Repo was already removed in the target repo | ||
| result.Removals.Should().HaveCount(1); | ||
| result.Updates.Should().HaveCount(1); | ||
| result.Updates.Should().HaveCount(2); | ||
| List<(string, string)> expectedAdditions = [ | ||
| ("Package.Added.In.Both", "2.2.2"), | ||
| ("Package.Added.In.VMR", "2.0.0")]; | ||
|
|
@@ -195,7 +195,9 @@ public async Task MergeVersionDetails_BackFlow_UsesPreviousVmrDependencies() | |
| .Should() | ||
| .BeEquivalentTo(expectedAdditions, options => options.WithStrictOrdering()); | ||
| List<(string, string)> expectedUpdates = [ | ||
| ("Package.Updated.In.Both", "3.0.0")]; | ||
| ("Package.From.Build", "1.0.1"), | ||
| ("Package.Updated.In.Both", "3.0.0"), | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this in the updates if it didn't change and stayed at There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In this case the PR changed MergeVersionDetails to include existing dependencies whose versions didn't change. At the end, after all the comparisons are done, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see, yeah |
||
| ]; | ||
| result.Updates.Values | ||
| .Select(u => (DependencyDetail)u.Value!) | ||
| .Select(d => (d.Name, d.Version)) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.