Repository navigation
test(proxy): isolate deployment archives in parallel tests - #13507
Merged
Merged
Conversation
Contributor
Greptile SummaryThis PR prevents parallel Proxy E2E tests from truncating one another’s deployment archives.
Confidence Score: 5/5The PR appears safe to merge, with the archive isolation implemented consistently with existing E2E packaging helpers. No actionable regressions or outstanding repository-rule violations were identified in the current change. Important Files Changed
Reviews (2): Last reviewed commit: "Merge branch 'main' into fix/proxy-e2e-f..." | Re-trigger Greptile |
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
TorstenDittmann
approved these changes
Sep 6, 2026
| } | ||
|
|
||
| return new CURLFile($tarPath, 'application/x-gzip', \basename($tarPath)); | ||
| register_shutdown_function(static function () use ($tarPath) { |
Contributor
There was a problem hiding this comment.
Does this play nice with swoole?
Member
Author
There was a problem hiding this comment.
yeah the test here doesnt use swoole, its phpunit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix the Proxy E2E archive race by giving each site/function package a unique temporary path, following the existing
SitesBase::packageSiteandFunctionsBase::packageFunctionpattern.code.tar.gz, archive exclusions, and size limit.Root cause
Failing Proxy job on #13506
ProxyConsoleClientTest::testCreateRedirectRulewaited for a deployment that had already failed. Its sidecar log identifies the actual failure:CI runs Proxy with four-process functional ParaTest. Both Proxy classes use
ProxyHelpers, whose packaging methods overwrote the sametests/resources/sites/static/code.tar.gz(and equivalent function archive). A secondtarcan truncate that file after the first caller packages it but before itsCURLFileupload reads it. The resulting empty upload causes a real build failure, not slow deployment activation.Local E2E verification
Isolated dedicated-PostgreSQL Docker stack with the real API, worker, Redis, ClickHouse, DNS fixture, executor, orchestrator 2.1.0, and static/node build runtimes. Source baseline:
bd66764e20.archive source.tar.gz is emptygit diff --checkFull-suite command:
docker compose -f /tmp/proxy-compose.json exec -T appwrite \ vendor/bin/paratest --processes 4 --functional tests/e2e/Services/Proxy \ --exclude-group abuseEnabled --exclude-group screenshots --exclude-group antivirusControlled reproduction
A temporary
tarwrapper was placed on only the test process's PATH, not in the source tree or build runtimes. It forces the problematic interleaving:Both the baseline and fix ran
--processes 2 --functional --filter=testCreateRedirectRulethrough the real API/build pipeline. The baseline shares the path and fails with the exact CI sidecar error. The fix uses different paths, so the first archive stays intact. Function-rule verification used--filter=testCreateFunctionRule. Normal full-suite verification ran without the wrapper.Local runtime: ARM64 PHP 8.5.9; CI used PHP 8.5.10. Locked dependencies were installed with
--ignore-platform-req=ext-mongodbbecause the cached development image contains MongoDB extension 2.3.3 instead of 2.1.x. MongoDB was not used for these PostgreSQL tests.