Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rollout] Production rollout 2024-09-19 #3972

Merged
merged 8 commits into from
Sep 18, 2024
Merged
4 changes: 2 additions & 2 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"microsoft.dnceng.secretmanager": {
"version": "1.1.0-beta.24420.1",
"version": "1.1.0-beta.24460.1",
"commands": [
"secret-manager"
]
Expand All @@ -15,7 +15,7 @@
]
},
"microsoft.dnceng.configuration.bootstrap": {
"version": "1.1.0-beta.24420.1",
"version": "1.1.0-beta.24460.1",
"commands": [
"bootstrap-dnceng-configuration"
]
Expand Down
32 changes: 16 additions & 16 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,37 +91,37 @@
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.24426.2">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.24463.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>80264e60280e2815e7d65871081ccac04a32445c</Sha>
<Sha>8c08d889b3c0b3f19398faceaccd74d0f184a3fb</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.SignTool" Version="8.0.0-beta.24426.2">
<Dependency Name="Microsoft.DotNet.SignTool" Version="8.0.0-beta.24463.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>80264e60280e2815e7d65871081ccac04a32445c</Sha>
<Sha>8c08d889b3c0b3f19398faceaccd74d0f184a3fb</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="8.0.0-beta.24426.2">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="8.0.0-beta.24463.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>80264e60280e2815e7d65871081ccac04a32445c</Sha>
<Sha>8c08d889b3c0b3f19398faceaccd74d0f184a3fb</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.SwaggerGenerator.MSBuild" Version="8.0.0-beta.24426.2">
<Dependency Name="Microsoft.DotNet.SwaggerGenerator.MSBuild" Version="8.0.0-beta.24463.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>80264e60280e2815e7d65871081ccac04a32445c</Sha>
<Sha>8c08d889b3c0b3f19398faceaccd74d0f184a3fb</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Git.IssueManager" Version="8.0.0-beta.24426.2">
<Dependency Name="Microsoft.DotNet.Git.IssueManager" Version="8.0.0-beta.24463.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>80264e60280e2815e7d65871081ccac04a32445c</Sha>
<Sha>8c08d889b3c0b3f19398faceaccd74d0f184a3fb</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.VersionTools" Version="8.0.0-beta.24426.2">
<Dependency Name="Microsoft.DotNet.VersionTools" Version="8.0.0-beta.24463.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>80264e60280e2815e7d65871081ccac04a32445c</Sha>
<Sha>8c08d889b3c0b3f19398faceaccd74d0f184a3fb</Sha>
</Dependency>
<Dependency Name="Microsoft.DncEng.SecretManager" Version="1.1.0-beta.24420.1">
<Dependency Name="Microsoft.DncEng.SecretManager" Version="1.1.0-beta.24460.1">
<Uri>https://github.com/dotnet/dnceng</Uri>
<Sha>a0d339b12f248ca5b42d3a53a49c6b09ef1db579</Sha>
<Sha>c74bfc3484389b8f365dcab61ecd63d506d3575a</Sha>
</Dependency>
<Dependency Name="Microsoft.DncEng.Configuration.Bootstrap" Version="1.1.0-beta.24420.1">
<Dependency Name="Microsoft.DncEng.Configuration.Bootstrap" Version="1.1.0-beta.24460.1">
<Uri>https://github.com/dotnet/dnceng</Uri>
<Sha>a0d339b12f248ca5b42d3a53a49c6b09ef1db579</Sha>
<Sha>c74bfc3484389b8f365dcab61ecd63d506d3575a</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
14 changes: 7 additions & 7 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
<UsingToolNetFrameworkReferenceAssemblies>true</UsingToolNetFrameworkReferenceAssemblies>
<MicrosoftNetFrameworkReferenceAssembliesVersion>1.0.0-preview.1</MicrosoftNetFrameworkReferenceAssembliesVersion>
<!-- Libs -->
<MicrosoftDotNetSignToolVersion>8.0.0-beta.24426.2</MicrosoftDotNetSignToolVersion>
<MicrosoftDotNetBuildTasksFeedVersion>8.0.0-beta.24426.2</MicrosoftDotNetBuildTasksFeedVersion>
<MicrosoftDotNetSwaggerGeneratorMSBuildVersion>8.0.0-beta.24426.2</MicrosoftDotNetSwaggerGeneratorMSBuildVersion>
<MicrosoftDotNetGitIssueManagerVersion>8.0.0-beta.24426.2</MicrosoftDotNetGitIssueManagerVersion>
<MicrosoftDotNetVersionToolsVersion>8.0.0-beta.24426.2</MicrosoftDotNetVersionToolsVersion>
<MicrosoftDotNetSignToolVersion>8.0.0-beta.24463.3</MicrosoftDotNetSignToolVersion>
<MicrosoftDotNetBuildTasksFeedVersion>8.0.0-beta.24463.3</MicrosoftDotNetBuildTasksFeedVersion>
<MicrosoftDotNetSwaggerGeneratorMSBuildVersion>8.0.0-beta.24463.3</MicrosoftDotNetSwaggerGeneratorMSBuildVersion>
<MicrosoftDotNetGitIssueManagerVersion>8.0.0-beta.24463.3</MicrosoftDotNetGitIssueManagerVersion>
<MicrosoftDotNetVersionToolsVersion>8.0.0-beta.24463.3</MicrosoftDotNetVersionToolsVersion>
<MicrosoftNetTestSdkVersion>17.4.1</MicrosoftNetTestSdkVersion>
<MicrosoftDotNetInternalLoggingVersion>1.1.0-beta.24376.1</MicrosoftDotNetInternalLoggingVersion>
<MicrosoftAspNetCoreApiPaginationVersion>1.1.0-beta.24376.1</MicrosoftAspNetCoreApiPaginationVersion>
Expand All @@ -37,8 +37,8 @@
<MicrosoftDotNetWebAuthenticationVersion>1.1.0-beta.24376.1</MicrosoftDotNetWebAuthenticationVersion>
<ServiceFabricMocksVersion>1.1.0-beta.24376.1</ServiceFabricMocksVersion>
<CoreHealthMonitorVersion>1.1.0-beta.24376.1</CoreHealthMonitorVersion>
<MicrosoftDncEngSecretManagerVersion>1.1.0-beta.24420.1</MicrosoftDncEngSecretManagerVersion>
<MicrosoftDncEngConfigurationBootstrapVersion>1.1.0-beta.24420.1</MicrosoftDncEngConfigurationBootstrapVersion>
<MicrosoftDncEngSecretManagerVersion>1.1.0-beta.24460.1</MicrosoftDncEngSecretManagerVersion>
<MicrosoftDncEngConfigurationBootstrapVersion>1.1.0-beta.24460.1</MicrosoftDncEngConfigurationBootstrapVersion>
</PropertyGroup>
<!--Package names-->
<PropertyGroup>
Expand Down
6 changes: 3 additions & 3 deletions eng/deployment/product-construction-service-deploy.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ param(

$containerapp = az containerapp show -g $resourceGroupName -n $containerappName | ConvertFrom-Json
$pcsUrl = "https://$($containerapp.properties.configuration.ingress.fqdn)"
$pcsStatusUrl = $pcsUrl + "/status"
$pcsStopUrl = $pcsStatusUrl + "/stop"
$pcsStartUrl = $pcsStatusUrl + "/start"
$pcsStatusUrl = $pcsUrl + "/api/status"
$pcsStopUrl = $pcsStatusUrl + "/stop?api-version=2020-02-20"
$pcsStartUrl = $pcsStatusUrl + "/start?api-version=2020-02-20"
$authenticationHeader = @{
"Authorization" = "Bearer $token"
}
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
}
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24426.2"
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24463.3"
}
}
2 changes: 1 addition & 1 deletion src/Microsoft.DotNet.Darc/DarcLib/GitHubClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ private async Task<IList<Check>> GetChecksFromChecksApiAsync(string owner, strin
CheckStatus.Queued or CheckStatus.InProgress => CheckState.Pending,
CheckStatus.Completed => (run.Conclusion?.Value) switch
{
CheckConclusion.Success => CheckState.Success,
CheckConclusion.Success or CheckConclusion.Skipped => CheckState.Success,
CheckConclusion.ActionRequired or CheckConclusion.Cancelled or CheckConclusion.Failure or CheckConclusion.Neutral or CheckConclusion.TimedOut => CheckState.Failure,
_ => CheckState.None,
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using Microsoft.AspNetCore.ApiVersioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.OpenApi.Extensions;
Expand All @@ -10,6 +11,7 @@
namespace ProductConstructionService.Api.Controllers;

[Route("status")]
[ApiVersion("2020-02-20")]
public class StatusController(WorkItemScopeManager workItemScopeManager)
: ControllerBase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public partial interface IProductConstructionServiceApi
IChannels Channels { get; }
IPipelines Pipelines { get; }
IRepository Repository { get; }
IStatus Status { get; }
ISubscriptions Subscriptions { get; }
}

Expand Down Expand Up @@ -129,6 +130,8 @@ public HttpPipeline Pipeline

public IRepository Repository { get; }

public IStatus Status { get; }

public ISubscriptions Subscriptions { get; }


Expand All @@ -149,6 +152,7 @@ public ProductConstructionServiceApi(ProductConstructionServiceApiOptions option
Channels = new Channels(this);
Pipelines = new Pipelines(this);
Repository = new Repository(this);
Status = new Status(this);
Subscriptions = new Subscriptions(this);
SerializerSettings = new JsonSerializerSettings
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,222 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using Azure;
using Azure.Core;



namespace ProductConstructionService.Client
{
public partial interface IStatus
{
Task StopPcsWorkItemProcessorAsync(
CancellationToken cancellationToken = default
);

Task StartPcsWorkItemProcessorAsync(
CancellationToken cancellationToken = default
);

Task GetPcsWorkItemProcessorStatusAsync(
CancellationToken cancellationToken = default
);

}

internal partial class Status : IServiceOperations<ProductConstructionServiceApi>, IStatus
{
public Status(ProductConstructionServiceApi client)
{
Client = client ?? throw new ArgumentNullException(nameof(client));
}

public ProductConstructionServiceApi Client { get; }

partial void HandleFailedRequest(RestApiException ex);

partial void HandleFailedStopPcsWorkItemProcessorRequest(RestApiException ex);

public async Task StopPcsWorkItemProcessorAsync(
CancellationToken cancellationToken = default
)
{

const string apiVersion = "2020-02-20";

var _baseUri = Client.Options.BaseUri;
var _url = new RequestUriBuilder();
_url.Reset(_baseUri);
_url.AppendPath(
"/api/status/stop",
false);

_url.AppendQuery("api-version", Client.Serialize(apiVersion));


using (var _req = Client.Pipeline.CreateRequest())
{
_req.Uri = _url;
_req.Method = RequestMethod.Put;

using (var _res = await Client.SendAsync(_req, cancellationToken).ConfigureAwait(false))
{
if (_res.Status < 200 || _res.Status >= 300)
{
await OnStopPcsWorkItemProcessorFailed(_req, _res).ConfigureAwait(false);
}


return;
}
}
}

internal async Task OnStopPcsWorkItemProcessorFailed(Request req, Response res)
{
string content = null;
if (res.ContentStream != null)
{
using (var reader = new StreamReader(res.ContentStream))
{
content = await reader.ReadToEndAsync().ConfigureAwait(false);
}
}

var ex = new RestApiException<Models.ApiError>(
req,
res,
content,
Client.Deserialize<Models.ApiError>(content)
);
HandleFailedStopPcsWorkItemProcessorRequest(ex);
HandleFailedRequest(ex);
Client.OnFailedRequest(ex);
throw ex;
}

partial void HandleFailedStartPcsWorkItemProcessorRequest(RestApiException ex);

public async Task StartPcsWorkItemProcessorAsync(
CancellationToken cancellationToken = default
)
{

const string apiVersion = "2020-02-20";

var _baseUri = Client.Options.BaseUri;
var _url = new RequestUriBuilder();
_url.Reset(_baseUri);
_url.AppendPath(
"/api/status/start",
false);

_url.AppendQuery("api-version", Client.Serialize(apiVersion));


using (var _req = Client.Pipeline.CreateRequest())
{
_req.Uri = _url;
_req.Method = RequestMethod.Put;

using (var _res = await Client.SendAsync(_req, cancellationToken).ConfigureAwait(false))
{
if (_res.Status < 200 || _res.Status >= 300)
{
await OnStartPcsWorkItemProcessorFailed(_req, _res).ConfigureAwait(false);
}


return;
}
}
}

internal async Task OnStartPcsWorkItemProcessorFailed(Request req, Response res)
{
string content = null;
if (res.ContentStream != null)
{
using (var reader = new StreamReader(res.ContentStream))
{
content = await reader.ReadToEndAsync().ConfigureAwait(false);
}
}

var ex = new RestApiException<Models.ApiError>(
req,
res,
content,
Client.Deserialize<Models.ApiError>(content)
);
HandleFailedStartPcsWorkItemProcessorRequest(ex);
HandleFailedRequest(ex);
Client.OnFailedRequest(ex);
throw ex;
}

partial void HandleFailedGetPcsWorkItemProcessorStatusRequest(RestApiException ex);

public async Task GetPcsWorkItemProcessorStatusAsync(
CancellationToken cancellationToken = default
)
{

const string apiVersion = "2020-02-20";

var _baseUri = Client.Options.BaseUri;
var _url = new RequestUriBuilder();
_url.Reset(_baseUri);
_url.AppendPath(
"/api/status",
false);

_url.AppendQuery("api-version", Client.Serialize(apiVersion));


using (var _req = Client.Pipeline.CreateRequest())
{
_req.Uri = _url;
_req.Method = RequestMethod.Get;

using (var _res = await Client.SendAsync(_req, cancellationToken).ConfigureAwait(false))
{
if (_res.Status < 200 || _res.Status >= 300)
{
await OnGetPcsWorkItemProcessorStatusFailed(_req, _res).ConfigureAwait(false);
}


return;
}
}
}

internal async Task OnGetPcsWorkItemProcessorStatusFailed(Request req, Response res)
{
string content = null;
if (res.ContentStream != null)
{
using (var reader = new StreamReader(res.ContentStream))
{
content = await reader.ReadToEndAsync().ConfigureAwait(false);
}
}

var ex = new RestApiException<Models.ApiError>(
req,
res,
content,
Client.Deserialize<Models.ApiError>(content)
);
HandleFailedGetPcsWorkItemProcessorStatusRequest(ex);
HandleFailedRequest(ex);
Client.OnFailedRequest(ex);
throw ex;
}
}
}
Loading