Skip to content

Conversation

apranaseth
Copy link
Member

@apranaseth apranaseth commented Sep 26, 2025

This is to enable worker indexing for Logic Apps workflow app kind behind an environment variable. The settings used by Logic Apps are "FUNCTIONS_INPROC_NET8_ENABLED": "1", "FUNCTIONS_WORKER_RUNTIME": "dotnet" and we are bringing up a "dotnet" worker.

resolves #11386

Pull request checklist

IMPORTANT: Currently, changes must be backported to the in-proc branch to be included in Core Tools and non-Flex deployments.

  • Backporting to the in-proc branch is not required
    • Otherwise: This is the in-proc PR
  • [> ] My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • My changes should not be added to the release notes for the next release
    • Otherwise: I've added my notes to release_notes.md
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • My changes do not require diagnostic events changes
    • Otherwise: I have added/updated all related diagnostic events and their documentation (Documentation issue linked to PR)
  • I have added all required tests (Unit tests, E2E tests)

Additional information

Additional PR information

@apranaseth apranaseth requested a review from a team as a code owner September 26, 2025 18:42
@Copilot Copilot AI review requested due to automatic review settings September 26, 2025 18:42
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enables worker indexing for Logic Apps when they operate in codeful mode, controlled by the WORKFLOW_CODEFUL_ENABLED environment variable. This allows Logic Apps with .NET codeful functions to leverage worker-based indexing while maintaining backward compatibility for traditional Logic Apps.

  • Adds a new environment variable check for Logic App codeful mode
  • Modifies worker indexing logic to allow indexing for Logic Apps when codeful mode is enabled
  • Disables runtime/payload metadata mismatch validation for Logic Apps in codeful mode

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/WebJobs.Script/Environment/EnvironmentSettingNames.cs Adds the new environment variable constant for Logic App codeful mode
src/WebJobs.Script/Environment/EnvironmentExtensions.cs Implements the extension method to check if Logic App codeful mode is enabled
src/WebJobs.Script/Utility.cs Updates worker indexing logic to allow indexing for Logic Apps in codeful mode
src/WebJobs.Script/Host/ScriptHost.cs Disables runtime/payload metadata validation for Logic Apps in codeful mode

if (!cancellationToken.IsCancellationRequested)
{
bool throwOnWorkerRuntimeAndPayloadMetadataMismatch = true;
bool throwOnWorkerRuntimeAndPayloadMetadataMismatch = _environment.IsLogicApp() && _environment.IsLogicAppCodefulModeEnabled() ? false: true;
Copy link
Preview

Copilot AI Sep 26, 2025

Choose a reason for hiding this comment

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

The ternary operator can be simplified. Since the condition already evaluates to a boolean, you can negate it directly: bool throwOnWorkerRuntimeAndPayloadMetadataMismatch = !(_environment.IsLogicApp() && _environment.IsLogicAppCodefulModeEnabled());

Suggested change
bool throwOnWorkerRuntimeAndPayloadMetadataMismatch = _environment.IsLogicApp() && _environment.IsLogicAppCodefulModeEnabled() ? false: true;
bool throwOnWorkerRuntimeAndPayloadMetadataMismatch = !(_environment.IsLogicApp() && _environment.IsLogicAppCodefulModeEnabled());

Copilot uses AI. Check for mistakes.

@jviau
Copy link
Contributor

jviau commented Oct 1, 2025

@apranaseth you will need to rebase off in-proc branch to fix your CI build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants