← Back to issue list

trying to upload a delta if delta service is disabled fails

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1780851
Type
issue
State
closed
Author
~roadmr
Labels
—
Created
Updated
Closed

Current evaluation

Fixed by merged PR #2181 (commit 5437f01ca), restoring fallback to a full-snap upload when the Store rejects deltas with HTTP 501.

Resolution: closed resolved

Reason: PR #2181 was merged as commit 5437f01ca and correctly handled the Store's feature-disabled 501 response. Snapcraft again reports that delta uploads are disabled and retries with the full snap.

Evaluated by: mr-cal-bot

No scores available.

Issue body

If upload deltas are disabled on the snap store servers, snapcraft fails like this when trying to upload a delta (easy way to ensure it's a delta upload: push two revisions of the same snap, one after the other). After pushing, an attempt will be made to release to 'edge' Preparing to push '/home/ubuntu/minisnap/hello-roadmr-1_2018-07-09-02_amd64.snap' to the store. Found cached source snap /home/ubuntu/.cache/snapcraft/projects/hello-roadmr-1/snap_hashes/amd64/81d67619708155032388f69f382e0975d7c9dbdce6ec25590c1e6faf844b155ca307966c9c1af8e6b29ebfe44dcc0c68. Generating xdelta3 delta for hello-roadmr-1_2018-07-09-02_amd64.snap. Pushing delta /home/ubuntu/minisnap/hello-roadmr-1_2018-07-09-02_amd64.snap.xdelta3. Pushing hello-roadmr-1_2018-07-09-02_amd64.snap.xdelta3 [==========================================] 100% The Snap Store encountered an error while processing your request: not implemented (code 501). The operational status of the Snap Store can be checked at https://status.snapcraft.io/ > snapcraft --version snapcraft, version 2.42.1+18.4 > lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04 LTS Release: 18.04 Codename: bionic this regressed in 2.42.1, because with 2.42 things work well, snapcraft gets the same 501 code from the store (which means deltas are not available/not implemented) and falls back to a full-snap upload (with a nice error saying delta support is disabled): Pushing hello-roadmr-1_2018-07-09-02_amd64.snap After pushing, an attempt will be made to release to 'edge' Preparing to push '/home/ubuntu/minisnap/hello-roadmr-1_2018-07-09-02_amd64.snap' to the store. Found cached source snap /home/ubuntu/.cache/snapcraft/projects/hello-roadmr-1/snap_hashes/amd64/81d67619708155032388f69f382e0975d7c9dbdce6ec25590c1e6faf844b155ca307966c9c1af8e6b29ebfe44dcc0c68. Generating xdelta3 delta for hello-roadmr-1_2018-07-09-02_amd64.snap. Pushing delta /home/ubuntu/minisnap/hello-roadmr-1_2018-07-09-02_amd64.snap.xdelta3. Pushing hello-roadmr-1_2018-07-09-02_amd64.snap.xdelta3 [==========================================] 100% Unable to push delta to store: The delta upload support is currently disabled. Falling back to pushing full snap... Pushing hello-roadmr-1_2018-07-09-02_amd64.snap [==================================================] 100% Processing...| Ready to release! Revision 51 of 'hello-roadmr-1' created. Track Arch Channel Version Revision Expires at latest amd64 stable 2018-06-08-01 47 candidate ^ ^ beta ^ ^ edge 2018-07-09-02 51 stable/mybranch 2018-06-08-01 47 2018-07-15T21:44:58.667374 We think the commit that regressed here was: https://github.com/snapcore/snapcraft/commit/c6500ca0ed3cf4fe564a15adfb0a46ff0a3a787f storeapi: handle 5xx error codes for all store endpoints (#2116) Currently, the snapcraft CLI handles a 500 response when releasing a snap. Make this more robust, and nicely handle 5xx codes for all endpoints. As reference, the response when deltas are disabled is that 501 HTTP status code with this payload: {"error_list": [{"message": "The delta upload support is currently disabled.", "code": "feature-disabled"}]}

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed by merged PR #2181 (commit 5437f01ca), restoring fallback to a full-snap upload when the Store rejects deltas with HTTP 501.
stealth/space-bunny-alpha — closed resolved Restored full-snap fallback when delta uploads return HTTP 501 via PR #2181 (commit 5437f01ca).
stealth/space-bunny-alpha — closed resolved Delta-upload HTTP 501 fallback was restored by merged PR #2181 (commit 5437f01ca), fixing the regression in structured Store API error handling.
stealth/space-bunny-alpha — closed resolved Fixed by merged PR #2181 (commit 5437f01ca), restoring HTTP 501 handling for disabled deltas and falling back to a full upload; regression tests reference LP: #1780851.
qwen/qwen3.6-35b-a3b — — Fixed regression in v2.42.1 where disabled delta uploads triggered a 501 error. Resolution restored graceful 5xx handling to detect feature-disabled responses and automatically fall back to full snap uploads.
qwen/qwen3.6-35b-a3b — — Closed without documented resolution. The regression caused snapcraft 2.42.1 to fail delta uploads with a 501 error instead of falling back to full uploads when the delta service is disabled.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcore/snapcraft#2181 (confidence 100%)

    The merged PR explicitly fixes handling of disabled delta uploads.

Related issues

Issue Project State Summary Similarity
#1196 store: enable delta uploads by default when pushing. snapcraft merged Merged PR #1196 enabled delta uploads by default for store pushes, resolving Launchpad #1673455; recorded in commit 3b13bbd1a.
74%
#940 store: implement delta uploads in push. snapcraft merged Merged PR #940 as commit 05ba34a32, adding store-push delta uploads with SHA3-384 caching and fallback to full uploads when deltas fail or are too large.
74%
#2181 store: properly handle disabled deltas snapcraft merged Merged #2181 in commit 5437f01ca, restoring HTTP 501 handling for disabled store deltas and adding regression tests for LP #1780851.
73%
#1673455 enable delta uploads by default snapcraft (launchpad) closed Delta uploads were enabled by default for Snap Store pushes by merged canonical/snapcraft#1196 (commit 3b13bbd1a).
73%
#1345 deltas: Improved message returned when delta is too big snapcraft merged Merged PR #1345 as commit 6295fd828, improving the oversized-delta warning to show the delta size before uploading the full snap.
72%