0626b9fc8a
gates / gates (push) Successful in 46s
Tier-2 and the one-copy notice ask the host agent (POST /disks/same-disk, agent 0.157.0): different + proven -> made and counted; same disk -> not made (D1); unknown (VM, hidden USB serial) -> made, not counted, the row says why (D2); a NAS never counts and no longer hides the notice (R-1075). An older agent keeps the st_dev rule, logged once. D4: a data-folder or media app on a box with no drive is refused in words with a link to the drives page (R-1068's raw-error half). MinAgent 0.157.0. Claude-Session: https://claude.ai/code/session_012qRErfCoiTkvDK9N5XHbzb
42 lines
2.6 KiB
Go
42 lines
2.6 KiB
Go
package stacks
|
|
|
|
import (
|
|
"errors"
|
|
)
|
|
|
|
// R-553 — the deploy path's refusals carry a KIND, so the API can pick its status code without
|
|
// reading the customer's Hungarian sentence. The sentences themselves are unchanged (a test pins
|
|
// each one byte-for-byte); `internal/util.KindErrorf` builds the message exactly as fmt.Errorf did.
|
|
//
|
|
// Before this, internal/api/router.go matched „kötelező", „memória", "does not exist" and
|
|
// "already deployed" in the error text — so localisation slice 2 would have turned every validation
|
|
// refusal into a 500.
|
|
var (
|
|
// ErrAlreadyDeployed — the stack is already deployed (API: 409).
|
|
ErrAlreadyDeployed = errors.New("stack already deployed")
|
|
// ErrRequiredField — a required (or password) field was left empty (API: 400).
|
|
ErrRequiredField = errors.New("required field empty")
|
|
// ErrPathMissing — a path field names something that is not on the filesystem (API: 400).
|
|
ErrPathMissing = errors.New("path field does not exist")
|
|
// ErrNotEnoughMemory — the memory verdict refused the deploy (API: 400).
|
|
ErrNotEnoughMemory = errors.New("not enough memory")
|
|
// ErrKeptDataChoice — the app's drive folder already holds old data and the install named neither
|
|
// „use my kept data" nor „start fresh" (`09` §3 decision 36; API: 409 with code kept_data_choice).
|
|
ErrKeptDataChoice = errors.New("kept data: a choice is needed")
|
|
// ErrStackDeploying — R-634 (v0.265.0): a stop or start was asked of a stack whose deploy is still
|
|
// running. Refused, because a `compose down` or a second `compose up -d` in the middle of the
|
|
// deploy's own `up` makes BOTH fail, and the deploy then records „not deployed" over whatever
|
|
// containers the race left behind. Pinned by TestR634_StopAndStartRefuseADeployingStack.
|
|
ErrStackDeploying = errors.New("stack is being deployed")
|
|
// ErrNeedsDrive — a data-folder or media app on a box with NO drive (felhom.eu architecture/
|
|
// 16-storage-physical-identity.md §5, D4; R-1068). API: 400 with code "needs_drive" and a link to the
|
|
// drives page; the sentence never names the field. Pinned by TestD4_NoDriveRefusalSpeaksInWords.
|
|
ErrNeedsDrive = errors.New("a storage drive is needed")
|
|
)
|
|
|
|
// KeyMemoryOvercommitWarning is the soft overcommit warning's bundle key. It travels as a KEY from
|
|
// memoryVerdict through DeployStack to the API, which renders it in the request's language (R-575 —
|
|
// it used to be rendered here in Hungarian, so an English page showed a Hungarian line). Pinned by
|
|
// TestR575_OvercommitWarningFollowsTheLanguage.
|
|
const KeyMemoryOvercommitWarning = "err.stacks.memory_overcommit_warning"
|