Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/WebJobs.Script/Host/ScriptHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ internal async Task<Collection<FunctionDescriptor>> GetFunctionDescriptorsAsync(
bool payloadMatchesWorkerRuntime = ValidateAndLogRuntimeMismatch(functions, workerRuntime, _hostingConfigOptions, _logger);
if (!payloadMatchesWorkerRuntime)
{
UpdateFunctionMetadataLanguageForDotnetAssembly(functions, workerRuntime);
UpdateFunctionMetadataLanguageForDotnetAssembly(functions, workerRuntime, _environment.IsLogicApp());
throwOnWorkerRuntimeAndPayloadMetadataMismatch = false; // we do not want to throw an exception in this case
}
}
Expand Down Expand Up @@ -860,8 +860,14 @@ internal async Task<Collection<FunctionDescriptor>> GetFunctionDescriptorsAsync(
return functionDescriptors;
}

private static void UpdateFunctionMetadataLanguageForDotnetAssembly(IEnumerable<FunctionMetadata> functions, string workerRuntime)
private static void UpdateFunctionMetadataLanguageForDotnetAssembly(IEnumerable<FunctionMetadata> functions, string workerRuntime, bool isLogicApp)
{
if (isLogicApp)
{
// For Logic Apps, we want to keep the language as DotNetAssembly to avoid breaking changes.
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment states "For Logic Apps, we want to keep the language as DotNetAssembly to avoid breaking changes," but based on the PR description and the implementation, the more accurate statement would be: "For Logic Apps (workflowApp), preserve the original function language metadata without modification." The current implementation prevents any language modification for Logic Apps, not just keeping it as DotNetAssembly specifically.

Suggested change
// For Logic Apps, we want to keep the language as DotNetAssembly to avoid breaking changes.
// For Logic Apps (workflowApp), preserve the original function language metadata without modification.

Copilot uses AI. Check for mistakes.
return;
}

foreach (var function in functions)
{
if (function.Language == DotNetScriptTypes.DotNetAssembly)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,17 @@ public async Task CodelessFunction_CanUse_SingleJavaLanguageProviders()
/// Runs tests with Node language provider function.
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The XML documentation comment "Runs tests with Node language provider function" is incomplete. The test now covers multiple scenarios including both C# (DotNetAssembly) and JavaScript (Node) language providers, with different worker runtime configurations (dotnet and dotnet-isolated). Consider updating the summary to reflect this, for example: "Runs tests with multiple language providers (C# and JavaScript) to verify workflowApp behavior with different worker runtimes."

Suggested change
/// Runs tests with Node language provider function.
/// Runs tests with multiple language providers (C# and JavaScript) to verify workflowApp behavior with different worker runtimes.

Copilot uses AI. Check for mistakes.
/// </summary>
[Theory]
[InlineData(true)]
[InlineData(false)]
public async Task CodelessFunction_CanUse_SingleJavascriptLanguageProviders(bool enableDynamicWorkerResolution)
[InlineData(true, "dotnet")]
[InlineData(false, "dotnet")]
[InlineData(true, "dotnet-isolated")]
[InlineData(false, "dotnet-isolated")]
public async Task CodelessFunction_CanUse_SingleJavascriptLanguageProviders(bool enableDynamicWorkerResolution, string functionWorkerRuntime)
{
var sourceFunctionApp = Path.Combine(Environment.CurrentDirectory, "TestScripts", "NoFunction");
var settings = new Dictionary<string, string>()
{
[EnvironmentSettingNames.AppKind] = "workflowApp",
[EnvironmentSettingNames.FunctionWorkerRuntime] = functionWorkerRuntime,
};
var testEnvironment = new TestEnvironment(settings);

Expand Down
Loading