From 52ef3d096190426646ca3c9da59225fe2c08b207 Mon Sep 17 00:00:00 2001 From: Phill Morton Date: Thu, 28 Sep 2023 09:52:04 +0100 Subject: [PATCH 1/8] stash in function app explore --- .idea/.idea.tye/.idea/.gitignore | 13 ++++++++ .idea/.idea.tye/.idea/GitLink.xml | 6 ++++ .idea/.idea.tye/.idea/codestream.xml | 6 ++++ .idea/.idea.tye/.idea/indexLayout.xml | 8 +++++ .idea/.idea.tye/.idea/vcs.xml | 6 ++++ .../AzureFunctionServiceBuilder.cs | 2 +- .../Dapr/DaprExtension.cs | 3 +- test/E2ETest/Microsoft.Tye.E2ETests.csproj | 4 +++ test/E2ETest/TyeGenerateTests.cs | 4 +++ test/E2ETest/TyeRunTests.cs | 33 +++++++++++++++++-- .../.idea.frontend-backend/.idea/.gitignore | 13 ++++++++ .../.idea/.idea.frontend-backend/.idea/.name | 1 + .../.idea.frontend-backend/.idea/GitLink.xml | 6 ++++ .../.idea/codestream.xml | 6 ++++ .../.idea/encodings.xml | 4 +++ .../.idea/indexLayout.xml | 8 +++++ .../.idea.frontend-backend/.idea/vcs.xml | 6 ++++ .../azure-functions/backend/backend.csproj | 6 ++-- .../dapr-function-app/dapr-function-app.sln | 25 ++++++++++++++ .../dapr-function-app/function/HttpTrigger.cs | 32 ++++++++++++++++++ .../dapr-function-app/function/Program.cs | 18 ++++++++++ .../function/Properties/launchSettings.json | 27 +++++++++++++++ .../function/appsettings.Development.json | 9 +++++ .../function/appsettings.json | 10 ++++++ .../function/dapr-function-app.csproj | 23 +++++++++++++ .../dapr-function-app/function/host.json | 12 +++++++ .../function/local.settings.json | 6 ++++ .../projects/dapr-function-app/tye.yaml | 8 +++++ .../projects/dotnet-env-vars/tye.yaml | 4 +++ 29 files changed, 301 insertions(+), 8 deletions(-) create mode 100644 .idea/.idea.tye/.idea/.gitignore create mode 100644 .idea/.idea.tye/.idea/GitLink.xml create mode 100644 .idea/.idea.tye/.idea/codestream.xml create mode 100644 .idea/.idea.tye/.idea/indexLayout.xml create mode 100644 .idea/.idea.tye/.idea/vcs.xml create mode 100644 test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/.gitignore create mode 100644 test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/.name create mode 100644 test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/GitLink.xml create mode 100644 test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/codestream.xml create mode 100644 test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/encodings.xml create mode 100644 test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/indexLayout.xml create mode 100644 test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/vcs.xml create mode 100644 test/E2ETest/testassets/projects/dapr-function-app/dapr-function-app.sln create mode 100644 test/E2ETest/testassets/projects/dapr-function-app/function/HttpTrigger.cs create mode 100644 test/E2ETest/testassets/projects/dapr-function-app/function/Program.cs create mode 100644 test/E2ETest/testassets/projects/dapr-function-app/function/Properties/launchSettings.json create mode 100644 test/E2ETest/testassets/projects/dapr-function-app/function/appsettings.Development.json create mode 100644 test/E2ETest/testassets/projects/dapr-function-app/function/appsettings.json create mode 100644 test/E2ETest/testassets/projects/dapr-function-app/function/dapr-function-app.csproj create mode 100644 test/E2ETest/testassets/projects/dapr-function-app/function/host.json create mode 100644 test/E2ETest/testassets/projects/dapr-function-app/function/local.settings.json create mode 100644 test/E2ETest/testassets/projects/dapr-function-app/tye.yaml diff --git a/.idea/.idea.tye/.idea/.gitignore b/.idea/.idea.tye/.idea/.gitignore new file mode 100644 index 000000000..f7ad803b8 --- /dev/null +++ b/.idea/.idea.tye/.idea/.gitignore @@ -0,0 +1,13 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Rider ignored files +/contentModel.xml +/projectSettingsUpdater.xml +/modules.xml +/.idea.tye.iml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/.idea.tye/.idea/GitLink.xml b/.idea/.idea.tye/.idea/GitLink.xml new file mode 100644 index 000000000..009597cc2 --- /dev/null +++ b/.idea/.idea.tye/.idea/GitLink.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/.idea.tye/.idea/codestream.xml b/.idea/.idea.tye/.idea/codestream.xml new file mode 100644 index 000000000..83b274948 --- /dev/null +++ b/.idea/.idea.tye/.idea/codestream.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/.idea.tye/.idea/indexLayout.xml b/.idea/.idea.tye/.idea/indexLayout.xml new file mode 100644 index 000000000..7b08163ce --- /dev/null +++ b/.idea/.idea.tye/.idea/indexLayout.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.tye/.idea/vcs.xml b/.idea/.idea.tye/.idea/vcs.xml new file mode 100644 index 000000000..35eb1ddfb --- /dev/null +++ b/.idea/.idea.tye/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/Microsoft.Tye.Core/AzureFunctionServiceBuilder.cs b/src/Microsoft.Tye.Core/AzureFunctionServiceBuilder.cs index 5216ad846..21e964a52 100644 --- a/src/Microsoft.Tye.Core/AzureFunctionServiceBuilder.cs +++ b/src/Microsoft.Tye.Core/AzureFunctionServiceBuilder.cs @@ -6,7 +6,7 @@ namespace Microsoft.Tye { - public class AzureFunctionServiceBuilder : ServiceBuilder + public class AzureFunctionServiceBuilder : LaunchedServiceBuilder { public AzureFunctionServiceBuilder(string name, string path, ServiceSource source) : base(name, source) diff --git a/src/Microsoft.Tye.Extensions/Dapr/DaprExtension.cs b/src/Microsoft.Tye.Extensions/Dapr/DaprExtension.cs index 3e682fb75..16534d999 100644 --- a/src/Microsoft.Tye.Extensions/Dapr/DaprExtension.cs +++ b/src/Microsoft.Tye.Extensions/Dapr/DaprExtension.cs @@ -28,7 +28,8 @@ public override async Task ProcessAsync(ExtensionContext context, ExtensionConfi // For local run, enumerate all projects, and add services for each dapr proxy. var projects = context.Application.Services.OfType().Cast(); var executables = context.Application.Services.OfType().Cast(); - var services = projects.Concat(executables).ToList(); + var functions = context.Application.Services.OfType().Cast(); + var services = projects.Concat(executables).Concat(functions).ToList(); foreach (var project in services) { diff --git a/test/E2ETest/Microsoft.Tye.E2ETests.csproj b/test/E2ETest/Microsoft.Tye.E2ETests.csproj index d84fcf593..1c90e196d 100644 --- a/test/E2ETest/Microsoft.Tye.E2ETests.csproj +++ b/test/E2ETest/Microsoft.Tye.E2ETests.csproj @@ -15,6 +15,7 @@ The Microsoft.Build.Locator package takes care of dynamically loading these assemblies at runtime. We don't need/want to ship them, just to have them as references. --> + @@ -29,6 +30,9 @@ + + + diff --git a/test/E2ETest/TyeGenerateTests.cs b/test/E2ETest/TyeGenerateTests.cs index d2fd6c9d8..6e4758db8 100644 --- a/test/E2ETest/TyeGenerateTests.cs +++ b/test/E2ETest/TyeGenerateTests.cs @@ -253,6 +253,10 @@ public async Task Generate_DaprApplication() } } + + + + [ConditionalFact] [SkipIfDockerNotRunning] public async Task Generate_ConnectionStringDependency() diff --git a/test/E2ETest/TyeRunTests.cs b/test/E2ETest/TyeRunTests.cs index 09c09434e..642d6c310 100644 --- a/test/E2ETest/TyeRunTests.cs +++ b/test/E2ETest/TyeRunTests.cs @@ -82,12 +82,13 @@ public async Task FrontendBackendRunTest() }); } - [Fact(Skip = "Need to figure out how to install func before running")] + //[Fact(Skip = "Need to figure out how to install func before running")] + [Fact] public async Task FrontendBackendAzureFunctionTest() { // Install to directory using var tmp = TempDirectory.Create(); - await ProcessUtil.RunAsync("npm", "install azure-functions-core-tools@3`", workingDirectory: tmp.DirectoryPath); + //await ProcessUtil.RunAsync("npm", "install azure-functions-core-tools@3`", workingDirectory: tmp.DirectoryPath); using var projectDirectory = CopyTestProjectDirectory("azure-functions"); var content = @$" @@ -97,7 +98,6 @@ public async Task FrontendBackendAzureFunctionTest() services: - name: backend azureFunction: backend/ - pathToFunc: {tmp.DirectoryPath}/node_modules/azure-functions-core-tools/bin/func.dll - name: frontend project: frontend/frontend.csproj"; @@ -126,6 +126,33 @@ public async Task FrontendBackendAzureFunctionTest() Assert.True(frontendResponse.IsSuccessStatusCode); }); } + [Fact] + public async Task DaprAzureFunctionTest() + { + using var projectDirectory = CopyTestProjectDirectory("dapr-function-app"); + + var projectFile = new FileInfo(Path.Combine(projectDirectory.DirectoryPath, "tye.yaml")); + var outputContext = new OutputContext(_sink, Verbosity.Debug); + var application = await ApplicationFactory.CreateAsync(outputContext, projectFile); + + await application.ProcessExtensionsAsync(new HostOptions(), outputContext, ExtensionContext.OperationKind.LocalRun); + var handler = new HttpClientHandler + { + ServerCertificateCustomValidationCallback = (a, b, c, d) => true, + AllowAutoRedirect = false + }; + + var client = new HttpClient(new RetryHandler(handler)); + + await RunHostingApplication(application, new HostOptions(), async (app, uri) => + { + var backendUri = await GetServiceUrl(client, uri, "dapr-test-project"); + + var backendResponse = await client.GetAsync(backendUri); + + Assert.True(backendResponse.IsSuccessStatusCode); + }); + } [ConditionalTheory] [SkipIfDockerNotRunning] diff --git a/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/.gitignore b/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/.gitignore new file mode 100644 index 000000000..1d782647e --- /dev/null +++ b/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/.gitignore @@ -0,0 +1,13 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Rider ignored files +/modules.xml +/contentModel.xml +/.idea.frontend-backend.iml +/projectSettingsUpdater.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/.name b/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/.name new file mode 100644 index 000000000..059e0f12b --- /dev/null +++ b/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/.name @@ -0,0 +1 @@ +frontend-backend \ No newline at end of file diff --git a/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/GitLink.xml b/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/GitLink.xml new file mode 100644 index 000000000..009597cc2 --- /dev/null +++ b/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/GitLink.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/codestream.xml b/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/codestream.xml new file mode 100644 index 000000000..90f56a85f --- /dev/null +++ b/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/codestream.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/encodings.xml b/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/encodings.xml new file mode 100644 index 000000000..df87cf951 --- /dev/null +++ b/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/encodings.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/indexLayout.xml b/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/indexLayout.xml new file mode 100644 index 000000000..7b08163ce --- /dev/null +++ b/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/indexLayout.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/vcs.xml b/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/vcs.xml new file mode 100644 index 000000000..bc5997070 --- /dev/null +++ b/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/test/E2ETest/testassets/projects/azure-functions/backend/backend.csproj b/test/E2ETest/testassets/projects/azure-functions/backend/backend.csproj index 8516359a3..09dcb8b45 100644 --- a/test/E2ETest/testassets/projects/azure-functions/backend/backend.csproj +++ b/test/E2ETest/testassets/projects/azure-functions/backend/backend.csproj @@ -1,10 +1,10 @@ - net6.0 - v3 + net7.0 + v4 - + diff --git a/test/E2ETest/testassets/projects/dapr-function-app/dapr-function-app.sln b/test/E2ETest/testassets/projects/dapr-function-app/dapr-function-app.sln new file mode 100644 index 000000000..5957fe314 --- /dev/null +++ b/test/E2ETest/testassets/projects/dapr-function-app/dapr-function-app.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 25.0.1706.3 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dapr-function-app", "function/dapr-function-app.csproj", "{0979B3EB-D56F-4402-A858-AB19B6D9B902}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0979B3EB-D56F-4402-A858-AB19B6D9B902}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0979B3EB-D56F-4402-A858-AB19B6D9B902}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0979B3EB-D56F-4402-A858-AB19B6D9B902}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0979B3EB-D56F-4402-A858-AB19B6D9B902}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {B9930E6C-6675-4B5A-8D01-5BEEABAF024D} + EndGlobalSection +EndGlobal diff --git a/test/E2ETest/testassets/projects/dapr-function-app/function/HttpTrigger.cs b/test/E2ETest/testassets/projects/dapr-function-app/function/HttpTrigger.cs new file mode 100644 index 000000000..b7f536e60 --- /dev/null +++ b/test/E2ETest/testassets/projects/dapr-function-app/function/HttpTrigger.cs @@ -0,0 +1,32 @@ +using System.Net; +using Microsoft.Azure.Functions.Worker; +using Microsoft.Azure.Functions.Worker.Http; +using Microsoft.Extensions.Logging; + +namespace dapr_function_app +{ + public class HttpTrigger1 + { + private readonly ILogger _logger; + + public HttpTrigger1(ILoggerFactory loggerFactory) + { + _logger = loggerFactory.CreateLogger(); + } + + [Function("HttpTrigger1")] + public HttpResponseData Run([HttpTrigger(AuthorizationLevel.Anonymous, "get", "post")] HttpRequestData req) + { + _logger.LogInformation("C# HTTP trigger function processed a request."); + + var response = req.CreateResponse(HttpStatusCode.OK); + response.Headers.Add("Content-Type", "text/plain; charset=utf-8"); + + response.WriteString("Welcome to Azure Functions!"); + + return response; + } + + + } +} diff --git a/test/E2ETest/testassets/projects/dapr-function-app/function/Program.cs b/test/E2ETest/testassets/projects/dapr-function-app/function/Program.cs new file mode 100644 index 000000000..1c6cb8e09 --- /dev/null +++ b/test/E2ETest/testassets/projects/dapr-function-app/function/Program.cs @@ -0,0 +1,18 @@ +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; + +internal class Program +{ + private static void Main(string[] args) + { + var host = new HostBuilder() + .ConfigureFunctionsWorkerDefaults(config => + { + config.Services.AddLogging(); + }) + .Build(); + + + host.Run(); + } +} \ No newline at end of file diff --git a/test/E2ETest/testassets/projects/dapr-function-app/function/Properties/launchSettings.json b/test/E2ETest/testassets/projects/dapr-function-app/function/Properties/launchSettings.json new file mode 100644 index 000000000..58c012189 --- /dev/null +++ b/test/E2ETest/testassets/projects/dapr-function-app/function/Properties/launchSettings.json @@ -0,0 +1,27 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:64181", + "sslPort": 44315 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "dapr": { + "commandName": "Project", + "launchBrowser": true, + "applicationUrl": "https://localhost:5001;http://localhost:5000", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/test/E2ETest/testassets/projects/dapr-function-app/function/appsettings.Development.json b/test/E2ETest/testassets/projects/dapr-function-app/function/appsettings.Development.json new file mode 100644 index 000000000..8983e0fc1 --- /dev/null +++ b/test/E2ETest/testassets/projects/dapr-function-app/function/appsettings.Development.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + } +} diff --git a/test/E2ETest/testassets/projects/dapr-function-app/function/appsettings.json b/test/E2ETest/testassets/projects/dapr-function-app/function/appsettings.json new file mode 100644 index 000000000..d9d9a9bff --- /dev/null +++ b/test/E2ETest/testassets/projects/dapr-function-app/function/appsettings.json @@ -0,0 +1,10 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "AllowedHosts": "*" +} diff --git a/test/E2ETest/testassets/projects/dapr-function-app/function/dapr-function-app.csproj b/test/E2ETest/testassets/projects/dapr-function-app/function/dapr-function-app.csproj new file mode 100644 index 000000000..9d671e6c8 --- /dev/null +++ b/test/E2ETest/testassets/projects/dapr-function-app/function/dapr-function-app.csproj @@ -0,0 +1,23 @@ + + + net7.0 + v4 + Exe + enable + + + + + + + + + PreserveNewest + + + PreserveNewest + Never + + + + \ No newline at end of file diff --git a/test/E2ETest/testassets/projects/dapr-function-app/function/host.json b/test/E2ETest/testassets/projects/dapr-function-app/function/host.json new file mode 100644 index 000000000..5df170b64 --- /dev/null +++ b/test/E2ETest/testassets/projects/dapr-function-app/function/host.json @@ -0,0 +1,12 @@ +{ + "version": "2.0", + "logging": { + "applicationInsights": { + "samplingSettings": { + "isEnabled": true, + "excludedTypes": "Request" + }, + "enableLiveMetricsFilters": true + } + } +} \ No newline at end of file diff --git a/test/E2ETest/testassets/projects/dapr-function-app/function/local.settings.json b/test/E2ETest/testassets/projects/dapr-function-app/function/local.settings.json new file mode 100644 index 000000000..f5bff4150 --- /dev/null +++ b/test/E2ETest/testassets/projects/dapr-function-app/function/local.settings.json @@ -0,0 +1,6 @@ +{ + "IsEncrypted": false, + "Values": { + "FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated" + } +} \ No newline at end of file diff --git a/test/E2ETest/testassets/projects/dapr-function-app/tye.yaml b/test/E2ETest/testassets/projects/dapr-function-app/tye.yaml new file mode 100644 index 000000000..1ccba26c4 --- /dev/null +++ b/test/E2ETest/testassets/projects/dapr-function-app/tye.yaml @@ -0,0 +1,8 @@ +name: dapr_test_application +extensions: +- name: dapr + config: tracing + log-level: debug +services: +- name: dapr-test-project + azureFunction: function/ \ No newline at end of file diff --git a/test/E2ETest/testassets/projects/dotnet-env-vars/tye.yaml b/test/E2ETest/testassets/projects/dotnet-env-vars/tye.yaml index 63b953906..3bcba44da 100644 --- a/test/E2ETest/testassets/projects/dotnet-env-vars/tye.yaml +++ b/test/E2ETest/testassets/projects/dotnet-env-vars/tye.yaml @@ -1,6 +1,10 @@ # tye application configuration file # read all about it at https://github.com/dotnet/tye name: dotnet-env-vars +extensions: + - name: dapr + config: tracing + log-level: debug dashboardPort: 8005 services: - name: test-project From e2806e66d550ed88ba77d3ca46560c71aa89aeb8 Mon Sep 17 00:00:00 2001 From: Phill Morton Date: Thu, 28 Sep 2023 12:27:17 +0100 Subject: [PATCH 2/8] add test for Dapr --- test/E2ETest/TyeRunTests.cs | 8 ++- .../.idea.dapr-function-app/.idea/.gitignore | 13 +++++ .../.idea.dapr-function-app/.idea/GitLink.xml | 6 +++ .../.idea/codestream.xml | 6 +++ .../.idea/encodings.xml | 4 ++ .../.idea/indexLayout.xml | 8 +++ .../.idea.dapr-function-app/.idea/vcs.xml | 6 +++ .../dapr-function-app/dapr-function-app.sln | 6 +++ .../dapr-function-app/dapr/Program.cs | 26 ++++++++++ .../dapr/Properties/launchSettings.json | 27 ++++++++++ .../dapr-function-app/dapr/Startup.cs | 51 +++++++++++++++++++ .../dapr/appsettings.Development.json | 9 ++++ .../dapr-function-app/dapr/appsettings.json | 10 ++++ .../dapr-function-app/dapr/dapr.csproj | 11 ++++ .../projects/dapr-function-app/tye.yaml | 4 +- 15 files changed, 193 insertions(+), 2 deletions(-) create mode 100644 test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/.gitignore create mode 100644 test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/GitLink.xml create mode 100644 test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/codestream.xml create mode 100644 test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/encodings.xml create mode 100644 test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/indexLayout.xml create mode 100644 test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/vcs.xml create mode 100644 test/E2ETest/testassets/projects/dapr-function-app/dapr/Program.cs create mode 100644 test/E2ETest/testassets/projects/dapr-function-app/dapr/Properties/launchSettings.json create mode 100644 test/E2ETest/testassets/projects/dapr-function-app/dapr/Startup.cs create mode 100644 test/E2ETest/testassets/projects/dapr-function-app/dapr/appsettings.Development.json create mode 100644 test/E2ETest/testassets/projects/dapr-function-app/dapr/appsettings.json create mode 100644 test/E2ETest/testassets/projects/dapr-function-app/dapr/dapr.csproj diff --git a/test/E2ETest/TyeRunTests.cs b/test/E2ETest/TyeRunTests.cs index 642d6c310..927c13307 100644 --- a/test/E2ETest/TyeRunTests.cs +++ b/test/E2ETest/TyeRunTests.cs @@ -148,9 +148,15 @@ public async Task DaprAzureFunctionTest() { var backendUri = await GetServiceUrl(client, uri, "dapr-test-project"); + await Task.Delay(10000); + var backendResponse = await client.GetAsync(backendUri); - + Assert.True(backendResponse.IsSuccessStatusCode); + + //The backend calls the Function app via Dapr InvokeMethod. So test that that func has a sidecar, and being proxied. + var responseContent = await backendResponse.Content.ReadAsStringAsync(); + Assert.Contains("Welcome to Azure Functions!", responseContent); }); } diff --git a/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/.gitignore b/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/.gitignore new file mode 100644 index 000000000..c122df2c9 --- /dev/null +++ b/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/.gitignore @@ -0,0 +1,13 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Rider ignored files +/modules.xml +/contentModel.xml +/.idea.dapr-function-app.iml +/projectSettingsUpdater.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/GitLink.xml b/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/GitLink.xml new file mode 100644 index 000000000..009597cc2 --- /dev/null +++ b/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/GitLink.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/codestream.xml b/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/codestream.xml new file mode 100644 index 000000000..bb40c10a4 --- /dev/null +++ b/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/codestream.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/encodings.xml b/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/encodings.xml new file mode 100644 index 000000000..df87cf951 --- /dev/null +++ b/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/encodings.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/indexLayout.xml b/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/indexLayout.xml new file mode 100644 index 000000000..7b08163ce --- /dev/null +++ b/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/indexLayout.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/vcs.xml b/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/vcs.xml new file mode 100644 index 000000000..bc5997070 --- /dev/null +++ b/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/test/E2ETest/testassets/projects/dapr-function-app/dapr-function-app.sln b/test/E2ETest/testassets/projects/dapr-function-app/dapr-function-app.sln index 5957fe314..9dbc4f09a 100644 --- a/test/E2ETest/testassets/projects/dapr-function-app/dapr-function-app.sln +++ b/test/E2ETest/testassets/projects/dapr-function-app/dapr-function-app.sln @@ -5,6 +5,8 @@ VisualStudioVersion = 25.0.1706.3 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dapr-function-app", "function/dapr-function-app.csproj", "{0979B3EB-D56F-4402-A858-AB19B6D9B902}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dapr", "dapr\dapr.csproj", "{8336F6C8-57F3-4D80-B4AF-CFE0A9DA446E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -15,6 +17,10 @@ Global {0979B3EB-D56F-4402-A858-AB19B6D9B902}.Debug|Any CPU.Build.0 = Debug|Any CPU {0979B3EB-D56F-4402-A858-AB19B6D9B902}.Release|Any CPU.ActiveCfg = Release|Any CPU {0979B3EB-D56F-4402-A858-AB19B6D9B902}.Release|Any CPU.Build.0 = Release|Any CPU + {8336F6C8-57F3-4D80-B4AF-CFE0A9DA446E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8336F6C8-57F3-4D80-B4AF-CFE0A9DA446E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8336F6C8-57F3-4D80-B4AF-CFE0A9DA446E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8336F6C8-57F3-4D80-B4AF-CFE0A9DA446E}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/test/E2ETest/testassets/projects/dapr-function-app/dapr/Program.cs b/test/E2ETest/testassets/projects/dapr-function-app/dapr/Program.cs new file mode 100644 index 000000000..7a886b792 --- /dev/null +++ b/test/E2ETest/testassets/projects/dapr-function-app/dapr/Program.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; + +namespace dapr +{ + public class Program + { + public static void Main(string[] args) + { + CreateHostBuilder(args).Build().Run(); + } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup(); + }); + } +} diff --git a/test/E2ETest/testassets/projects/dapr-function-app/dapr/Properties/launchSettings.json b/test/E2ETest/testassets/projects/dapr-function-app/dapr/Properties/launchSettings.json new file mode 100644 index 000000000..58c012189 --- /dev/null +++ b/test/E2ETest/testassets/projects/dapr-function-app/dapr/Properties/launchSettings.json @@ -0,0 +1,27 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:64181", + "sslPort": 44315 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "dapr": { + "commandName": "Project", + "launchBrowser": true, + "applicationUrl": "https://localhost:5001;http://localhost:5000", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/test/E2ETest/testassets/projects/dapr-function-app/dapr/Startup.cs b/test/E2ETest/testassets/projects/dapr-function-app/dapr/Startup.cs new file mode 100644 index 000000000..91d45e268 --- /dev/null +++ b/test/E2ETest/testassets/projects/dapr-function-app/dapr/Startup.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Http; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Dapr.Client; + +namespace dapr +{ + public class Startup + { + // This method gets called by the runtime. Use this method to add services to the container. + // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 + public void ConfigureServices(IServiceCollection services) + { + } + + // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. + public void Configure(IApplicationBuilder app, IWebHostEnvironment env) + { + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + + app.UseRouting(); + + app.UseEndpoints(endpoints => + { + endpoints.MapGet("/", async context => + { + var functionAppId = "dapr-function-app"; + var methodName = "api/HttpTrigger1"; + + + var daprClient = new DaprClientBuilder().Build(); + var daprRequest = daprClient.CreateInvokeMethodRequest(HttpMethod.Post, functionAppId, methodName); + + var response = await daprClient.InvokeMethodWithResponseAsync(daprRequest); + + await context.Response.WriteAsync(await response.Content.ReadAsStringAsync()); + }); + }); + } + } +} diff --git a/test/E2ETest/testassets/projects/dapr-function-app/dapr/appsettings.Development.json b/test/E2ETest/testassets/projects/dapr-function-app/dapr/appsettings.Development.json new file mode 100644 index 000000000..8983e0fc1 --- /dev/null +++ b/test/E2ETest/testassets/projects/dapr-function-app/dapr/appsettings.Development.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + } +} diff --git a/test/E2ETest/testassets/projects/dapr-function-app/dapr/appsettings.json b/test/E2ETest/testassets/projects/dapr-function-app/dapr/appsettings.json new file mode 100644 index 000000000..d9d9a9bff --- /dev/null +++ b/test/E2ETest/testassets/projects/dapr-function-app/dapr/appsettings.json @@ -0,0 +1,10 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "AllowedHosts": "*" +} diff --git a/test/E2ETest/testassets/projects/dapr-function-app/dapr/dapr.csproj b/test/E2ETest/testassets/projects/dapr-function-app/dapr/dapr.csproj new file mode 100644 index 000000000..891c0a146 --- /dev/null +++ b/test/E2ETest/testassets/projects/dapr-function-app/dapr/dapr.csproj @@ -0,0 +1,11 @@ + + + + net6.0 + + + + + + + diff --git a/test/E2ETest/testassets/projects/dapr-function-app/tye.yaml b/test/E2ETest/testassets/projects/dapr-function-app/tye.yaml index 1ccba26c4..bdc065eb8 100644 --- a/test/E2ETest/testassets/projects/dapr-function-app/tye.yaml +++ b/test/E2ETest/testassets/projects/dapr-function-app/tye.yaml @@ -4,5 +4,7 @@ extensions: config: tracing log-level: debug services: +- name: dapr-function-app + azureFunction: function/ - name: dapr-test-project - azureFunction: function/ \ No newline at end of file + project: dapr/dapr.csproj \ No newline at end of file From 9b5ab86f761a3efa31195c4af2c9bc1b600c3e7b Mon Sep 17 00:00:00 2001 From: Phill Morton Date: Thu, 28 Sep 2023 12:28:25 +0100 Subject: [PATCH 3/8] add code comments for test. --- test/E2ETest/TyeRunTests.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/E2ETest/TyeRunTests.cs b/test/E2ETest/TyeRunTests.cs index 927c13307..6ac1ec6fe 100644 --- a/test/E2ETest/TyeRunTests.cs +++ b/test/E2ETest/TyeRunTests.cs @@ -146,15 +146,16 @@ public async Task DaprAzureFunctionTest() await RunHostingApplication(application, new HostOptions(), async (app, uri) => { + //The backend calls the Function app via Dapr InvokeMethod. So test that that func has a sidecar, and being proxied. var backendUri = await GetServiceUrl(client, uri, "dapr-test-project"); - + + //Wait for the services to start await Task.Delay(10000); var backendResponse = await client.GetAsync(backendUri); Assert.True(backendResponse.IsSuccessStatusCode); - //The backend calls the Function app via Dapr InvokeMethod. So test that that func has a sidecar, and being proxied. var responseContent = await backendResponse.Content.ReadAsStringAsync(); Assert.Contains("Welcome to Azure Functions!", responseContent); }); From 1afdfd4756badde69f5fba76bb15073abe2901b5 Mon Sep 17 00:00:00 2001 From: Phill Morton Date: Thu, 28 Sep 2023 12:29:32 +0100 Subject: [PATCH 4/8] remove dapr from env vars test --- test/E2ETest/testassets/projects/dotnet-env-vars/tye.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/E2ETest/testassets/projects/dotnet-env-vars/tye.yaml b/test/E2ETest/testassets/projects/dotnet-env-vars/tye.yaml index 3bcba44da..63b953906 100644 --- a/test/E2ETest/testassets/projects/dotnet-env-vars/tye.yaml +++ b/test/E2ETest/testassets/projects/dotnet-env-vars/tye.yaml @@ -1,10 +1,6 @@ # tye application configuration file # read all about it at https://github.com/dotnet/tye name: dotnet-env-vars -extensions: - - name: dapr - config: tracing - log-level: debug dashboardPort: 8005 services: - name: test-project From 60810d33857ea5ca101c0cab824d7be6d6fc306b Mon Sep 17 00:00:00 2001 From: Phill Morton Date: Thu, 28 Sep 2023 12:30:15 +0100 Subject: [PATCH 5/8] ignore .idea --- .gitignore | 2 ++ .idea/.idea.tye/.idea/.gitignore | 13 ------------- .idea/.idea.tye/.idea/GitLink.xml | 6 ------ .idea/.idea.tye/.idea/codestream.xml | 6 ------ .idea/.idea.tye/.idea/indexLayout.xml | 8 -------- .idea/.idea.tye/.idea/vcs.xml | 6 ------ 6 files changed, 2 insertions(+), 39 deletions(-) delete mode 100644 .idea/.idea.tye/.idea/.gitignore delete mode 100644 .idea/.idea.tye/.idea/GitLink.xml delete mode 100644 .idea/.idea.tye/.idea/codestream.xml delete mode 100644 .idea/.idea.tye/.idea/indexLayout.xml delete mode 100644 .idea/.idea.tye/.idea/vcs.xml diff --git a/.gitignore b/.gitignore index 5931d2ed9..f09ca5887 100644 --- a/.gitignore +++ b/.gitignore @@ -353,3 +353,5 @@ MigrationBackup/ # Ionide (cross platform F# VS Code tools) working folder .ionide/ + +.idea/ diff --git a/.idea/.idea.tye/.idea/.gitignore b/.idea/.idea.tye/.idea/.gitignore deleted file mode 100644 index f7ad803b8..000000000 --- a/.idea/.idea.tye/.idea/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Rider ignored files -/contentModel.xml -/projectSettingsUpdater.xml -/modules.xml -/.idea.tye.iml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/.idea/.idea.tye/.idea/GitLink.xml b/.idea/.idea.tye/.idea/GitLink.xml deleted file mode 100644 index 009597cc2..000000000 --- a/.idea/.idea.tye/.idea/GitLink.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/.idea.tye/.idea/codestream.xml b/.idea/.idea.tye/.idea/codestream.xml deleted file mode 100644 index 83b274948..000000000 --- a/.idea/.idea.tye/.idea/codestream.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/.idea.tye/.idea/indexLayout.xml b/.idea/.idea.tye/.idea/indexLayout.xml deleted file mode 100644 index 7b08163ce..000000000 --- a/.idea/.idea.tye/.idea/indexLayout.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/.idea.tye/.idea/vcs.xml b/.idea/.idea.tye/.idea/vcs.xml deleted file mode 100644 index 35eb1ddfb..000000000 --- a/.idea/.idea.tye/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file From 28d3bd7d2ba1e86c94df7b31833945db6854b6d0 Mon Sep 17 00:00:00 2001 From: Phill Morton Date: Thu, 28 Sep 2023 12:38:04 +0100 Subject: [PATCH 6/8] remove rider files --- .../.idea/.idea.frontend-backend/.idea/.gitignore | 13 ------------- .../.idea/.idea.frontend-backend/.idea/.name | 1 - .../.idea/.idea.frontend-backend/.idea/GitLink.xml | 6 ------ .../.idea.frontend-backend/.idea/codestream.xml | 6 ------ .../.idea.frontend-backend/.idea/encodings.xml | 4 ---- .../.idea.frontend-backend/.idea/indexLayout.xml | 8 -------- .../.idea/.idea.frontend-backend/.idea/vcs.xml | 6 ------ .../.idea/.idea.dapr-function-app/.idea/.gitignore | 13 ------------- .../.idea/.idea.dapr-function-app/.idea/GitLink.xml | 6 ------ .../.idea.dapr-function-app/.idea/codestream.xml | 6 ------ .../.idea.dapr-function-app/.idea/encodings.xml | 4 ---- .../.idea.dapr-function-app/.idea/indexLayout.xml | 8 -------- .../.idea/.idea.dapr-function-app/.idea/vcs.xml | 6 ------ 13 files changed, 87 deletions(-) delete mode 100644 test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/.gitignore delete mode 100644 test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/.name delete mode 100644 test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/GitLink.xml delete mode 100644 test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/codestream.xml delete mode 100644 test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/encodings.xml delete mode 100644 test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/indexLayout.xml delete mode 100644 test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/vcs.xml delete mode 100644 test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/.gitignore delete mode 100644 test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/GitLink.xml delete mode 100644 test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/codestream.xml delete mode 100644 test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/encodings.xml delete mode 100644 test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/indexLayout.xml delete mode 100644 test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/vcs.xml diff --git a/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/.gitignore b/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/.gitignore deleted file mode 100644 index 1d782647e..000000000 --- a/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Rider ignored files -/modules.xml -/contentModel.xml -/.idea.frontend-backend.iml -/projectSettingsUpdater.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/.name b/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/.name deleted file mode 100644 index 059e0f12b..000000000 --- a/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -frontend-backend \ No newline at end of file diff --git a/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/GitLink.xml b/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/GitLink.xml deleted file mode 100644 index 009597cc2..000000000 --- a/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/GitLink.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/codestream.xml b/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/codestream.xml deleted file mode 100644 index 90f56a85f..000000000 --- a/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/codestream.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/encodings.xml b/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/encodings.xml deleted file mode 100644 index df87cf951..000000000 --- a/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/encodings.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/indexLayout.xml b/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/indexLayout.xml deleted file mode 100644 index 7b08163ce..000000000 --- a/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/indexLayout.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/vcs.xml b/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/vcs.xml deleted file mode 100644 index bc5997070..000000000 --- a/test/E2ETest/testassets/projects/azure-functions/.idea/.idea.frontend-backend/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/.gitignore b/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/.gitignore deleted file mode 100644 index c122df2c9..000000000 --- a/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Rider ignored files -/modules.xml -/contentModel.xml -/.idea.dapr-function-app.iml -/projectSettingsUpdater.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/GitLink.xml b/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/GitLink.xml deleted file mode 100644 index 009597cc2..000000000 --- a/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/GitLink.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/codestream.xml b/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/codestream.xml deleted file mode 100644 index bb40c10a4..000000000 --- a/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/codestream.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/encodings.xml b/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/encodings.xml deleted file mode 100644 index df87cf951..000000000 --- a/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/encodings.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/indexLayout.xml b/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/indexLayout.xml deleted file mode 100644 index 7b08163ce..000000000 --- a/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/indexLayout.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/vcs.xml b/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/vcs.xml deleted file mode 100644 index bc5997070..000000000 --- a/test/E2ETest/testassets/projects/dapr-function-app/.idea/.idea.dapr-function-app/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file From d8f25392566f461234aa061073f41dfc350200f9 Mon Sep 17 00:00:00 2001 From: Phill Morton Date: Thu, 28 Sep 2023 13:24:10 +0100 Subject: [PATCH 7/8] remove func app nuget from e2e tests --- test/E2ETest/Microsoft.Tye.E2ETests.csproj | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test/E2ETest/Microsoft.Tye.E2ETests.csproj b/test/E2ETest/Microsoft.Tye.E2ETests.csproj index 1c90e196d..f7c27d16e 100644 --- a/test/E2ETest/Microsoft.Tye.E2ETests.csproj +++ b/test/E2ETest/Microsoft.Tye.E2ETests.csproj @@ -1,4 +1,4 @@ - + @@ -15,7 +15,7 @@ The Microsoft.Build.Locator package takes care of dynamically loading these assemblies at runtime. We don't need/want to ship them, just to have them as references. --> - + @@ -30,9 +30,7 @@ - - - + From 1dc3b7309918df929ba7ef0a6d8297083c0db31a Mon Sep 17 00:00:00 2001 From: Phill Morton Date: Thu, 28 Sep 2023 13:31:13 +0100 Subject: [PATCH 8/8] remove inherited properties. My IDE treats these as warnings --- src/Microsoft.Tye.Core/AzureFunctionServiceBuilder.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Microsoft.Tye.Core/AzureFunctionServiceBuilder.cs b/src/Microsoft.Tye.Core/AzureFunctionServiceBuilder.cs index 21e964a52..a75e36a8c 100644 --- a/src/Microsoft.Tye.Core/AzureFunctionServiceBuilder.cs +++ b/src/Microsoft.Tye.Core/AzureFunctionServiceBuilder.cs @@ -14,12 +14,10 @@ public AzureFunctionServiceBuilder(string name, string path, ServiceSource sourc FunctionPath = path; } - public int Replicas { get; set; } = 1; public string? Args { get; set; } public string FunctionPath { get; } public string? FuncExecutablePath { get; set; } public string? ProjectFile { get; set; } public string? AzureFunctionsVersion { get; set; } - public List EnvironmentVariables { get; } = new List(); } }