Skip to content

Commit

Permalink
[Rollout] Production rollout 2024-11-25 (#4184)
Browse files Browse the repository at this point in the history
  • Loading branch information
premun authored Nov 25, 2024
2 parents 0227c76 + 0fdedf4 commit 7256251
Show file tree
Hide file tree
Showing 302 changed files with 1,535 additions and 1,041 deletions.
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.24555.1",
"version": "1.1.0-beta.24562.1",
"commands": [
"secret-manager"
]
Expand All @@ -15,7 +15,7 @@
]
},
"microsoft.dnceng.configuration.bootstrap": {
"version": "1.1.0-beta.24555.1",
"version": "1.1.0-beta.24562.1",
"commands": [
"bootstrap-dnceng-configuration"
]
Expand Down
2 changes: 1 addition & 1 deletion .vault-config/product-construction-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ secrets:
name: BotAccount-dotnet-bot
gitHubBotAccountName: dotnet-bot

dotnet-bot-maestro-auth-test-content-rw:
dotnet-bot-maestro-auth-test-content-rw-pr-rw:
type: github-access-token
parameters:
gitHubBotAccountSecret:
Expand Down
16 changes: 8 additions & 8 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -102,19 +102,19 @@
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Http.Resilience" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
<PackageVersion Include="Microsoft.Extensions.Logging.ApplicationInsights" Version="2.22.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="8.0.2" />
<PackageVersion Include="Microsoft.Extensions.ServiceDiscovery" Version="$(AspireVersion)" />
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components.Icons" Version="4.10.0" />
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.10.0" />
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components.Icons" Version="4.10.4" />
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.10.4" />
<PackageVersion Include="Microsoft.Identity.Web" Version="2.18.2" />
<PackageVersion Include="Microsoft.ServiceFabric.Actors" Version="5.2.1571" />
<PackageVersion Include="Microsoft.ServiceFabric.AspNetCore.HttpSys" Version="5.2.1571" />
Expand Down Expand Up @@ -160,4 +160,4 @@
<PackageVersion Include="Verify.NUnit" Version="19.6" />
<PackageVersion Include="YamlDotNet" Version="16.0.0" />
</ItemGroup>
</Project>
</Project>
8 changes: 7 additions & 1 deletion azure-pipelines-product-construction-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -268,4 +268,10 @@ stages:
parameters:
name: scenarioTests_Other
displayName: Other tests
testFilter: 'TestCategory!=GitHub&TestCategory!=AzDO'
testFilter: 'TestCategory!=GitHub&TestCategory!=AzDO&TestCategory!=CodeFlow'

- template: /eng/templates/jobs/e2e-pcs-tests.yml
parameters:
name: scenarioTests_CodeFlow
displayName: Code Flow tests
testFilter: 'TestCategory=CodeFlow'
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.24525.2">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.24570.5">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>24e02f80c5458d1f75240ae57fc2a98fb8a9022a</Sha>
<Sha>3c7e11bf80279cde53a6251c4d0fa10e613fc739</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.SignTool" Version="8.0.0-beta.24525.2">
<Dependency Name="Microsoft.DotNet.SignTool" Version="8.0.0-beta.24570.5">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>24e02f80c5458d1f75240ae57fc2a98fb8a9022a</Sha>
<Sha>3c7e11bf80279cde53a6251c4d0fa10e613fc739</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="8.0.0-beta.24525.2">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="8.0.0-beta.24570.5">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>24e02f80c5458d1f75240ae57fc2a98fb8a9022a</Sha>
<Sha>3c7e11bf80279cde53a6251c4d0fa10e613fc739</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.SwaggerGenerator.MSBuild" Version="8.0.0-beta.24525.2">
<Dependency Name="Microsoft.DotNet.SwaggerGenerator.MSBuild" Version="8.0.0-beta.24570.5">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>24e02f80c5458d1f75240ae57fc2a98fb8a9022a</Sha>
<Sha>3c7e11bf80279cde53a6251c4d0fa10e613fc739</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Git.IssueManager" Version="8.0.0-beta.24525.2">
<Dependency Name="Microsoft.DotNet.Git.IssueManager" Version="8.0.0-beta.24570.5">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>24e02f80c5458d1f75240ae57fc2a98fb8a9022a</Sha>
<Sha>3c7e11bf80279cde53a6251c4d0fa10e613fc739</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.VersionTools" Version="8.0.0-beta.24525.2">
<Dependency Name="Microsoft.DotNet.VersionTools" Version="8.0.0-beta.24570.5">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>24e02f80c5458d1f75240ae57fc2a98fb8a9022a</Sha>
<Sha>3c7e11bf80279cde53a6251c4d0fa10e613fc739</Sha>
</Dependency>
<Dependency Name="Microsoft.DncEng.SecretManager" Version="1.1.0-beta.24555.1">
<Dependency Name="Microsoft.DncEng.SecretManager" Version="1.1.0-beta.24562.1">
<Uri>https://github.com/dotnet/dnceng</Uri>
<Sha>64878fb972e889fc51b1f2e80a1ad2285fbd896c</Sha>
<Sha>b61ece47324607e2ab69de0b6e8cf2d19cef2570</Sha>
</Dependency>
<Dependency Name="Microsoft.DncEng.Configuration.Bootstrap" Version="1.1.0-beta.24555.1">
<Dependency Name="Microsoft.DncEng.Configuration.Bootstrap" Version="1.1.0-beta.24562.1">
<Uri>https://github.com/dotnet/dnceng</Uri>
<Sha>64878fb972e889fc51b1f2e80a1ad2285fbd896c</Sha>
<Sha>b61ece47324607e2ab69de0b6e8cf2d19cef2570</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.24525.2</MicrosoftDotNetSignToolVersion>
<MicrosoftDotNetBuildTasksFeedVersion>8.0.0-beta.24525.2</MicrosoftDotNetBuildTasksFeedVersion>
<MicrosoftDotNetSwaggerGeneratorMSBuildVersion>8.0.0-beta.24525.2</MicrosoftDotNetSwaggerGeneratorMSBuildVersion>
<MicrosoftDotNetGitIssueManagerVersion>8.0.0-beta.24525.2</MicrosoftDotNetGitIssueManagerVersion>
<MicrosoftDotNetVersionToolsVersion>8.0.0-beta.24525.2</MicrosoftDotNetVersionToolsVersion>
<MicrosoftDotNetSignToolVersion>8.0.0-beta.24570.5</MicrosoftDotNetSignToolVersion>
<MicrosoftDotNetBuildTasksFeedVersion>8.0.0-beta.24570.5</MicrosoftDotNetBuildTasksFeedVersion>
<MicrosoftDotNetSwaggerGeneratorMSBuildVersion>8.0.0-beta.24570.5</MicrosoftDotNetSwaggerGeneratorMSBuildVersion>
<MicrosoftDotNetGitIssueManagerVersion>8.0.0-beta.24570.5</MicrosoftDotNetGitIssueManagerVersion>
<MicrosoftDotNetVersionToolsVersion>8.0.0-beta.24570.5</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.24555.1</MicrosoftDncEngSecretManagerVersion>
<MicrosoftDncEngConfigurationBootstrapVersion>1.1.0-beta.24555.1</MicrosoftDncEngConfigurationBootstrapVersion>
<MicrosoftDncEngSecretManagerVersion>1.1.0-beta.24562.1</MicrosoftDncEngSecretManagerVersion>
<MicrosoftDncEngConfigurationBootstrapVersion>1.1.0-beta.24562.1</MicrosoftDncEngConfigurationBootstrapVersion>
</PropertyGroup>
<!--Package names-->
<PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion eng/templates/jobs/e2e-pcs-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:
env:
PCS_BASEURI: ${{ variables.PcsTestEndpoint }}
PCS_TOKEN: $(GetAuthInfo.Token)
GITHUB_TOKEN: $(dotnet-bot-maestro-auth-test-content-rw)
GITHUB_TOKEN: $(dotnet-bot-maestro-auth-test-content-rw-pr-rw)
AZDO_TOKEN: $(AzdoToken)
DARC_PACKAGE_SOURCE: $(Pipeline.Workspace)\PackageArtifacts
DARC_DIR: $(Build.SourcesDirectory)\darc
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.24525.2"
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24570.5"
}
}
1 change: 1 addition & 0 deletions src/Maestro/Client/src/GlobalSuppressions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
[assembly: SuppressMessage("Performance", "CA1834:Consider using 'StringBuilder.Append(char)' when applicable", Justification = "Auto-generate code", Scope = "namespaceanddescendants", Target = "~N:Microsoft.DotNet.Maestro.Client")]
[assembly: SuppressMessage("Performance", "CA1844:Provide memory-based overrides of async methods when subclassing 'Stream'", Justification = "Auto-generate code", Scope = "namespaceanddescendants", Target = "~N:Microsoft.DotNet.Maestro.Client")]
[assembly: SuppressMessage("Style", "IDE0034:Simplify 'default' expression", Justification = "Auto-generate code", Scope = "namespaceanddescendants", Target = "~N:Microsoft.DotNet.Maestro.Client")]
[assembly: SuppressMessage("Style", "IDE0130:Namespace does not match folder structure", Justification = "Auto-generate code", Scope = "namespaceanddescendants", Target = "~N:Microsoft.DotNet.Maestro.Client")]
5 changes: 3 additions & 2 deletions src/Maestro/DependencyUpdater/DependencyUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using Maestro.Data;
using Maestro.Data.Models;
using Microsoft.DotNet.DarcLib;
using Microsoft.DotNet.DarcLib.Models.Darc;
using Microsoft.DotNet.Internal.Logging;
using Microsoft.DotNet.ServiceFabric.ServiceHost;
using Microsoft.EntityFrameworkCore;
Expand Down Expand Up @@ -296,15 +297,15 @@ public async Task UpdateLongestBuildPathAsync(CancellationToken cancellationToke
};

_logger.LogInformation($"Will update {channel.Name} to best case time {lbp.BestCaseTimeInMinutes} and worst case time {lbp.WorstCaseTimeInMinutes}");
await _context.LongestBuildPaths.AddAsync(lbp);
await _context.LongestBuildPaths.AddAsync(lbp, cancellationToken);
}
else
{
_logger.LogInformation($"Will not update {channel.Name} longest build path because no nodes have {nameof(DependencyFlowNode.OnLongestBuildPath)} flag set. Total node count = {flowGraph.Nodes.Count}");
}
}

await _context.SaveChangesAsync();
await _context.SaveChangesAsync(cancellationToken);
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/Maestro/FeedCleanerService/FeedCleanerService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using Maestro.Data.Models;
using Microsoft.DotNet.DarcLib;
using Microsoft.DotNet.DarcLib.Helpers;
using Microsoft.DotNet.DarcLib.Models.AzureDevOps;
using Microsoft.DotNet.ServiceFabric.ServiceHost;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
Expand Down Expand Up @@ -291,7 +292,7 @@ await _azureDevOpsClient.DeleteNuGetPackageVersionFromFeedAsync(feed.Account,
/// <param name="version">Version to search for</param>
/// <param name="packageMappings">Feeds to search</param>
/// <returns>List of feeds in the package mappings where the provided package and version are available</returns>
private List<string> GetReleaseFeedsWherePackageIsAvailable(
private static List<string> GetReleaseFeedsWherePackageIsAvailable(
string name,
string version,
Dictionary<string, Dictionary<string, HashSet<string>>> packageMappings)
Expand Down
2 changes: 1 addition & 1 deletion src/Maestro/Maestro.Api.Model/v2018_07_16/FlowEdge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using Microsoft.DotNet.DarcLib;
using Microsoft.DotNet.DarcLib.Models.Darc;

namespace Maestro.Api.Model.v2018_07_16;

Expand Down
2 changes: 1 addition & 1 deletion src/Maestro/Maestro.Api.Model/v2018_07_16/FlowGraph.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using Microsoft.DotNet.DarcLib;
using Microsoft.DotNet.DarcLib.Models.Darc;

namespace Maestro.Api.Model.v2018_07_16;

Expand Down
2 changes: 1 addition & 1 deletion src/Maestro/Maestro.Api.Model/v2018_07_16/FlowRef.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.

using System.Collections.Generic;
using Microsoft.DotNet.DarcLib;
using Microsoft.DotNet.DarcLib.Models.Darc;
using Newtonsoft.Json;

namespace Maestro.Api.Model.v2018_07_16;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public SubscriptionPolicy(Data.Models.SubscriptionPolicy other)
UpdateFrequency = (UpdateFrequency)(int)other.UpdateFrequency;
MergePolicies = other.MergePolicies != null
? other.MergePolicies.Select(p => new MergePolicy(p)).ToImmutableList()
: ImmutableList<MergePolicy>.Empty;
: [];
}

public bool Batchable { get; set; } = false;
Expand Down
2 changes: 1 addition & 1 deletion src/Maestro/Maestro.Api.Model/v2019_01_16/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public Build(Data.Models.Build other)

public string GitHubBranch { get; set; }

public bool PublishUsingPipelines
public static bool PublishUsingPipelines
{
get
{
Expand Down
2 changes: 1 addition & 1 deletion src/Maestro/Maestro.Api.Model/v2019_01_16/BuildData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class BuildData

public string GitHubBranch { get; set; }

public bool PublishUsingPipelines
public static bool PublishUsingPipelines
{
get
{
Expand Down
2 changes: 1 addition & 1 deletion src/Maestro/Maestro.Common/AppCredentials/AppCredential.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Maestro.Common.AppCredentials;
/// </summary>
public class AppCredential : TokenCredential
{
public static string AUTH_CACHE = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".darc");
public static readonly string AUTH_CACHE = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".darc");

private static readonly string AUTH_RECORD_PREFIX = ".auth-record";

Expand Down
2 changes: 1 addition & 1 deletion src/Maestro/Maestro.Data/BuildAssetRegistryContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ where buildIds.Contains(build.Id)
b.DateProduced > build.DateProduced);
dict[id].Staleness = newer.Count();
}
return dict.Values.ToList();
return [.. dict.Values];
}

public bool IsProductDependency(
Expand Down
2 changes: 1 addition & 1 deletion src/Maestro/Maestro.Data/Models/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public override bool Equals(object obj)

public override int GetHashCode()
{
return (BuildId, ChannelId).GetHashCode();
return HashCode.Combine(BuildId, ChannelId);
}
}

Expand Down
1 change: 1 addition & 0 deletions src/Maestro/Maestro.DataProviders/SqlBarClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using System.Collections.Immutable;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.DotNet.DarcLib.Models.Darc;

namespace Maestro.DataProviders;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using Maestro.Contracts;
using Maestro.MergePolicyEvaluation;
using Microsoft.DotNet.DarcLib;
using Microsoft.DotNet.DarcLib.Models;

namespace Maestro.MergePolicies;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Maestro.Contracts;
using Maestro.MergePolicyEvaluation;
using Microsoft.DotNet.DarcLib;
using Microsoft.DotNet.DarcLib.Models;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
using Channel = Maestro.Api.Model.v2018_07_16.Channel;
using FlowGraph = Maestro.Api.Model.v2018_07_16.FlowGraph;
using ReleasePipeline = Maestro.Api.Model.v2018_07_16.ReleasePipeline;
using Microsoft.DotNet.DarcLib.Models.Darc;

namespace Maestro.Web.Api.v2018_07_16.Controllers;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
using Microsoft.Extensions.Internal;
using Newtonsoft.Json.Linq;
using Maestro.Api.Model.v2020_02_20;
using Microsoft.DotNet.DarcLib.Models.Darc;

namespace Maestro.Web.Api.v2020_02_20.Controllers;

Expand Down
2 changes: 1 addition & 1 deletion src/Maestro/Maestro.Web/BackgroundQueue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken)
_workItems.CompleteAdding();
}

if (_workItems.TryTake(out (Type type, JToken args) item, 1000))
if (_workItems.TryTake(out (Type type, JToken args) item, 1000, stoppingToken))
{
using (Operation op = _operations.BeginOperation("Executing background work: {item} ({args})", item.type.Name, item.args.ToString(Formatting.None)))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace Maestro.Web.Pages.DependencyFlow;

public class IncomingModel : PageModel
{
private static readonly Regex _repoParser = new Regex(@"https?://(www\.)?github.com/(?<owner>[A-Za-z0-9-_\.]+)/(?<repo>[A-Za-z0-9-_\.]+)");
private static readonly Regex _repoParser = new(@"https?://(www\.)?github.com/(?<owner>[A-Za-z0-9-_\.]+)/(?<repo>[A-Za-z0-9-_\.]+)");

private readonly BuildAssetRegistryContext _context;
private readonly IGitHubClient _github;
Expand Down Expand Up @@ -180,7 +180,7 @@ public string GetBuildUrl(Build? build)
? "(unknown)"
: $"https://dev.azure.com/{build.AzureDevOpsAccount}/{build.AzureDevOpsProject}/_build/results?buildId={build.AzureDevOpsBuildId}&view=results";

private bool IncludeRepo(GitHubInfo? gitHubInfo)
private static bool IncludeRepo(GitHubInfo? gitHubInfo)
{
if (string.Equals(gitHubInfo?.Owner, "dotnet", StringComparison.OrdinalIgnoreCase) &&
string.Equals(gitHubInfo?.Repo, "blazor", StringComparison.OrdinalIgnoreCase))
Expand Down
7 changes: 3 additions & 4 deletions src/Maestro/Maestro.Web/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Microsoft.OpenApi.Models;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
Expand Down Expand Up @@ -293,12 +292,12 @@ public override void ConfigureServices(IServiceCollection services)
(doc, req) =>
{
bool http = HostingEnvironment.IsDevelopment();
doc.Servers = new List<OpenApiServer>
{
doc.Servers =
[
new() {
Url = $"{req.Scheme}://{req.Host.Value}/",
},
};
];

req.HttpContext.Response.Headers["Access-Control-Allow-Origin"] = "*";
});
Expand Down
Loading

0 comments on commit 7256251

Please sign in to comment.