Skip to content

Conversation

@lbussell
Copy link
Member

@lbussell lbussell commented Oct 2, 2025

This is the biggest part of https://github.com/dotnet/dotnet-docker-internal/issues/6741. The functionality added in this PR ensures that the internal/release/* branch can be updated with the state of the release/* branch even when the two branches diverge.

I have attempted to make commits reviewable individually.

@lbussell
Copy link
Member Author

lbussell commented Oct 2, 2025

The biggest change from the last ~3 commits has to do with the SourceBranch argument. It was used by various update-dependencies commands to determine which base url variables to update. However the new sync command needs to use the SourceBranch option because it operates on two branches.

The "source" branch (or "upstream" branch) is just a property of the repo. For example, our Get-Branch PowerShell function reads the name of the first repo in the manifest to determine the upstream branch. That is passed to the Dockerfile/Readme generation scripts as a variable override. I figured everything would be simpler if we just put it in manifest.versions.json.

The various update-dependencies can now just read it from the manifest variables directly instead of taking it as an argument, which frees up SourceBranch for the sync command to use.

I actually already made this change when working on dotnet/docker-tools#1813 to simplify things. There will need to be a little bit of cleanup in various scripts that still override the branch variable when generating dockerfiles/readmes.

@lbussell lbussell marked this pull request as ready for review October 2, 2025 22:41
@lbussell lbussell requested a review from a team as a code owner October 2, 2025 22:41

// AzdoOrganization is a URL like https://dev.azure.com/<org>
// A valid Azure DevOps repository URL is formatted like https://dev.azure.com/<org>/<project>/_git/<repo>
return $"{options.AzdoOrganization.TrimEnd('/')}/{options.AzdoProject}/_git/{options.AzdoRepo}";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shares the same logic as SyncInternalReleaseCommand.ExecuteAsync. It'd be nice if there was one method to format this URL.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made sure that SpecificCommand and SyncInternalReleaseCommand both use the extension method. Also centralized the trimming into the options class.

@lbussell lbussell merged commit 08c285e into dotnet:nightly Oct 3, 2025
105 checks passed
@lbussell lbussell deleted the consume-int-version branch October 3, 2025 19:59
lbussell added a commit to lbussell/dotnet-docker that referenced this pull request Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants