mirror of
https://github.com/microsoft/autogen.git
synced 2026-04-20 03:02:16 -04:00
change to EP plan on Windows + bux fixes (#2)
This commit is contained in:
@@ -44,7 +44,7 @@ resource appService 'Microsoft.Web/sites@2022-03-01' = {
|
||||
properties: {
|
||||
serverFarmId: appServicePlanId
|
||||
siteConfig: {
|
||||
linuxFxVersion: linuxFxVersion
|
||||
|
||||
alwaysOn: alwaysOn
|
||||
ftpsState: ftpsState
|
||||
minTlsVersion: '1.2'
|
||||
|
||||
@@ -24,7 +24,7 @@ param runtimeVersion string
|
||||
param extensionVersion string = '~4'
|
||||
|
||||
// Microsoft.Web/sites Properties
|
||||
param kind string = 'functionapp,linux'
|
||||
param kind string = 'functionapp'
|
||||
|
||||
// Microsoft.Web/sites/config
|
||||
param allowedOrigins array = []
|
||||
|
||||
@@ -115,9 +115,12 @@ module appServicePlan './core/host/appserviceplan.bicep' = {
|
||||
location: location
|
||||
tags: tags
|
||||
sku: {
|
||||
name: 'Y1'
|
||||
tier: 'Dynamic'
|
||||
name: 'EP1'
|
||||
tier: 'ElasticPremium'
|
||||
family: 'EP'
|
||||
}
|
||||
kind: 'elastic'
|
||||
reserved: false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace SK.DevTeam
|
||||
|
||||
[Function("CloseSubOrchestration")]
|
||||
public async Task Close(
|
||||
[HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = "close")] HttpRequest req,
|
||||
[HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = "close")] HttpRequestData req,
|
||||
[DurableClient] DurableTaskClient client)
|
||||
{
|
||||
var request = await req.ReadFromJsonAsync<CloseIssueRequest>();
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text.Json;
|
||||
using Azure.Data.Tables;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Azure.Functions.Worker;
|
||||
using Microsoft.Azure.Functions.Worker.Http;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace SK.DevTeam
|
||||
{
|
||||
@@ -9,15 +13,21 @@ namespace SK.DevTeam
|
||||
public static class MetadataActivities
|
||||
{
|
||||
[Function(nameof(GetMetadata))]
|
||||
public static async Task<IActionResult> GetMetadata(
|
||||
[HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = "metadata/{key}")] HttpRequest req,
|
||||
public static async Task<IssueMetadata> GetMetadata(
|
||||
[HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = "metadata/{key}")] HttpRequestData req, string key,
|
||||
[TableInput("Metadata", Connection = "AzureWebJobsStorage")] TableClient client,
|
||||
FunctionContext executionContext)
|
||||
{
|
||||
var key = req.RouteValues["key"].ToString();
|
||||
var logger = executionContext.GetLogger<SKWebHookEventProcessor>();
|
||||
|
||||
logger.LogInformation($"Getting metadata for {key}");
|
||||
|
||||
var metadataResponse = await client.GetEntityAsync<IssueMetadata>(key, key);
|
||||
var metadata = metadataResponse.Value;
|
||||
return new OkObjectResult(metadata);
|
||||
|
||||
logger.LogInformation($"Metadata result {JsonSerializer.Serialize(metadata)}");
|
||||
|
||||
return metadata;
|
||||
}
|
||||
|
||||
[Function(nameof(SaveMetadata))]
|
||||
|
||||
@@ -10,6 +10,7 @@ using Azure.ResourceManager.Resources;
|
||||
using Azure.Storage.Files.Shares;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Azure.Functions.Worker;
|
||||
using Microsoft.Azure.Functions.Worker.Http;
|
||||
using Microsoft.DurableTask.Client;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
@@ -196,12 +197,11 @@ namespace SK.DevTeam
|
||||
|
||||
[Function(nameof(Terminated))]
|
||||
public async Task<ContainerInstanceMetadata> Terminated(
|
||||
[HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = "container/{name}/terminate")] HttpRequest req,
|
||||
[HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = "container/{name}/terminate")] HttpRequestData req, string name,
|
||||
[TableInput("ContainersMetadata", Connection = "AzureWebJobsStorage")] TableClient tableClient,
|
||||
[DurableClient] DurableTaskClient client)
|
||||
{
|
||||
var containerGroupName = req.RouteValues["name"].ToString();
|
||||
var metadataResponse = await tableClient.GetEntityAsync<ContainerInstanceMetadata>(containerGroupName, containerGroupName);
|
||||
var metadataResponse = await tableClient.GetEntityAsync<ContainerInstanceMetadata>(name, name);
|
||||
var metadata = metadataResponse.Value;
|
||||
if (!metadata.Processed)
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace SK.DevTeam
|
||||
{
|
||||
[Function("IssueOrchestrationStart")]
|
||||
public static async Task<string> HttpStart(
|
||||
[HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = "doit")] HttpRequest req,
|
||||
[HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = "doit")] HttpRequestData req,
|
||||
[DurableClient] DurableTaskClient client,
|
||||
FunctionContext executionContext)
|
||||
{
|
||||
@@ -34,38 +34,38 @@ namespace SK.DevTeam
|
||||
var logger = context.CreateReplaySafeLogger(nameof(IssueOrchestration));
|
||||
var outputs = new List<string>();
|
||||
|
||||
var newGHBranchRequest = new GHNewBranch
|
||||
var newGHBranchRequest = new GHNewBranch
|
||||
{
|
||||
Org = request.Org,
|
||||
Repo = request.Repo,
|
||||
Branch = request.Branch,
|
||||
Number = request.Number
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
var newBranch = await context.CallActivityAsync<bool>(nameof(PullRequestActivities.CreateBranch), newGHBranchRequest);
|
||||
|
||||
var readmeTask = await context.CallSubOrchestratorAsync<bool>(nameof(ReadmeAndSave), new RunAndSaveRequest
|
||||
var readmeTask = await context.CallSubOrchestratorAsync<bool>(nameof(ReadmeAndSave), new RunAndSaveRequest
|
||||
{
|
||||
Request = request,
|
||||
InstanceId = context.InstanceId
|
||||
});
|
||||
|
||||
var newPR = await context.CallActivityAsync<bool>(nameof(PullRequestActivities.CreatePR), newGHBranchRequest);
|
||||
|
||||
var newPR = await context.CallActivityAsync<bool>(nameof(PullRequestActivities.CreatePR), newGHBranchRequest);
|
||||
|
||||
var planTask = await context.CallSubOrchestratorAsync<SkillResponse<string>>(nameof(CreatePlan), request);
|
||||
var plan = JsonSerializer.Deserialize<DevLeadPlanResponse>(planTask.Output);
|
||||
|
||||
var implementationTasks = plan.steps.SelectMany(s => s.subtasks.Select(st =>
|
||||
context.CallSubOrchestratorAsync<bool>(nameof(ImplementAndSave), new RunAndSaveRequest
|
||||
var plan = JsonSerializer.Deserialize<DevLeadPlanResponse>(planTask.Output);
|
||||
|
||||
var implementationTasks = plan.steps.SelectMany(s => s.subtasks.Select(st =>
|
||||
context.CallSubOrchestratorAsync<bool>(nameof(ImplementAndSave), new RunAndSaveRequest
|
||||
{
|
||||
Request = new IssueOrchestrationRequest
|
||||
{
|
||||
Number = request.Number,
|
||||
Org = request.Org,
|
||||
Repo = request.Repo,
|
||||
Request = new IssueOrchestrationRequest
|
||||
{
|
||||
Number = request.Number,
|
||||
Org = request.Org,
|
||||
Repo = request.Repo,
|
||||
Input = st.prompt,
|
||||
},
|
||||
InstanceId = context.InstanceId
|
||||
InstanceId = context.InstanceId
|
||||
})));
|
||||
|
||||
await Task.WhenAll(implementationTasks);
|
||||
|
||||
@@ -19,7 +19,7 @@ public static class Program
|
||||
public static void Main()
|
||||
{
|
||||
var host = new HostBuilder()
|
||||
.ConfigureFunctionsWebApplication()
|
||||
.ConfigureFunctionsWorkerDefaults()
|
||||
.ConfigureGitHubWebhooks()
|
||||
.ConfigureAppConfiguration(configuration =>
|
||||
{
|
||||
|
||||
@@ -26,12 +26,12 @@
|
||||
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.14.0" />
|
||||
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.19.0" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="2.21.0" />
|
||||
<PackageReference Include="Octokit.Webhooks.AzureFunctions" Version="2.0.1" />
|
||||
<PackageReference Include="Octokit.Webhooks.AzureFunctions" Version="2.0.3" />
|
||||
<PackageReference Include="Microsoft.SemanticKernel" Version="0.18.230725.3-preview" />
|
||||
<PackageReference Include="Microsoft.SemanticKernel.Connectors.Memory.Qdrant" Version="0.18.230725.3-preview" />
|
||||
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Storage" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Tables" Version="1.2.0" />
|
||||
<PackageReference Include="Octokit" Version="6.0.0" />
|
||||
<PackageReference Include="Octokit" Version="7.1.0" />
|
||||
<PackageReference Include="GitHubJwt" Version="0.0.6" />
|
||||
<PackageReference Include="Azure.ResourceManager.ContainerInstance" Version="1.2.0-beta.1" />
|
||||
<PackageReference Include="Azure.Storage.Files.Shares" Version="12.16.0-beta.1" />
|
||||
|
||||
@@ -29,7 +29,7 @@ internal class KernelSettings
|
||||
[JsonPropertyName("orgId")]
|
||||
public string OrgId { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("qdrantEndoint")]
|
||||
[JsonPropertyName("qdrantEndpoint")]
|
||||
public string QdrantEndpoint { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("logLevel")]
|
||||
|
||||
@@ -5,5 +5,5 @@
|
||||
"embeddingDeploymentOrModelId": "",
|
||||
"endpoint": "",
|
||||
"apiKey": "",
|
||||
"qdrantEndoint": ""
|
||||
"qdrantEndpoint": ""
|
||||
}
|
||||
Reference in New Issue
Block a user