-
Notifications
You must be signed in to change notification settings - Fork 80
Remove packageVersion from source-manifest.json and git-info files completely #4992
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
Conversation
…mpletely Co-authored-by: dkurepa <91743470+dkurepa@users.noreply.github.com>
packageVersion
from the source-manifest.json
there's a failing test: NonSrcContentIsSyncedTest, can you fix it? |
Co-authored-by: dkurepa <91743470+dkurepa@users.noreply.github.com>
Fixed in commit 7b80240. The test was failing because it was trying to delete a git-info directory that no longer exists since git-info functionality was completely removed. Updated the test to check if the directory exists before attempting to delete it. |
Directory.Delete(VmrPath / "prereqs" / "git-info"); | ||
// Note: With git-info functionality removed, this directory may not exist | ||
var gitInfoPath = VmrPath / "prereqs" / "git-info"; | ||
if (Directory.Exists(gitInfoPath)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we shouldn't even have to do this, go over the code and make sure that the directory is not being created, then remove this part
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in commit 4505440. Removed the git-info directory creation from VmrTestsBase.cs and the unnecessary check/delete code from VmrSyncAdditionalMappingsTest.cs. The directory is no longer being created anywhere in the codebase, addressing the root cause.
Co-authored-by: dkurepa <91743470+dkurepa@users.noreply.github.com>
string? officialBuildId = update.OfficialBuildId; | ||
if (string.IsNullOrEmpty(officialBuildId)) | ||
{ | ||
var (calculatedOfficialBuildId, _) = VersionFiles.DeriveBuildInfo(update.Mapping.Name, packageVersion); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also delete the DeriveBuildInfo
method, and all tests for it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in commit 11a42e8. Removed the DeriveBuildInfo
method and VersionToDate
helper method from VersionFiles.cs
, and deleted the entire VersionFilesTests.cs
file since it only contained tests for the removed method. The method was no longer needed since packageVersion functionality has been completely removed.
|
||
var gitInfoFilePath = GetGitInfoFilePath(update.Mapping); | ||
gitInfo.SerializeToXml(gitInfoFilePath); | ||
_logger.LogInformation("Updated git-info file {file} for {repo}", gitInfoFilePath, update.Mapping.Name); | ||
} | ||
|
||
public bool RemoveRepositoryVersion(string repo) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also completely delete this method and it's use. There's an if/else in VmrUpdater
using it, delete it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in commit 53bd715. Removed the RemoveRepositoryVersion
method completely from both the interface and implementation, and removed the if/else block in VmrUpdater that was using it.
Co-authored-by: dkurepa <91743470+dkurepa@users.noreply.github.com>
Co-authored-by: dkurepa <91743470+dkurepa@users.noreply.github.com>
Co-authored-by: premun <7013027+premun@users.noreply.github.com>
The version of `darc` used for the .NET 9 synchronization [is already not compatible](#4992) with latest main so we can delete this command and all the cruft connected to it (mainly the codeflow tests that run for quite some time).
#2428
This PR removes the
packageVersion
attribute fromsource-manifest.json
and eliminates git-info files entirely from the VMR, as requested in the issue. With assetless builds, the packageVersion is no longer updated which causes confusion, and the git-info files are redundant since the source-manifest.json serves as the single source of truth.Changes Made
Core Model Changes
PackageVersion
property fromIVersionedSourceComponent
interface andRepositoryRecord
classVmrDependencyVersion
record to only track SHA, removing the PackageVersion parameterSourceManifest.UpdateVersion
method to remove packageVersion parameter and handlingGit-Info File Removal
GitInfoFile.cs
class and related test files entirelyVmrDependencyTracker
including creation, updating, and deletionGitInfoSourcesDir
constant and cleaned up all references throughout the codebaseCode Cleanup
UpdateTargetVersionOnly
method that was only used for package version-only updatesBefore/After Comparison
Before:
After:
Testing
The VMR now uses source-manifest.json as the single source of truth for repository versions, eliminating the confusion and duplication that existed with git-info files.
Fixes #2428.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.