dotnet/arcade-services

darc add-default-channel should warn or error when the channel is not setup for publishing

Opened this issue · 3 comments

roslyn and msbuild both had an issue during the recent 17.10.P3 snap, where contributors updated the darc config to publish their main branch builds to the "VS 17.11" channel. This was done because the component main and VS main branches were targeting VS 17.11.P1 after the snap.

However the "VS 17.11" channel was not set up for publishing and the subsequent official builds failed in the Publish Using Darc stage as a result, e.g. https://dev.azure.com/dnceng/7ea9116e-9fac-403d-b258-b31fcf1bb293/_build/results?buildId=2421415

This misconfiguration would have been prevented by a warning or error in the add-default-channel command which detects that the channel is not setup for publishing.

See also First Responders thread https://teams.microsoft.com/l/message/19:afba3d1545dd45d7b79f34c1821f6055@thread.skype/1712158633951?tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47&groupId=4d73664c-9f2f-450d-82a5-c2f02756606d&parentMessageId=1712158633951&teamName=.NET%20Core%20Eng%20Services%20Partners&channelName=First%20Responders&createdTime=1712158633951

This is a common occurrence, usually with the vs channels.

The suggestion seems reasonable and I'm here wondering why we never thought of adding a guardrail such as this.

Unfortunately, there is no simple fix for this issue. This is because darc doesn't know if a channel has been configured for publishing, this information is kept in arcade in this file https://github.com/dotnet/arcade/blob/main/src/Microsoft.DotNet.Build.Tasks.Feed/src/model/PublishingConstants.cs, that darc doesn't know about

This has already been causing us pain in the release infra too, so it's something we're looking into improving

Yeah. I don't think it's a simple FR level fix. If there are plans to improve the space already, that's even better.