Repository navigation
fix(deployments): require ownership on chunked upload resume - #13117
Closed
cursor[bot] wants to merge 9 commits into
Closed
cursor[bot] wants to merge 9 commits into
cursor[bot] wants to merge 9 commits into
Conversation
When createDeployment is resumed via x-appwrite-id, reject existing deployments that belong to another function/site or resource type instead of returning or mutating them. Adds a Functions e2e check. Co-authored-by: Chirag Aggarwal <[email protected]>
Co-authored-by: Chirag Aggarwal <[email protected]>
Contributor
Greptile SummaryThe PR prevents chunked deployment resumes and completed-upload short-circuits from crossing Function or Site ownership boundaries.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Reviews (6): Last reviewed commit: "Merge branch 'main' into fix/deployment-..." | Re-trigger Greptile |
Co-authored-by: Chirag Aggarwal <[email protected]>
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
x-appwrite-id is only applied when content-range is present; without it the handlers mint a fresh deployment ID and skip the ownership guard. Co-authored-by: Chirag Aggarwal <[email protected]>
Co-authored-by: Chirag Aggarwal <[email protected]>
Co-authored-by: Chirag Aggarwal <[email protected]>
Co-authored-by: Chirag Aggarwal <[email protected]>
2 of 4 tasks
Meldiron
approved these changes
Aug 6, 2026
Keep both ownership e2e tests: duplicate deployment from main and upload resume from this branch. Co-authored-by: Cursor <[email protected]>
Keep the partial-resume ownership test landed via #13118. Co-authored-by: Cursor <[email protected]>
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.
What does this PR do?
POST .../deploymentswithx-appwrite-idloads an existing deployment to resume a chunked upload (or short-circuit when already complete) without checking that it belongs to the function/site in the URL. A caller could pass another resource's deployment ID and receive its completed deployment or continue mutating its upload state.Adds
resourceId+resourceTypeguards in both Functions and SitesDeployments/Create(both lock callbacks), matching Get/Delete/Status/Duplicate. IncludestestCreateDeploymentResumeRequiresOwnership.Test Plan
x-appwrite-id→ 404deployment_not_foundRelated PRs and Issues
Checklist