update-dependencies: support multiple internal versions #4045
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The update-dependencies tool doesn't correctly handle updates to the test NuGet.config file when multiple internal versions are being targeted in a branch. It ends up deleting the internal configuration from a previous run.
For example, let's say you've run update-dependencies for an internal build of .NET 6. It will have updated the test NuGet.config file to include package source and credentials named
dotnet6_0_internal
. After committing those changes you then run update-dependencies again, this time targeting an internal build of .NET 7. Doing that will remove thedotnet6_0_internal
entries and replace them withdotnet7_0_internal
. This will cause testing to fail for .NET 6 because it won't have access to the internal .NET 6 NuGet feed.The fix is to simply change the update logic to be additive and not remove existing entries.