From 0bb09e102b53ee674087cf4d5814b36cdf6c736c Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Mon, 27 Jul 2026 21:22:18 +0100 Subject: [PATCH] fix(deployment): declare the extract artifact's dependency on source The unarchive artifact reads source.tar.gz but never declared that the download artifact produces it, so the sidecar ran the extract even when the download had failed. Extracting a file that was never written fails with "unrecognized archive format", and because that error came last it was the one that aborted the job and reached the user, burying the download's real error. sourceSize already declared depends: 'source' for the same file; extract just never did. Needs the orchestrator-side change that skips artifacts whose dependency failed to have any effect on which error surfaces. Co-Authored-By: Claude Opus 5 --- src/Appwrite/Deployment/Backend/Orchestrator.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Deployment/Backend/Orchestrator.php b/src/Appwrite/Deployment/Backend/Orchestrator.php index 81a5ecd442..c7a9cdbadc 100644 --- a/src/Appwrite/Deployment/Backend/Orchestrator.php +++ b/src/Appwrite/Deployment/Backend/Orchestrator.php @@ -145,7 +145,7 @@ readonly class Orchestrator extends Backend $subdir = \trim($source['subdir'] ?? '', '/'); $sourceArtifacts = [ new DownloadArtifact(id: 'source', in: $source['url'], out: 'source.tar.gz'), - new UnarchiveArtifact(id: 'extract', in: 'source.tar.gz', out: 'source', subdir: $subdir !== '' ? $subdir : null, strip: true), + new UnarchiveArtifact(id: 'extract', in: 'source.tar.gz', out: 'source', subdir: $subdir !== '' ? $subdir : null, strip: true, depends: 'source'), // Appwrite never sees the remote source (the sidecar fetches it), // so unlike the uploaded-tarball path it can't size it. Stat the // downloaded archive so the orchestrator reports its byte size in @@ -165,7 +165,7 @@ readonly class Orchestrator extends Backend ]); $sourceArtifacts = [ new DownloadArtifact(id: 'source', in: $sourceUrl, out: 'source.tar.gz'), - new UnarchiveArtifact(id: 'extract', in: 'source.tar.gz', out: 'source'), + new UnarchiveArtifact(id: 'extract', in: 'source.tar.gz', out: 'source', depends: 'source'), ]; }