Skip to content

Conversation

@Sid-Heart
Copy link

Backport of old PR: #10690

Issue describing the changes in this PR

Logic app needs this supper because PAL worker we are running as part of our PAL project, looks for .spf libraries in either in CurrentDirectory or CurrentDirectory/lib.
So we need a support in functions app to set the working directory of a worker process. Currently it defaults to function app's location.

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: Link to backporting 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

We have tested the changes using a worker config like below to run a pal process in Linux. Test branch la-hybrid/v4.636.1

{
  "description": {
    "language": "dotnet-isolated",
    "extensions": [
      ".dll"
    ],
    "defaultExecutablePath": "{workerDirectoryPath}lapalfe",
    "executableWorkingDirectory": "{workerDirectoryPath}",
    "defaultWorkerPath": "lapalfe"
  },
  "processOptions": {
    "initializationTimeout": "00:00:30",
    "environmentReloadTimeout": "00:00:30"
  }
}

@Sid-Heart Sid-Heart requested a review from a team as a code owner December 24, 2025 12:53
Copilot AI review requested due to automatic review settings December 24, 2025 12:53
Copy link
Contributor

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 is a backport of #10690 that adds support for configuring a custom working directory for worker processes. Logic Apps PAL worker requires this feature because it searches for .spf libraries in either the current directory or current directory's lib subdirectory.

Key Changes:

  • Added ExecutableWorkingDirectory property to worker configuration that can be set via worker.config.json
  • Worker process now uses the configured working directory instead of defaulting to the function app's root directory
  • Test infrastructure refactored to support testing different worker configurations

Reviewed changes

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

Show a summary per file
File Description
src/WebJobs.Script/Workers/ProcessManagement/WorkerDescription.cs Added new ExecutableWorkingDirectory property with XML documentation
src/WebJobs.Script/Workers/Rpc/RpcWorkerDescription.cs Added FormatWorkingDirectoryIfNeeded() method to replace {workerDirectoryPath} placeholder
src/WebJobs.Script/Workers/Rpc/RpcWorkerProcess.cs Updated to use configured ExecutableWorkingDirectory with fallback to script root path
src/WebJobs.Script/Workers/Rpc/Configuration/RpcWorkerConfigFactory.cs Added call to format working directory during worker configuration initialization
src/WebJobs.Script/Workers/Profiles/WorkerDescriptionProfile.cs Extended profile support to include ExecutableWorkingDirectory
test/WebJobs.Script.Tests/Workers/Rpc/RpcWorkerProcessTests.cs Refactored test class to use helper method and added new test for working directory configuration
test/WebJobs.Script.Tests.Shared/TestHelpers.cs Added helper method to create test worker config with executable working directory

@Azure Azure deleted a comment from Copilot AI Dec 24, 2025
@Sid-Heart
Copy link
Author

@microsoft-github-policy-service agree company="Microsoft"

@microsoft-github-policy-service agree company="Microsoft"

@Azure Azure deleted a comment from Copilot AI Dec 24, 2025
@Azure Azure deleted a comment from Copilot AI Dec 24, 2025
@Sid-Heart
Copy link
Author

@kshyju @mathewc Please review!

@Sid-Heart Sid-Heart requested review from kshyju and mathewc December 24, 2025 13:05
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.

2 participants