Skip to content

Conversation

krishnajaju
Copy link

@krishnajaju krishnajaju commented Sep 19, 2025

Issue describing the changes in this PR

Set IsFileSystemReadOnly to true by default for Functions on Container Apps to prevent unintended file system behaviours

resolves #11337

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

Additional PR information

@krishnajaju krishnajaju requested a review from a team as a code owner September 19, 2025 10:25
@Copilot Copilot AI review requested due to automatic review settings September 19, 2025 10:25
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

Sets Functions running on Azure Container Apps to use a read-only file system by default by short-circuiting in the zip/run-from-package detection logic.

  • Adds an early return in IsZipDeployment when running in a Managed (Container Apps) environment.
  • Updates XML doc comment to clarify that Managed App environment refers to Azure Container Apps.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/WebJobs.Script/Environment/EnvironmentExtensions.cs Comment clarified to reference Azure Container Apps.
src/WebJobs.Script.WebHost/Configuration/ScriptApplicationHostOptionsSetup.cs Added early return treating Container Apps as read-only (run-from-package equivalent).

@@ -66,7 +66,7 @@ public void Configure(string name, ScriptApplicationHostOptions options)
options.IsStandbyConfiguration = true;
}

options.IsFileSystemReadOnly |= IsZipDeployment(out bool isScmRunFromPackage);
options.IsFileSystemReadOnly |= IsZipDeployment(out bool isScmRunFromPackage) || _environment.IsManagedAppEnvironment();
Copy link
Member

Choose a reason for hiding this comment

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

Recommend moving your logic into IsZipDeploymente so it's consistent with the other skus

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.

Set IsFileSystemReadOnly to true by default for Functions on Container Apps
2 participants