[Logic Apps Hybrid] File System connection save PATCHes the container app and drops/repoints the /home/site/wwwroot volume mount, app fails to start

Aperta
#9,438 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
42/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
azure, typescript
Ambito
cloud, frontend

Direzione di ricerca

Inizia dal ramo hybrid di connectionCreationFunc in src/Extension/Client/React/Services/FileSystemConnectionCreationClient.ts, quindi confronta i file mirror indicati nell’issue. Traccia GET, la ricostruzione del template e il PATCH di corsFetch, verificando come vengono gestiti volumes e volumeMounts tra i container. Il lavoro è completato quando il salvataggio di una connessione File System conserva i mount esistenti /home/site/wwwroot e gli altri mount, e l’app continua ad avviarsi.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug needs-investigation

Platform

Azure Logic Apps Hybrid (runtime hosted on Azure Container Apps via a connected/Arc environment + custom location). Confirmed by internal repro (ADO 38598433). A parallel non-hybrid (Logic Apps Standard on App Service) path exists in the same client and is noted below.

Summary

Saving/creating a File System connection issues a raw ARM PATCH on the container app in which the /home/site/wwwroot volume mount is removed and its mountPath is repointed to the file-share mount instead. The runtime then can't find /home/site/wwwroot (host.json, workflow content), and the app fails to come up.

Internal repro (ADO 38598433, "[LA Hybrid] – App setting update is corrupting the volume mount configuration"):

the portal is messing up the volume mount in the PATCH request (removing /home/site/wwwroot and setting it to the fileshare name instead).

Where it happens (code)

FileSystemConnectionCreationClient.ts, hybrid branch:

  • AzureUX-LogicAppsPortal (prod portal, ADO): src/Extension/Client/React/Services/FileSystemConnectionCreationClient.ts — connectionCreationFunc, if (isHybrid) (~L167–247). A mirror also exists at src/Extension/Client/CodelessWorkflows/Services/FileSystemConnectionCreationClient.ts.
  • LogicAppsUX (OSS designer): apps/Standalone/src/designer/app/AzureLogicAppsDesigner/Services/FileSystemConnectionCreationClient.ts.

The flow:

  1. GET the container app and reconstruct a partial payload — keeping only location, extendedLocation, properties.environmentId, and properties.template.{volumes, containers[].{name,image,volumeMounts,env}} (drops properties.configuration, workloadProfileName, managedEnvironmentId, tags, systemData, and any container fields beyond the four mapped) (~L176–190).
  2. Prepend the new share to volumes/volumeMounts (~L216–230).
  3. Raw PATCH the reconstructed object back via corsFetch (~L232–241).

Root cause (hypothesis, code-grounded)

The client reconstructs and re-sends the whole template from a client-side GET rather than sending a minimal, additive delta. Because the reconstructed template.volumes/volumeMounts become the source of truth on write-back, any staleness or drift in the fetched revision — or a sibling flow that also reconstructs the template (e.g. the app-settings update path in the ADO repro) — results in the reserved /home/site/wwwroot mount being dropped or repointed. Reconstruct-and-PATCH of template is inherently fragile for a resource whose volume mounts must be preserved exactly.

Suggested fix direction

  • Do not reconstruct the container-app template. Re-fetch the latest revision and send an additive change that preserves all existing volumes/volumeMounts (and every other template/configuration field), keyed by a stable connector-specific volume name so the reserved /home/site/wwwroot mount is never touched.
  • Guard the reserved mount explicitly (never emit a volumeMount whose mountPath is /home/site/wwwroot for a connector volume).
  • Handle all containers, not only containers[0].

Impact

High — the app becomes unbootable after saving a File System connection (or, per the ADO repro, after an app-settings update on a hybrid app). Runtime is down until the mount is restored.

References

  • Internal work item: https://msazure.visualstudio.com/Antares/_workitems/edit/38598433 ("[LA Hybrid] – App setting update is corrupting the volume mount configuration", State: Done — but the File System connector path exhibits the same reconstruct-and-PATCH fragility).
  • Companion issue: #9439 (adding a new File System connector duplicates/overrides existing volume mount settings).
Lingua principale
TypeScript
Stelle
114
Fork
115
Merge medio
1g 3h
PR unite (30g)
40

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Azure/LogicAppsUX

Tutte le issue di Azure/LogicAppsUX

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.