arcade icon indicating copy to clipboard operation
arcade copied to clipboard

Revert "Revert "Update to February Servicing""

Open mmitche opened this issue 1 year ago • 6 comments

Reverts dotnet/arcade#14486

mmitche avatar Feb 14 '24 17:02 mmitche

@tmat There is an interesting regression here. For some reason, after the update to the latest SDK, the LocateRepository task is no longer able to determine the ScmRepositoryUrl of the inner cloned repo in SB. It would have been this change that altered things:

https://github.com/dotnet/sourcelink/compare/f6b97c9ef6...94eaac3385

Any ideas what happened here?

mmitche avatar Feb 14 '24 19:02 mmitche

More info (note the ScmRepositoryUr value diff). What's interesting is that this does work in the VMR.

Arcade Repo: 8.0.101 (working)

Microsoft.Build.Tasks.Git.LocateRepository
    Assembly = /__w/1/s/.dotnet/sdk/8.0.101/Sdks/Microsoft.Build.Tasks.Git/build/../tools/core/Microsoft.Build.Tasks.Git.dll
    Parameters
        NoWarnOnMissingInfo = True
        ConfigurationScope = local
        Path = /__w/1/s/artifacts/source-build/self/src/src/Microsoft.DotNet.Arcade.Sdk
    SourceLink: Reusing cached git repository information.
    OutputProperties
        _GitRepositoryId = /__w/1/s/artifacts/source-build/self/src/.git
        ScmRepositoryUrl = https://github.com/dotnet/arcade
        SourceRevisionId = da98edc4c3ea539f109ea320672136ceb32591a7
    OutputItems
        SourceRoot
            /__w/1/s/artifacts/source-build/self/src/
                SourceControl = git
                RevisionId = da98edc4c3ea539f109ea320672136ceb32591a7
                ScmRepositoryUrl = https://github.com/dotnet/arcade

Arcade Repo: 8.0.102 (not working)

Microsoft.Build.Tasks.Git.LocateRepository
    Assembly = /__w/1/s/.dotnet/sdk/8.0.102/Sdks/Microsoft.Build.Tasks.Git/build/../tools/core/Microsoft.Build.Tasks.Git.dll
    Parameters
        NoWarnOnMissingInfo = True
        ConfigurationScope = local
        Path = /__w/1/s/artifacts/source-build/self/src/src/Microsoft.DotNet.Arcade.Sdk
    SourceLink: Reusing cached git repository information.
    OutputProperties
        _GitRepositoryId = /__w/1/s/artifacts/source-build/self/src/.git
        SourceRevisionId = fc77e80b5bae1a338845de59586a833a7785ce33
    OutputItems
        SourceRoot
            /__w/1/s/artifacts/source-build/self/src/
                SourceControl = git
                RevisionId = fc77e80b5bae1a338845de59586a833a7785ce33
                ScmRepositoryUrl = 

VMR: 8.0.102 (working)

Microsoft.Build.Tasks.Git.LocateRepository
    Assembly = /vmr/.dotnet/sdk/8.0.102/Sdks/Microsoft.Build.Tasks.Git/build/../tools/core/Microsoft.Build.Tasks.Git.dll
    Parameters
        NoWarnOnMissingInfo = True
        ConfigurationScope = local
        Path = /vmr/src/arcade/artifacts/source-build/self/src/src/Microsoft.DotNet.Arcade.Sdk
    SourceLink: Reusing cached git repository information.
    OutputProperties
        _GitRepositoryId = /vmr/.git
        ScmRepositoryUrl = https://github.com/dotnet/dotnet
    OutputItems
        SourceRoot
            /vmr/
                SourceControl = git
                RevisionId = 99f3307aa690137283696958d89dd0196a8ec048
                ScmRepositoryUrl = https://github.com/dotnet/dotnet

mthalman avatar Feb 14 '24 20:02 mthalman

The VMR in 8.0.* copies rather than clones, IIRC

mmitche avatar Feb 14 '24 21:02 mmitche

@tmat - Can you investigate what might be the issue here? See https://github.com/dotnet/arcade/pull/14487#issuecomment-1944449559

mthalman avatar Feb 20 '24 14:02 mthalman

Also seeing this in main now. @tmat Looks to be out right now. I'm inclined to put in a workaround so that we can get unblocked. Will look into it.

mmitche avatar Feb 22 '24 00:02 mmitche

I didn't get a chance to fix this, but the issue appears to be that the inner clone doesn't end up with a remote that matches the outer clone's URI. It appears that the sourcelink targets look for origin and then upstream. I think it probably has the correct behavior? Perhaps before, if there was no remote URI for inner clone, it kept looking up the directory structure.

Two possible solutions include:

  • Alter the inner clone so that it sets the remotes equal to the outer clones
  • Alter the source build inner invocation to pass through the azdo specific variables (BUILD_SOURCE_URI I think) if they exist.

I think the first option one is better.

mmitche avatar Feb 22 '24 03:02 mmitche