Make LocalFactory create DFM with repo factory instead of git client - #6302
#6302Make LocalFactory create DFM with repo factory instead of git client#6302adamzip merged 4 commits intodotnet:maindotnet/arcade-services:mainfrom adamzip:fix-update-dependency-globaljson-failureadamzip/arcade-services:fix-update-dependency-globaljson-failureCopy head branch name to clipboard
Conversation
There was a problem hiding this comment.
Pull request overview
This PR changes local DARC dependency updates so LocalFactory creates a DependencyFileManager using the shared repo factory instead of passing the local git client directly.
Changes:
- Updates
LocalFactoryto call the parameterless dependency file manager factory method. - Changes
DependencyFileManagerFactoryto hold an injectedIGitRepoFactory. - Moves Arcade remote creation in
Local.UpdateDependenciesAsync.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/Microsoft.DotNet.Darc/DarcLib/LocalFactory.cs |
Uses the new parameterless dependency file manager creation path. |
src/Microsoft.DotNet.Darc/DarcLib/Local.cs |
Adjusts Arcade remote creation during dependency updates. |
src/Microsoft.DotNet.Darc/DarcLib/Helpers/DependencyFileManagerFactory.cs |
Adds IGitRepoFactory as a factory dependency and updates creation overloads. |
|
@adamzip how about the failing tests? |
I thought the DI registry thing would've caused a test to fail for the MSBuild task we don't use anymore, but something is still failing when running the unit tests and i didn't understand what it is |
|
Think we should have added a test for this in https://github.com/dotnet/arcade-services/blob/main/eng/pipelines/templates/jobs/darc-and-api-tests.yml so it doesn't happen again |
|
Agreed, we could run |
https://github.com/dotnet/release/issues/2211#issue-4439529518