What
Staging is how files are copied into a session, for example in cloud sessions. Failures that will never succeed on a retry are now tagged permanent: true, where before they only reported failure and an error message.
- HTTP 4xx errors are permanent, except 408 (timeout) and 429 (too many requests).
- These file-system errors are permanent:
ENAMETOOLONG,ENOSPC,EDQUOT,EFBIG,EISDIR,ENOTDIR,EINVAL,ELOOP,ENOTEMPTY, andSTAGE_PARENT_ESCAPE(a file trying to land outside its allowed folder). - Fetches blocked by a gate are permanent. The "list gated" error used to print the wrong value as its reason; it now shows the real reason (
list gated: ${r.reason}). - The record of a completed staging gains a
replacedfield, and overwriting a file with different contents is logged as a warning.
Why
Callers can stop retrying uploads that cannot work, such as a full disk or a name that is too long, instead of looping. A gated list now explains itself with a readable reason.