Changelog¶
The changelog documents the history of changes and version releases for Piceli.
For detailed information on each version, please visit the Piceli GitHub Releases page.
Version 0.99.1¶
The prune line agrees with its count (ops#120)¶
The host agent’s
piceli.host.pruneevent says “1 generation deleted” and “3 generations deleted” (it said “1 generations”). The count stays in the event’spiceli.deletedfield.
Version 0.99.0¶
Records-only commits start no run (ops#119)¶
Source(records=["config/signatures/**", ...])names paths that change no environment’s run (*stays within one path segment;**crosses segments). A followed branch that moves by a fast-forward touching only those paths starts no run. The log says so, and the environment keeps its revision. A force-push, a first sight or a Git error runs as before.Such a commit counts as verified through the commit whose run it follows (
viain the record of passed commits):Promotionandpiceli promoteaccept it, and the plan names that run. Candidates skip it.
A release candidate holds the whole release (ops#119)¶
Candidate(steps=[Step(...)]): once the copies are done, each step runs its command on a build host, in a checkout of the release source. It gets the candidate’s record (PICELI_CANDIDATE_FILE) and its secrets. Piceli commits the files it changed and pushes them with that host’s own Git write credential. Only paths that match the step’srecordsand the source’s records are allowed. The command comes from the build host’s own composition, never from the controller.Candidate(releases=[web_release]): when the head ofrelease_branchpins the candidate’s commit inflake.lock, Piceli prebuilds the release (closure signed and pushed to the cache, manifest uploaded, no pointer).readywaits for every prebuild. A later tag at that commit is a pointer-only publish: the build host checks the prebuilt closure and writes the tag’s manifest and pointer, and builds nothing.Candidate(rehearse=[canary_release]): the build host points a canary host (one that followsBranch(...)) at the prebuilt closure. It then reads the host’s status over SSH until the deploy and its checks passed, failed or timed out.readywaits for it; a failure iscandidate-rehearsal-failed, with the host’s reason.piceli gitops candidate listshows each step, release and rehearsal.
Version 0.98.0¶
Scheduling values for named workloads (ops#118)¶
HelmChart(scheduling=["web"])givesnodeSelector,tolerationsandaffinityonly to the named workloads; a DaemonSet that runs on every node keeps its own. The storage probe’s Job and pod get them when the workload whose claim it probes is named. A name that is not a workload of the bundle, an empty list or a bare string is refused withbundle-invalid.scheduling=Trueis still every workload.
Version 0.97.0¶
A storage probe that needs nothing from the app’s images (ops#115)¶
StorageProbe()withoutimage=runs Piceli’s controller image, pinned by digest in Piceli (piceli.bundle.probe.DEFAULT_IMAGE, the 0.96.0 image), with a Python version of the probe: the same API calls and the same lines as theshandcurlscript. Distroless andscratchapp images now work.image.registryrewrites its host for a mirror;image=keeps theshscript.
Where the pods run (ops#115)¶
HelmChart(scheduling=True)adds the valuesnodeSelector,tolerationsandaffinity. Every workload gets them, merged with its own (the value wins on a key; tolerations are added). The storage probe’s Job and pod get them too (ofaffinity, onlynodeAffinity). So--set nodeSelector.pool=xputs the app and the probe’s volume on one node pool. Charts without it render byte for byte as in 0.96.0.
Version 0.96.0¶
A failed copy names its check, and a candidate tries it again (ops#100)¶
copy-verification-failedsays which read-back check failed and what it compared: the manifest digest read back, the tag, the served bytes, a platform manifest or a referrer, for exampletag 1.4.0: the target names nothing, not sha256:…. It is the copy receipt’smessage, the copy set’sdetail(report and ledger) and a candidate’sdetail(<component>: <text>).A release candidate whose copy fails with
copy-verification-failedorcopy-failedis tried again with the candidate backoff (60 s, then 5, 15 and 30 minutes, at most five tries), as a registry that does not answer already is. A registry still settling after a push no longer leaves the candidate failed until someone requests it.
Version 0.95.0¶
Chart values that need other values (ops#116)¶
HelmOptional(when=[...])renders a value’s objects, and applies its patches, only when every listed value is true too: one{{- if and (A) (B) }}, each value read as before (default_on_reuseincluded). It names toggles or optional values, and gates whole objects.HelmChart(requires={"collector.enabled": ["intake.expose"]})fails the install withcollector.enabled=true needs intake.expose=truewhen the first is true and the second is not.values.yaml,values.schema.jsonand the chart’s README note each dependency. Unknown names, a value naming itself, a cycle and defaults that would fail the default install are refused withbundle-invalid.Charts that use neither render byte for byte as in 0.94.0.
An install note for an optional value (ops#117)¶
HelmOptional(note="...")prints one line in the install notes (NOTES.txt) only when the value’s objects render (whenincluded); it is a template line ({{ .Release.Namespace }}works), and the chart’s README lists it next to the value.
An image may read no context¶
contexts = []on an[[output.image]]is accepted: the image’s key is its own tables only, so an OpenTelemetry Collector image built from itscollectortable (0.94.0) is not rebuilt for every source change.
Version 0.94.0¶
An OpenTelemetry Collector image built with OCB (ops#115)¶
Host builds can build an OpenTelemetry Collector image with OCB (OpenTelemetry Collector Builder). An
[output.image.collector]table lists only the components you want, as short names or full module pins (a stable module such ask8sattributesprocessorv1.x needs its full pin).Piceli writes the manifest and builds a static binary for each platform with the Go that the new
build.toolchains.gopins (a version, or a go.modtoolchainline, checked against go.dev)./THIRD-PARTY-NOTICESis written from the licence and NOTICE files of every linked Go module, Go’s own included. The SBOM (software bill of materials) lists each module aspkg:golang, and the provenance records the collector version, the components and the manifest’s sha256.New errors:
collector-notices-failed,collector-licence-missing.
Every image is scanned for known vulnerabilities (ops#115)¶
Images are scanned for known CVEs (Common Vulnerabilities and Exposures) with Grype 0.122.1, pinned by sha256: each host-build archive before it is pushed or recorded, each mirror copy before it is ready, and the source of
piceli artifacts copybefore anything is copied.A Critical finding with a fixed version fails with
image-vulnerable. A waiver needs a reason and an end date ([scan] ignoreinhost-build.toml,--scan-policy FILEorPICELI_SCAN_POLICY).Receipts record
scans(scanner version, database build time, counts by severity, waived ids), andattestations/<image>.scan.jsonsits beside the SBOM. Turning scanning off ([scan] enabled = false,--no-scan) is recorded as"scan": "off".New errors:
image-vulnerable,image-scan-failed,image-scanner-checksum,scan-policy-invalid.
A storage probe before a chart’s install (ops#115)¶
HelmChart(storage_probe=StorageProbe(image=..., timeout_seconds=180, size="1Gi"))adds Helmpre-installhooks. A Job (shandcurl) creates a claim instorageClassand a pod that mounts it, then deletes both once the pod runs.Otherwise the install stops before any app object, with one line that names the newest warning event (
FailedAttachVolume,ProvisioningFailed,FailedScheduling) and the storage classes to try. Helm 4 prints that line; Argo CD shows it as the termination message.Values
storageProbe.enabled(default true) andstorageProbe.timeoutSeconds. Every hook object passes the safety gate; the ClusterRole only reads storage classes. Chart only, and only for an app with a claim.
Version 0.93.0¶
The canary checks compositions with derived images (ops#114)¶
gitops enable --canaryrefused every composition with derived images (0.89.0): its dry builder could build, mirror and copy, but not append, so the resolve stage failed withcomponent-build-unsupported(“this controller’s builder cannot append derived images”), although the live controller deploys the same composition.The canary now appends them dry, as it builds: the live controller’s image for the same key is reused, any other gets a placeholder and is listed in the environment’s
derives. Its line saysappends N derived images.
Version 0.92.0¶
Cluster init replaces a development cache that cannot grow (ops#113)¶
A refused object no longer stops
piceli cluster init --approve: every other object is applied, then init fails withcluster-init-partial, listing each refused object with the API’s own reason. Before, a cache claim that could not grow kept the development config from being applied.The plan says
replacefor the claimpiceli-dev-cachewhencache_sizeasks for a size it cannot reach in place: smaller, or larger on a storage class that cannot resize it (allowVolumeExpansionnottrue, or a volume the class did not provision), or another storage class. Applying it sets aRetainvolume toDelete, deletes the claim, and creates it again at the new size; the cache rebuilds. A claim in use by a running pod is left as it is and reported.Every API refusal names the API’s reason (the
Statusmessage) after the HTTP status. A 403 that is not RBAC (an admission refusal) is reported asrefused, notdenied.
Version 0.91.0¶
A tailnet device that is a node reaches the LoadBalancer companions (ops#112)¶
The Tailscale operator marks a companion’s tailnet IP
ipMode: VIP, so kube-proxy on every node sends it straight to the pod, and the packet comes from the node, not from the operator’s proxy. The ingress policies admitted only the operator’s namespace, so a tailnet device that is also a cluster node was refused (for example a TURN server’s port 3478).env upand the GitOps controller now read the nodes when an environment declaresAccess(tailnet=True)and add a second rule on the ports of the plain companions: each node’sInternalIPand the first two addresses of its pod range (flannel.1andcni0on flannel). Ports served by a TailscaleIngress(https=True) are not opened to the nodes. Nothing is widened beyond those ports.The plan’s
accesslists them asnodes. When the nodes cannot be listed,env upsays so and admits only the operator, as before.
Version 0.90.0¶
The development cache’s budget follows its disk (ops#111)¶
DevBuilds(cache_free_share=)(default0.5,0turns it off): the budget of a run is the smaller ofcache_budget×cache_sizeand what the cache holds plus that share of its disk’s free space, measured when the run starts. A biggercache_sizeis then safe on a disk shared with other data. Its log says which applies:[piceli-dev] cache budget: ... GiB (...); the budget report hasmax_bytes,cap_bytesandlimited_by.piceli dev runsays when the installed config is not the declared one: one line naming the fields (cache_size: 80Gi -> 110Gi). Runs use the installed config;piceli cluster initapplies the declaration.
Version 0.89.0¶
A derived image appends files to a built image, without a build (ops#110)¶
An
[[output.image]]withfrom = "<image>"inhost-build.tomlis a derived image: that built image of the same spec plus one layer offiles. It takes onlyname,repository,from,files,contextsandlabels; anything else is refused when the spec is loaded.Its change key is the base image’s key plus the files of its own contexts. A file read only by derived images (a release number, for example) changes only their keys, so changing it runs no build: no build host, no build Job.
The composition controller appends the files in the cluster registry to the base image it recorded, pinned by digest, as
crane appenddoes. The base layers and config are kept (base layers are mounted, not downloaded); a base index gets one derived manifest per platform and a new index. The same files give the same layer, so every image derived for one release shares that layer.A derived image is never made from a rebuilt base: when the base’s key did not change but its record is lost, the step fails with
derived-base-unrecordedinstead of building the base.The record and provenance carry
derived_from: {image, digest}, the added files’ sha256 and the layer; the status andgitops historyshowderived_from. The SLSA (Supply-chain Levels for Software Artifacts) statement uses build typehttps://piceli.dev/derived-image/v1.piceli artifacts build-spec runrefuses derived images (derived-image-local-unsupported). A builder or build host older than 0.89.0 refuses a spec withfrom: upgrade them with the controller.
An idle build host stays live (ops#109)¶
An idle
piceli builder serverenews a lease (build-host-lease) every 2 minutes. “Not heard from for 10 minutes” now means the host stopped, so the in-cluster fallback waitshost_waitfor an idle host instead of building cold after 60 seconds.A host on another Piceli version than the controller’s reports it once per upgrade. For 30 minutes after that it counts as coming (
upgrading), and the fallback waits for it to restart.A host that claims a build while its in-cluster fallback Job runs takes it over: the controller stops the Job and uses the host’s images. If the Job finished first, its images stand and the host’s answer is refused, so a build never has two results.
piceli gitops hostssays per host whether the fallback waits for it:busy,live,UPGRADING,STALEornever seen(livenessin--json).piceli gitops buildsshows one record for a build whose fallback Job runs.Hosts on 0.88.0 or older send no lease: upgrade the build hosts before, or with, the controller.
Version 0.88.0¶
A new commit with the same images gets checks of its own (ops#108)¶
An unchanged release is checked again for new commits. When the GitOps controller deploys source commits whose images and manifests did not change, nothing is applied, but the environment’s checks now run against the running release (
verification.trigger: new-revision). Before, the run skipped its checks (“release already verified”), so the commit never counted as passed: a promotion gate refused it andgitops candidate requestdid not find it. Now its run carries passed checks like any other.The checks output records the commits it covers (
revision). The same commits again stay verified; a release whose last checks were recorded before 0.88.0 is checked once more on its next run.The deploy log line says why:
verified ... (new commits, same images).
Version 0.87.0¶
A candidate copies an image the run lists by digest only (ops#106)¶
No more
candidate-no-imagefor an image in the cluster registry. A run’s component with a digest but no image reference is copied fromregistry/repository@digest, the repository the controller pushes the component to (<registry repository>/<component>). An image that is not there fails the copy with the registry’s answer, which is not retried.
A resumed copy says what it copied¶
artifacts copy --ledgerrun again (also--in-cluster) when the ledger says a copy is done now reports that copy’s receipt (target and tag, digest, platforms, pull reference, result, referrers;from_ledger: true) instead ofresult: null, in--outand on stdout. The ledger keeps that compact receipt with each done copy; a copy recorded before 0.87.0 has none.
Version 0.86.0¶
Which commits an unchanged image stands for (ops#107)¶
components[].current_forin the run history.{source: commit}: the run’s commits this component’s image stands for. An image whose inputs did not change keeps the build of an older commit;current_forsays it is current for the run’s commits, so a release that copies a verified run’s images comparescurrent_forto the run’ssources(also ingitops show RUN --artifacts).commitandprovenance.commitsstay the build’s. A run recorded before 0.86.0 reads withcurrent_fortoo: the component’s own source at the run’s commit (older records do not list the other sources an image reads).An image’s provenance does not move without a build. The same image recorded again for a newer commit keeps the provenance of its build; a rebuild (
piceli gitops build,rebuild --host) records its own. Candidates copy the run’s image whatever commit built it (a test covers it).Docs:
Candidate(source=)takes the source’s name in the environment, not a Python variable name.
Version 0.85.0¶
A candidate named by the source you choose (ops#106)¶
Candidate(source="product"). A candidate is named by the commit of one source the environment follows, no longer only the first one.sourcenames that followed source (default: the first, as before). Its commit names the candidate and fills{commit}in copy tags, its passed commits are the ones recorded, and the commit given togitops candidate requestis that source’s.sourceis written to the configuration only when set, so existing hashes do not change. A source the environment does not follow is refused when the composition loads (candidate-source-unknown, naming the sources it follows).Upgrade:
piceli gitops enableagain for the controller.
Version 0.84.0¶
Layers per platform; a candidate without copies (ops#106)¶
History
layersfor multi-platform images. The components ofgitops history --jsonandgitops show RUN --artifactsnow carry the file-mapping layers of every platform of a multi-platform image, each entry{"platform", "mapping", "digest"}(at most 4 platforms and 16 layers each). A single-platform image keeps{"mapping", "digest"}. The componentimagestays the index reference. Additive withinpiceli.gitops-history.v1.Candidate(copies=())is allowed. A candidate without copies is a ready marker: after the quiet time (orgitops candidate request) it isreadyonce the run that passed the commit is found, withdigeststaken from the run’s images.A missing credentials Secret no longer stops the controller. Each
CandidateCopy(credentials=)Secret is mounted as optional; the candidate fails withcandidate-credentials-missing, naming the Secret, is retried with the usual backoff (up to five tries) and starts again withgitops candidate request.Upgrade:
piceli gitops enableagain for the controller.
Version 0.83.0¶
Release candidates and a resumable copy to an outside registry (ops#106)¶
A run’s artifacts. The components of
gitops history --jsonnow carryimage(repositoryand areferencepinned by digest) andlayers(one entry per file mapping of a host build, at most 16). Newpiceli gitops show RUN --artifacts [--env E] [--json]printspiceli.gitops-artifacts.v1: the commits and, per component, the digest, image reference, platform digests, layers and provenance.piceli.gitops.releases.artifacts(document, run_id, env)returns the same body. A key is left out when the run did not record it (for examplelayerson an image built by Docker). The history schema stayspiceli.gitops-history.v1.A copy that survives a dropped connection.
piceli artifacts copygains--attempts N(default 5): a whole copy is tried again afterregistry-unreachableor HTTP 429, 502, 503 and 504, with a pause that grows to 60 s; other reasons stop at once.--set FILEcopies a list of images under one plan digest.--ledger NAMErecords each copy, and a rerun continues at the first one not done.No laptop port-forward.
--in-clusterruns the copy as a Job next to the registry, which it reaches by its Service name; credentials come from a Secret (--credentials-secret), never from arguments. A killed client leaves the Job running, and the same command attaches to it. New hiddenartifacts copy-job-runis what the Job runs; the report ispiceli.copy-set.v1.Release candidates.
Controller(candidate=Candidate(environment=..., quiet="30m", keep=5, copies=(CandidateCopy(component=..., to="oci://host/repo", tag="{commit}"),))). After the environment passes a commit and no newer one passes for the quiet time, the controller copies that run’s images, by digest, to the declared paths with the resumable copy set. A candidate iswaiting,building,ready,failed(with a reason) orcancelled; a newer passed commit cancels one still building.piceli gitops candidate request COMMITstarts one at once,release COMMITmarks it released,list [--json]shows them, andgitops status(text and JSON) gainscandidates. Thekeepnewest and every released one stay; their digests come fromcandidate list --jsonforartifacts retention --pin-file. See Release candidates.Promote a passed commit that is not the newest.
piceli promote HOST --from ENV --commit SHA(7 to 40 hex characters) pins a commit ENV passed even when a newer one passed since. It is refused (promotion-not-verified) unless ENV ran it with its release checks passed; the plan’sverified_runnames that run and the digest covers the commit.Not in this release: Nix closure candidates, a macOS build host, records-only paths and an upgrade environment.
Upgrade: the controller image for candidates and the in-cluster copy (
piceli gitops enableagain); the client for the new flags and commands.
Version 0.82.0¶
A source missing a tracked file is cloned again; the copy is restored (ops#101)¶
The host check looks at the files.
git statuscalls a checkout clean when a tracked file is missing but its index entry has a skip-worktree or assume-unchanged flag. After each checkout,builder servenow also checks that every tracked file exists; if not, it clones the source again (source NAME did not verify on the host (source 'NAME' lacks 1 tracked file(s) (path)); re-cloned it).The container’s copy is restored from its objects. If Git calls the copy of a source changed, the log names the paths and how each looks in the mount (
builder: in the mount: ...), the container restores the tracked files from the copy’s own objects (exactly the commit the host verified), and saysbuilder: source NAME restored from its objects; it is clean, orstill not cleanwith the paths. The build then records the sources as before.The copy fails loudly. The
tarpipe is nowcp -a: a file it cannot copy stops the build with the reason, instead of leaving a copy without it.Upgrade:
builder serveon the build hosts and the builder image.
Version 0.81.0¶
A missing value reads as its default only where the chart owner asks (ops#104)¶
default_on_reuse=TrueonHelmOptionalandHelmToggle. 0.80.0 made every optional value or toggle with atruedefault read astruewhenhelm upgrade --reuse-valuesfinds the key missing from the stored values. That also switched on objects a client never turned on (a cluster-wide DaemonSet, for one). Now the chart owner chooses per value: withdefault_on_reuse=Truea missing key reads as the default (an explicitfalsestill turns it off); without it a missing key is off, as in 0.79.0.--reset-then-reuse-valuesstill turns a default on.Upgrade: a chart that relied on 0.80.0’s behaviour for a value adds
default_on_reuse=Trueto it; every other chart renders as in 0.79.0 again.
Version 0.80.0¶
piceli bundle names the product the operator installs (ops#102)¶
--input-prefix PREFIX(defaultPICELI_INPUT_) names the input variables ofprepare.sh, in its error texts and inINSTALL.md.--tool-name NAME(defaultpiceli bundle) is the tool named in the generated comments:prepare.sh, the headers of the chart’s templates,values.yaml,Chart.yamland the chart README.--annotation-domain DOMAIN(defaultpiceli.io) is the domain of every annotation and label key the bundle writes (DOMAIN/bundle,/namespace,/helm-release,/configmaps-digest,/secrets-digest,safety.DOMAIN/allow-<rule>), in the objects, the pod templates, the selectors that use them and thefieldPaththat reads one. A bad name is refused withbundle-invalid.With all three set, no file or file name of a bundle or chart holds the tool’s name: the base’s image host, the
schemaofbundle.jsonand the chart’s Secrets template take the first label of the domain (images.shop.invalid,shop.client-bundle.v1,templates/shop-secrets.yaml).piceli support-bundlereads theDOMAIN/bundlemarker under any domain.Upgrade: the defaults are unchanged: a bundle rendered without the options is byte for byte the same. Moving an installed chart to a new annotation domain works with
helm upgradebut makes its pods roll once (the digest annotation keys on the pod templates change); the old keys are not migrated.
A HelmChart takes one existing Secret per app Secret, and optional values keep their default on reuse (ops#103)¶
HelmChart(existing_secrets={"api.existingSecret": ["shop-api"]})maps a value name to the app Secrets it replaces. Set it to the name of a Secret you made: the chart does not render those Secrets, and every reference to them (environment, volumes, projected sources,envFrom) reads the name.Only what is needed runs. A generator whose outputs land only in replaced Secrets is skipped, and an import that feeds only them is not required, so an install that brings one Secret needs no
--set-filefor the rest. Thesecrets-digestannotation takes the name, so a different Secret rolls the pods.The README,
values.yamlandvalues.schema.jsonlist each value with the keys its Secret must hold. A bad declaration is refused when the chart is built (bundle-invalid): an unknown Secret, a Secret in two values, a name that clashes with another value, a bad name, two Secrets of one value with a key in common.existingSecretis unchanged: it replaces every Secret, and when it and a value are set together,existingSecretwins for all. ListexistingSecretinexisting_secretsto make it a value of some Secrets only; then nothing replaces every Secret.Optional values keep their default.
helm upgrade --reuse-valuesover a release made before a value existed no longer turns it off: aHelmOptionalorHelmTogglewhose default istruereads astruewhen its key is missing. An explicitfalsestill turns it off.Upgrade: a chart without
existing_secretsrenders byte for byte as in 0.79.0, and a default offalserenders as before. Only a chart with an optional value or toggle whose default istruediffers in its templates (theiftests the key, then its value); nothing changes for a fresh install.
Version 0.79.0¶
A refused source says why, and the builder repairs its checkout (ops#101)¶
source-identityandsource-driftcarry their reason. A host build refused for a source dropped the cause (host build failed (source-identity)); the build log andpiceli gitops buildsnow end the line with the source and the failed check, redacted and cut at 400 characters:host build failed (source-identity): git status failed in /work/src/shop: ..., orsource 'shop' has 2 uncommitted change(s), or the drift’sshop: commit 'a' -> 'b'. The error’s message stays fixed; the text isBuildSpecError.reason.builder servechecks each checkout the way the build does. Afterexport_source, Git must name the commit and the tree must be clean. If not, the checkout is removed and fetched again, then the mirror too (as a corrupt mirror since 0.71.0). The repair is in the log and in the receipt’ssource.repaired("check": "identity"). If the source still fails, the log says why and the build decides.Upgrade:
builder serveon the build hosts (the reason and the repair) and the builder image (the reason inside a Job).
Version 0.78.0¶
Faster CI¶
CI runs each Python version’s unit tests in two halves on two runners (
PICELI_TEST_SHARD=I/N) and the kind tests in five shards; release images build while PyPI publishes, so they are out about two minutes sooner.
A flaky request no longer fails a copy or a promotion (ops#100)¶
A registry request that fails in transit (a refused, reset or aborted connection, a timeout, a name not resolved, a TLS connection cut short, HTTP 429, 502, 503 or 504) is tried again: up to 5 times, with a growing, partly random pause (about 1, 2, 4, 8 seconds;
Retry-Afterhonoured up to 60 seconds), never past the command’s deadline. Before, one dropped connection failed a wholeartifacts copywithregistry-unreachable.A failed chunk of a large upload resumes where the registry’s upload session says it stopped (its
Range); when the session is gone, the blob starts again (up to 3 times). A chunk is never resent blindly.The copy receipt lists each retry (
retries) and, on failure, where it failed (error: side, host, method, path, blob digest and offset, exception and errno or HTTP status; never a credential). The CLI line says it too:copy: failed [registry-unreachable] target ghcr.io PATCH blob sha256:9072a3f9… at 33554432: ConnectionResetError(54). The error codes are unchanged. Mirror receipts get the sameretriesanderror.The same retries cover every command that talks to a registry through Piceli’s client:
artifacts publish,publish-files,deliver,copy, mirrors, retention and the in-cluster registry.piceli promote: agit fetch,push,ls-remoteorclonethat fails in transport (such asssh: connect to host … Operation timed out) now runs up to three times, after 2 seconds and then 4 to 8 seconds (0.74.0 retried once).git_retriesentries gainattempt.
Version 0.77.0¶
A damaged cargo registry source is repaired (ops#95)¶
A dev run whose build cannot read or parse a file of an extracted crate in the cache’s cargo home (
couldn't read `…/registry/src/…`: stream did not contain valid UTF-8,failed to parse manifest at,unknown start of token) removes that crate’sregistry/src/<index>/<crate>directory and runs once more: cargo extracts it again from its checked.crate. The result sayscache.repaired {kind: "registry-src-reextracted"}. Only a real directory strictly insideregistry/src/goes, under cargo’s own package cache lock. Damaged again after the fresh extraction, the run fails with the newdev-registry-src-damaged: the host is likely corrupting files (check its disk and memory).piceli dev cache clear --crate NAMEalso removes that crate’s extracted sources (NAME: every version;NAME-VERSION: one); the new--registry-srcremoves only extracted sources (all, or--crate’s), no target. Neverregistry/cachenorregistry/index.
A resumed or finished deploy names its commits (ops#98)¶
The controller’s end-of-deploy lines name the commits, as the push line does.
main: deployed; rolled nothingis nowmain: deployed shop@610572993f71, workspace@c5f6c1059cf8; rolled nothing, and after a restartmain: its deploy of shop@..., workspace@... was interrupted (restart), andmain: verified shop@... (checks changed); rolled nothing. Theverification failed,failedandapproval requiredlines addat shop@..., workspace@...(the single-repository controller:at <commit>). A restarted controller’s log alone now tells which commits were deployed.piceli gitops status --jsonalready had the deployed commit of each source:envs.<env>.deployed_revision(and, per cluster,envs.<env>.clusters.<cluster>.deployed_revision); unchanged.
Version 0.76.0¶
Host builds send their step times (ops#97 follow-up)¶
piceli gitops builds --jsonshows step times for host builds too.piceli builder servenow sends the build’ssteps(each command’s seconds, from its build container’s receipt) with itsbuiltanswer, and withbuild-failedwhen the build ran commands (the steps that ran, the failing one last). The controller keeps them where an in-cluster build’s go, sostepsis filled for every build: host or in-cluster, passed or failed. No more reading a host’s journal over SSH for step times.Compatible both ways. A 0.76.0 controller records a build from an older
builder servewithout steps; an older controller ignores the new field. Upgrade both the controller and the build hosts to see host steps.Steps from a host are checked. The controller keeps at most 64 steps and only their known fields (
platform,kind,tool,state,exit_code,seconds); a step with a wrong type, a text too long or seconds out of range is dropped.
Version 0.75.0¶
A container-engine failure does not block a host (ops#97)¶
A build host whose container engine fails once is backed off, not blocked. When
docker runexited 125 (the engine could not start the build container, for example a runtime hook error), the controller quarantined the host for every source of the build, with no end: the host refused every build untilpiceli gitops release-host, every image build went to the in-cluster fallback, and nothing said so. Now the earlybuild-failedanswer names its cause (engineorsource); an engine failure hands the build over as before but quarantines no source. The host claims no image build for 5 minutes, then twice as long at each next engine failure in a row (at most 1 hour); after 3 in a row it is blocked untilrelease-host. Its next build that starts clears the count. An older builder sends no cause: an early failure that names no source counts asengine. See engine backoff.A source quarantine ends after 24 hours. The host then tries the source again (
untilincontroller.source_quarantine).piceli gitops hostsshows every block. Each source block and engine backoff or block, with its reason, cause and times (source_quarantineandengine_backoffin--json, newcontroller.engine_backoffin the status). Before, it showed only health events, so a blocked host read0 recent health event(s).Two new alarms.
build-host-blockedfires for a host blocked by its engine (build-host-engine-failed) or by a source (build-host-source-failed).builds-fallbackfires when an environment’s image builds all went to the in-cluster fallback:Alarms(fallback_after=3)builds in a row, or at least two overAlarms(fallback_for="6h")(build-host-fallback-only; newcontroller.builds_fallbackin the status).
In-cluster builds keep their step times (ops#97)¶
piceli gitops builds --jsonshows each command’s seconds of an in-cluster build. When no build host took an image build, the in-cluster build Job (the fallback) printed its steps only in its pod log, and its record had none, so a script summing command times saw nothing. The Job’s receipt now lists every platform’ssteps(the shape of a host build’s receipt:platform,kind,tool,state,exit_code,seconds); the controller keeps them in the history (builds.<image>.steps) and the build record shows them in the new fieldsteps. The CLI line adds “N command(s) in Ss”. A failed build Job prints a last receipt line with the steps that ran, so a failed build is a record too (stagefailed), with those steps and the end of its log inlog_tail. Upgrade the controller and the builder image; with an older builder image a passed build shows its first platform’s commands, a failed one no steps. See Every build: list, start, cancel (0.26.0).
Version 0.74.0¶
Features
A pipeline spec’s declared platforms are all built and recorded as one OCI index. Since 0.68.0 a GitOps pipeline build compiled only the platforms of the nodes the pods run on, and
build.platformsonly limited them: an arm64-only environment built arm64 alone, and its recorded digest was one arm64 manifest, so a release had nothing to copy for amd64. Now a spec that declaresplatformsin[build]builds every declared platform and pushes one OCI (Open Container Initiative) image index over them; nodes pull their own platform. The status records the index digest withmedia_typeandplatforms(each platform’s manifest digest), and so do the history andpiceli gitops builds --json(new fielddigests). Every platform’s manifest stays in the registry under the index. A spec withoutplatforms, andController(delivery="nodes"), keep the 0.68.0 rule. The provenance’splatformsnow lists the platforms built, not every enabled one. See Declared platforms are all built (0.74.0).piceli artifacts copypromotes an image by digest.--from oci://host/repo@sha256:… --to oci://host/repo:tagcopies the index, every platform’s manifest and blob, and the referrers (SBOM, provenance, signatures, and the referrers of those), keeping every digest;skopeo copy --all --preserve-digestslost the referrers. Same plan, approve and receipt flow asartifacts publish: without--approveit prints the plan digest (exit 3) and contacts nothing; the tag moves last, and one that names another digest is refused (copy-tag-exists) unless--move-tag. New error codescopy-invalid,copy-not-approved,copy-tag-exists,copy-verification-failedandcopy-failed. See Promote a built image by digest: piceli artifacts copy (0.74.0).
The build rule runs in the controller: upgrade the controller. Images of
a spec that declares platforms rebuild once (their platforms are part
of the image key). artifacts copy runs in the client: upgrade the client
that releases.
Fixes
A sync waiting for its build is not a failed run. While a build host built the commit, the controller ended one
SYNC <composition>/<env>run per poll as failed (error.type: build-waiting, statusERROR), each withbuild <image>spans markedcomponent-build-failed: a dozen failed runs per good deploy, and alerts on failed runs fired for the whole build. Such a run now stays open, like a run waiting for its approval: one trace from the push to the result, onebuild <image>span per image from the first wait to the delivery, and one INFO eventpiceli.build.waiting.component-build-failedstays for a build that failed. A run replaced by a newer revision (superseded) has status unset and counts no run error; its unfinished builds arecancellation.A re-verification no longer invalidates a
piceli promoteapproval. The plan’s digest covered the run that verified the pinned commit, so when the environment ran the same commit again between plan and--approve(a push to another of its sources), the approval failed withpromote-plan-changed. The digest now covers what the promotion changes (host, input, old and new commit, lock hash, tag, base, remote, branch). The commit must still be verified at plan and at approve; the run found at approve is named in the commit message, the tag and the result’s newverified_run.A failed promotion push is resumed by the same command. After
promote-push-failed, running the same--approvecommand again finds the local commit and tag, checks the commit is exactly the plannedflake.lockchange, and pushes them (resumein the plan,resumedin the result). Before, the working copy was refused as ahead of its upstream and the push had to be typed by hand.One transport failure no longer stops a promotion. A
git fetch,push,ls-remoteorclonethat times out or loses its connection is retried once after 2 seconds, listed in the result’s newgit_retries.A re-verification no longer changes a gated
NixReleaseplan. When the controller plans the same pinned commit again, the live plan keeps itspinnedrun, so its digest and approval stay valid.
A digest printed by an older client does not match: plan again after the upgrade. Build hosts are unchanged.
Version 0.73.0¶
Features
piceli dev nix build --artifact PATHcopies files of the built output back. Before, a build copied back only a disk image (--image), so reading one small file of an output (a manifest, a list) meant building it again outside Piceli, where the build’s private inputs are not reachable.--artifact(repeat) takes a path or glob relative to the output; the files land under--artifacts-dirand the result’s newartifactsfield lists each with itspath, localfile,bytesandsha256(an empty list without--artifact). A path that matches nothing fails the build withdev-nix-no-output; an absolute path,..or**is refused before the build (dev-nix-invalid).
Version 0.72.0¶
Fixes
A tracked file a run’s command changed is restored. An in-place refresh of a lineage’s tree only re-read the paths of the uncommitted changes, so a file a test or build script had deleted, truncated or rewritten stayed that way for up to 49 runs, and a later run of the same commit failed with a missing file. Each in-place refresh now checks every tracked file of the commit (exists, file, executable or symlink, size) and re-reads those that differ (
sync.restored, with up to 10 paths insync.restored_sample). About 90 ms for 10,000 files. A same-size content change is not caught; the full sync every 50 runs still covers it.A run never starts on a tree that lacks a tracked file. After the sync of a delta upload, a tree still missing a file the commit tracks (less those the run’s own diff deletes) fails the run with the new error
dev-tree-mismatch, listing a few paths; the next run syncs in full.
The fix runs in the client: piceli dev run sends its own copy of the
run’s code. Upgrade the client that starts the runs.
Version 0.71.0¶
Fixes
A dev run on a damaged disk continues on a fresh lineage. When the tree sync into a lineage fails with a filesystem error inside it (EUCLEAN “Structure needs cleaning”, EIO, EBADMSG, EROFS, ENOTEMPTY), the lineage is renamed into
cache/quarantine/without reading or deleting anything in it, and the same run continues on a fresh lineage (cache.repaired.kind = "lineage-quarantined"). A quarantined lineage is never taken again;piceli dev statuslists it until a person removes it. A second fault fails the run withdev-lineage-damaged.No empty folder survives a tree sync. A whole-tree upload that held an empty folder (left by a branch switch) kept it in the lineage, and a workspace glob such as
members = ["crates/*"]then failed. Empty folders are now removed after every sync (bottom-up, never the root, never insidetarget/or.git/).A corrupt source mirror is cloned again. When a build host’s Git mirror of a source is corrupt (
pack has bad object,invalid index-pack output, …),builder serveremoves it and fetches the source once more in the same build, says so and records it in the receipt (source.repaired). Before, the host handed the build over and stayed quarantined for that source. A network or credential failure never removes the mirror.The fallback does not wait for hosts that cannot build. It builds at once when every declared host is quarantined for one of the build’s sources, also when an earlier build set the quarantine; and after 60 seconds, not
host_wait, when no host that may take it reported in the last 10 minutes (an offline laptop). The waiting status says why.
The dev-run fixes run in the client: piceli dev run sends its own copy
of the run’s code. Upgrade the client that starts the runs. The build-host
fixes need the 0.71.0 controller and builder serve.
Version 0.70.1¶
Fixes
typer is capped below 0.29. typer 0.29.0 (released 2026-11-09) reworked its option classes:
piceli help-jsonfailed and--helpon a subcommand exited with code 2 in a fresh install. Piceli 0.70.0 allowed it; its images were never published, use 0.70.1.A release run finishes after an interrupted one. When the PyPI files were already uploaded, the release workflow skipped the release notes and the images too; they now run once the tag is pushed.
Version 0.70.0¶
Fixes
A silent build keeps its claim. A build host now reports every 2 minutes while it builds, whatever the build prints. Before, only output lines renewed the claim, so a compile or link step silent for 10 minutes made the controller drop it (and its in-cluster fallback could start a second build).
Version 0.69.0¶
Fixes
A damaged dev lineage is rebuilt, not reused. When a run on a warm lineage still crashes rustc after the
incremental/repair, or a linker refuses a file inside the lineage’starget/, or rustc itself is killed by SIGSEGV or SIGBUS while compiling, the run removes thattarget/and runs once more cold (cache.repaired.kind = "lineage"). A lineage still damaged at the end is removed, so the next run never takes it. Before, the incremental repair could not reach damaged dependencies intarget/debug/deps/, and each new run failed on the same lineage.
Version 0.68.0¶
Changes
Pipeline builds compile only the platforms the pods run on. An environment’s needed nodes come from its
on_nodes, else from its pods’ node selectors (kubernetes.io/arch, the hostname, Piceli’s role labels), else every node. A build compiles their platforms only, and delivery into nodes imports into those nodes only. An arm64-only environment on a cluster with an amd64 builder node no longer builds amd64. Its images rebuild once after the upgrade, since the platforms are part of the image key.Build steps for some images only. A host-build command can be
{ run = [...], images = ["site"] }inbuild.commandsorbuild.shared_commands; it runs only when one of those images changed. A plain argv list still runs in every build.Only changed images are assembled. Images whose key did not change are no longer packaged or pushed again.
Failed dev runs stay in
piceli dev statusfor 7 days (infailed, at most 60) after they leave the last 50 runs;piceli dev logs RUNfinds them.
Fixes
Every CI download from GitHub is signed in. OpenTofu, sops and kustomize now come through
scripts/gh_fetch.sh(gh release downloadwith the job’s token, retried for about two minutes), like kind and Flux since 0.67.0.
Version 0.67.0¶
Changes
A failed dev run names the signal that ended it. The result has
signal(number, name, and whether the command or a line of its output showed it) and acause: SIGKILL isout-of-memoryand no longer looks like a crash; SIGSEGV, SIGBUS and SIGILL arehost-or-toolchain.piceli dev statuskeepssignal,cause,healthand the last 30 lines (was 20) of each failed run, and the run summary ends withkilled by SIGKILL (out-of-memory).
Fixes
CI and the builder image survive slow GitHub downloads. kind, the Flux and Gateway API manifests are fetched signed in, with retries; the builder image’s nextest download retries on a cut-off transfer.
Version 0.66.0¶
Changes
Optional ConfigMap volumes.
ConfigVolume(..., optional=True)rendersconfigMap.optional: true, likeSecretVolumesince 0.55.0: the pod starts when the ConfigMap is missing and sees an empty directory. AHelmValuecan name the ConfigMap, also on a workload another value patches.
Version 0.65.0¶
Changes
Retired Helm values.
HelmChart(retired={"tlsCert": "a TlsCa makes it now"})names values an older chart had. The schema still accepts them, sohelm upgrade --reuse-valuesfrom that chart works; the chart ignores them, and the install notes warn when one is set. Before, the upgrade failed:additional properties ... not allowed.Scalars as strings where needed. A boolean or number
HelmValueplaced where the object holds a string (a ConfigMap key, an environment variable) is written as one ("true","30"), so a chart can offerscrape.enabled: false.
Version 0.64.0¶
Fixes
A rustc 1.97 crash is repaired again. Since 0.20 a dev run that hits a rustc internal compiler error drops the lineage’s
incremental/directories and runs once more. rustc 1.97 words the crash differently (thread 'rustc' (1169) panicked,the compiler unexpectedly panicked), so the retry never ran and the build host was not marked. Both wordings are recognised now.
Changes
piceli dev run --env.--env NAME=VALUE(or--env NAME, its value in your shell) sets a variable for one run over the profile’senv, such asCARGO_INCREMENTAL=0. Before, a variable set in the caller’s shell never reached the run.
Version 0.63.0¶
Changes
Helm charts make a private CA and its certificates. A
TlsCa(or self-signed) generator was refused bypiceli bundle --helm. The chart now makes the CA and the leaves at install (genCA,genSignedCert) and keeps them on upgrade throughlookup; a DNS name with the bundle’s namespace takes the release namespace. Keys are 2048-bit RSA; other sizes and IP addresses are refused.Several Helm values on one object. Two
HelmValues aimed at the same object (for examplescrape.enabledandscrape.intervalSeconds) were refused withname objects the render lacks: the placements were counted per object, not per value. Each value now renders its own place.
Version 0.62.0¶
Fixes
Helm charts upgrade with
--reuse-values. A chart frompiceli bundle --helmnow reads every nested value (storage.size,image.registry,intake.expose, aHelmValuelikealerts.egressAllow) safely: when the values lack its map, as withhelm upgrade --reuse-valuesfrom an older chart, the value takes its default. Before, the render failed withnil pointer evaluating.
Version 0.61.0¶
Changes
“Warm” means warm for this command. A dev run prefers the lineage that last finished the same command key (the command up to
--, its working directory,RUSTFLAGS,CARGO_*and the other build variables). Before, a lineage built for other commands counted as warm, and a new target or profile compiled every crate there (875 s where the warm build took 93 s). When only a busy lineage has the key, the run copies it into a new lineage if there is room, else waits for it up to 120 s (warm_wait_seconds). The result addscache.tree_warmandcache.command_key; the log sayscold for this commandwhen only the tree was warm.
Version 0.60.0¶
Fixes
A rollback keeps the current tailnet companions. A rollback still re-applies the older release’s own objects, but its tailnet companions (label
piceli.io/access) now come from the release it rolls back from. Before, rolling back to a release 0.58 had rendered brought back theAccess(https=True)companions that 0.59 fixed, and deleted a TURN Service’s plain companion.
Version 0.59.0¶
Fixes
Access(https=True)serves only HTTP over HTTPS. A port counts as HTTP by its forward’s scheme (aspiceli accessshows it), not by its path: every forward has a path (/by default), so a TURN forward got Tailscale Ingresses. UDP ports never get an Ingress, and a port number gets one Ingress, not one per protocol.A companion changing kind keeps its tailnet name. Turning on
httpsreplaces a port’s plain companion (aLoadBalancerService) with an Ingress of the same name. The release now deletes the old companion first and waits until it is gone. Before, the Ingress was created while the old proxy still held the name, so it registered asNAME-1.
Version 0.58.0¶
Fixes
A failed switch says why. The host agent keeps the end of a failed
switch-to-configuration(or service restart) output in the failed stage’sdetailand in its journal. Before, it kept onlyhost-switch-failed, so a cause such aswarning: user activation for root failedtook a journal search to find.host waitkeeps one SSH connection. Status reads share one connection (ControlMaster, kept 60 s after the last read), so a wait no longer opens a login session every poll. Each logout stopped root’s user manager 10 s later, and a switch that landed in that gap failed.Generated host modules keep root’s user manager running. A whole-system host module sets
users.users.root.linger = lib.mkDefault true, so no logout can stop it during a switch. Service-mode modules do not.
Version 0.57.0¶
Features
cargo-nextestin the builder image. The builder image ships cargo-nextest 0.9.149 (pinned, checked against its sha256, amd64 and arm64), so development runs on build hosts run test binaries in parallel with retries instead of falling back tocargo test.One name for plan hashes in JSON. The plan documents of
promote,artifacts publishandartifacts publish-filescarryplan_hash(the value--approvetakes), asgitops enablealready did; a script reads stdout, not the human text on stderr. An approvedpromotealways prints its result (tag,commit) on stdout.
Fixes
builder serveno longer fills its temporary directory. A build’s scratch was bind-mounted into the container, whose user made directories there the host’s user could not remove, so every build left files behind (49 GB on one host). The container now opens the scratch to the host’s user before it exits, andbuilder serveremoves the scratch of killed builds (older than 6 hours) when it starts.
Version 0.56.0¶
Fixes
A Docker host’s cache volume is always the run user’s. The volume was given to the run user (uid 65532) only when Piceli created it. Reading a host’s cache (
dev status) orbuilder serve --checkmounted it first when it did not exist, so Docker created it owned by root and every run failed withPermission denied: '/cache/git', for example after the host’s Docker data moved. Runs and builder serve now set the owner every time and fail clearly when they cannot; reads and the check never create the volume.A claimed build says where it builds.
gitops wait,enable --waitand the controller log said “waiting for a build host” while a host was already building; they now saybuilding <images> on <host>.Paused runs no longer wait for good. A dev run paused for 10 minutes that still does not fit the cache stops (
dev-cache-over-cap) and its lineage is freed for the runs that wait.
Version 0.55.0¶
Features
Optional Secret volumes.
SecretVolume(..., optional=True)renderssecret.optional: true: the pod starts when the Secret is missing, with an empty directory. A chart can mount a Secret its user creates later, or never (an alerting key), on a workload another value already patches.
Version 0.54.0¶
Fixes
dev statussays why queued runs wait. The scheduler’sheld(the node under disk pressure, the cache over its budget) and each queued run’swaiting_forreachdev statusand its--json; a waitingdev runprints the reason next to its position. Before, the view droppedheld, so a queue held by disk pressure looked stuck for no reason.The cache numbers survive a controller restart. A restarted scheduler starts from the last published cache use and recent runs.
Queued runs nobody waits for expire. A
dev runthat leaves before its run starts deletes its queued Job. A client killed outright cannot, so it marks its Job every 30 s while it waits; the queue removes a run with no mark for 5 minutes, or one that waited past its queue timeout (dev-run-abandoned).
Version 0.53.0¶
Features
A new lineage starts warm. A run picks the free lineage of its branch, else the one nearest its commit in Git (fewest commits apart), else the most recently used. A run that needs a new lineage starts from a copy of the nearest sibling, busy or not (
cp --reflink=auto, else a plain copy); files that changed during the copy are removed with their cargo unit, so cargo rebuilds only those. The result sayscache.warm: "seeded"andcache.seed.A full cache pauses a run instead of stopping it. When a lineage passes its cap while other runs hold lineages, the youngest running run pauses (
SIGSTOP) and resumes when room appears (cache.paused); older runs continue, so the oldest always finishes. Its lineage is kept. Only a run that alone is over the budget still stops (dev-cache-over-cap). Paused time extends the run’s deadline, by at most its timeout.piceli dev statuslists the lineages (size, last use, the run that holds it, its hint, paused), largest first;--jsonlists them all.piceli dev hostsshows a docker or native host’s lineages.
Version 0.52.0¶
Features
One trace per host release.
piceli gitops build NAME --ref TAG --traceparent TPandpiceli gitops approve NAME DIGEST --traceparent TPtake a W3C (World Wide Web Consortium)traceparent; without one the controller starts a trace when it plans the release. It travels beside the plan (never in its digest) to the build host, which signs it into the ref pointer. The host agent’s deploy uses its trace id and its records carry the parent’s span id (spanId), so the release shows up as one trace in the collector.host statusshowsparent_span_id. A bad value is refused by the CLI (gitops-traceparent-invalid) and ignored by the agent.
Version 0.51.0¶
Fixes
host statusno longer says the report isokwhile nothing is sent. The host agent keeps its last send error (last_error,last_error_detailsuch asHTTP 415,last_error_at) and its last success (last_sent_at,sent_total) across runs; the report isdownwhile records wait behind an error.Waiting records are sent again on every run, also a run with nothing new, and once more after a release’s checks pass, so a release that restarts the collector still delivers its events.
Version 0.50.0¶
Fixes
piceli dev runuploads work with staged renames. Uncommitted changes go as a delete and an add, and the builder reads both names of a rename (also in uploads from older clients), so the patch applies.A run killed while its tree was refreshed in place no longer leaves a stale record: the next run on that lineage syncs the whole tree.
dev-cache-over-capnames the cap that stopped the run. The cap shrinks while a run runs when other runs’ lineages grow; the message gives the cap at the stop, the cap at the start and what other runs hold, and the result recordscache.cap_bytes_at_stop.Merge-train runs started in the same second sort in order. Run ids carry microseconds, so
train-wait <train>andstatusfind the newest run; older ids still work.
Version 0.49.0¶
Features
Release retention.
[release] keep_releases = 20(orPipeline(keep_releases=20)) keeps the newest releases, the running one and any rollback target, and retires the rest with their sessions, files, executions and secret versions at the end of a successful apply. Off unless set; values below 2 are refused.piceli release retentionruns it by hand;--dry-runlists what it would retire and changes nothing. Replace backups are never deleted; their size is reported.
Fixes
The secret store no longer fills up with old object copies. Versions nothing names any more (also those left by executions 0.47.0 already forgot) are removed after a grace period, and the store’s budget counts the pages in use, so freed space counts before a
VACUUM.A rollback to a retired release says it was retired.
Version 0.48.0¶
Fixes
A growing development run makes room before it is stopped. A run’s cap was the cache budget less what the other lineages held when it started, so on a full cache a run was stopped (
dev-cache-over-cap) and its own warm lineage evicted while idle lineages stayed. Now it evicts free lineages first and stops only when nothing else can go.gitops waitsurvives a slow API. A timed-out or dropped status read is retried until--timeoutinstead of ending the wait.Release journal compaction is logged: what it removed and the bytes in use.
Features
A build host’s own cache budget.
BuildHost.docker(..., cache_max="300Gi")(also native hosts) replaces the cluster’scache_sizeshare on that host, so a host with a large disk keeps more lineages warm.
Development
The nightly CI has its own concurrency group, so it never cancels the push run on
mainthat the release waits for.
Version 0.47.0¶
Fixes
A full release journal no longer blocks every release. The journal kept every execution forever, so after about 160 releases it reached its 64 MB budget and every new release was refused (“journal byte budget exhausted”). Past half its budget it now forgets finished executions nothing needs (not
pending, not the latest of a release, not in recent history, not named by a migration lineage), counts only the pages in use, and shrinks the file withVACUUM. Deployment sessions stay. See How big the state grows (0.47.0).
Version 0.46.0¶
Features
The Helm release name and namespace as env values. A generated chart escapes every
{{in literal values, so a container could not be given{{ .Release.Name }}.HelmRelease.nameandHelmRelease.namespaceare env values for that: the namespace comes from the pod itself, and the name from a pod annotation the chart sets to the release name (only on pods that use it). Outside Helm the name is empty.
Version 0.45.0¶
Features
Release services, not the whole system.
NixHost(..., scope=Services(profile, units))publishes and follows a package: the agent sets the named Nix profile to the new build and restarts only the listed units, and rolls the profile back when a restart or check fails. It never runsswitch-to-configurationor touches the boot entry, andgenerations=prunes that profile only, so a hand-runnixos-rebuildand a release never undo each other. See Only some services. Moving a host into service mode drops what the agent recorded for the system (its current, previous and held builds), so no rollback or pin ever points the profile at a system build.
Version 0.44.0¶
Fixes
A test tag never becomes the release a host follows. A tag with build metadata (
web-v1.2.3+rollbacktest) used to count as a normal release, so it outranked the real ones: a host followed it, andpiceli promotebumped from it or reportedcurrentwithout a new tag. Such a tag is now a test tag: hosts, Nix releases andpromoteignore it (the host status lists it underignored_tags), and a host still running one goes back to the newest release at its next poll.
Features
Checks that must hold.
HostCheck.unit(..., stable=N)(alsohttpandcommand) must keep passing for N seconds after a switch; a failed try within that window starts it again. A unit that starts and dies a few seconds later now fails its check, and the host rolls back. The default (0) passes on the first success, as before.
Development
The release images build each platform on its own runner (arm64 on
ubuntu-24.04-arm) instead of emulating arm64, and join the two digests under the version tag.
Version 0.43.0¶
Fixes
Nix builds on a docker host run in parallel. A
DevProfile.for_nixrun (andpiceli dev nix build --publish) reaches the host’s Nix daemon from a container that has nonix.conf, so its client asked the daemon formax-jobs = 1and independent derivations built one after another. The container now getsNIX_CONFIG=max-jobs = auto; a profile’s ownNIX_CONFIGstill replaces it.
Development
A pre-commit hook (
doc-refs) refuses a{ref}without a title to a label that is not above a heading, which the docs build rejects.The pre-commit hooks keep every extra installed (
uv run --frozen --all-extras), so a commit no longer leaves the environment without them.
Version 0.42.0¶
Fixes
An in-cluster build no longer stops the controller. The controller used to create the build Job and wait for it inside its poll: during a 25-minute build nothing else ran (no other environment, no approval, no NixRelease publish,
piceli gitops buildsempty). Now it starts the Job, records it (controller.cluster_buildsin its status) and looks at it once per poll, as it already did for builds on build hosts. The waiting environment saysbuilding <images> in the cluster: Job <name> since <time> (pending|running). A passed Job’s receipt and a failed Job’s log tail are read as before. A restarted controller looks at the same Job.piceli gitops canceldeletes it (before, it ran to its end), and a commit with other inputs replaces it.piceli gitops run --oncestill waits for its build. See in-cluster build Jobs.A commit that changes no input keeps the running build. A wanted build is now named by each image’s change key and the platforms, not by the commits it is fetched at. A commit that changes only a file no image reads (for example
flake.lock) no longer cancels a host’s running build and offers a new one: the claim (or the in-cluster Job) continues and its images serve the new revision. A build not yet claimed is handed the newest commits. A host’s failure now stands for the same inputs, not the same commit: a commit that changes none of them does not retry it (piceli gitops syncdoes). See build identity.A replacement build goes to the live host first. When inputs really change while a host builds them, the new build is offered first to that host, and the in-cluster fallback waits while the host still reports (within 10 minutes, the rule that already decides a claim is dead), even past
host_wait. Before, the fallback took it afterhost_waitalthough the host was alive and idle.host_waitstill applies when no host is alive. A build that replaces one the cluster was building goes back to the cluster at once. See replacement builds.
Version 0.41.0¶
Features
A failed host build’s output reaches the run record. A build host that answers build-failed now sends the failing command’s own block (the failed step, the first error, then the command’s last lines) and its stage (
fetch,buildorpush). Before, it sent the end of the whole build output, bounded from the end in three places (the host’s 120 lines, the status’ 80 lines, the history’s 2000 characters), so lines printed after the failing command pushed the command’s own output out, and the stage was never sent. The controller keeps both infailure(log_tail,stage,host) and in eachfailed_attemptsentry.piceli gitops show RUN --logsprints them (text and--json), a failed run now also keeps the attempts before it, and the text no longer says “in stage None”: a run without a host stage shows the step’s stage. The output is redacted by the build, as before, and stays bounded.A command that names a file its context does not stage is refused when the spec is loaded (
host-build-path-not-staged). For example["bash", "site/scripts/build.sh"]with[context.site] include = ["src/**"]used to fail on the build host withNo such file or directory. The error names the command, the path and the include list. The check is conservative: plain relative paths only, the programs of ash -cscript only, placeholders, outputs and directories skipped. See Builds without a VM.An identical failure is not retried. When a step fails with the same code and the same output (times, durations, temporary paths and hex ids taken out) on the same revision and inputs as the attempt before, the environment is
failedat once, withstopped: "same-failure"in its status and history entry, instead of four more attempts over about nine minutes. Failures that may pass on their own (unreachable, timeouts, network errors, quarantined hosts, disk or memory pressure) are still retried. A new revision orpiceli gitops synctries again.
Version 0.40.0¶
Features
FilesImage, a folder of an image mounted read-only. A content-keyed folder of files (site builds, for example) can now come from an image in one declaration:volumes={"/srv/builds": FilesImage(images["site-builds"], size_limit="2Gi")}. It renders a diskemptyDir, an init containerfiles-<volume>that runscp -a /data/. /piceli-files/with that image (before the workload’s own init containers), and a read-only mount in every container. The image is resolved, mirrored and pinned like any container image, so a new digest rolls the pods. The init container gets the workload’s security settings over locked-down defaults, and small resources when the pod declares resources. The image needs acp(a pinned busybox base is enough); the copy runs once per pod start. See Describe an app in typed Python (“Files from an image”).
CI
Pull requests that touch machine code run the OpenTofu tests again: the checkout fetched one commit, so the comparison with the base failed and the tests were skipped. The check now diffs the pull request’s merge commit against its base, and runs the tests when the diff itself fails.
Tool downloads in CI (OpenTofu, sops, Helm, kustomize) retry 5 times, so a dropped connection no longer fails a run.
Version 0.39.0¶
Features
Plain file outputs for host builds:
[[output.files]]in ahost-build.toml(name, andtarget_filesmapping a path under the target directory to a file name, placeholders such as{arch}allowed) copies each file tofiles/<name>/<file name>in the output directory (<platform>/files/…for several platforms). A spec may declare files only, with no image. The receipt (piceli.build-receipt.v1) lists them inoutputs.files({path: sha256}, as a Docker build’s receipt does) and in the newoutputs.file_details(per path:output,file,platform,sha256,size). Specs without the section keep their digests and plan hashes. See Builds without a VM.piceli artifacts publish-files --receipt RECEIPTpublishes the files a host build receipt lists (each must still have the receipt’s sha256 and size;--output-dirwhen they are not next to the receipt). See Publish and sign release files.A deploy pipeline and
piceli build jobrefuse a host build with no image (pipeline-invalid), and a composition controller refuses[[output.files]](composition-invalid): they deliver images only.
Fixes
The nightly retention test on kind waits for the Deployment’s observed generation before it trusts the rollout status (#88): the controller writes the new revision before it updates the status, so the old status could pass for the new revision.
CI
The tests that run the real OpenTofu binary (marker
tofu, the slowest of the suite) run only withPICELI_TOFU_TESTS=1: a localpytest -n autoskips them. CI installs OpenTofu and runs them nightly, by hand and on pull requests that touch machine code (before, CI had no OpenTofu and always skipped them).
Version 0.38.1¶
Fixes
A development run can no longer fill its node’s disk. On storage that never enforces a claim’s size (k3s
local-path), a lineage in use was counted but never evicted, and the cache’s budget was checked only before a run: one lineage could grow far past the claim until the node was under disk pressure, and then no run started to trim it. Now the wrapper watches the cache’s disk while the command runs (statvfs every 15 seconds, a measurement of the lineage only when needed). A lineage over its cap (the budget less the rest of the cache), or one that grows by 1 GiB while the disk is under 15% free, stops the run with the new codedev-cache-over-capand is evicted at once. The result’scachehascap_bytes,lineage_bytesandover_cap.Every development run evicts the cache to its budget again when it ends, passed or not (
cache.trimin its result), so the cache never sits over its budget between runs.While the last run left the cache over its budget or its disk low, the queue starts one run at a time, and only when none is running; while the builder node is under disk pressure it starts none.
dev statusand a waitingdev runsay so (held). The controller still creates no Job inpiceli-dev.
Version 0.38.0¶
Features
piceli gitops history,gitops showandgitops compare: the controller’s deployment history on the command line, read-only, from the document the UI’s Deployment history reads.history [ENV] [--limit N]lists each environment’s runs, newest first, each withwindowandrelease_window;show RUN [--logs]is one run and the log tail it kept;compare ENV [A] [B]puts two runs side by side (default: the running release and the one before): source commits, components whose image changed, objects added, removed and changed, and both windows.--jsonprintspiceli.gitops-runs.v1,piceli.gitops-run.v1andpiceli.gitops-compare.v1. New codes:gitops-history-unavailable,gitops-run-unknown. See GitOps: Piceli’s controller and manifest export.Release markers: each finished release sends one OpenTelemetry log record named
piceli.release, from the controller (an environment deploy that applied a release, a publishedNixRelease) and from each Nix host’s agent to the host’s ownHostReportendpoint. It carriesdeployment.environment.name,deployment.id,deployment.status(succeeded,failed,rolled_back),service.version,vcs.ref.head.revision, the components it changed, its window (piceli.release.started_at,.finished_at,.seconds) and the previous release (piceli.release.previous.*). A rollback that ends a release sends one withrolled_back. Existing events and attributes are unchanged; the host agent’s resource addsdeployment.environment.name. See Deploy events to OpenTelemetry.
Fixes
A node under disk pressure that holds a Piceli cache recovers.
piceli dev cache clearandpiceli gitops cache clearrun their Job with the priority classsystem-node-critical. Under DiskPressure the kubelet admits only critical pods: the toleration of 0.35.0 got the pod scheduled, then the node evicted it. A ResourceQuota that limits that class in the namespace stops it; the refusal says so.A pod the node refuses or evicts fails the command with the node’s reason (
the cache-clear pod was rejected by the node: Evicted: The node had condition: [DiskPressure].), not “the cache-clear Job printed no result”.controller.cache_clearaddsreasonandmessage.No run or build starts on such a node, so their budget eviction never ran there. The controller now evicts the build cache to its budget itself, at most once per poll window, and records it in
storage.relief. It does not create Jobs in the development namespace, where untrusted code runs, so for the development cachestorage.reliefrecords the refusal and the status says to runpiceli dev cache clear.storage.cachescarries each cache’s last measured use (used, budget, free disk), and the controller isdegradedwith a plain reason (storage.problem,controller.storage_problem) while a node under disk pressure holds a Piceli cache.gitops statusshowshealth: degraded.
Version 0.37.1¶
Fixes
Piceli works again with the oldest
kubernetesclient it allows (29.0). Clients before 36.0 have noV4_CHANNEL_PROTOCOLconstant (port-forward checks failed with an import error), read the bearer token from another key (exec-plugin andtokenFilecredentials were not sent) and cannot choose a patch type per call (branch environments and claim growth sent a strategic merge patch). All three now work on 29.0 to 36.x.
CI
A failed nightly run (CI or Stress) opens one issue labelled
nightly-failure, comments on it while the failures go on, and closes it when the nightly passes again.Coverage uses the
sysmoncore (Python’ssys.monitoring): the test job with coverage was twice as slow as the others and the longest job of a pull request.The delayed-write executor test no longer fails when a read is slow on a busy runner: only the held write has the short time limit.
Version 0.37.0¶
Fixes
A NixHost runs a release only once it says so.
piceli gitops buildsand the Builds page named a host inrunning_onas soon as the release was published, before the host switched to it. A NixHost now counts only when its own agent reports the revision as its current system with its checks passed. Until then the build’s new fieldhost_switchisnot-switched-yet(the CLI prints “published, host not switched yet”); after it,switched.
Features
{source_rev:<context>}in a host build’senv. Abuild.envvalue can carry the full commit of the source a context reads, for exampleAPP_BUILD_REV = "{source_rev:shop}". It is filled in when the build runs, after the plan hash, so a commit that changes no staged file keeps the same plan. An unknown context, or one without a source, fails when the file is loaded. See host builds.
Version 0.36.0¶
Fixes
A reused lineage no longer keeps emptied folders.
piceli dev runremoved the files of a deleted folder but kept the folder. A Rust workspace with a glob member (members = ["crates/app/*"]) then failed on every later build of that lineage: cargo found a crate folder withoutCargo.toml. The sync now removes folders it leaves empty (never the lineage root, never undertarget/or.git/), also those left by older versions. The sync result counts them inremoved_dirs.
Features
ScratchVolume, a scratch folder on disk.MemoryVolumekeeps its data in RAM, which costs the node’s memory for large files.ScratchVolume(size_limit="2Gi")renders anemptyDiron the node’s disk and is accepted whereverMemoryVolumeis (containers, init containers, sidecars). Itssize_limitcounts against the node’s ephemeral storage: a pod that writes more is evicted.piceli importnow types a plainemptyDirasScratchVolume.
Version 0.35.0¶
Features
Cache budgets enforced by Piceli. On a storage class without quotas (k3s
local-path) a cache claim is a directory on the node’s disk and could grow past its size until the node was full. Before each development run the whole cache now counts (lineages, toolchains, cargo’s home, Git mirrors), and free lineages are evicted, least recently used first, while it holds more thanDevBuilds(cache_budget=)(default0.8) ofcache_sizeor while its disk has less than 15% free. A lineage a killed run never released, or one that never recorded its size, is measured again instead of counting as empty. Each cluster build Job does the same on its cache claim (JobSettings.cache_budget,ClusterBuildConfig(cache_budget=), default0.8), evicting the least recently usedtarget/<arch>-<page size>,stage/<name>andblobs. Both reportover_budget,fs_free_bytes,fs_lowand what they evicted (the run’s result and the build receipt’scache).Disk alarms. The controller reads every minute which nodes report
DiskPressureand the caches’ last budget checks, publishes them ascontroller.storage, andpiceli gitops alarmsraisesnode-disk-pressureandcache-over-budget(each resolved when the condition ends). The dev scheduler’s status carriesnode_disk_pressure.piceli dev runnever waits in silence. It says at once what it waits behind (queue, cache against its budget, a node under disk pressure), repeats its state every 30 seconds, and fails withdev-run-unschedulableand the scheduler’s reason when its pod finds no node for--unschedulable-seconds(default 60) instead of waiting for--queue-timeout.piceli dev cache clearfails the same way.
Changes
piceli dev cache clearandpiceli gitops cache clearJobs toleratenode.kubernetes.io/disk-pressure:NoSchedule: they free space, so they run on a node whose disk is full.The development cache budget was 85% of
cache_sizefor the lineages’ recorded bytes alone; it is nowcache_budget(80%) of everything in the cache. Build Jobs carryPICELI_CACHE_MAX_BYTESandPICELI_CACHE_MIN_FREE_RATIO, so cluster build plan hashes change once.
Version 0.34.0¶
Features
Client charts: one value adds objects and patches others.
HelmOptional(description, objects=[...], patches=[(obj, patch)]):patches(a JSON Patch or a merge patch per object, as forHelmToggle) applies only when the value is true, so one value (for exampleintake.expose) both installs a Service and a NetworkPolicy and switches the app’s listen address.objectsmay now be empty whenpatchesis not. A patched object may not be one of the optional objects of any value, nor patched by another value (bundle-invalid), and the patched render passes the safety gate. See Deliver to a cluster you never access.Client charts: optional secret inputs.
HelmChart(optional_inputs= ("privateCa",))names--set-fileinputs the client may leave out: the install no longer fails, and the Secret keys the input fills are omitted while it is empty (once passed, it is kept across upgrades like any input).piceli bundle --helmreports them asoptional_inputs; the README and the install command list them as optional.
Changes
The refusal for two values patching one object now reads
two values patch the same object(s); a patch list naming one object twice is refused (is patched twice; join its patches) instead of keeping the last one.
Version 0.33.0¶
Features
Build hosts run the controller’s Piceli version.
piceli builder serveclaims a build only while it runs the same Piceli version as the GitOps controller (controller.version). On a mismatch it claims nothing (the controller builds in the cluster), tells the controller its version (new requestbuild-host-version), writes the controller’s version into--version-file PATHwhen given and exits 75 (EX_TEMPFAIL, new codebuilder-version-mismatch), so its service installs that version without root (uv tool install "piceli==$(cat PATH)"before it starts) and starts again.piceli builder statusshowsversion-mismatch(version_mismatch,controller_versioninpiceli.builder-status.v1),piceli gitops hostsprintsVERSION MISMATCH, and the new alarmbuild-host-versionfires until the host runs the same version.builder serve --checkreports both versions and exits 1 on a mismatch. See The same Piceli version as the controller (0.33.0).Build hosts build in the controller’s builder image. The controller publishes its build Job’s image (
controller.builder_image);builder serveuses it by default and pulls it again when it changes (claiming nothing while it cannot), so a host never builds in an older image.--imageis now an explicit override, said once when it differs.
Version 0.32.0¶
Features
piceli artifacts publish-files: release files as one OCI artifact. Each file is one layer stored as it is, so its digest is the file’s sha256, titled with its name; the manifest hasartifactTypeand the empty config, and no time, so the same files give the same digest. Plan (exit 3),--approve,--move-tag, credentials and receipt as forartifacts publish.piceli artifacts fetch-filedownloads one file by its digest (anonymous for a public repository) and writes it only when the digest matches. See Publish and sign release files.Release signing keys.
piceli secrets signing-key NAME --generate(or--file KEYto import an ed25519 key) keeps an ssh-ed25519 key in the local secret store (kindsigning-key;status,setup,backupanddeletecover it;SigningKey(NAME, public_key=...)declares it) and prints only its public key andallowed_signersline.piceli sign-file FILE... --key NAMEwritesFILE.sig, the same bytes asssh-keygen -Y sign -n file;--agent KEY.pubsigns with a key an SSH agent holds. New codessign-file-invalid,signing-agent-failed.
Version 0.31.0¶
Features
Client charts: optional objects, values in objects, an existing Secret, the claim size.
HelmChart(optional={"intake.expose": HelmOptional(..., objects=[...])})installs named objects only when the client sets the value;HelmChart(values={"intake.allowNamespaces": HelmValue(..., targets=[(obj, "/json/pointer")])})writes a value (a list, a string, a number) into named objects;NetworkPeer.namespaces([...])selects namespaces by name (kubernetes.io/metadata.name In [...]), so a policy’s namespace list can be such a value.existingSecret=NAME: the chart makes no Secret and every workload reads the client’s Secret, which holds every key the README lists; nothing is generated, sohelm templateand Argo CD render the same every time.storage.sizesets every claim’s size, andHelmChart(storage_env={"DISK_LIMIT": 90})sets a declared variable to that share of it, in bytes. See Deliver to a cluster you never access.Image labels.
labels = {...}per[[output.image]]inhost-build.toml(build hosts and the cluster) andbuild.toml(buildx --label): image config labels such asorg.opencontainers.image.licenses. See Builds without a VM.piceli promote HOST --from ENV --wait --machines MODULE[:ATTR]names the module declaring theInfrastructureof the host’s server; without it, the one the composition imports from its directory is used.--infrastays an older name of--composition.piceli accessprints services by what they speak. Web pages (http,https) first, with their label; others by scheme (turn:HOST:3478) and marked “not a web page”. The scheme comes fromapp.access.forward(scheme=...), the Service port’sappProtocol(ServicePort(app_protocol=...)renders it), its name, or a well-known port; JSON entries carryschemeandweb. See Reach your services from your laptop.
Fixes
piceli gitops buildsnames the build host of images a build host delivered (they were missing from the history), and each in-cluster build records the machine that built it.Tests that build real images (
PICELI_DOCKER_TESTS=1, the kind suites) remove thepiceli-e2e/*andpiceli-examples/*images they add, on every outcome; a test whose image cannot be removed fails.
Contributors
make release-bump VERSION=X.Y.Zpins a release everywhere (pyproject, uv.lock, the skill, the API snapshot, eval baselines);make docs-freshbuilds the docs without the cache.
Version 0.30.0¶
Features
piceli bundle --helm: the client bundle as a Helm chart. The same render, after the same safety gate, becomes a Helm 3 chart (Chart.yaml,values.yaml,values.schema.json,README.md,templates/), so a client installs it with onehelm installand removes it with onehelm uninstall, with no archive and noprepare.sh. ConfigMap keys and secret inputs become camelCase values (cluster-id→clusterId; an imported token is--set-file NAME=FILE); aHelmChartdeclaration names required settings (Helm’srequired), descriptions and boolean toggles (HelmToggle: JSON Patch or merge patches applied when the value is true; the patched render passes the safety gate too). Generated Secrets (Random,Static,Template) are made at install likeprepare.shmakes them and kept acrosshelm upgrade(lookup). Images stay pinned by digest;image.registrypoints every image at a mirror,image.pullSecretsnames pull Secrets,storageClasssets every claim’s class anddeleteDataOnUninstallmakes uninstall delete the StatefulSets’ claims (by default they stay). Cluster-scoped RBAC follows the release namespace and is removed byhelm uninstall.values.schema.jsonrefuses unknown values. See Deliver to a cluster you never access.piceli bundle --helm --push oci://HOST/PATHpublishes the chart ashelm pushdoes, toPATH/<name>:<version>: without--approveit prints the chart’s deterministic digest and exits 3;--approve DIGESTpushes it (--credentials FILE,--ca-file).--app-versionsetsappVersion.
Not covered
TLS generators (
TlsCa, self-signed) and build images from--receiptare refused with--helm; use the kustomize bundle for them.
Version 0.29.0¶
Features
Only declared build hosts build. When the composition declares build hosts (
DevBuilds(hosts=[...])), the GitOps controller refuses claims, answers and standbys from any other host (not declared in the compositioninrejected_requests). A host still running after it was removed from the composition says so in itsbuilder serveoutput and claims nothing until it is declared again. The status lists the declared hosts (controller.build_hosts_declared). See only declared hosts.A failure before the build runs is handed over. A build host that cannot fetch a source, or whose container engine cannot start the build, answers
build-failedwithearly. The build is not failed: the controller hands it to another declared host (60 seconds before the in-cluster fallback) or to the fallback at once when no host is left, and quarantines that host for that source untilpiceli gitops release-host(controller.source_quarantine). Before, the host kept claiming the build and failing it, and the fallback never ran. See hand-over.piceli builder serve --once --take-nextstands by for the next build this host may take, claims it before the in-cluster fallback (which waits for a standing-by host at most 2 minutes pasthost_wait), builds it and exits (--timeout, default 30 minutes). Claims and standbys wake the controller within 2 seconds. See –take-next.builder serve --checkalso runsgit ls-remoteof every source the controller follows, as the build fetches it, and writes into a scratch directory and the build cache from inside the builder container (sourcesandscratchinpiceli.builder-check.v1; exit 1 when one fails).NixOS build hosts.
builder install --printprints the unit without checking anything, so it works before the secrets exist.builder serve --args-file PATHreads more arguments at start (one per line), so a fixed unit from Nix takes its image and flags from a file under the state directory. See NixOS build hosts.
Fixes
piceli gitops build ENVdid nothing when the environment’s commit was already deployed: it now builds its images again (offered to build hosts, or in the cluster) and deploys them through the usual plan and approval.The images a build host delivered for
gitops buildare no longer asked for again at the next step.
Design
A proposal for alarm targets per organisation and environment (named webhook-based targets, routes, a test command): Design: alarm targets per organisation and environment. Not implemented yet.
Upgrade notes
A build host that is not in
DevBuilds(hosts=[...])of a composition that declares hosts can no longer claim builds: declare it, or stop it.builder install --printno longer runs the checks; runbuilder serve --checkwhere the service runs.
Version 0.28.0¶
Features
Alarms.
Controller(alarms=Alarms(targets=[Notify.ntfy(url), Notify.webhook(url_env=...), Notify.desktop()], secret="piceli-alarms", waiting_after="10m"))makes the GitOps controller send a short message when an environment fails or waits too long for a build host or an approval, aNixReleasefails or waits, the composition does not import, or the controller restarts on a new version. Each alarm is sent once (also across restarts), with one “recovered” message when it ends; each names the environment or host, the reason code and the next command. Secret URLs and tokens come from a Kubernetes Secret, never the config, logs or status. A failed send is listed in the status (gitops-alarm-failed) and never stops the controller.piceli gitops alarms --followraises the same alarms as desktop notifications on your machine. The train’s notifiers gainNotify.ntfy. See Alarms (0.28.0).--waitafter an install or a promotion.piceli gitops enable infra.py --approve HASH --wait [--timeout 15m]waits until every environment runs its revision with its checks passed, printing progress lines (staging: building (waiting for a build host) 3m), or reports the first failure with its environment, stage, reason code and log tail (a composition that does not import included).piceli promote HOST --from ENV --approve DIGEST --waitdoes the same for the Nix host. Exit 0: all good; 1: a failure; 2: timeout (gitops-wait-timeout). See Wait for every environment after an install: --wait (0.28.0).Test an upgrade before it replaces the controller.
piceli gitops enable infra.py --approve HASH --canaryfirst runs the new controller image once, as a Job that imports the composition, resolves each environment, loads its builds and plans it without applying anything (main: imports, plans 3 changes, builds 2 components: ok). A failure refuses the upgrade (gitops-canary-failed, naming the first failure) and the live controller keeps running;--forcereplaces it anyway. The Job and its ConfigMap are removed when the command ends. See Test an upgrade before it replaces the controller: --canary (0.28.0).Previews in minutes.
piceli env up BRANCH --cluster infra.py:CLUSTER --waitasks the GitOps controller to deploy the branch’s preview now: the controller wakes for the request within 2 seconds instead of waiting for its next poll, takes the images a merge train offered for the branch’s head (no build), and the command prints the preview’s URL once it runs with its checks passed (Environment.per_branch(url= "https://{branch}.preview.example.org")). A branch outside the rule’s patterns gets a preview on request.piceli env down BRANCH --cluster ...tears it down until the branch’s next push, andEnvironment.per_branch(down_when_merged=True)also tears down a branch once it is merged intomain(deleting the branch always did). Exit codes asgitops enable --wait. Every request people make (env up,gitops sync,gitops approve,promote, …) now wakes the controller at once. See Previews in minutes.Build hosts as services.
piceli builder install --cluster infra.py:my_cluster --host builder-1(run on the build host) writes and starts a systemd unit (Linux) or launchd property list (macOS) that runsbuilder servewith the same arguments and Piceli program, restarts it on failure and stops it with SIGINT. It runs thebuilder serve --checkchecks first and refuses on a missing credential or a missing docker, git or kubectl;--printonly shows the unit;piceli builder uninstall --host builder-1removes it.piceli builder statuslists each build host’s Piceli version, last sighting, live or expired claim, last build and quarantine, and the declared hosts never seen (claims and progress reports now carry the host’s version;controller.build_hostsin the status). See Run a build host as a service (0.28.0).Cycle report. Piceli records how long each commit takes from a push to running with its checks passed, and each phase on the way: the controller per deploy (queued, waiting for a build host, building, delivering, applying, checking) in its history, status and OpenTelemetry event; a train run in its
run.jsonand trace (queued, merging, testing per step, promoting, images, pushing);piceli host waitper host switch.piceli cycle report [--since 24h] [--target NAME] [--json] [--markdown]gives, per environment, Nix release, Nix host and train, the p50 and p90, the count, the slowest phase and the slowest cycle;--markdownprints a table to paste into docs. A push time Piceli does not know is said, with when it first saw the commit. See Cycle report (0.28.0).Adopt the train in ten minutes.
piceli train init train_spec.py --from scripts/merge.shwrites a starting train spec from a shell script: cargo, pytest, npm, make and similar commands become steps, the base branch is read, and every line it cannot translate stays as a TODO comment (also printed). Without--fromit writes a commented template.--images infra.pyaddsStep.imagesfor aController(prebuilt=True),--host NAMEruns the cargo steps on a build host; an existing file is kept unless--force.piceli train SPEC --branches ... --compare "COMMAND"runs the old command in a scratch clone, then the train on the same branches without promoting, and prints a side-by-side table (wall time, time per phase, tests, failures, retries, and whether both agree). See Adopt the train in ten minutes.
Version 0.27.1¶
Fixes
A restarted controller deploys again when the composition’s head failed to import. When an older controller could not import the composition’s newest commit (for example, it used a newer Piceli API), it recorded the commit as failed. After an upgrade or a restart, the new controller never tried that commit again and had no composition loaded, so it read no requests and ran no steps: builds waited forever, no build host could claim them and the in-cluster fallback never started. Now a controller of another version tries the failed commit once more, and when the head still fails it deploys the last good commit again.
piceli gitops statusshowscomposition at <commit> failed to import (<type>: <message>), and the health isdegraded. The error keeps the exception’s message, not only its type.A dead build host no longer blocks a build. A claim lives while its host reports; after 10 minutes without a report the in-cluster fallback may take the build and another host may claim it (before: 4 hours, and the fallback waited forever).
A waiting build says what it waits for: the hosts it is offered to, who claimed it, and when the in-cluster fallback starts or why it never does.
piceli builder servesays once why it skips a build (claimed by another host, failed untilpiceli gitops sync, claim refused and why). A controller without a builder image no longer takes the fallback and fails; the build keeps waiting for a host and says so.
Version 0.27.0¶
Features
Versioned Secrets.
app.secret("turn", {...}, versioned=True)names the Secretturn-<hash>, where the hash is a short keyed digest of its values (never the values). A changed value is a new, immutable Secret; every workload that readsturnis pointed at the new name in the same apply, so it rolls. Piceli still never rewrites a Secret. The plan printssecret turn → turn-a1b2c3d4e5 (new value)and, once nothing mounts an old version,delete turn-0f9e8d7c6b (no longer mounted). The current version and the one the running release uses (the rollback target) are kept. Binding arandom,tls-self-signedortls-cavalue directly into a versioned Secret is refused (versioned-secret-generated). See Versioned Secrets.
Version 0.26.3¶
Fixes
A Nix build with a private flake input uses the exact tree the fetch step fetched. Before the build, the build host fetches each private input with exactly the attributes
flake.lockpins (shallowincluded; 0.26.2 forcedshallow = false) and recomputes the tree’snarHash. A different tree stops the release withinfra-nix-input-unreachable, naming the expected and the actual hash. The step then stores a copy offlake.lockin which each fetched input points at its tree in the Nix store, and the build reads it withnix build --reference-lock-file. The build no longer resolves a private input itself, so it needs no Git credential and cannot get another tree. The checkout’sflake.lockand every other pin stay as they are, so the built store path is the same. This applies tobuilder serve --publishanddev nix build. The copy is held by a GC (garbage collection) root until the build ends, like the trees.The in-cluster build Job builds contexts at a source’s top. Since 0.23.0 the Job links each source to its checkout on the cache claim, and a context with
path = "."(or none) read that link and failedcontext-missingin every Job. The Job now reads the checkout itself. Build hosts were not affected.context-missingnames the context and the path, for examplehost build failed (context-missing): context 'site' (source 'web'): context directory /work/src/web/site is unreadable (Permission denied).A new value in a retained Secret is refused by the plan. A rotated or regenerated value, or a changed template, under an existing Secret name passed the plan and then failed every apply with
retained-content-precondition-failed. The plan now refuses it withretained-content-differs, naming the Secret and the keys (never a value). Put the new value in a Secret with a new name.retained-content-precondition-failedsays what failed. The execution’sdiagnosis.preconditionnames the object, the check and each differing field, with keyed digests of the expected and live values. A pipeline reports it asrelease X was not applied: a precondition failed (...), not as “did not become ready”: nothing was written and the live release keeps running.
Upgrade notes
A changed value under an existing Secret name now stops the plan (
retained-content-differs) instead of failing every apply. Piceli never rewrites a retained Secret: give the new value a new Secret name.Use the 0.26.3 builder image for the in-cluster build Job fix; the fix runs inside the Job.
Version 0.26.2¶
Upgrade notes
Nix hosts: render the host module again and switch once. The host agent now activates a new system in a new order (below). A host keeps the old agent until its module is rendered again and switched to one time. Deploy stages are now
activate,checksandboot(wereswitchandchecks).secrets statusexits 1 for S3 key pairs the owner has not stored. An S3 (object storage) key pair the owner makes by hand (NixCache(write_credentials=, read_credentials=)) waspending; it is nowmissinguntil stored. Pairs the nextinfra applycreates staypending.
Changes
A Nix host makes a new system the boot default only after its checks pass. The agent records a pending attempt, activates the new system for this boot only (
switch-to-configuration test), runs the checks, and then sets the profile and the boot default. A failed check activates the previous system again. An agent that died mid-attempt rolls it back on its next start (host-deploy-interrupted), and a reboot comes up on the previous system.piceli host statusandwaitnever hang on SSH (Secure Shell). A status read connects within 10 s and gives up after 30 s. A session that breaks after login is the newhost-ssh-failed;host-unreachablestays for no session at all.waitkeeps waiting until--timeout.Replace a server instead of rebuilding it.
Server(on_image_change="replace")recreates a server whose image changed, on the same IP addresses and with its current user data (the first-boot secret). The default,"rebuild", rebuilds it in place as before, and now warns when the server has user data, which a rebuild reuses although it was single-use.piceli infra replace REF SERVERreplaces one server on request, through the usual plan and approval.infra applyreads the OpenTofu state once instead of three times (each read costs about 1 s of CPU).Garbage-collection roots on docker build hosts.
BuildHost.docker(roots_dir=...)keeps what a build fetched or made safe from Nix’s garbage collector while it is needed: a fetched private input until the build ends, an--imagebuild until the next build of that name.dev nix buildfetches the private inputs the release path fetches, so a plain--imagebuild of a flake with private inputs no longer fails.Tests: the forward, telemetry and parallel-train tests no longer fail on a busy machine.
Docs: a shorter roadmap, one object-model page instead of three, and unused images removed.
Version 0.26.1¶
Private flake inputs are fetched on a docker build host. The fetch and publish steps of a docker build host ran the image
Nonewhen the host and itsDevProfile.for_nix()declared none, and Nix then aborted (“cannot determine user’s home directory”) as uid 65532 without a home it owns; SSH also refused to run without a passwd entry. Both steps now use the image the build run uses (the host’s, the profile’s, else theDevBuildsimage; a missing one is refused whenbuilder serve --publishstarts), and run as 65532 with an entry and a home of their own (the container starts with only SETUID/SETGID to add it, then drops every capability).infra-nix-input-unreachableanddev-nix-publish-failednow name the docker or Nix error instead of “the fetch failed”. The 0.26.0 builder image keeps working.The S3 key pair test has a hang guard sized for its 47 OpenTofu runs (it timed out under load, never with a wrong result).
A forward that has just started is recorded for
access stop --stalealso on a loaded machine. For a moment afterexeca new process’s command line reads empty, so its fingerprint read as unknown and the owned-process registry silently skipped the record;piceli access stop --stalethen could not recognise that forward as Piceli’s. The registry now reads the fingerprint again while the child exists (up to 5 s).The stale
access uiforward test is reliable under load. Its fakekubectlclosed every connection, as a forward with a dead upstream does, so the supervisor’s health probe restarted it with a new pid about 13 s after the start; it now keeps them open, as a healthy forward does. The foreign listener binds a port the kernel picks, and the forward’s port comes from the pytest worker’s own slice below the ephemeral range, so neither a connection nor a parallel run of the test can take it before the fake binds it.
Version 0.26.0¶
0.26.0 brings a pre-merge train: piceli train merges candidate branches
onto the base, judges them by the checks of the commit under test (impact
tests, with a retry of only the failed tests), bisects out the branches
that fail, and runs its steps on build hosts with warm and reused builds,
behind a queue per train, seen with piceli trains, OpenTelemetry and
notifications. A promoted train hands the images it built to the GitOps
controller (prebuilt), which deploys them without building again. Nix
builds fetch private flake inputs with the build host’s or the
controller’s Git credentials, and builds are now something you can see and
start: NixReleases follow a branch or a schedule, piceli gitops build
and cancel start and stop one, and the UI’s Builds page shows them all.
A pre-merge train:
piceli train. Declare aTrainin Python (piceli.train:Train(name, steps=[...], base="main", tested="tested", tag="tested/{date}.{n}", remote="origin")) withStep.command,CargoCheck,CargoTests(select=Impact())andStep.publishsteps, then runpiceli train MODULE[:ATTR] --branches a b c. Each candidate set is merged withgit merge --no-ffonto the train’s current head (the base plus the branches already joined) in a temporary worktree, and judged by the steps of the merged tree: the spec module is loaded from that tree in a fresh process, so a branch meets the base’s newest rules and its own. The first trial merges every candidate; a failing set is bisected, and each failing branch is ejected with the step, an output tail and its log (train-step-failed,train-step-timeout,train-spec-invalid; a conflict is never resolved:train-merge-conflict). See Merge train.Impact selection and flaky tests.
Impact()tests the cargo packages with changed files plus their dependents (fromcargo metadata), and every package when a root file changes (Cargo.toml, the toolchain and cargo configuration by default; configurable). ACargo.lockchange (Impact(lockfile="packages"), the default) tests the members that use its added or changed entries, by name and version, transitively over the resolved graph, and their dependents; a toolchain or[patch]change, a lock that cannot be read or a graph that cannot be resolved still tests everything (lockfile="all": any lock change does). A file outside every package tests everything (Impact(outside="all"), the default), except documentation (ignore=("*.md", "docs/*"));outside="none"ignores them.CargoTests(select=Impact(), on_push="all")(andCargoCheck) tests everything in a run with--pushand the impact selection otherwise. WithImpact(dev_targets=True), a member that reaches a changed package only through a dev-dependency runs only its integration test targets that name the changed library (the whole member when its unit tests or shared test code name it).CargoTestsruns every test binary, then retries only the failed tests, by exact name; a test that passes on the retry joins and is recorded as flaky with its failure output.Promote and push, only when asked.
--promotetagstested/<date>.Nand movestestedand the base by fast-forward only (refused withtrain-not-fast-forwardortrain-checkout-dirty, before anything moves), then runs the publish steps;--push(with--promote) pushes the tag and both branches atomically. Without them no ref changes and nothing is pushed.Retire joined branches:
--retire. With--promote(or--promote-run),--retirerenames each joined branchto_delete_<date>_<branch>once promoted, never deleting it; a branch checked out in a worktree with changes, or one that moved after it joined, is left alone.--retire-remote(needs--push) also deletes the branch on the remote after the push, only while it is at the joined commit. The result’sretireobject, thebranch-retiredandretire-skippedevents, the summary (retired) andpiceli trainssay what was retired (train-retire-invalidwithout the promotion or push it needs).Keep the tested head; promote a reviewed run. Every run that joined something points
refs/piceli/train/<name>/lastat its head.piceli train APP --promote-run RUN(orlast) promotes that head without running the train again, refused when the base is no ancestor of it (train-not-fast-forward) or the run is unknown (train-run-unknown). It is an ordinary run of the train: it can be queued (--promote-run last --queuepins the run it means when it queues), and one that raises midway isrun-failed.Train steps on build hosts.
Train(builds=..., hosts=[...])names where steps run:"local"and theBuildHosts of aDevBuilds(orMODULE:ATTRof one, or of aClusterwithdev=); a step’s ownhosts=wins. A step on a build host is apiceli dev runof the merged checkout: the same upload, the host’s own queue and slots, quarantine and warm lineage (the profile’s shared cargo target on that host). Only thePICELI_TRAIN_*variables and the step’senvtravel, never the caller’s environment; declared outputs come back as artifacts. A host that is down or unavailable at start hands the step on, andTrain(fallback="local")(the default) runs it here when every host named is down (elsetrain-host-unavailable). The result’shostis where each step ran.Warm local runs. Local commands take one of
Train(local_slots=1)slots of the machine (file locks shared by every train), so the laptop keeps its limit. Trials use a few stable worktree paths under$XDG_CACHE_HOME/piceli/train, each with its own shared cargo target directory (Train(target_dir="auto");CARGO_TARGET_DIRin the environment wins), and files whose content did not change since that path’s previous trial keep their modification time, so cargo rebuilds only what changed.sccacheis used when onPATH(Train(sccache="auto")).Content-hash reuse. A step with
inputs=(globs) andoutputs=(paths) has a key: the Git blobs of its inputs, its definition (argv, env, impact selection) and the toolchain pins. A step whose key passed before isreused: nothing runs, its outputs are restored from a content store, and the result names the run, trial and host that made them. It holds across trials (bisection included), runs and trains of the machine; failures are never kept. Publish steps get the outputs of the tested steps restored first, so what is published is what was tested.Parallel halves. After a failed joint run the right half is judged, at the same time as the left one, on top of the left half’s merge; when the whole left half joins, that verdict stands, else it is discarded and the right half judged again.
Train(parallel="auto")does it when two slots are free ("on","off"). The verdicts are the sequential ones.Bounded caches:
Train(retention=Retention(...))andpiceli train-prune. At the end of every run the train prunes leftover trial worktrees, cargo target directories unused for 14 days or beyond 100 GiB per train and repository (least recently used first), content-store records unused for 30 days or beyond 20 GiB (shared by the machine) and the bytes no record keeps, and runs older than 30 days beyond the newest 20; never what a running trial holds, and never the queue, the lock, the run in progress, the runs queued requests name or the newest promoted runs. The result reports the sizes kept (prune).piceli train-prune NAME|SPEC [--dry-run] [--json]does the same by hand. The cache layout is nowcheckouts/<train>/<repo>/andtargets/<train>/<repo>/.History. Each run’s result (
piceli.train.v1: every branch’s verdict, every step’s start, duration, host, verdict and log) is kept in$XDG_STATE_HOME/piceli/train/<name>/runs/, with an append-only flaky registry (flaky.jsonl: count, first and last seen, last failure tail). Steps run through a runner interface and report to an event sink. Every event of a run is appended toruns/<id>/events.jsonl, and the lock names the run and process holding it.A queue per train.
piceli train … --queueon a busy train queues the request with its flags (--promote,--push) and returns at once with its id and position (piceli.train.queued.v1). Everypiceli trainserves the queue in order when its run ends;piceli train-queue NAMElists it,--cancel IDcancels a waiting request and--drainserves it here. A request whose process died is resumed by the next server; one whose branches are gone is rejected when it starts.piceli train-wait Q-IDwaits for the run that serves a request, andpiceli trainsand the UI show the queue.run-failed. A run that raises midway (train-git-failed,train-run-failed, Ctrl-C:train-run-cancelled), or whose build hosts are all gone (train-host-unavailable), is recordedfailedwith its reason and what had joined, emitsrun-failed, and sends its notifications and OpenTelemetryfinishedevent;train-waitexits 1 for it.See a train:
piceli trains [NAME]. One view of the trains on this machine (piceli.trains.v1,--json), read from the events without ever taking the lock: the run in progress with its branches, the steps done and the running step’s start, elapsed time, host and log tail (--followstreams the log until the run ends); recent runs with their verdicts and seconds per step; per-step trends (median of the last N executions, the last one against it:slower,faster,steady); flaky tests with their counts and last failure; and, with--composition/--infra, which run produced what each environment and NixHost runs (its tag, its commit or the product commit it pins, matched to a run’s promoted tag or head). A killed run shows asinterrupted.Fast trains are seen too. A step on a build host emits
step-placedwith the host its command went to, sopiceli trainsshows it running there, and its span and run row name it (hostsin each recent run). A reused step isreusedin its event (with the run, trial and host it came from), in the status (reusedper run; no trend sample) and in the trace (an ok span withpiceli.train.reused_from). Parallel halves show both trials and steps at once (trials,steps, the right halfspeculative, a discarded one indiscarded), andhalves-parallel,trial-discarded,outputs-restoredandprunedare span events of the run.piceli train-wait RUN. Blocks until a run (its id, or a train’s name) ends and exits with its verdict, printing the run’s summary (piceli.train.summary.v1):train-interruptedfor a killed run,train-wait-timeoutafter--timeout,train-run-not-found.A train is a trace.
Train(telemetry=Otlp(url, protocol="http/protobuf")), or the standardOTEL_EXPORTER_OTLP_*variables, exports each run over OTLP/HTTP: a root spanpiceli.dev.train, a span per trial and per step (piceli.dev.train.trial,piceli.dev.train.step: branches, step, kind, host, verdict, duration, impact selection), span events for verdicts, promotion, push and flaky tests, a log record with each step’s output tail and the eventpiceli.dev.train.finished. Spans go out as they end, through a bounded queue with a 2 s timeout: a collector that is down never slows or fails a run (onetrain-telemetry-failedwarning).http/protobufis sent as protobuf (thepiceli[telemetry]extra; a spec that declares it without the extra is refused before the run withtrain-telemetry-unavailable),OTEL_EXPORTER_OTLP_PROTOCOL=http/json(or unset) as JSON. A collector behind a private CA takesOtlp(..., ca_file=PATH)orOTEL_EXPORTER_OTLP_CERTIFICATE; the cluster-onlyheaders_secret=andca_secret=are refused with the local alternative named (the controller, in turn, refusesca_file=).Notifications when a train ends.
Train(notify=[Notify.command(argv), Notify.webhook(url or url_env=, headers_env=), Notify.desktop()]), eachwhen="always"or"failure": the command gets the summary JSON on stdin, the webhook aPOSTof it, the desktop a headline (osascript,notify-send). The summary names the joined and ejected branches (with step and reason), the promotion, tag and push, the duration and the flaky tests, never step output. A failing notifier never changes the result: onetrain-notify-failedwarning, and the run record’snotifylist.The UI’s Trains view.
piceli ui serve --trains(with--train-composition MODULEfor the deployed-by-train join) shows the same document, live, with the queue.The train’s images go to the cluster:
Step.images("infra.py"). On promote the train computes the change key the GitOps controller will compute once the promoted head is pushed, builds the images with the same host-build code aspiceli builder serve, pushes them to the cluster’s registry with their provenance (naming the train run and host) and offers them to the controller with a newprebuiltrequest, before the push the controller reacts to. It covers each component built from the repository, and each pipeline environment’s build spec (the spec, the files its contexts select, node facts and the controller’s platforms; one OCI index over the platforms). The composition may live in another repository than the train’s, with contexts reading both:Step.images("infra.py", repository="https://…/infra.git", branch="main"). The train then takes every source an environment follows at the commit the controller will pick: its own repository at the promoted head, every other one at its current tip, read from the same remote with the machine’s Git credentials; the offer records those commits. A failure istrain-images-failed.Controller(prebuilt=True)uses those images. Such a controller keeps an offer and uses it only when a step’s own change key is the offered key, the reference names the component’s repository in its registry, pinned by digest, and the digest is in the registry; it then deploys without waiting for a host or a Job. Offers show in the controller’s status with the source commits their key was made with; a component built although an offer exists names, in its status entry (prebuilt), the sources whose commits differ (another repository moved after the offer). Only for registry delivery.Private flake inputs of a Nix build. A NixRelease (and
piceli dev nix build) whoseflake.lockpins a private input now builds on a build host with no Git credential of its own: before the build, the build host fetches each private input into its own Nix store (builtins.fetchTreeof the locked attributes, onenixprocess per input) with agit-tokenfrom its own Piceli secrets, and the build finds it there by itsnarHash. Covered: the promotion gate’s input, every input whose repository is aSourceof the composition (by host and path,git+ssh,git+https,github:and.gitnormalised), andNixRelease(inputs={"lib": "lib-token"})(default credentialgit); the release plan lists them (inputs), and the build host checks each one againstflake.lockof the commit it fetched.git+httpsusesGIT_ASKPASSwith credential helpers off,git+sshof the token’s host is fetched over HTTPS,github:/gitlab:get Nix’saccess-tokens; the token is on the fetch step’s stdin only, never in an argument, the build, the log, the receipt, the manifest, the cache or the closure. A failure refuses before any build with the new codeinfra-nix-input-unreachable, naming the input, its URL and the credential tried. The release’s stages gaininputs. See Nix host releases.Two ways to give that fetch a credential:
NixRelease(credentials="host")(default) uses the build host’s own read-only credential;credentials="controller"uses the composition’s Git Secret (piceli secrets git), which the controller seals per build to a one-time X25519 key the build host claimed it with (bound to the build and the host; the claim’s cache-key proof covers that key), only for inputs on the hosts of the composition’s sources (the plan’sgit_hosts). The claim of a controller release without a key is refused.piceli secrets git-token NAME --host HOST --promptstores a token (with its host, used for no other, and--username),piceli secrets git-ssh-key NAME --host HOST --file KEY [--known-hosts FILE]a read-only deploy key; either reaches a build host withpiceli secrets backup --only NAMEandrestore.builder servechecks them: at start it warns per release of an input whose credential the host lacks, andbuilder serve --checkclaims nothing and printspiceli.builder-check.v1(each release’s mode, inputs and credential states; exit 1 when one is missing).needed_secrets(),secrets statusandsecrets setuplist each credential a NixRelease declares ininputs=as an owner-made secret needed on its builder (wherenames the build host; once stored, the next step is thesecrets backup --only ... --recipienttransfer andrestorethere), and, withcredentials="controller", the composition’s Git Secretpiceli-build-git(in the cluster) instead;secrets statusalso gives each release’s mode (nix_inputs).GC roots for fetched inputs. On a native build host each fetched tree gets an indirect GC root, held from the fetch until the build ended, then removed with its temporary directory.
piceli dev nix build --input NAME[=CREDENTIAL]adds private inputs to a hand-run build; with--publish, the composition’sNixReleaseof the output adds its own, and the plan lists them.A NixRelease follows a branch, or a schedule.
NixReleaseaccepts a host that followsBranch("main"): each new head of the branch is planned with the branch’s pointer and no tag, and the build host checks the commit is on the branch before it builds.schedule="daily"(hourly,weeklyor five cron fields, UTC) plans the newest tag or head again at that time. Each one goes through the promotion gate, the plan and the approval as a new tag does; the record names itstrigger_kind(tag,branch,schedule,sync,cli,ui).Builds started by hand:
piceli gitops build NAME [--ref TAG|COMMIT] [--approve DIGEST]. A NixRelease plans that tag, its branch or a full commit (the newest without one); an environment rebuilds every image at the commit it follows. It is recorded as triggered bycliwith the requester (--by, else the user name);--approveapproves the plan in one go when its digest is that one, otherwise it waits forpiceli gitops approveas usual. An unknown ref isgitops-build-ref-unknown.piceli gitops cancel NAME. A planned or queued build is dropped; a build host that holds one stops before its next stage and its answer is refused (gitops-build-cancelled). A cancelled image build fails its step untilpiceli gitops sync. Nothing to cancel:gitops-build-not-running.Build hosts report their progress.
piceli builder servesends abuild-progressrequest at each stage (fetch, build, publish or push) and at most every 15 seconds while it logs: the stage and the last 4000 characters of its log, kept on the wanted build inbuilds_wanted. A build that is no longer wanted (cancelled, or superseded by a newer commit) stops at its next stage instead of building on.One record per build:
piceli gitops builds [--target NAME] [--state STAGE|active] [--json]. NixRelease publishes, image builds and train handoffs share one record,piceli.builds.v1: the trigger (kind, who, text), the commit, tag and branch, the build host, the stage (fromapproval-requiredandqueuedthroughfetching-inputs,building,signinganduploadingtopublished,failed,cancelledorrejected) with a time for each, the log tail, the duration, the plan digest and the targets that run it now, joined withpiceli targets.A Builds page in the UI. Delivery → Builds lists every build with those fields, filters by target and state, a live log tail polled every three seconds, and approve (the plan and its exact digest, confirmed), retry and cancel buttons for sessions that may sync. “Build now” takes a target and a tag or commit and writes the request
piceli gitops buildwrites.Fix: the UI’s breadcrumb named the Machines page “Page not found”.
New error codes. In the new
trainarea:train-not-found,train-unknown,train-load-failed,train-invalid,train-repo-invalid,train-branches-required,train-branch-unknown,train-push-needs-promote,train-busy,train-merge-conflict,train-step-failed,train-step-timeout,train-spec-invalid,train-not-fast-forward,train-checkout-dirty,train-publish-failed,train-push-failed,train-git-failed,train-host-unavailable,train-run-unknown,train-images-failed,train-run-not-found,train-wait-timeout,train-interrupted,train-run-failed,train-run-cancelled,train-queue-not-found,train-queue-not-waiting,train-queue-cancelled,train-notify-failed,train-telemetry-failed,train-telemetry-unavailableandtrain-retire-invalid; ingitops:gitops-build-ref-unknown,gitops-build-not-runningandgitops-build-cancelled; ininfra:infra-nix-input-unreachable.A train merges where Git has no identity. On a CI runner or a build host without
user.name/user.email, every merge used to fail and was reported as a conflict. The train now commits its own merges and tags asPiceli train <train@piceli.invalid>there, and a merge that fails for any other reason istrain-merge-failedwith Git’s message, never a conflict.
Upgrade notes
Train impact:
Cargo.lockand files outside every package. Since the 0.26.0 preview,Cargo.lockis no longer a default root: a lock change tests the members that use its changed entries (Impact(lockfile="packages")) instead of the whole workspace, and a changed file outside every package (a script, a fixture) now tests the whole workspace instead of nothing (Impact(outside="all")), except*.mdanddocs/*. A spec that listedCargo.lockinrootskeeps testing everything on a lock change; drop it fromrootsfor the new selection. For the earlier behaviour:Impact(lockfile="all", outside="none"). A cargo step’s content-hash key includes its selection, so steps withinputs=run once more after the upgrade.Plan digests of gated NixReleases change once. A release plan now lists the private inputs the build host fetches first (
inputs; the promotion gate’s input is always among them), so the first plan after upgrading has a new digest for every gated release, and for any release with a covered input: an approval of the old digest no longer matches; approve the new one (or letauto_approvedo it).Upgrade build hosts with the controller. Only a 0.26.0
piceli builder servefetches private inputs before the build, and the claim of acredentials="controller"release from a build host that sends no key is refused.Controller(prebuilt=True)is opt-in. Without it the controller keeps no offer and builds the images as before, even when a train hands them over.A superseded or cancelled build stops at its next stage. A build host no longer builds on a build that is no longer wanted; a cancelled image build fails its step until
piceli gitops sync.
Version 0.25.3¶
The Infomaniak preset refuses
S3Key. Infomaniak’s API lets only the account’s own user create S3 (EC2) credentials, never an application credential, restricted or not:infra applyfailed with a 403 onOS-EC2.Infomaniaknow creates no S3 keys (supports_s3_keysis false), andBucket(keys=[S3Key(...)])there is refused when the module loads, before any plan, with the new codeinfra-s3-keys-unsupported. Its message gives the commands for each pair:openstack ec2 credentials createsigned in as the project’s user,piceli secrets s3 NAME --prompt, and theNixCache(write_credentials=, read_credentials=)to declare. A genericOpenStackstill creates them.NixCache(read_credentials=NAME)names a read pair you made. It is the alternative to the bucket’sS3Key(access="read")(giving both, or naming the write pair or another key of the bucket, is refused; only for ans3://cache).NixHostandpiceli host secretsinstall it exactly as they install a bucket’s read key:/var/lib/piceli-host/cache.envby default, the same plan, digest and comparison; while it is not stored,host secretsrefuses withinfra-credential-missingand the command that stores it.write_credentials=works withoutkeys=as before.secrets statuslists owner-made pairspending. Both pairs are reported withcreated_by: "owner", statependinguntil stored (exit 0, like the pairs the nextinfra applycreates), next commandpiceli secrets s3 NAME --prompt, and a detail naming how to make them (openstack ec2 credentials create, signed in as the project’s user);wherenames the build host of aNixReleasefor the write pair and the host for the read pair.needed_secrets()rows gainhint.secrets setupasks for them (piped: one part per line). The owner-made read pair gets the sames3-read-not-enforcedwarning as a bucket’s read key. Ans3://cache’s ownwrite_credentials=is nowpendingbyownertoo, instead ofmissing.Piceli uploads OpenStack images itself, from where they were built. OpenTofu’s image resource sent the file from the machine running
tofu applyin one stream: a dropped connection after minutes left a half-made image insavingand the next plan replaced it. Glance cannot resume an upload (PUT /v2/images/{id}/fileandglance-directstaging are each one stream), sopiceli infra applynow creates the image record, sends the file and lets OpenTofu adopt it (tofu import), then plans again and applies that plan, which must be the approved one less the upload (infra-plan-changedotherwise).Image.from_buildof an image built on a docker host over SSH uploads it from that host (a shortdocker run --rm -iof the run image with the host’s/nixread-only);piceli dev nix build --imagerecords the host and the store file in the sidecar (built_on,store_file).upload="local"keeps the local copy. A fresh Keystone token reaches the host on stdin only and is revoked after each attempt.The plan lists each upload (
images: action, from where, size, sha256), covered by its hash; images a killed upload left at the cloud are listed asstale_imagesand deleted before the upload.Three attempts, on the same record when Glance put it back to
queued, else on a new one after deleting the old; theninfra-image-upload-failed(new code, exit 1).Progress on stderr (bytes sent, total, rate, ETA; at most once a second), the log’s path when it starts (
image-upload-NAME.login the state directory),uploaded_imagesin the JSON result.A failed or interrupted upload (
Ctrl-Ctoo) deletes the image it made, by its tags. Glance’schecksumandos_hash_valuemust be the hashes of the bytes sent, and those the declared sha256 (infra-image-checksum).
A half-made image is replaced, and a new sha256 too. An image in the state whose status is not
active, or whose sha256 is not the declared one, is planned with-replace:replace (a failed upload left it in saving). Images carry their sha256 as a tag (piceli.io:image-sha256=…) and ignorelocal_file_path, so an image uploaded by 0.25.2 is kept: its first plan updates its tags in place.
Version 0.25.2¶
Infomaniak’s public network is found by name.
Infomaniak()lookedext-net1up as arouter:externalnetwork; it is a shared network that is not, so every plan failed with “Your query returned no results”. The preset now matches the name alone.OpenStack(public_network_external=)chooses how a generic cloud’s network name is matched:True(the default, as before) only arouter:externalnetwork,Falseonly one that is not,Nonethe name alone. The plan hash of an Infomaniak declaration changes (its lookup changed).An OpenTofu failure names what it failed on.
infra-tofu-failedandinfra-apply-failedsay which resource or data source failed (from OpenTofu’s JSON diagnostics:tofu plan failed on data.openstack_networking_network_v2.public-network), list the addresses infailed_on, and start eachtofu:line on stderr with its address. OpenTofu’s whole output, redacted, is kept intofu-<command>.login the state directory (tofu_log);piceli infra plan|apply|destroy --verboseprints it.A destroy removes the images Piceli uploaded to OpenStack. Glance gives every image a computed
metadatamap, which was read instead of its tags, sopiceli infra destroyrefused Piceli’s own image as foreign (infra-foreign-resource). An image’s labels are now read from its tags.cryptographyis a dependency. Generating keys is core topiceli secrets setup,secrets nix-cacheandsecrets age, which crashed withModuleNotFoundErrorwhen Piceli was installed without thecryptoextra.cryptography>=42is now a base dependency;piceli[crypto]still installs (an empty extra). The codesstate-crypto-unavailableanddev-nix-crypto-unavailable, which could no longer happen, are removed.
Version 0.25.1¶
A reaped forward is stopped only once its exit is confirmed. The reaper of
piceli accessforwards took a process whose fingerprint no longer matched as gone, but an exiting process reads as unknown for a moment (its command line is released before it becomes a zombie). It now reports a forward stopped only when its pid no longer exists, is a zombie, or is held by another process on two reads in a row.
Version 0.25.0¶
A Nix host’s releases need no hand-run publish step: in 0.25.0 the GitOps
controller publishes a NixHost’s release when you push its tag, behind a
promotion gate that only lets through product commits an environment
verified. Tags carry a prefix per target, and piceli targets shows every
environment and host in one view.
The controller publishes Nix host releases.
NixRelease(host, source=, builder=, auto_approve=False)(new inpiceli.infra) in a composition makes the GitOps controller follow the host’sTag("web-v*")in the flake’s source: a new tag is planned (piceli.nix-release-plan.v1), waits forpiceli gitops approve NAME <plan digest>unlessauto_approve=True, and is asked for as anix-publishwanted build.piceli builder serve --publish MODULE:ATTR(repeatable; a native host with it only publishes) claims it only for a cache whose signing and S3 write keys are in its own secrets, proves it with the key’s signature over the claim (the keys never leave it), checks that the tag points at the commit, builds, signs and publishes exactly asdev nix build --publishdoes and answersnix-published; the controller accepts only a manifest signed by the cache’s key for the planned commit and tag.gitops status --jsonlistsnix_releases(latest tag, state, stages with times, manifest digest); the history and telemetry (piceli.nix.release.finished) record each attempt. A failure isfailedwith its tail (gitops-nix-release-failed) until a newer tag orgitops sync; tags present at first sight are the baseline. A composition may now hold releases and no environment.builder serve --publish MODULE:ATTR --publish-onlyclaims only those publishes on any kind of host, never an image build (said once), and needs no cluster registry: a remote machine that only publishes is a docker host with an SSH context to itself (BuildHost.nativeis the machine running Piceli), so a publisher never changes who builds a cluster’s images.A build host that only publishes.
BuildHost(..., runs=False)(docker or native) declares a host that only publishes Nix releases: it is in the plan (runs: false, only when declared, so other hashes stay) andpiceli dev hostsshows it (runsin--json).piceli dev run,piceli dev nix buildandbuilder servenever pick it without--host, so an agent’s runs never land on the publisher.builder serveon it implies--publish-onlyand is refused without--publishor with--no-publish-only(dev-host-publish-only).A promotion gate and
piceli promote HOST --from ENV.NixRelease(..., gate=Promotion(input="app", environment="main"))(Promotionis new inpiceli.infra) publishes only a commit whoseflake.lockpins the input to a commit the environment ran with its release checks passed (deployed, every check passed, no rollback). The controller leaves another tagrejected(promotion-not-verified, with the newest passed commit) and checks it again on every poll;dev nix build --publish --release HOST --composition MODULEruns the same gate and refuses an unreadable history (promotion-history-unreachable). The result,pinned(input, commit, environment, verified_run, verified_at), is in the release plan, the signed manifest (an optional field) andgitops status.piceli promote web-1 --from mainplans the pin of the newest passed commit in the flake’s working copy (nix flake lock --override-input, or a direct edit with the computed narHash without nix), the commit and the next tag of the host’s pattern, and with--approve DIGESTcommits, tags and pushes atomically; it refuses a dirty working copy or one out of sync with its upstream. A hand-run publish of a gated host’s attribute to its cache runs the gate without--release(found in the--publishmodule or--composition). The controller keeps a record of the commits each gated environment passed (the last 200 per source;passed_commitsin the history), so a verified commit keeps qualifying after it left the 20 listed runs.NixHost(gate=Promotion(...))makes the host agent refuse a build without that verified pin (host-promotion-missing); itsNixReleasetakes the host’s gate. New codespromotion-*,promote-*; seedocs/gitops.md.Tag prefixes per host.
Tag("web-v*")orders tags by the version after the pattern’s literal prefix (Tag.prefix,Tag.version(tag)):web-v1.10.0is aboveweb-v1.9.0, and two hosts released from one repository (web-v*,api-v*) never see each other’s tags.Tag("v*")never matchesweb-v1.2.3. The agent’s resolve and “never older” use it;dev nix build --publish --tag-pattern GLOBpoints the host’s tag when a commit carries several, anddev nix gc --tag-pattern GLOB(repeatable) keeps the newest--keep-tagsversions of each.One status view of every target.
piceli targets [--composition MODULE] [--infra MODULE] [--json]lists each GitOps environment and each NixHost with its commit or tag, the product commit it pins (a promotion gate’spinnedwhere present, else every source’s commit), its checks and its state, as of when and from which source (controller or host agent):piceli.targets.v1. The controller is read once, by default from the composition’s home cluster with itspiceli loginprofile (explicit flags win; without the profile, environments showprofile-not-foundand the login to run); hosts over SSH in parallel with--timeout; an unreachable one showsunreachableand never fails the view (exit 1 when any target failed or is unreachable). The UI’s new Targets view shows the same document; the in-cluster UI cannot reach hosts and shows each release as published. The host agent now reports the pin of the build it runs: it copies the deployed manifest’spinnedinto its status (current.pinned,previous.pinnedand each attempt’spinned; a rollback restores the previous build’s),piceli host status --jsonshows it, andpiceli targetsprefers it (facts.pinned: host-agent) over the controller’s release. Status files without the field still read.An encrypted backup of the secret store.
piceli secrets backup --to PATH [--recipient R]... [--recipients-file F] [--force]streams every file of$PICELI_CREDENTIALS_DIR(whatever its kind, the registered clusters’ kubeconfigs included) and the profiles intoage, to the recipients you choose (age1...keys, hardware keys through their age plugin, SSH keys); no plaintext touches the disk. The recipients and a marker of the last backup (time, sha256, names) are kept, without values, incredentials.backup.jsonnext to the store, so later backups need no flags.piceli secrets restore PATH [--identity FILE]decrypts in memory, refuses an unsafe archive (secrets-restore-archive-invalid) and restores0600files in0700directories; into a store that is not empty it lists what it would add, what is identical and what differs, and writes only with--approve DIGEST(exit 3 otherwise).piceli.infra.machines.secrets_backup.staleness()tells when the last backup is older than the newest secret;backup --jsonincludes it. Needs theagecommand (secrets-age-missingotherwise).The cache’s S3 keys from
infra apply.Bucket(..., keys=[S3Key( "cache-write"), S3Key("cache-read", access="read")])(S3Keynew inpiceli.infra) declares the key pairs a bucket needs.infra planlists them ins3_keys(name, bucket, access, action, credential,read_only_enforcedand how; never a value);infra applycreates them (OpenStack:openstack_identity_ec2_credential_v3) and stores each as the credential of its name (s3-keys,0600), also after a partial apply, redacted from every output (an EC2 credential’s id, its access key id, is not reported). A re-apply is a no-op; removing a key deletes the pair through the plan and then its stored credential; a credential Piceli did not store is never replaced (infra-credential-exists). Key pairs need an encrypted, enforced state (infra-state-unencrypted).NixCache(bucket=)takes the bucket’s write key aswrite_credentialsby default.What “read” means at OpenStack. An EC2 credential carries its user’s project roles, and Swift lets
memberread and write every container:S3Key(access="read")is a separate pair, not a read-only one, and the plan saysread_only_enforced: false. A bucket in a project of its own limits what the pair reaches. Since Keystone’s OSSA-2026-005 fix a restricted application credential may not create EC2 credentials:infra-s3-key-refused(new) names that.piceli host secretsinstalls the cache’s read pair. This reverses 0.24.0, where the hosts’ cache keys lived only in sops-nix: for a cache whose bucket declaresS3Key(access="read"),NixHost’sread_credentials_file=defaults to/var/lib/piceli-host/cache.env, andhost secretswrites the stored pair there (0600root, on ssh’s stdin, compared by sha256, never read back). The plan’scacheshows the path, credential, a short digest and what the host has; a rotated pair is replaced without--replaceand needs no activation (the agent reads the file each poll). A host withoutage_identity=gets only this file; the age-only plan and its digest are unchanged. Aread_credentials_file=you give (a sops-nix path) is left alone.piceli.infra.machines.keys.needed_secrets(...)lists every secret a declaration (Infrastructure,Bucket,NixCache,NixHost) needs: name, kind, who creates it (infra-applyoroperator) and the command.Backups need two recipients.
piceli secrets backuprefuses a single recipient (secrets-backup-single-recipient): losing that one key loses the store and its backup together.--single-recipientallows it, and the backup’s manifest, the remembered marker incredentials.backup.jsonandstaleness()record it (single_recipient: true). The recommended pair is an age key kept in the password manager plus an offline age key:piceli secrets backup-key --out PATH [--add] [--force]creates it withage-keygen, writes the private key to PATH (0600; refused inside the store (secrets-backup-key-invalid) and over an existing file without--force(secrets-backup-key-exists)), prints only itsage1...recipient and, with--add, adds it to the remembered recipients.age-plugin-yubikeyis documented as the hardware alternative.Two-part credentials are asked for, checked and stored by part.
piceli secrets provider NAME --promptasks for a Porkbun API key pair as “Porkbun API key (pk1_…)”, then “Porkbun secret API key (sk1_…)”, and an OpenStack (Infomaniak) application credential as “Application credential ID”, then “Application credential secret”, each with where to find it; identifiers are echoed, secrets are not. Each part is checked before anything is stored (not empty, no space around it, no:inside,pk1_/sk1_, 32 hex for the ID): a wrong one is refused withinfra-credential-part-invalid, whosepartnames it, so a pasted secret alone or a swapped pair is caught at once, not at apply. Parts are stored under their own names; thestoredline and JSON name them ("parts": [...],"provider","replaced"), never their values. Piped input is one part per line;--from-envreads the provider’s standard variables (PORKBUN_API_KEY,PORKBUN_SECRET_API_KEY,OS_APPLICATION_CREDENTIAL_ID,OS_APPLICATION_CREDENTIAL_SECRET,HCLOUD_TOKEN). The provider comes from--provider,--infra MODULE:ATTR, the credential stored before, or the name (porkbun,infomaniak,hcloud, alone or before a dash); otherwise one token.piceli secrets s3 NAME --promptchecks and stores its two keys by part too. A credential stored as oneA:Bvalue still reads; one that lacks a part is refused by every plan before any API call (infra-credential-incomplete: “porkbun: one part of two stored, re-runpiceli secrets provider porkbun --prompt”), and re-running that command replaces it.piceli.infra.machines.credential_parts.credential_reports()reports every stored credential’s completeness;secrets backup --jsonlists the incomplete ones (incomplete).piceli secrets status MODULE[:ATTR]andpiceli secrets setup.statuslists every secret a module’s declarations need (Infrastructure,Bucket,NixCache,NixHost,NixRelease,DevBuilds, and a composition’s clusters, whose credentials arepiceli loginprofiles):present,missing,incomplete(a credential that lacks a part),damaged(unreadable, readable by others, another kind, a signing key whose public key is not the declared one),pending(a key pair the nextinfra applycreates: the infrastructure’s records show it not applied yet; not an error) ornot-needed(the user data of a server that exists); who creates it (infra-apply,piceliwith--generate, orownerwith--prompt); the exact next command; what it is for and where else it must live (the host, a build host, “read once at creation”). Then the backup’s state (none,stalewith the newer names,single-recipient,current) and warnings (an S3 read pair the cloud does not limit to reading, a spent user-data key).--jsonprints onepiceli.secrets-status.v1object; exit 0 when every secret is stored and complete or pending, 1 otherwise (a pair applied but absent here ismissing: the next plan stores it again), 2 for a module that declares nothing (secrets-nothing-declared).setupwalks the missing ones in order: provider credentials part by part, the keys Piceli generates (printing only the public halves to copy into the declaration or.sops.yaml;--yeswithout a terminal), the user data (offered, left for right beforeinfra applyby default), the S3 pairs (left toinfra apply) and a backup. It never replaces a stored key without a typed confirmation;--jsonprints one object per step. Never prints a value.A cache declared before its key exists:
NixCache(key_name=).NixCache(key_name="cache-1", bucket=...)names the signing key without its public key (NixCache("cache-1:base64...", ...)still works), sopiceli secrets statusandsetupload the module that the key does not exist for yet, andinfra planof the bucket works.statusshows the keymissing, then, once generated,copywith “putcache-1:...into NixCache(public_key=)” (blocking: exit 1);setupgenerates it and prints the public key to copy.dev nix build --publish,dev nix gc,host moduleand the agent’s configuration refuse withdev-nix-cache-key-unset, namingpiceli secrets setup MODULE. A composition holding aNixReleaseof such a cache still loads, so its environments deploy as usual: the controller keeps that releaserejectedwith reasondev-nix-cache-key-unsetand its message (ingitops status,nix_releases, andpiceli targets, where the host isheld), plans and publishes nothing for it, and takes the tags it sees once the key is declared as the baseline;gitops enableprints a warning line for it. A module whose declaration raises while loading is now reported under the declaration’s own code (for exampledev-nix-cache-invalid), elseinfra-load-failed, notinfra-not-foundwith a hint about anInfrastructureattribute;hostcommands do the same.needed_secrets()also takesNixRelease(its cache’s signing and write keys are needed on its build host too) andDevBuilds, and eachNeededSecretcarriesprovider,whereandbuild_host(the release’s builder).Carrying a build host’s keys there:
piceli secrets backup --only NAME. The signing key and S3 write pair aNixRelease’s builder publishes with are made on the owner’s machine;backup --only cache-1 --only cache-write --to PATH --recipient <the build host's age1...>writes just those, encrypted to that one key (one recipient is enough with--only; the manifest saysonly: true; an unknown name issecrets-backup-only-unknown), without touching the last backup’s marker or the remembered recipients.piceli secrets restore PATH --identity KEYon the build host adds them (plan, then--approve, into a store that is not empty) and does not adopt the transfer as its backup configuration.secrets statusgives that command for each such secret once it is present.S3 pairs from
infra applyare stored by part, aspiceli secrets s3stores them, socredential_report()sees them complete. Plans pass OpenStack and Porkbun credentials to OpenTofu from their stored parts (Provider.credential_env(parts)now takes the parts by name, not anID:SECRETstring).piceli secrets s3 NAME --from-envreadsAWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEY.Upgrade note: credentials stored by part need 0.25.0. A credential that 0.25.0 stores by part (a Porkbun key pair or an OpenStack application credential from
secrets provider, S3 keys fromsecrets s3orinfra apply) cannot be read by an earlier Piceli, which expects oneA:Bvalue. Credentials stored before still read in 0.25.0. Keep every machine that shares a secret store (or restores its backup) on 0.25.0.
Version 0.24.0¶
A machine without a cluster: 0.24.0 creates NixOS hosts on OpenStack clouds, points DNS at them, publishes signed Nix builds to your own binary cache and lets each host follow your release tags on its own, with checks and rollback.
A single NixOS host, end to end.
docs/single_nixos_host.mdtakes one host from nothing to its first release with one tested declaration (an Infomaniak server from an uploaded image on a persistent port, a security group, a key pair, a bucket as the Nix cache, two Porkbun records, aNixHostfollowingv*tags), then compares a single host with a Kubernetes environment.OpenStack machines, with an Infomaniak preset.
OpenStack(...)andInfomaniak(...)inpiceli.infrarender servers, a persistent public port perPrimaryIp(a replaced server keeps its addresses without a floating IP;protect=Trueisprevent_destroy), security groups with inbound rules, key pairs, uploadedImages (sha256 verified before the upload:infra-image-checksum,infra-image-unavailable) andBuckets for the pinnedterraform-provider-openstack/openstack3.4.0. The application credential reaches OpenTofu only in its environment; ownership marks andinfra-foreign-resourcework as for Hetzner; prices are a declared table.Infrastructure(buckets=)is new; Hetzner declarations render and hash as before.Secret user data, at creation only.
Server(user_data=UserData(NAME))(new inpiceli.infra; OpenStack servers) gives a server a stored secret as its user data: a cloud-config, a script or a bootstrap key, stored withpiceli secrets user-data NAME --file PATH(or--prompt;0600, never printed). It renders as a sensitive OpenTofu variable passed only throughTF_VAR_*, redacted from every output (also JSON-escaped), withlifecycle.ignore_changes = ["user_data"]. Only a plan that creates or replaces the server loads it; the plan shows the secret’s name and a short digest (user_data), which the plan hash covers. Later plans never need it and never replace the server for it. A creating plan without it fails with the new codeinfra-user-data-missing. The provider keeps only its SHA-1 in the state. The single-host guide now bootstraps the host onto a tailnet with a one-hour, single-use key and opens no public port 22.piceli secrets delete NAME [--kind KIND] [--yes]removes a stored credential, such as the spent bootstrap key of a server’s user data.--kind(provider,state-key,nix-cache,s3,age,user-data) refuses a credential of another kind (infra-credential-invalid). Without--yesit asks for the name on a terminal, otherwise it exits 3 with the command to run and deletes nothing. It prints the name, kind and path ({"state": "deleted", ...}), never the value. The single-host guide uses it to discard the spent key.OpenStack flavors are an allow-list.
OpenStack(flavors=[...])is required andInfomaniak(flavors=)defaults to its smallest,a1-ram2-disk20-perf1, likeHetzner(server_types=): a server with another flavor is refused when it is declared (infra-invalid).DNS records at Porkbun, for servers anywhere.
Porkbun(credentials=)inpiceli.infrarendersDnsRecord(..., provider=Porkbun(...))for the pinnedmarcfrederick/porkbun1.3.3 OpenTofu provider (API v3; one record per answer). A record’s servers may now be at another provider than the record: each answer is a reference through the server’s own provider (an OpenStack server on a port answers with the port’s address), so records follow a replaced server and no address is written down. The key pair is stored asAPIKEY:SECRETKEYand reaches OpenTofu only asPORKBUN_API_KEY/PORKBUN_SECRET_API_KEY(redacted, refused in the environment ofpiceli secrets provider). Records carry no labels, so the ledger alone owns them (infra-foreign-resourceotherwise). New codeinfra-dns-api-disabledfor a domain without API access.DnsRecord(ttl=)now defaults to the provider’s (300 s; Porkbun’s minimum and default 600 s).Porkbun API access is checked at plan time. A plan that changes records at Porkbun asks Porkbun’s API once per domain; a domain without API access fails the plan (
infra-dns-api-disabled) instead of the apply, and a check that cannot run fails it too (new codeinfra-dns-check-failed). The plan JSON’s newcheckssays whether it ran; it is not part of the plan hash.DNS records in the way fail the plan, not the apply. The plan-time Porkbun check now also reads each zone’s records. A record Piceli did not create (not in its ledger) where the plan creates one fails the plan with the new code
infra-dns-record-conflict: a CNAME or ALIAS at the same name (a parking ALIAS at the apex), any record at a name where Piceli creates a CNAME, or a record of the same name and type (for TXT, the same content). Itsconflictslists each record (type, name, content) and the fix: remove or change it at the registrar; Piceli never touches it. A wildcard does not answer explicit names, so it is a warning in the plan’s newporkbun-record-conflictscheck, as is a TXT record with other content beside Piceli’s.Provider.plan_checknow receives the ledger and may return several checks.A partially applied change exits 1.
piceli infra applyanddestroythat fail after changing something exit 1 (also for a refusal such asinfra-dns-api-disabled, which exited 2), withpartially_applied,applied(address, action, the provider’s id) andnot_applied; stderr says what was applied and that the next plan shows what remains. Upgrade note: a script that took exit 2 fromapplyas “nothing changed” must now readpartially_applied.Nix builds on build hosts, a signed binary cache and build manifests.
piceli dev nix build ATTRbuilds a flake output (a NixOS system; with--image, a disk image copied back with its sha256) as a development run withDevProfile.for_nix(): a docker host mounts its own/nixread-only and builds through its daemon, a native host uses itsnix.--publish MODULE:ATTRnames aNixCache(bucket=|url=, public_key=)(new inpiceli.infra); it plans (exit 3) and runs only with--approve DIGEST; the build stays isolated, and a separate step on the same host receives the signing key and S3 keys on stdin only, signs each path asnix copyuploads it, and Piceli uploads a manifestpiceli/NAME/COMMIT.json(piceli.nix-build.v1: commit, tag, flake attribute, store path, system, closure size, build time) signed with the cache key;piceli.dev.nix_verifychecks it and the narinfo with the standard library only. A cache’swrite_credentials(builds, gc) never reach a host; hosts read with read-only keys kept in sops-nix.piceli dev nix gckeeps the last 5 tags, the current main and their closures and deletes the rest after approval. Newpiceli secrets nix-cache NAME --generate(prints the public key only) andpiceli secrets s3 NAME --prompt; new codesdev-nix-*.Nix host releases.
NixHost(name, server=, flake=, follow=Tag("v*") | Branch("main"), cache=, checks=[HostCheck.unit|http|command], report= HostReport(endpoint))inpiceli.infra.piceli host module MODULE:ATTRrenders a self-contained NixOS module (a standard-library agent, its verifier, the configuration without secrets, a systemd service and timer) that you commit and import. On each poll the agent resolves the ref from signed pointers, verifies the pointer, the manifest and the narinfo with the cache key, fetches the system withnix copy(never builds: no builders,max-jobs 0), switches, runs the checks, and rolls back and marks the build bad when one fails. It refuses replayed pointers and older versions. It reports over OTLP/HTTP logs (a collector that is down never blocks a deploy) and writes/var/lib/piceli-host/status.json.piceli host statusandpiceli host wait HOST REVread it over SSH, with no cluster.dev nix build --publishnow also writes signed ref pointerspiceli/NAME/refs/{tags,heads}/REF.json(--branch), anddev nix gckeeps what they name.host waitjudges only the newest publication of the rev the host has seen (a commit published again is retried, and its earlier failure is not reported meanwhile);--published-afterpins one before the host has polled. New codeshost-*; seedocs/nix_hosts.md.A Nix host keeps 5 systems, not every one.
NixHost(generations=5)(at least 2: a rollback needs the previous one). After a deploy whose checks passed, the agent deletes the system profile’s older generations (nix-env --delete-generations +N; never the current, the previous or a held system, which it then names generation by generation) and collects the store (nix-store --gc), each within a time limit. A failure is reported (new codehost-prune-failed) and never fails the deploy. The status, each attempt and the OTLP eventpiceli.host.prunesay what was deleted, kept and freed;piceli host statusprints it. The rendered module sets the boot menu’sconfigurationLimit(GRUB and systemd-boot) to the same number withlib.mkDefault.Pin, unpin and roll back a Nix host.
piceli host pin HOST TAGdeploys a published tag’s build (verified like any deploy, an older version too, checked and rolled back on failure) and holds it;piceli host rollback HOSTswitches to the previous system, already in the store, runs the checks and holds it, so the next poll does not deploy what was rolled away from;piceli host unpin HOSTdrops the hold and starts a poll. They run the agent once over SSH (the module now puts apiceli-host-agentcommand on the host’s PATH), need no approval digest, printpiceli.host-control.v1with--jsonand reportpiceli.host.pin,piceli.host.unpinandpiceli.host.rollbackover OTLP. A hold lives in/var/lib/piceli-host/state.jsonacross reboots;host statusshows it andhost waitfor another build exits 1 withhost-pinned. New codeshost-pinned,host-pin-not-found,host-rollback-unavailable,host-busy,host-control-unsupported.A host’s secrets live in sops-nix; Piceli provisions its age key.
piceli secrets age NAME --generate(or--prompt) stores an age X25519 identity (0600, never printed) and prints itsage1...public key for.sops.yaml.NixHost(age_identity=NAME, age_key_file= "/var/lib/sops-nix/key.txt")andpiceli host secrets MODULE:ATTRput it on the host after approval of a plan that shows the path, mode, owner, public key and whether the host has the same, another or no key (compared by fingerprint); the key travels on ssh’s stdin, is renamed into place atomically, another key is replaced only with--replace, and the host re-runs its activation so sops-nix decrypts. The cache’s read-only keys and the OTLP headers are sops-nix secrets:read_credentials_file=defaults to/run/secrets/piceli/cache.envfor ans3://cache, and the agent accepts sops-nix’s0400root files (it refuses files that root does not own).NixCache(read_credentials=)is removed: Piceli no longer keeps keys that only hosts use. New codeshost-secret-*.Nix builds need no cluster.
piceli dev nix build --cluster(now also--dev) takes a bareDevBuilds, as well as aClusterwithdev=.No hand-copied image checksum.
dev nix build --imagewritesARTIFACTS_DIR/NAME.image.json(piceli.nix-image.v1: the image’s path, sha256, format, size, store path and commit), andImage.from_build(NAME, PATH)reads it (new codeinfra-image-build-invalid).Host keys without a cluster.
piceli infra register INFRA SERVERfor a server withoutcluster=pins its SSH host keys only, after the same preview and approval of their fingerprints (mode: host-keys, statepinned). The state’sknown_hostsnow keeps the other servers’ keys when one is registered.Hosts by name.
piceli host status|wait|pin|unpin|rollback|secrets NAME --infra MODULEfinds theNixHostthe module declares by its name, and reads it with the host keys pinned in the infrastructure’s state;--infratakes a module orMODULE:ATTR.Docker’s containerd image store. Docker 29 stores images in containerd by default (Docker Desktop offers it as an option). There the image ID (
docker image inspect --format '{{.Id}}') is the digest of the image’s index, not of its config, so every delivery of a Docker build was refused withdigest-mismatch. A build now reads the config digest fromdocker image save(the manifest for the built platform; attestation manifests are ignored) and records it asimage_id, the identity deliveries approve and nodes report; the engine’s own ID is the newlocal_id, used for the smoke check, presence checks anddocker image save. A delivery of an archive that holds several platforms takes the image whose config was approved, and the node is given only that image. The classic store is unchanged. To approve an image by hand, read its config digest as Image delivery shows.Local import and run with the containerd image store.
DockerLocalImporterrecords the engine’s own ID of the loaded image aslocal_idwhen it is not the config digest, andLocalRunGrant(local_id=)letsDockerLocalRunnerinspect and run the image by it; the runner checks that the saved image’s config is the grantedimage_id. Before, a loaded image could not be found by its config digest in the containerd store.
Version 0.23.0¶
Workloads roll when their configuration changes. Every Deployment, StatefulSet and DaemonSet that reads a ConfigMap or Secret of its release (volume, projected volume,
envFrom,env.valueFrom) carriespiceli.io/configmaps-digestand/orpiceli.io/secrets-digeston its pod template: a changed value rolls the pods; an unchanged or carried-over value changes nothing. Secret values are reduced to an HMAC-SHA256 under a random key kept in the private secret store and are never exposed. Jobs and CronJobs are not annotated.roll_on_change=Falseonapp.deployment,stateful_setanddaemon_set(orpiceli.io/roll-on-change: "false"on a raw workload) opts out;piceli importsets it for imported workloads that read configuration. Upgrade note: the first release after upgrading rolls every workload that reads a ConfigMap or Secret of its release once. A new release’s plan dry-runs the final pod templates of Secret consumers, so an unrelated change leaves them a no-op. A Secret or ConfigMap declared without content (adopted metadata only) adds no digest.Generated Secrets survive an empty state. When the state has no record of a
random,tls-self-signedortls-cagenerator but a live Secret the app declares carries this release’s owner annotation and field manager, the plan adopts its values instead of generating new ones (originadopted,secret_adoptionsin the plan JSON, bound with the Secret’s UID into the plan hash). Nothing is rotated, deleted or written. This fixes a GitOps controller with a new state volume failing withretained-content-precondition-failed. New codessecret-adoption-invalidandsecret-adoption-incomplete. Secrets without the app’s marks are refused as before.Steps shared by every platform run once.
build.shared_commands(a wasm32 browser bundle, generated assets) run once in a multi-platform build into<cache>/target/shared($PICELI_SHARED_TARGET_DIR); images copy their outputs withshared_files. Node facts are refused in them. Specs without them keep their spec digest and plan hash.host_waitis the real wait. A waiting step looked again only a whole poll after it ended, and the run loop slept a whole poll:host_wait="20s"with a 1-minute poll waited 121-122 s. Now the fallback starts whenhost_waitends.Cluster build Jobs keep their source checkouts on the cache claim: incremental fetches, and unchanged files keep their times, so cargo rebuilds only what changed. Each Job’s time is broken down per image (the whole Job, the wait to start, the source fetch, commands, assembly, push) in the controller’s log and history.
Reliable tests. Process waits in tests are hang guards of at least 30 s, and a test keeps them so; an end-to-end test builds a commit while a newer one arrives and checks the newer one is deployed.
Version 0.22.0¶
The toolchain follows the source, for builds too. A host build spec declares its pins:
[build] toolchains = { rust = "app/rust-toolchain.toml", node = "app/.nvmrc", wasm-bindgen = "app/Cargo.lock", binaryen = "123" }(paths relative to the stage root, or versions). Each tool is installed once into<cache>/toolchainsunder a lock: Rust with rustup, node and binaryen from their official tarballs checked against the published sha256, wasm-bindgen-cli withcargo install --lockedand the pinned Rust. It works for local builds, the cluster build Job andpiceli builder serve. The pins bind the plan hash and the image change key (a changed pin rebuilds); the receipt and the SLSA provenance record them.DevProfile(toolchains=...)pins node, wasm-bindgen and binaryen for development runs. New codeshost-toolchain-invalid,host-toolchain-checksum,host-toolchain-failed,dev-toolchain-checksum.Where each image was built. The controller records every image’s provenance (build host or node, builder image, commits, toolchains, times) with the component:
piceli gitops status --json, the history and its image cache.piceli builder servealso pushes it as an in-toto OCI 1.1 referrer (application/vnd.in-toto+json); a registry that refuses referrers only loses the copy.Faulty machines are quarantined. Machine-health signs in a build or a development run (internal compiler error, segfault, illegal instruction, bus error, machine check, a corrupt or repaired cache) record a health event for the host. After
quarantine_afterevents withinquarantine_window(BuildHostandController, default 2 in 24 h) the host is quarantined:dev runskips it,builder serveclaims nothing, the controller refuses its claims and does not fall back to a quarantined builder node (build-host-quarantined).piceli dev hostsandpiceli gitops hostsshow it;piceli dev release-hostandpiceli gitops release-hostend it.Suspect images.
piceli gitops suspects --host NAME [--since ISO]lists the deployed images a machine built;piceli gitops rebuild --host NAME [--since]drops their cached builds and redeploys them through the usual plan, approval and checks.Verified caches. Host builds re-hash cached blobs before reusing them; a mismatch is discarded, rebuilt and counted against the build host.
Delivery into the nodes, without a registry.
Controller(builds=("hosts",), delivery="nodes")withNode(target="ssh://user@host?runtime=k3s-containerd")on every node:piceli builder serveimports each image into each node’s containerd over SSH (ctr images import, through the validating relay), the platform of each node’s architecture. Nodes know it by a content tag of its config digests (node.piceli.invalid/<repository>:sha256-…). The controller accepts the answer only when each node’s import receipt shows its platform’s config digest; such a controller needs no registry.piceli gitops run --local-buildbuilds every platform and pushes one OCI index per image.The builder image ships Rust 1.97.0 and lld.
One public API.
piceli/public_api.pylists the 13 modules code imports from:piceli,piceli.app,piceli.artifacts,piceli.checks,piceli.envs,piceli.infra,piceli.k8s,piceli.k8s.ops,piceli.k8s.release_spec,piceli.k8s.templates,piceli.pipeline,piceli.server.cluster_install,piceli.testing.piceli.k8s,piceli.k8s.ops,piceli.artifactsandpiceli.infranow also export what the guides imported from internal modules (DeploymentComposition,PlanExecutor,load_all,DeliveryGrant,register_cluster, …), loaded on first use, so importing them stays cheap. The old import paths keep working. The API reference documents these modules (90 pages instead of 329), and the eval harness checks their exports.dir(piceli.envs)anddir(piceli.pipeline)list their lazily loaded names.Reliable tests: seven tests that failed on busy CI runners are fixed (wall-clock bounds, leases and fakes that assumed an idle machine). A nightly
Stressworkflow runs the suites on twice as many workers as cores (make test-stresslocally), and a test rejects elapsed-time bounds under 1 s. The kind shards also run on pushes to main.The build queue reaches the current build.
builds_wanteddrops what no step waits for any more (a superseded commit, an environment that moved on, leftovers of an older controller after three polls); a failed build showsfailedwith its tail and is not offered again until its inputs change orpiceli gitops syncretries it; a host never rebuilds what it just delivered while the controller still lists it.
Version 0.21.1¶
piceli builder servebuilds specs with inputs. Each source is checked out with its.git(kept between builds in~/.cache/piceli/builder/checkouts) instead of exported as plain files, so the build’s source identity check passes; 0.21.0 failed every spec build with an inputs file (source-identity, “not a git repository”). The builder container copies the read-only checkouts into its cache volume, owned by its own user, so Git verifies them with no exception to its ownership check. Unchanged files keep their times: incremental builds see only what changed (0.21.0’s archives stamped every file with the commit’s time).Private sources. Fetches never prompt; an HTTPS URL that cannot be fetched is fetched again over SSH with the host’s keys (this process only; no Git config changes). A source neither transport reaches fails with both errors.
Version 0.21.0¶
GitOps builds on build hosts.
Controller(builds=("hosts",))(or("hosts", "cluster")) makes the controller hand its builds to the build hosts instead of a builder-node Job: it publishes what it waits for (builds_wantedinpiceli gitops status) and the step waits asretryingwith reasonbuild-waiting(no attempt counted).Controller(host_wait="30m")is how long an unclaimed build waits before("hosts", "cluster")falls back to the in-cluster Job.piceli builder serve. On a docker build host: claims a wanted build (build-claim), exports each source at its commit with the host’s Git, builds with the same host-build code as the in-cluster Job, pushes to the cluster registry through a port-forward and answersbuilt(orbuild-failedwith its log tail). The controller checks the id, every image’s key and that each digest is in its registry, then deploys through the same plan, approval and checks.--oncebuilds one and exits.Every platform. A build for several platforms pushes one image per platform and one OCI index over them; the deploy pins the index digest.
piceli gitops enabledefaults the platforms to the cluster nodes’ architectures. Another architecture is cross-compiled (cargo zigbuild), not emulated.piceli build job-run --archives-onlywrites the image archives without pushing them.
Version 0.20.0¶
Build hosts.
DevBuilds(hosts=[...])declares where development runs may execute besides the in-cluster builder:BuildHost.docker(name, context=None | "ssh://user@host")(Linux containers of the profile’s image through Docker Desktop, OrbStack, colima, Podman or a Linux engine, locally or over the CLI’s own SSH transport),BuildHost.native(name)(this machine, no container: macOS-only builds) andBuildHost.cluster(node). Each hasslots,cpu,memory,platforms.DevBuilds(node=None)means no in-cluster runs.A queue on each host. Slots and waiting runs live on the host itself (uniquely named containers, or lock files), so every client shares them and they work with the cluster or its controller down; waiting runs start in the cluster queue’s order (priority, fair share, age).
Automatic fallback.
piceli dev runtakes the first host that is up and has a free slot (a docker host whose engine does not answer, or a cordoned builder node, is skipped) and tries the next one when the chosen host turns out unavailable (dev-host-unavailable).--hostpins one,--platformruns another platform (emulated on a docker host).piceli dev hostsshows each host’s state, platforms, slots and queue.The toolchain the source pins. A run in a pod or a docker host reads the source’s
rust-toolchain.toml(orrust-toolchain) and installs that toolchain once into the cache withrustup(channel, targets, components), instead of the image’s Rust;toolchain.rustin the result (dev-toolchain-invalid,dev-toolchain-failed).Every second of a run is attributed. The result has a
timeline: contiguous phases with millisecond wall times (the client’s queue, pack and transfer; the run’s extract, isolation, toolchain, lineage, sync, fetch, build and test, repair and artifacts). The controller’s trace of a run uses it: no gap, no second-rounded edges.Failed tests by name:
tests.failed_namesin the result andpiceli.dev.tests.failed_nameson the trace.A dropped log stream no longer orphans a run: the client reopens the pod’s (or container’s) log and skips the lines it has seen.
More corrupted caches repaired: an internal compiler error in rustc’s incremental state drops
incremental/and retries once; a plainundefined symbol(a corrupt rlib) clears the crates whose artifacts the link error names and retries once.Errors name the path: a link out of the tree (with its target), an unsafe path or special file in a run’s archive, a duplicate source name, a symlink leaving an image directory, an undeclared, missing or oversized build output.
DaemonSets run on every node: an environment’s
on_nodesno longer narrows a DaemonSet (a node agent); its ownnode_selectorstill does.piceli access ENV --cluster ...forwards only the declared forwards when the app declares any (no internal ports);--all-portsadds the other live Service ports.
Version 0.19.1¶
Tailnet companions in GitOps deploys. The controller rebuilt each composition environment without its
Access(and ignored the cluster’saccess), so an environment deployed by the GitOps controller got no tailnet companion at all in 0.19.0; only localpiceli envdeploys did.Tailnet: the NetworkPolicies are decided by the pods. In 0.19.0 an ingress policy was opened to the Tailscale operator’s namespace only when its
podSelectorlabels were all in an exposed Service’s selector. A policy that selects the same pods through other labels was skipped and kept blocking the operator’s proxies, so those services never answered on the tailnet. Now every ingress policy whosepodSelector(matchLabelsandmatchExpressions) selects a pod template of the release that an exposed Service selects gets the operator rule, on the exposed target ports only; still no policy is added or widened.Why a service is not on the tailnet. The plan’s
planstage hasaccess(not hashed): the companions, the policies admitting the operator andnotes(access-tailnet-skipped: not found, no selector, no matching port;access-policy-unchanged: a selector that cannot be evaluated, pods not in the release).piceli accesschecks the cluster read-only and printstailnet_notes(also in its JSON events):access-tailnet-missing(the running release predates the declaration),access-operator-missing,access-operator-not-ready(also a crash-looping operator),access-operator-unknown, andaccess-tailnet-pendingwith the operator’s latest Event on a companion without a name.Options:
Access(tags=[...])(tailscale.com/tags), and opt-inAccess(https=True): a Tailscale Ingress per HTTP port,https://NAME.TAILNET.ts.net/with a tailnet certificate.proxy_classis now rendered as thetailscale.com/proxy-classlabel, which is what the operator reads (0.19.0 wrote an annotation).Docs: the access guide’s tailnet section says that
Cluster(access=...)reaches every environment (release candidates and branches included), that branch environments create and delete tailnet devices, that the URL’s name is read from the operator (a stale device givesNAME-1), and has a cluster owner checklist (tailnet policy, OAuth client, the operator’s two traps).
Version 0.19.0¶
Development runs ship Git deltas. The builder keeps a Git mirror per repository; the run pod’s init container fetches the repository’s remote with the cluster’s Git credentials (the controller keeps a copy for runs,
piceli-dev-gitinpiceli-dev, limited to the composition’s source URLs, mounted only by that init container) and reports which commits the mirror has. The client uploads only agit bundlefrom the nearest known commit, the uncommitted diff and the untracked files: kilobytes for a typical run instead of the whole tree. Without a known commit the whole history goes once and seeds the mirror. Sibling sources the same way; a--sourcethat is the tree being run is skipped with a note. The result gainsupload(mode,bytes,chunks,retries,seconds) and per-sourcebase,bundle_bytesandfetch(fetched, masked error, note). An image without git still gets the whole tree.Uploads survive a slow or dropped link. 4 MiB chunks over
pods/exec, each retried after 1, 2, 4, 8 and 16 s, progress on stderr; the run waits while parts keep arriving;dev-upload-failednames the chunk, the bytes sent and the cause. The waiting line saysfetching sourceswhile the init container runs (it saidContainerCreating).Environments on the tailnet.
Environment(access=Access(tailnet=True))(alsoCluster(access=...)for every environment, andEnvironment.per_branch(access=...)) adds, per Service with a declared forward, a companion Service<name>-tailnet(loadBalancerClass: tailscale) that the Tailscale Kubernetes operator exposes on the tailnet underhostname({env}-{service}by default); the environment’s ingress policies that select those pods admit the operator’s namespace.piceli access ENV --cluster ...prints the tailnet URLs instead of forwarding them (tailnetin thestartedevent; exits 0 when nothing is left to forward); a companion without a name yet is forwarded, with a note;--forwardforwards everything.A busy forward is never restarted.
piceli accessholds each local port in a relay in front ofkubectl: a forward that moved bytes in the last 15 s isbusy, not failed, whatever its probe says; probes go straight tokubectlon a connection of their own; restarts keep the local port.statusevents and the dashboard carryrestart_reasons(last ten,{at, reason}) andtraffic.access stop --stalenow identifies every port’s holder before signalling any, so one leftover holding several ports is stopped through all of them;piceli statusreports a port held by that relayup, notoccupied. On Linux, a forward reaped after its server was killed and left a zombie no longer counts as running.A failing Git remote is never silent. Git’s stderr, masked, is kept in
gitops-git-failed(controller.last_error_detail,sources.*.error_detail,gitops status, the UI’s Cluster page), logged once per change, and emitted aspiceli.controller.git.failed;gitops waitfor a commit the controller cannot see fails after two failed polls (stage: fetch) withcontroller_error; a GitHub token that expires within 7 days is warned (gitops-token-expiringincontroller.warnings).Failed checks say why. The check’s own detail is in
checks.results[].detail,gitops status,gitops wait(failed_checks), the controller’s log and the UI.Corrupted caches repair themselves. A dev run or a cluster build step that fails with a loader, metadata or link error on cached artifacts has the blamed crates cleared and runs once more (
cache.repaired, the step’srepaired).piceli dev cache clear [--lineage] [--crate]andpiceli gitops cache clear [--crate]empty the caches without a root pod on the claim. A failure keeps itsfirst_error(the firsterrorline and 19 more), printed bydev runand at the end of a build Job’s log.Dev runs: the lineage name defaults to the repository’s main checkout (Git’s common dir), so every worktree builds warm on one lineage; the builder image has
clippyandrustfmt.piceli dev runno longer leaves its packed tree behind when it is stopped by SIGTERM or SIGHUP (a cancelled agent): its scratch is a tracked Piceli temporary directory.
Version 0.18.0¶
Development builds (
piceli dev run): a developer’s or coding agent’s build and test commands run on the cluster’s builder node for a working tree as it is on disk (the default, or--worktree PATH: uncommitted and new files, never Git’s ignored ones) or a commit (--ref), with sibling sources at pinned commits or as working trees (--source NAME=PATH[@REF]), in a shared warm cache. Declared on the cluster (Cluster(dev=DevBuilds(node=, image=, profiles=[DevProfile(...)]))) and installed bypiceli cluster init: namespacepiceli-dev, cache claim, NetworkPolicy, configuration. Each run is an isolated pod; the commit is packed on the client and uploaded overpods/exec(no registry, no Git credentials in the cluster), runs nothing from the repository until its NetworkPolicy holds (dev-isolation-not-enforcedotherwise); it builds in a cache lineage synced keeping unchanged files’ mtimes, so cargo rebuilds only what changed. The result (piceli.dev-run.v1) has the exit code, phase durations, cargo test counts, crates compiled and the log tail;--artifactcopies files back. New codesdev-*(piceli explain); seedocs/dev_builds.md.A queue for development runs.
slots(auto from the builder’s CPU and memory, or fixed); the GitOps controller runs the queue on a thread (orpiceli dev schedule): runs start by priority (roundbeforeagentbeforenormal), then fair share per requester, then age, are recorded inpiceli-dev-status(last 50) and their Jobs removed.piceli dev status(slots, running, queued with position, recent runs, cache use),piceli dev logs RUN [--follow],piceli dev cancel RUN.Observe the development cycle. Each finished run is an OpenTelemetry trace (
DEV <profile> <requester>, spansqueue,sync,fetch,build,test; eventpiceli.dev.run.finished; histogramspiceli.dev.run.duration,piceli.dev.queue.wait) through the controller’s exporter, and the UI has a Development builds page (slots, running, queue order, recent results, cache use; shown where development builds are installed).docs/dev_builds.mdhas an agent section and an integration-round recipe.The builder image has Node.js (for development runs of small JS tests).
Version 0.17.0¶
kubernetes<37. The kubernetes Python client 37.0.0 changedApiClient(call_api,update_params_for_auth, model constructors); Piceli needs a client from 29 to 36 until it is ported. Fresh installs of 0.16.0 and earlier pick 37 and fail on their first API call.A failed restore point leaves the release running. When a deploy’s
backupstage fails, its writers are started again on the running release before the controller backs off, also when an earlier attempt was killed mid-copy and left them at zero replicas (0.16.0 started them “again” at zero: the retry had recorded the replicas it found). The replica counts are written to the restore point’s record before any writer is scaled, and a retry takes them from a point that never ended. The deploy says so ([backup] started again on the running release: ...) and the status’failure.writers_startedlists the workloads.Every restore point attempt writes a clean point. A point directory is created only once (a reused id is refused with
restore-point-existsbefore any writer stops); a take first closes the points of attempts that died mid-copy (state: interrupted, their.partialfiles removed); and one process at a time takes into a directory (restore-point-busy, new: two controllers, or a controller and a laptop, sharing one would write and verify each other’s files). Arestore-point-checksum-mismatchnow says whether the file’s size differs from the recorded one.Restore points per environment.
Environment(restore_points=...)andEnvironment.per_branch(restore_points=...)take"off","touched","all"or aRestorePoints(...)for a pipeline environment; not set, the pipeline’srestore_pointsapply as before.Pipeline(..., restore_points=None)(the default) turns them off.A restore point size guard.
RestorePoints(max_claim_bytes=N, over_limit="fail" | "skip"), off by default: each claim is measured by a read-only helper before anything is quiesced or stopped;"fail"fails the stage with nothing stopped (restore-point-claim-too-large, new),"skip"leaves the claim out with a warning (skipped_claims).Build times per image. A pipeline image build Job reports each command’s time and, per image,
commands_seconds(the spec’s commands, shared by every image of the Job),assemble_secondsandpush_seconds; the deployment history keeps them underbuilds.<image>.timingswithshared_with(the other images of the same Job), and the controller logs one line per image (built api in 812.4s (commands 790.1s, shared with web, worker; assembly 14.2s, push 8.1s)). Images whose inputs did not change are still not built (each image’s change key covers only the contexts it lists).A persistent cargo cache for the build Job.
CARGO_HOMEis on the build cache claim (/cache/cargo-home) next to the target directory, so a build no longer downloads the registry index and crates again.Failed builds keep their evidence. A retry’s image build Job gets a name of its own (
piceli-image-build-<key>-r<attempt>); the failed attempts’ Jobs and pod logs stay until a build on that cache succeeds (0.16 deleted the failed Job and reused its name, so the failure’s log was gone). The status (failure.log_tail), each failed attempt and thepiceli.build.failedevent keep the last 80 lines of the build log (20 lines or 4000 characters before), at most 8000 characters.Telemetry that survives its receiver’s restart. Spans and events the OTLP endpoint refuses are spooled on the controller’s state volume (at most 64 MiB per signal) and sent again with their original times when it answers; a deploy that stops its own receiver keeps its trace.
Deploy events for timelines:
piceli.deploy.started,piceli.deploy.stage(one per stage that ran, at its end),piceli.deploy.retry(attempt, cause, next retry) andpiceli.deploy.finished(result).Timestamps on the controller’s log lines. Every line
piceli gitops runprints starts with its UTC time, as do the Python logging lines (an OTLP exporter’s errors).piceli gitops wait ENV COMMITblocks until the environment runs the commit (of any of its sources) and returnsdeployed,failed(with thestageandcause),approval-required,superseded,stoppedortimed-out(--timeout, default 1800 s;--json); retries are waited through. Agents end an integration round with it.The status shows the running stage and a summary. While a step runs,
envs.<env>.in_progress.stage(build, then the pipeline’s stages) andstage_sinceare published as they change; a failed step recordsfailed_stage.piceli gitops status --jsonaddssummary.<env>: state, commit, stage, attempt, next retry (ISO time) and last error.
Version 0.16.0¶
A stopped multi-cluster environment stays stopped across a controller restart. The first poll after a start forgot stop requests (and other per-environment memory) kept under the environment’s name when its records are per cluster (
edge@<cluster>), so the environment deployed again (0.15.0–0.15.1).Stage and build times. Run journals, run summaries and the deployment history (
piceli.gitops-history.v1) give each stagestarted_atandfinished_at(inputs, build, deliver, prerollout, backup, plan, apply, checks), each build its own (builds.<name>:started_at,finished_at,state), the apply’s deletes (prune) and the automatic rollback (rollback) theirs, and an owner-approved run itsapproval_wait. Runs and summaries also havefinished_at.Interrupted runs. A controller that restarts after dying during a step marks that step and every run journal still
runningasinterrupted(reasongitops-run-interrupted,finished_atwhen detected): they no longer show as running forever in the history and the status (envs.<env>.interrupteduntil the next step).Approval and stop times.
approved_by.atis set for policy approvals (when the run was created) andstop.atfor declared stops (when the controller first saw the declaration); both werenull.Stops, starts and teardowns in the history: entries of their own
kind(stop,start,teardown; runs arekind: "run") withat,by,via,stateand the environment; a torn-down branch environment keeps its entries.Controller heartbeat. The status has
controller.heartbeat_at, refreshed every 30 s (controller.heartbeat_seconds) by a thread of the controller, also during a long build or deploy; it writes only that field, never at the same time as the step’s own publish.gitops status,cluster statusand the UI reportstalefrom the heartbeat when there is one (fromlast_pollfor older controllers): a long build no longer reads as a stopped controller.Fix: an automatic rollback after failed checks restores the previous release whole again: what the failed release removed and the previous one declares is created again (a workload kept running without the Role the failed release had deleted), and what only the failed release declares is pruned. The environment still stops at
failed(checks-failed-rolled-back) with no retry until a new revision orpiceli gitops sync. Same forrelease applywithrollback_on_failed_checks.Compatibility promise:
piceli.gitops-status.v1andpiceli.gitops-history.v1change only additively within v1 (documented in GitOps: Piceli’s controller and manifest export); a test fails when a field disappears.The controller’s OpenTelemetry.
Controller(telemetry=Otlp(endpoint, protocol="grpc"|"http/protobuf", headers_secret=, ca_secret=, insecure=))makes the GitOps controller send, with the OpenTelemetry SDK (thetelemetryextra, now in the controller image), one trace per environment deploy (SYNC <composition>/<env>, CI/CD semantic conventions v1.43.0) with a span per stage: each image’s build, plan, approval wait, restore point, pre-rollout, apply with prune, checks with one span per check, rollback; times from the run journal and the controller’s own hooks. Events (log records with an event name and a stablepiceli.event.id) for approvals, rollouts, failed checks, rollbacks, prunes, failed builds (the last 20 redacted log lines), stops, starts and the controller’s start; CI/CD metrics (cicd.pipeline.run.*,cicd.worker.count) and Piceli’s (build durations, check results, approval and queue waits, time since the last successful deploy, a heartbeat from a background thread that keeps ticking during long builds). A run the controller was in when it died is closed asinterruptedin the same trace at its next start. Telemetry never blocks or fails a deploy (bounded queues, background export, bounded timeouts); header and CA Secrets are mounted, never printed. Without the setting the standardOTEL_EXPORTER_OTLP_*variables are honoured; the controller’s configuration (and its hash) is unchanged when it is not set. See OpenTelemetry from the GitOps controller.k3s lifecycle stage 31: a pinned OpenTelemetry Collector in the cluster checks the traces, events and metrics of a deploy, a rolled-back check failure, an approval, a stop and start, a broken build and a controller killed mid-build, and that deploys go on with the Collector down.
Version 0.15.1¶
A dead controller is visible.
piceli gitops status(JSONcontroller_live),piceli cluster status(controller.live) and the UI read the controller’s pod:downwith its reason, restarts and last error line (the containers keep their last log lines as the termination message), orstalewhen it has not polled for three intervals. When the controller is not running, the status says its environments’ states were written before it stopped, instead of showing them as current.Self-check at start. The controller and UI images ship the digests of their Python files;
piceliverifies them before importing anything else (PICELI_SELF_CHECK, under a second) and stops, exit 70, with “controller image files corrupted on this node; remove the image from the node’s containerd and restart” and the files that differ. Found on a cluster whose node altered one.pycof the unpacked image: the controller had crash-looped for hours with an unrelated import error.Overview: topology across the width, details below. The topology uses the whole width; the selected node’s details are a wide card under it (its sections side by side, source → image → environment left to right) instead of a narrow side column. ⌘/Ctrl- or Shift-click (or Shift+Enter) pins more nodes: their cards sit side by side, denser, with connections folded under More, each with a close button (
pinin the URL keeps the comparison). The expanded explorer keeps its side panel.
Version 0.15.0¶
Several clusters from one GitOps controller. A composition declares several
Clusters; the one withController(...)runs the controller and builds.Environment(..., clusters=[Placement(cluster, namespace=, on_nodes=, values=, replicas=, pipeline=)], rollout=Rollout(order=[...]))(andEnvironment.per_branch) deploys to each cluster through its API server, one record per cluster. See the Several clusters page.Canary rollouts.
Rollout(order=["edge-canary", "edge-*"]): a later wave deploys a revision only when the earlier ones run it with their checks passed; a failure there (rolled back once, as in 0.14.7) holds the rest (held,rollout-stopped) until a new revision.An unreachable cluster blocks nobody. It is probed every poll, retried with backoff without failing (
cluster-unreachable), shown with itslast_contact, and converges when it answers again.Each cluster pulls from its own registry: the controller copies the images by digest into that cluster’s
Registry.in_clusterthrough its API server; builds stay on the home cluster.piceli secrets cluster --cluster MODULE:ATTR --kubeconfig FILE --context NAME [--server URL](or--promptfor a token) stores another cluster’s credentials as the Secretpiceli-cluster-<name>; never printed.piceli.infra.multicluster.register_cluster(...)does the same from Python (with the local profile).Per-cluster status, history and UI.
gitops statusaddsenvs.<env>.clusters.<cluster>{state, health, checks, revision, reason, last_contact, …},clustersandremovals(JSON additive); the deployment history lists every cluster’s runs with theircluster; the web UI’s environment page and inventory show each cluster.Removing a cluster (or a placement) deletes there only the app’s objects in its namespace; claims and Secrets are kept with their delete command; the namespace goes only when Piceli created it and nothing is kept.
Replicas per environment.
Environment(..., replicas={"web": 3})andEnvironment.per_branch(..., replicas={"db": 1})set Deployment and StatefulSet replica counts per environment (an autoscaled workload is refused). Compositions that declare neither keep their config and hashes.New error codes:
cluster-unreachable,cluster-credentials-missing,cluster-credentials-unsupported,cluster-credentials-refused,cluster-registry-copy-failed,rollout-stopped,rollout-waiting.Status while a step runs. The GitOps controllers publish the status when an environment’s deploy, teardown or stop starts (
in_progress: {action, since}) and when it ends, not only at the end of the poll, which left it minutes stale during a long rollout.No failed checks next to
healthy. After a rolled-back release, a no-op deploy (a revert) shows the last passing checks of the running images, or none; a no-op never takes another run’s checks.piceli statuslists StatefulSets and DaemonSets also when the app cannot be rendered without the cluster (the fallback listed Deployments only).piceli ui connectneeds only the base package (the standard library posts to the UI when theuiextra is not installed), and SIGTERM or SIGHUP stop it like Ctrl-C, closing itskubectl port-forward.A
*TOKEN*variable holding a file path applies unredacted through a wholepiceli deploy(end-to-end test; fixed in 0.13.0).Deliver to a cluster you never access:
piceli bundle TARGET --env ENV --out DIR. The same typedAppas one directory a client installs withkubectlalone: a kustomize base andoverlays/dev(namespace, image registry and digests, requests and limits, storage class), every object labelledapp.kubernetes.io/part-of=<name>;prepare.sh NAMESPACE, a POSIX script that makes the app’s generated Secrets (random tokens, templates, a private CA and its certificates) in the client’s cluster withkubectlandopenssl(idempotent, never prints a value; no Secret is shipped); OCI image-layout archives of the build receipt’s images (--receipt; amd64 by default,--platformor--all-platforms) with their SBOM and provenance, whose digest survivesskopeo copy --preserve-digests;INSTALL.mdandUNINSTALL.mdwith the exact commands;bundle.jsonandSHA256SUMS. A generated default-deny NetworkPolicy admits nothing from outside the namespace. Never contacts a cluster or registry. See Deliver to a cluster you never access.A safety gate for foreign clusters.
piceli bundlerefuses (bundle-unsafe-<rule>, with every violation) containers that may run as root, write their root filesystem, escalate privileges or use the host, lack cpu/memory requests and limits, NetworkPolicies admitting ingress from outside the namespace, RBAC beyond least privilege, and node ports.app.safety_exception(item, rule, reason=...)waives one rule for one object; the reason is an annotation in the client’s cluster and is listed in the bundle.The cluster’s identity, read from the cluster:
app.cluster_identity(image=...)declares a ServiceAccount allowed only togetthekube-systemnamespace and returns aClusterIdentity: an init container writing its UID to/run/cluster-identity/uid, the volume, the account and the egress rule to the API server. No per-cluster constant in the model.piceli support-bundle --kubeconfig F --context C --namespace NS --out FILE: a read-only (GET only, any other method refused before it is sent), redacted.tar.gzof a namespace: versions, pod status, workloads, declared health, events, Services, ConfigMap keys, log tails, with a manifest. Secrets are never requested; env and ConfigMap values are never collected.Machines in typed Python, provisioned with OpenTofu.
Server,PrimaryIp,Firewall/Rule,DnsRecord,Hook,SshandInfrastructure(inpiceli.infra) declare servers, fixed IPs, firewalls and DNS record sets;Hetzner(...)renders them for thehcloudOpenTofu provider, pinned (1.69.0) with every platform’s lock-file hashes, behind a small provider contract (piceli.infra.Provider).piceli infra planprints the changes, the monthly estimate (Hetzner’s prices) and a plan hash;piceli infra apply|destroy --approve HASHre-plans and applies only that plan (infra-plan-changed), and never changes or deletes a resource Piceli did not create (ownership ledger and labels,infra-foreign-resource). Piceli owns the state: a0700directory outside Git, one command at a time, encrypted by OpenTofu’s state encryption with a passphrase frompiceli secrets state-key; optionalHttpStateremote backend (ciphertext only). Provider tokens come frompiceli secrets provider NAME --promptand reach OpenTofu in its environment only, redacted from its output.piceli infra installruns the server’s OS install hook after approval of its rendered command;piceli infra registerpins the server’s SSH host keys, reads its k3s kubeconfig (or--kubeconfig FILE), waits for a Ready node and makes it the server’sClusterprofile.piceli infra statusand a read-only Machines page (piceli ui serve --infra MODULE:ATTR) show servers, addresses, installs, clusters and cost.piceli.testing.infra.FakeProviderruns all of it with a real OpenTofu and nothing created. Error areainfra. See Machines with OpenTofu.
Version 0.14.7¶
Stop a named environment.
Environment(..., stopped=True)in a composition, orpiceli env stop ENV --cluster infra.py:CLUSTER(a request;piceli env start ENVends it, also--state-dirfor a local controller): the controller scales its workloads to zero (namespace, volumes and objects kept) and neither plans nor deploys it while stopped (state: stopped,reasondeclaredorrequested,stopin the status). The declaration wins:env startof a declared stop is refused (gitops-env-stop-declared). Start scales back and deploys the revision when it moved (with its usual approval). The UI has Stop and Start.Status keeps the checks of every deploy. A composition environment’s record has
checks(passed N/N, each check’s name and code, when, the trigger, the run) after a rollout too, not only after a checks-only verification;gitops statusprints it and the UI’s environment shows a Last checks card.piceli access ENV --cluster infra.py:CLUSTERforwards an environment’s declared forwards (a pipeline environment’sapp.access.forward, on their declared ports) besides its other Services;--uialso forwards the in-cluster UI and prints its launch URL.No
kubectloutlivespiceli access. A watchdog process stops every forward whenpiceli accessorpiceli access uiis killed (SIGKILL, a crash), on Linux and macOS; Ctrl-C, SIGTERM and SIGHUP still stop them directly.piceli access uikeeps trying through an API outage: its forward restarts with a backoff capped at 30 seconds until stopped (RestartPolicy(forever=True)) instead of giving up.Fixes in the composition controller’s records: a branch environment’s run names its branch’s push as trigger and
policyas its approver when the owner’s policy applied it; an approval stands across an unrelated push that keeps the plan hash; a component’scommitis the commit of the source that triggered its build (sourceslists every source’s commit); the log saysrolled nothingunless an image digest or a workload changed; a failed attempt’s log tail is kept (failed_attempts) in the status and in the history of the run that succeeds after it.UI: one Logs workspace (
/logs, Operations → Logs): container logs of every application, environment and profile scope the session may read, merged by time, with URL-backed filters (scope, workload, pod, container, previous instance, time range, level detected from the line, text search, lines per container) and a live tail you can pause. A localpiceli ui servecan add read-only namespaces of other saved profiles, each read with its own kubeconfig and context. Every application, environment, component, workload and pod links into it with its filters set; the per-pod Logs tab stays and links there too. New read APIs:GET /api/v1/logs/sources,GET /api/v1/logs/lines(at most 12 containers and 5,000 lines per read, the samelogsgrant as before),POST|DELETE /api/v1/profiles/scopes.UI: one Port forwards workspace (
/forwards): every forward or connection ticket of the session across scopes, with its state, local address and expiry; start one (target and ports, preselected by each workload’s Forward link) and stop it through the existing per-application paths. Stale forwards (a removed scope, a forward reconnecting, or one left running by a previous UI process, from the same registrypiceli ui servereaps at start) are shown and can be stopped without touching anything else. APIs:GET /api/v1/forwards,POST /api/v1/forwards/stale/stop.UI: the in-cluster composition UI issues connection tickets. Forwards from the UI that
piceli access uiopens run on your machine throughpiceli ui connect --server http://127.0.0.1:8790 …(pending → ready → stopped, listed in the Forwards workspace). The UI only reads the selected object; it needs no new RBAC.piceli ui connectaccepts plain http only for a loopback server; any other server still needs https.piceli access ENV --cluster infra.py:CLUSTER: forwards every Service port of a composition environment on free local ports, with the cluster’s credentials profile (named environments; refusalsenv-not-found,access-target-invalid).UI: Overview without nested scroll. The system schematic is sized to its content and fits the width (pan and zoom only after you zoom in, or in the expanded explorer); smaller cards, a tighter header, a compact environment strip that wraps instead of scrolling, and the inspector beside the canvas.
UI: navigation with alert counts (approvals waiting, degraded environments, failed builds, stale forwards, registry warnings, from
GET /api/v1/navigation) and collapsible, keyboard-accessible sub-menus (each environment, history and approvals, cluster nodes and registry) whose open state is remembered in the browser.Fix: pod logs read by the UI were one line holding a Python bytes literal (
b'…\n…'); they are decoded (UTF-8, invalid bytes replaced) and split into lines.Fix: log lines the UI and API return are redacted with the shared redaction (
password=,token:, bearer tokens, URL credentials, JSON Web Tokens, private keys become[REDACTED]).Fix: the GitOps controllers delete what an app no longer declares. Every environment deploy (single-repository and composition controllers, named, main and branch environments,
piceli env up) plans the deletion of the objects an earlier release created and the current render no longer declares (a removed workload, its Service and NetworkPolicy, a Deployment renamed to a StatefulSet) asdeleteactions of the same plan and hash. They run after the new objects are ready and before the checks, a workloadForeground(its pods first), so a leftover can no longer join the new pods or fail the checks. Only objects with this release’spiceli.io/ownerare deleted.Pipeline(prune=None|True|False)is new (default: environments prune, plainpiceli deploydoes not).Approval: an
auto_approvepolicy covers a prune (new classprune, marked"prune": trueondeletechanges) unless it deniespruneordelete; any otherdelete,replaceoradoptstill needs the hash. Without a covering policy the environment asks, with the deletes in the plan it shows.Data: claims, Secrets, retained objects, the claims a removed StatefulSet created from its templates, and a StatefulSet whose retention policy would delete its claims are never deleted: plans, status (
envs.<env>.kept_orphaned), run summaries and the deployment history list them withwhyand thekubectlcommand that deletes each. Status and history runs also havedeleted(additive JSON).Fix: an automatic rollback after failed checks restores only what the failed release changed (objects both releases declare): it no longer re-creates objects the failed release removed (by its prune or by hand). The controllers no longer retry a revision whose checks failed and whose release was rolled back: the environment is
failedwith reasonchecks-failed-rolled-backuntil a new revision orpiceli gitops sync.Testing: the fake API (
piceli.testing) acceptsForegrounddeletes.Tests: the local executor’s delayed-mutation test, the heavy-lock tests and the saved-forward conflict test no longer depend on timing: the test sets “in flight”, “applied” and “lock released” itself instead of waiting for wall-clock windows.
piceli.testing.FakeAPI.injecttakesholdandappliedevents for that (hold_timeoutbounds a held request). The access-history test checks the bound at a small limit (130 real starts passed the 30 s timeout under load), and deploy acceptance tests check their event schema once instead of on every line (about 3x faster).
Version 0.14.6¶
Fix: an environment does not ask twice for the plan it already runs. When a plan’s hash is exactly the owner-approved plan hash of the release running now (a reverted change plans it again), the GitOps controllers (single repository and composition) apply it with that hash instead of waiting in
approval-required. Only the running release’s plan counts: a hash the owner never approved, an older approved plan once another plan runs, or any plan after a failed step, a degraded verification or an idle stop still waits for approval. The status shows the hash asdeployed_plan_hash(nullwhen the policy applied the release).Fix: a stale
piceli access uiis recognised. The port check ofpiceli access uinow tells Piceli’s own UI forward from other processes (it reported thekubectlof an earlierpiceli access uias “not piceli”), also when Piceli runs as its console script (python …/bin/piceli …, asuv run picelishows inps; this applies topiceli access TARGETtoo), and prints the command that frees the port:piceli access stop --stale --cluster MODULE:ATTR(or--profile NAME), new, which stops only that forward.piceli access uirecords its forwards in the private registrypiceli ui serveuses, so a stale forward is recognised by its record and the forwards of a crashedpiceli access uiare stopped at the next start. Another process is never signalled.Docs: several images from one source: two contexts of the same source with different
includelists give each image a change key over its own paths (Compositions in Python).Fix: the in-cluster UI shows each environment’s deployment history. The composition controller now publishes its runs in the ConfigMap
piceli-gitops-history(piceli.gitops-history.v1, the newest 20 runs per environment, bounded to fit one ConfigMap), built from its record of every deploy step and the run journals on its volume, including runs recorded before this version. Delivery → Deployment history and each environment’s page list them newest first: trigger, sources and commits, plan hash and changed objects, approver, components with digests (built, rolled or unchanged), checks with outcome and duration, failure code, failing checks and build log tail, stage durations. New read-only endpointsGET /api/v1/composition/historyand/api/v1/composition/environments/{env}/history, capabilitycomposition_history. The UI’s service account getsgeton that one ConfigMap; nothing mounts the controller’s volume.Fix: Approve shows what the pending plan changes. The controller publishes
envs.<env>.pending_plan(plan hash, deploy plan hash, object counts and changed objects by kind and name) while it waits; the Approve review lists it and a changed plan needs a new acknowledgement.Fix: the approver is recorded. An approve request carries
via(clifrompiceli gitops approve,uifrom the web UI); the controller keeps it with the time (envs.<env>.approvalwhile it applies) and in the run’s history (approved_by, orpolicyfor the owner’s approval policy).Fix: the Cluster page in the cluster shows the registry claim’s use. The composition controller measures
duof the registry storage in its pod at most every ten minutes (it is grantedpods/execin its own namespace) and publishes it ascontroller.registry_usage; the UI, which has neitherpods/execnornodes/proxy, shows it as measured by the controller.Additive status fields:
envs.<env>.pending_plan,envs.<env>.approval,controller.registry_usage;EnvOutcomegainsrun_id,combined_hashandplan.
Version 0.14.5¶
Fix: one upgrade command:
gitops enableof a composition also updates the stored Cluster declaration (piceli-cluster), so a latercluster initplans nothing; without--pollthe controller usesController(poll=).Fix: a changed, added or removed check runs. A deploy whose release did not change (nothing to apply) used to skip its checks as “release already verified” even when the check set changed. Each checks outcome now records the digest of the check set (
checks_hash); when it differs the checks run against the running release as a verification: nothing is applied, backed up or rolled out, and the result carriesverification(trigger: checks-changed). A failing verification never rolls back the running release, whateverrollback_on_failed_checkssays. The GitOps controllers (single repository and composition) report it aslast_action: verifiedwithverification(state,trigger,checks_hash,rolled: [],failed); failing checks keep the environmentdeployedwithhealth: degradedandreason: pipeline-checks-failed, without retries, until a passing verification clears it. Unchanged checks are still not re-run.Fix: the controller forgets torn-down environments. Teardown removes the environment’s pipeline state, build receipts and trigger memory (also when its namespace was already gone), and on start the controller removes the state left by earlier teardowns, only for namespaces that no longer exist; a live environment’s state is never deleted.
Fix:
gitops enable infra.pyupgrades the in-cluster UI too. When the composition’sClusterdeclares aUi, the UI’s objects (rendered as bycluster init, imageUi(image=), elseController(image=), else--image) are in the same plan and approval as the controller; the result saysui(included,not-declared,unavailable,other-namespace).Fix: retention of the in-cluster registry works out what to keep on its own.
piceli artifacts retention --cluster infra.py:CLUSTER --deletederives the registry, the port-forward to its Service and the cluster read (every namespace) from the declared Cluster, and lists every manifest the registry stores with a read-onlyfindin the registry pod (pods/exec), so digest-only images nothing names any more (old builders) are found without receipts. It keeps what runs, what Piceli uses (the controller and UI Deployments, the builder inpiceli-gitops-config) and every workload’s rollback target, and collects the rest, tagged or not; the approval command is printed in full.--toand the other flags work as before.Fix: a Deployment’s newest scaled-down ReplicaSet and a StatefulSet’s previous ControllerRevision are kept as the rollback target (reason
rollback; older history stays collectable, and Piceli’s own controller, UI and registry have none), with or without--cluster. The delete refuses a plan that names one. ControllerRevisions are read (the cluster read needslistoncontrollerrevisions).Fix:
piceli registry status|install|uninstall|forwardaccept a declaredCluster(infra.py:CLUSTER) or the composition module (infra.py) and reach the cluster through its credential profile;infra.py:CLUSTERwas refused withcluster-registry-invalid.Fix:
piceli registry statusreports the registry claim’s use: the kubelet’s volume stats only when they are the claim’s own filesystem, elseduin the registry pod; the node filesystem alocal-pathclaim shares is shown as such (storage.used_source,storage.filesystem), never as the registry’s use. The UI’s cluster view no longer shows the node’s filesystem as the registry’s use.New error code
registry-storage-unreadable(reported in the retention report’sstorage_listing, not a refusal).History discovery: a first-level Deployment history destination and an application Plans tab expose paginated saved plans, including expired plans and plans with no recorded run. Exact plan/run identities connect reviews, revision comparison and direct captured-log links; existing authorization and approval checks remain in place.
Denser navigation: Sources presents refs, polling and environment/component connections in compact searchable rows. Cluster returns to the Workspace group, and a simplified vector mushroom/network mark fits the sidebar and browser icon.
Deployment evidence: ordered resource steps and dependencies from the engine plan, recorded execution transitions with visual and raw evidence, and read-only comparison of desired configurations across recorded revisions. Source revisions, exact plan identities and run outcomes stay connected; missing historical snapshots and redacted fields are reported explicitly.
Infrastructure explorer: composition sessions now open on the graph. An environment switchboard, expanded canvas and compact application headers bring infrastructure into the first viewport. Inspectors connect exact versions across environments and navigate observed resource owners/children; runtime pages link back to their published composition identity.
Connected workspace: original Piceli branding with warm orange accents; a source/component/environment canvas with node inspection, zoom and keyboard navigation; exact environment version comparison and contextual GitHub links; separate views for reported problems, decisions and lifecycle states.
Navigation and evidence: on-demand Ctrl/⌘ K workspace search, URL-backed application state filters, resource ownership lanes and neighborhood focus, searchable per-resource before/after changes, and recorded-operation timelines.
Review continuity: history readers can open an exact recorded plan without source-evaluation permission; preparing or executing a new review still needs its existing capability. Named-environment confirmation binds to the exact environment, action and reviewed identity, including refreshed plan hashes.
Web UI: Harbor workspace layout with grouped capability-aware navigation, application cards/table, compact environments, a composition overview and selected component evidence. Resource relationships use observed owner UIDs; source associations use reported source identity. Existing routes, inspection, logs, access, sync and reviewed actions remain available.
Review: separate plan evidence and exact approval context, real Pipeline stage progression and cluster-build placement. Changing the plan identity or digest clears acknowledgement; open expired Pipeline/build plans stop being approvable without waiting for a page refresh.
Appearance: responsive layouts and a remembered Light/Dark/System choice, using bundled assets without external fonts or diagram dependencies.
Contributors:
make ui-serve PICELI_UI_ARGS='...'builds and starts the current UI for an explicit target;make test-browser-harborcovers the new workspace journeys at desktop, tablet and phone sizes.One-command preview:
make uiprepares the frontend, starts disposable sample state and opens the current UI athttp://127.0.0.1:4178. Plain bookmarks and fresh browsers work without copying a token; only the disposable fixture bootstraps its session automatically. Real-target authentication is unchanged. No cluster setup is needed.
Version 0.14.4¶
Fix:
Checks.httpandChecks.metricpass in an isolated branch environment. They reach a ready pod of the target through a port forward of the API (from Python, nokubectl): the connection starts inside the pod, so the environment’s isolation policy, which refuses the API server’s proxy when the API server runs on another node (k3s), is neither in the way nor widened. The API proxy stays as a fallback.Fix: a failed build of a composition shows the failing command’s output (redacted) in the build Job’s log and in
gitops status(failure.log_tail).Fix: branch teardown removes the failed build Job kept for that branch.
Retention removes images nothing uses:
artifacts retention --keep 0is allowed (with--kubeconfigand--context) and keeps only live and pinned digests. Liveness is what runs or is referenced now: finished pods and Jobs and a Deployment’s scaled-down rollout history no longer keep an image, while environment records, pushed branch images and the GitOps controller status do. Digests the cluster still names are looked up in the registry, so a manifest pushed by digest without a receipt is found and collected. Each deletion now listsbytes,whyandseen_in; the guide shows how to garbage-collectRegistry.in_clusterafterwards.
Version 0.14.3¶
Branch environments may reach the API server:
EnvConfig(allow_api=True)/Environment.per_branch(..., allow_api=True)adds the API server’s endpoints (read from the EndpointSlicedefault/kubernetesatenv up) to the isolation policy, instead of node IPs inallow_egress.Teardown removes the release’s cluster-wide objects: the ClusterRoles and ClusterRoleBindings a branch’s release created (labelled
piceli.io/env-namespace, or named<namespace>:<app>:<name>, and marked as Piceli’s) are deleted with the branch.Deleting volumes is an opt-in: the controller reads PersistentVolumes;
gitops enable --delete-volumes/Controller(delete_volumes=True)lets teardown delete those bound to the branch’s claims. Without it teardown completes and reports them (volumes_left);cluster initkeeps the rule.Images: the release can also copy the controller and builder images to Docker Hub (
docker.io/pynenc/piceli-*) when its credentials are set. A private GHCR package is a warning with the settings link, no longer a failed release (everything is published by then).
Version 0.14.2¶
Images:
ghcr.io/pynenc/piceli-controllerandpiceli-builderare linked to the repository and public (anonymous pull); the release checks an anonymous pull before it finishes. The builder addsmake,cmake,g++,pkg-config,curlandxzfor crates with C builds (jemalloc-sys,aws-lc-sys).Fix: a failed cluster build is diagnosable. The build Job’s log ends with the failing command’s last 200 lines of output (at most 16 KiB, redacted like pre-rollout logs: known secret values,
password=…-style pairs, token-like strings); the failed Job and its pod are kept until the next build of the same branch (or, for a composition, of the same cache) replaces them; the controller status showsfailure.log_tail(scrubbed, at most 4000 characters) andfailure.kept_job.Fix: the deployer ClusterRole
piceli-gitops-deployerreadsmetrics.k8s.iopods and nodes (get,list,watch), so a release can create a Role that grants them without an escalation refusal, and updates thescalesubresource of Deployments and StatefulSets (get,update,patch) for restore points.Fix: after a partial apply the controller (single repository and composition) no longer retries the stale approval until it fails (
env-plan-changed): it plans again, applies when the auto-approve policy covers the new plan, and otherwise waits inapproval-requiredwith the new hash.Fix:
piceli gitops enablewith changed settings (a new--builder-image) restarts the controller: its pod template carries the configuration’s hash (piceli.io/config-hash).piceli cluster initkeeps the--cluster-rbacrulegitops enableadded to ClusterRolepiceli-gitopsinstead of removing it.Fix: deleting a branch removes its environment again: the controller’s ClusterRole
piceli-gitopsmayget,listanddeletePersistentVolumes (a teardown removes the volumes bound to the environment’s claims; listing them was refused with HTTP 403 and the teardown looped onenv-cluster-unavailable). A refused Kubernetes request now names its verb, resource and namespace in the message, the log and the status (failure.denied), never the server’s answer.Fix: pre-rollout checks of a first install no longer always fail
prerollout-failed. A Secret or ConfigMap the release itself creates did not exist yet and was mountedoptional; the check now reads a labelled copy with the release’s real values (piceli.io/pre-rollout: staged), created just before its Job and deleted with it (or by the next run after an interrupt), listed understagedin the stage output. The release’s own objects are still created only by the approved apply; when the values cannot be read the reference staysoptionalandunverified.Fix:
Checks.httpandChecks.metricreach their target through the API server proxy (services/NAME:PORT/proxy, or a ready pod’spods/NAME:PORT/proxyfor a Deployment) instead ofkubectl port-forward, so they work in the controller image, which has nokubectl(check-forward-unavailable, FileNotFoundError). The identity needsgetonservices/proxyandpods/proxy; when the API refuses the proxy andkubectlis installed, the check falls back to the port forward.CheckContext.forwardstill useskubectl;CheckContext.proxy_getis new. The fake API serves the proxy (FakeAPI.proxy,forbid_proxy).Fix: an environment with a
Stackruns only the pipeline checks of the workloads it deploys: a check whose Service or workload target the stack leaves out is skipped and listed as{"check", "target", "why": "not-in-stack"}underskippedin the plan’s and the run’s checks stage. Checks without such a target (python,pod/NAME) still run.
Version 0.14.1¶
Fix: the GitOps controller’s copy of third-party images and the cluster build Job’s push reach
Registry.in_cluster(...)by its Service name (piceli-registry.piceli-system.svc:5000) over plain HTTP. Plain HTTP was refused (plain-http-refused) everywhere but loopback; it is now allowed to loopback and to the in-cluster Service the endpoint names, never to another host (also not through a redirect).Fix: the GitOps controller no longer exits on a failed poll (an API timeout made its pod crash-loop): it logs the error type and retries after 5 s, doubling to at most 5 minutes; a successful poll restores the cadence.
Images: each release publishes
ghcr.io/pynenc/piceli-controllerandghcr.io/pynenc/piceli-builder(linux/amd64 and linux/arm64), built from the released wheel withimages/Dockerfile; the release notes list their digests forgitops enable --image/--builder-image.
Version 0.14.0¶
Web UI: a Cluster status page presents nodes, registry pods and storage, mirror restart state, controller and UI health. Named environment headers review the exact approval hash, published promotion ref and idle-stop Wake request. Local
piceli ui serve --profile NAMEshows and switches saved profiles through a fresh session; no credential material reaches the browser.Credential profiles:
piceli login NAME --kubeconfig FILE [--context C]stores a profile (the kubeconfig path and context, never its contents or a token;$PICELI_PROFILES_DIR, default~/.config/piceli/profiles, mode0600);piceli profiles [--json]andpiceli logout NAMElist and forget it.Target.profile("NAME", namespace=…)andcredentials = "NAME"in[target]resolve it when the target is used, so no machine path is in Git (the plan hash covers the name;Target.kubeconfighashes are unchanged); inside a cluster the name resolves to the service account.--profile NAMEreplaces--kubeconfig/--contexton every command that takes them and the declared credentials ondeploy,release,status,access,envandlogs. New codesprofile-not-found,profile-invalid,profile-conflict.Named environments:
EnvConfig(environments=[Environment(name, namespace, follow=Branch("main") | Tag("v*-rc*") | Promote(), stack=…, on_nodes=…, quota=…, auto_approve=False)])(from piceli.envs import Environment;Branch,Tag,Promote,Stackare also exported bypiceli) declares long-lived environments with their own trigger: the GitOps controller evaluates each one independently (every push to a followed branch, the latest new matching tag,piceli promote ENV BRANCH@SHA), so one branch can feed two environments.gitops enablereads them from the working tree (--root) into the controller config (covered by the install hash).piceli env up NAMEdeploys one (creating its namespace when absent); env commands never delete, stop or seed it;piceli envslists it ("fixed": true). A 0.13main_namespacestays the implicit main environment (tags and promotions); an environment named likemain_branchreplaces it. New codesgitops-promote-not-allowed,env-stack-unknown,env-stack-incomplete,env-nodes-conflict.Stacks and placement:
Stack(name, workloads=[...])renders only a subset of the app’s workloads (Environment(stack=…),EnvConfig(branch_stack=…));on_nodes=[...](or a{label: value}selector;EnvConfig(branch_nodes=…)for branches) places every workload of the environment.Branch claims: in a branch environment an
ExistingClaimwith a size inclaim_sizesbecomes a claim the environment owns (empty or seeded withseed_from, deleted with the environment); main and named environments keepExistingClaimsemantics.Idle stop:
EnvConfig(idle_stop="24h")makes the GitOps controller scale a branch environment without a push for that long to zero (statusstopped, reasonidle-stop); the next push starts it again.piceli.envs.env_stopdoes it by hand with a plannedenv_hash.Plan hashes,
EnvConfig.describe()and the controller config of 0.13 declarations are unchanged when the new fields are unused (tested).Compositions (preview): a module (
infra.py) withenvironments = [...],piceli.infra.Source(url, name=)repositories,Component(name, source=)whose contract is[component.<name>]in the source’spiceli.tomlat the environment’s commit (buildrust, python, files or dockerfile;imagebase pinned by digest, user, dirs;ports;healthready/check;upgrade_check;volumesretained or scratch;needswith?,secret:,component:;settings;emits; see docs/components.md),Component.image(ref, pin=)for third-party images (mirrored into the in-cluster registry, never pulled from a hosted registry at run time) andStack(name, [components]).Environment(follow={source: "main" | Tag(...) | Promote()}, cluster=, secrets=, settings=)follows several sources;Environment.per_branch(Branches("wp-*"), namespace="app-{branch}", ...)declares the branch environments. New codescomposition-invalid,component-contract-invalid,component-contract-missing,component-need-unmet,component-build-unsupported,component-build-failed,composition-ref-unresolved.Python compositions:
Environment(pipeline=PIPELINE)andEnvironment.per_branch(..., pipeline=PIPELINE)deploy aPipeline’s app (its workloadStack, checks, rollback and approval policy) instead of contract components; mixing it withComponents,settings=orsecrets=is refused (env-config-invalid). The composition repository is a source too:piceli gitops enable infra.pyrecords it (--repo, default theoriginremote of--root; branch--main-branch, defaultmain) when an environment deploys a pipeline, and the controller imports the module at the followed commit; a change there re-renders every environment. See docs/compositions.md;piceli.tomlstays the optional path for simple components.Host build contexts from sources, change-aware per image: in a pipeline environment,
[context.X] source = "X"reads the composition’sSourceXat the environment’s revision, fetched by one build Job with the one Git Secret (piceli build job-run --sources --spec SOURCE/PATH --image JSON).[[output.image]] contexts = [...](new, optional, default every context; absent from the spec digest when not declared) lists what an image reads; its change key is its output table, the[build]table and the Git blob ids of the files its contexts include. No changed key, no build; otherwise only the changed images take the new image, the others keep their digest and apply as no-op. Third-party images ofRegistry.in_cluster(mirror=[...])(and the pipeline’s ownmirror=) are copied into the in-cluster registry at sync. Status:envs.<env>.components.<image>(with an additivesources) andcontroller.composition_repo.Many sources, change-aware builds:
piceli gitops enable infra.pyinstalls the controller for a composition (its plain-data form is in the config, so the plan hash covers every rule). It polls every source with one Git Secret, resolves each environment to one commit per source (its revision), builds per component in one build Job that fetches every needed source (piceli build job-run --sources --component), cached by the component’s source digest (its build recipe and the Git trees of the paths it reads): unchanged components keep their image and apply as no-op, only changed ones rebuild and roll.piceli gitops run --local-buildbuilds on the machine running it instead. The status addssources,envs.<env>.revisionandenvs.<env>.components.<name>(additive).piceli gitops sync [ENV] [--component NAME]: a sync request (ConfigMappiceli-gitops-requests, kindsync): deploy now at the current revision;--componentrebuilds that component (a composition controller).gitops enabletakes--repoonly for a pipeline.In-cluster registry (preview):
Registry.in_cluster(on="NODE", storage="20Gi", port=5000)is a delivery target every node pulls from by one stable name,piceli-registry.piceli-system.svc:5000/<app>/<image>@sha256:….piceli registry installplans (exit 3) and with--approve HASHinstalls a registry Deployment pinned to the node (retained claim), a Service and a node agent DaemonSet that writes the containerd mirrorcerts.d/<host>/hosts.tomlon every node (pointing at the Service’s ClusterIP, plain HTTP for that host only);piceli registry statusshows the pod, each node’s mirror and the storage use;piceli registry uninstallkeeps the namespace and, without--delete-storage, the data;piceli registry forwardkeeps a push port-forward open.piceli deploypushes through a port-forward to the Service, cluster builds and the GitOps controller push by cluster DNS,env pushrecords the stable pull reference; the plan shows the registry and refuses withcluster-registry-not-installed/cluster-registry-not-readyuntil it serves. Plain HTTP is now also allowed toname.namespace.svcregistry hosts (never resolvable outside a cluster). 0.13 plan hashes are unchanged. New codescluster-registry-invalid,cluster-registry-target-required,cluster-registry-cluster-failed,cluster-registry-plan-changed,cluster-registry-not-installed,cluster-registry-not-ready. See In-cluster registry.Cluster init:
piceli.infra.Cluster(name, api=, credentials=, nodes=[Node(name, arch=, roles=[…])], storage_class=, registry=Registry.in_cluster(on=), controller=Controller(on=, poll=), ui=Ui(access="forward"))declares a cluster (values checked at import,cluster-invalid).piceli cluster init MODULE:ATTRplans (exit 3) and, with--approve HASH, labels the nodes (piceli.io/role-<role>=true,piceli.io/builder=trueforbuilder,piceli.io/runtimefrom the node’s runtime; only labels it set are ever removed), installs the in-cluster registry with its node mirrors, the GitOps controller’s namespace, identity, RBAC and state claim (gitops enableadds the Deployment;InstallSettings(node=)pins it), the UI (after the controller’s objects), and the ConfigMappiceli-clusterwith the declaration. It reaches the cluster with the credential profile and refuses one whose server is notapi(cluster-api-mismatch). Idempotent.piceli cluster status MODULE:ATTR [--json]reports nodes (roles,ready,mirror {kind, state}), registry, controller (health,last_poll), UI (health) and the Git Secret. New codescluster-invalid,cluster-not-found,cluster-load-failed,cluster-api-mismatch,cluster-api-failed,cluster-node-missing,cluster-node-arch-mismatch,cluster-plan-changed,cluster-not-initialized. See Cluster init.Git token:
piceli secrets git --cluster MODULE:ATTR --prompt [--username U]reads the token from stdin (no echo), refuses one given as an argument or inPICELI_GIT_TOKENwithout echoing it, writes the Secretpiceli-system/piceli-build-git(username,password) the controller and build Jobs use, and prints names only. New codessecrets-token-refused,secrets-prompt-required,secrets-token-empty,secrets-invalid.k3s node mirrors:
Registry.in_cluster(node_mirror="auto"|"k3s"|"containerd")(default"auto";mirror=stays the list of images to copy). On k3s nodes a second agent (piceli-registry-mirror-k3s) merges the mirror into/etc/rancher/k3s/registries.yamlbetween marker comments (other entries and the file’s mode kept; a flow-style or JSON file is left alone,unmergeable) and writes k3s’scerts.d, so it works without a restart and survives one; it never restarts k3s and reportsrestart: neededon a k3s whose containerd does not readcerts.d."auto"picks per node (piceli.io/runtime, elsenode.kubernetes.io/instance-type=k3s).piceli registry install --node-mirror;registry statusshows each agent’s runtime and restart need. Verified on a three-node k3s (k3d).UI in the cluster:
Cluster(ui=Ui(access="forward"))makespiceli cluster initinstall the Piceli UI inpiceli-system(piceli.infra.ui_install.render_ui(cluster)): one Deployment runningpiceli ui forward-servefrom the digest-pinnedUi.image(else the controller’s image) onUi.on(else the controller’s node), a ClusterIP Service only (no NodePort, Ingress or OIDC) and a service account that reads the controller status, the environments’ workloads, pods and logs (never their Secrets or ConfigMaps) and writes only the GitOps request inbox and its own launch Secret.piceli access ui --cluster MODULE:ATTR(or--profile NAME) forwards127.0.0.1:8790to it and prints the one launch URL. Views: Environments (revision per source, health, state, last sync), an environment’s components (source, commit, digest, synced/building/rolling/failed/unchanged, health) with a link to its workloads and logs, Sources (URL without credentials, refs, last poll) and a Sync button per environment and per component (thepiceli gitops syncrequest). New API routesGET /api/v1/composition,GET /api/v1/composition/environments/{env},POST /api/v1/composition/sync(additive). New codesui-controller-absent,ui-sync-target-unknown,ui-sync-unavailable,ui-install-image-unpinned,ui-install-node-unknown,ui-install-access-unsupported,access-ui-target-required,access-ui-cluster-invalid,access-ui-not-declared,access-ui-not-installed,access-ui-not-ready,access-ui-forbidden,access-ui-unreachable. See Piceli web application.
Version 0.13.0¶
Piceli as the GitOps controller (experimental):
piceli gitops enable deploy/app.py:pipeline --repo URL --branches 'main,wp-*' --image REPO@sha256:…plans (exit 3) and, with--approve HASH, installs a one-replica controller inpiceli-system: a ServiceAccount with a namespaced Role, a ClusterRole limited to reading nodes, managing namespaces and binding only thepiceli-gitops-deployerrole in each environment’s namespace, a state claim (Git mirror, last-seen commits, receipts) and a Deployment runningpiceli gitops runfrom a digest-pinned image. It polls the repository (--poll, no webhook) and keeps one environment per matching branch at its head: builds in the cluster (--builder-image) or uses the digestpiceli env pushrecorded for that commit, then deploys when the plan is inside the pipeline’sauto_approvepolicy, else waits with the plan hash forpiceli gitops approve ENV HASH. Main deploys only on a newv*tag orpiceli promote BRANCH@SHA, always with a hash approval unless the owner passed--main-auto-approve; an untagged push to main does nothing. A deleted branch tears its environment down (never main’s). One step at a time, bounded retries with backoff, a failing branch never stops the others. Git credentials come only from a mounted Secret (--credentials-secret) and are never printed.piceli gitops status [--json](health, last poll, per-branch commit, state and pending hash; also published in the ConfigMappiceli-gitops-statusforpiceli envs) andpiceli gitops disable(never removes an environment).piceli.gitopsbecomes a package (the handoff API is unchanged). New error codesgitops-*. See Piceli’s own GitOps controller.Per-branch environments (experimental):
Pipeline(envs=EnvConfig(prefix= "shop-", branches=["main", "wp-*"], max_envs=3, quota=…, claim_sizes=…, seed_from=…, auto_approve=…))runs one namespace per Git branch (<prefix><slug>, at most 63 characters with a hash suffix; main maps to its own namespace, never created, stopped or deleted).piceli env up BRANCHplans (exit 3,env_hash) then deploys the branch with the digests given (--digest,--receipt, or thosepiceli env pushrecorded), isolated at render time: Services by relative name, no NodePort, hostPort or hostPath, namespace-qualified cluster objects, its own state and generated Secrets, a default-deny NetworkPolicy across namespaces and a ResourceQuota (env-isolation-*codes otherwise). Branch claims useclaim_sizesand start empty;piceli env seed(or--seed-from main) restores main’s latest restore point into them. At mostmax_envsbranches run: one more stops the least recently pushed (scaled to zero), or--waitrefuses (env-budget-full).piceli env downdeletes the branch’s claims, namespace and volumes (never main’s).piceli envs [--json]lists branch, namespace, commit, build and deploy state, health, age and last push (with the GitOps controller’s view),piceli logs ENV WORKLOAD [-f]andpiceli access ENV --pipeline …(free local ports). Python APIpiceli.envs(env_up,env_down,seed_env,list_envs,namespace_for); the GitOps controller deploys and tears down through it.plan_restore(..., source_namespace=)restores a point into another namespace. Plans of pipelines withoutenvskeep their hashes.Builds in the cluster (experimental):
piceli build job MODULE:ATTR --commit SHA --image BUILDER@sha256:… --repo URL(andpiceli.artifacts.cluster_build.run_build_job) runs the pipeline’s host builds as a Job on a labelled amd64 builder node: Git credentials from a Secret (never printed), arm64 cross-built, the cache on a claim per branch and page size, images pushed by digest to the node registry, the receipt of a local host build plusdeliveredandjob. Plan first (exit 3, plan hash), then--approve HASH; new errorscluster-build-invalidandcluster-build-failed.piceli env push BRANCH MODULE:ATTR --receipt FILE(or--digest IMAGE=sha256:…) records a laptop-built digest in the ConfigMappiceli-env-<branch>of the branch’s namespace (env-push-invalid).Fixed, B25: an env var named like a token or secret whose value is a file path (an app pointing at a mounted token file) is a plain value: it is no longer redacted into a refused apply (
unresolved private or redacted manifest). Inline secret values are still redacted.Fixed, B22: a host build no longer needs the cluster API for node facts: the last successful read is cached per node in the state directory and used (and reported, with its age) when the API is unreachable, and
Build.spec(..., node_facts={...})declares them. The plan hash covers the facts used.Fixed, B28: the shared host-build target directory is per architecture and page size (
<cache>/target/arm64-16384), so builds for 4 KiB and 16 KiB pages no longer rebuild jemalloc and everything above it; the first build after upgrading compiles once more.Registry retention from the CLI (experimental):
piceli artifacts retention --to oci://host[:port]/prefix --receipts …reports which manifests a registry keeps (the last--keep Nreleases, per image, of the publish and delivery receipts (<state_dir>/deliveries/),--pindigests, the digests running pods use, the children and referrers of those, tagged manifests no receipt mentions) and which are collectable, with the deduplicated bytes they free.--budget 10GiBkeeps more releases newest first while the kept bytes stay within it, never fewer than--keep.--deleteprints the plan and its hash (exit 3);--delete --approve HASHdeletes exactly that list by digest through the registry API, refuses (retention-not-approved) when the plan changed, never deletes a digest a workload uses (running pods and the pod templates of Deployments, StatefulSets, DaemonSets, ReplicaSets, Jobs and CronJobs, so scaled-to-zero workloads and CronJobs between runs are safe; the output says which kind keeps each digest), and needs a live source (--kubeconfig/--contextor--live-file, elseretention-live-unknown). A registry that refuses deletes isregistry-delete-disabled. Blob space is freed by the registry’s own garbage collection (without--delete-untagged). The registry client gainslist_repositories,list_tagsanddelete_manifest. New error codesretention-*andregistry-delete-disabled. See Registry retention.Machine-wide lock for heavy work (
piceli heavy):piceli heavy run [--name N] [--wait SECONDS] -- COMMAND...runs a command under an OS-level lock (flockin a per-user state directory, released by the OS when the holder dies) so heavy runs of several agents serialize, prints who holds the lock while it waits, forwardsSIGINT/SIGTERM/SIGHUP, exits with the command’s code and writes a receipt (redacted command, cwd, git commit, times, duration, exit code, peak memory; newest 100 kept).piceli heavy status [--json]shows the holder and recent receipts. WithPICELI_HEAVY_LOCK=1, host builds and DockerBuild.specruns take the same lock. New error codesheavy-lock-timeout,heavy-command-empty,heavy-command-missing(A machine-wide lock for heavy work).Web UI: the optional
piceli[ui]extra adds a bundled web application. See Piceli web application for local and installed setup, environment controls and the security model.piceli ui serveruns a loopback UI for explicit inventory scopes and existing release definitions: isolated source evaluation, exact source and plan approvals before a durable release run, Activity replay, Resources with observations, owner relationships, current and previous container logs and supervised local port forwards. A one-time launch token grants the session; cookies are named per origin; forwards left by a crashed UI are stopped at the next start (--state-dir).Apps that declare
app.pre_rollout(...)include those checks in the reviewed release plan and run them before apply. A configured Pipeline can also run checks and restore points from the browser, using a second exact approval after image delivery when needed.Branch Environments and GitOps pages reuse Piceli’s environment and controller APIs for status, exact-hash changes, pending approvals and promotion requests. Local branch scopes open Resources, logs and access.
piceli ui backupandrestorehandle stopped private UI control state.piceli ui cluster-observeoffers authenticated namespace inspection and logs behind an HTTPS gateway with OIDC subject grants and a rotating projected service-account token. Configuredcluster-servegrants permit exact-plan manual delivery and credential-free build Jobs. The UI Pod holds no registry or cluster-admin credential; the builder Job has its own ServiceAccount, Git Secret and cache PVC.piceli ui connecttakes an authorized one-time ticket from pending to a ready local forward, passes traffic and releases it on stop. An installed UI can recover operation records from its private PVC after a Pod restart, and its stopped state can be backed up and restored.The installed OIDC journey, exact-plan deployment with pre-rollout check, build Job, restart recovery, backup/restore, revoked grants and renderer egress denial run in one disposable kind acceptance cluster. The former
PICELI_UI_EXPERIMENTALgate is no longer required.make ui-fake-servestarts a disposable fake-API demo;make test-ui-fakeruns the service and browser journeys.Pipeline recovery propagates a stale or expired plan refusal instead of planning and applying another digest;
piceli accessrecognizes macOS frameworkPythonexecutables when stopping its own stale server; a kubeconfigtokenFilecredential is re-read before each API request.
Version 0.12.0¶
Grow or move a retained claim (preview): with
Pipeline(restore_points=...), a release that asks for a larger claim (a largerClaimTemplatesize, or the newExistingClaim(expand_to=...)) grows it in the deploy’sbackupstage, after the restore point and with the writers stopped: the claim’s size is patched when its StorageClass allows volume expansion, and Piceli waits until the volume has grown. Otherwise the plan is refused withclaim-migration-requiredand the declaration that moves the data:ClaimTemplate("data-2", size=..., migrate_from="data")orExistingClaim("new", size=..., migrate_from="old"). A move creates the new claim (labelledpiceli.io/migration=target, annotatedpiceli.io/migrated-from), extracts the restore point’s archive of the old claim into it, checks the content digest in the cluster and runs the workload’srestore_verifycommand on it read-only; the apply then switches the workload. On any failure before the switch the writers start again on the old claim. The old claim is kept (annotatedpiceli.io/migrated-to), never deleted. A smaller size is refused (claim-shrink-refused). The backup stage’s plan gainsclaim_changes(and the hash covers them only when present), the run summary’srestore_pointgainsclaim_changes, and the fake API serves StorageClasses. New error codesclaim-*. See Restore points of retained data.Typed egress and namespace selectors in network policies:
app.network_policy(…)takesegress=[…](workloads of the app orNetworkRules withNetworkPeer.pods|workload|namespace|cidrpeers, CIDRexcept, ports, protocols andend_portranges),ingress=[…]with the same typed rules (namespace selectors for ingress too),allow_dns=True(NetworkRule.dns():kube-dnsinkube-system, port 53 UDP and TCP; a default-deny egress otherwise breaks name resolution) and an explicitpolicy_types, derived when omitted (egress alone rendersEgressonly). Policies without the new arguments render byte-identically. Invalid CIDRs, ports, empty selectors and unknown workloads are refused at build time (render-target-invalid, whose message names the problem). Proven on kind: a client reaches an allowed workload and not a denied one, and a replica pair is cut and healed. See Describe an app in typed Python.
Version 0.11.0¶
Prove a restore point without touching live data (preview):
piceli restore MODULE:ATTR --point ID --to-new-claim(or--allfor every verified restore point) restores into scratch claims instead of the live ones. The plan (exit 3,verify_hash) names one Piceli-owned scratch claim per restored claim, shaped like its source (storage class, size, access modes; pinned to the node of a node-local volume); with--approve HASHPiceli creates them, extracts each archive and checks its content digest in the cluster, then runs the command declared withapp.restore_verify(workload, RestoreVerify([...]))in a Job with the workload’s current image and pod settings, the scratch copies mounted read-only at the workload’s paths. A receipt under<restore point>/verifies/recordsPASSorFAILper claim (exit 1 on anyFAIL); the scratch claims are deleted in every case unless--keep. Writers are never stopped and the command’s output is never printed. Scratch claims carryapp.kubernetes.io/managed-by=piceli,piceli.io/scratch=trueandpiceli.io/restore-verify=<id>, and Piceli deletes only claims with that label. New error codesrestore-verify-*andrestore-options-invalid. See Restore points of retained data.Deploy events to OTLP (experimental):
piceli deployandpiceli release apply|rollbackcan send one trace per run (a root span with a child span per stage) and one result log record (the dashboard marker) to an OTLP/HTTP endpoint, with app, namespace, run, release, plan hash, commit and ref, image digests, outcome and duration. Off unless--otlp-endpointorOTEL_EXPORTER_OTLP_ENDPOINTis set; also readsOTEL_EXPORTER_OTLP_HEADERS,_TIMEOUT,OTEL_SERVICE_NAME,OTEL_SDK_DISABLED. Never fails a deploy: one bounded export at the end, a problem is one warning line (new codesdeploy-events-export-failed,deploy-events-config-invalid). No secrets are exported and no OpenTelemetry package is needed. See Deploy events to OpenTelemetry.piceli release orphans: report and prune leftover objects: lists the objects Piceli wrote (piceli.io/owner) that the selected release no longer declares (a removed component) or that belong to another environment of the same app (same ownership labels, another owner), with kind, name, matched label, reason and age.--prunedeletes them only after approval of a plan hash over the exact set (UIDs and resourceVersions); a changed set is refused. PersistentVolumeClaims, Secrets, another owner’s objects and cluster-scoped objects are kept unless--include-claims,--include-secrets,--include-other-ownersor--include-cluster-scoped. A prune waits (at mostreadiness_seconds) until each deleted object is gone; one still terminating (a claim a stopping pod still mounts) is reporteddeletingwith itsfinalizers, notdeleted. New error codesorphans-*. See Releases from a spec (piceli release).
Version 0.10.1¶
piceli statuslists the StatefulSets of an app that pins a workload to a node:App.rendertreated the “any node” placeholder used for listing as an empty mapping, so the listing fell back to Deployments only.Checks.python(callable)works in aPipeline: the plan describes a callable by its entry (module:function), aspublic_dictdoes, so it plans and its hash is stable. A lambda, a local function or another callable without a module-level name is refused at declaration with the new error codepipeline-check-not-referenceable.The text deploy plan shows the
prerolloutstage: one line per pre-rollout check (workload, command, upgrade claims, the Secrets and ConfigMaps it uses), as the JSON plan already did, so a reviewer approving the hash sees which checks will run.
Version 0.10.0¶
Helm chart and manifests for other people’s clusters (preview):
piceli chart render|package|manifests|publishrenders the sameApp(orPipeline) as a Helm chart whose templates, with the default values, render the objectspiceli renderprints (plus thehelm.sh/chartandapp.kubernetes.io/managed-bylabels), a byte-identical chart archive, an OCI chart in thehelm pushlayout (approval by digest), or plain manifests with a values file applied and validated by Piceli. Values cover images (repository, tag, digest),imagePullSecrets, replicas, resources, node selectors, storage classes and sizes, existing claims, Ingress and HTTPRoute hosts, ConfigMap keys and Secret names;values.schema.jsondocuments and validates them. Secrets are never rendered: the chart references existing Secrets by name. An unbuilt pipeline image is a required value. New error codeschart-*. See Publish for other people’s clusters: a Helm chart and manifests.piceli releaserefuses an App with pre-rollout checks: onlypiceli deployrunsApp.pre_rolloutchecks, sopiceli release plannow refuses a composition that returns such an App (release-prerollout-unsupported) at plan time, before anything is written, instead of skipping the checks silently.Multi-platform images from one spec (experimental): a
host-build.tomldeclaresbuild.platforms = ["linux/amd64", "linux/arm64"](orpiceli artifacts build-spec run --platform …, which now also runs host builds): one layer set, SBOM and provenance per platform, built with the platform’s facts, and one canonical OCI image index per image; one approval covers every platform. A single-platform build keeps its plan hash. New codebuild-platforms-invalid. See Publish images for other people’s clusters.piceli artifacts publish(experimental): pushes a build’s images to a hosted registry for other people’s clusters: per-platform manifests by digest (only missing blobs; a second publish sends nothing), one image index, the SBOM and provenance as OCI 1.1 referrers (fallback tag on registries without the referrers API), optional cosign signatures (--sign-key, no transparency log) and the version tag last; a tag that names another image is refused (publish-tag-exists) unless--move-tag. Plan first (exit 3),--approve <digest>to push. Credentials from--credentials FILEor--docker-config(credential helpers).--values-outwrites theimages.<key>.{repository, tag, digest}values of thepiceli chartHelm chart. New codespublish-*,sign-*,cosign-tool-required,invalid-docker-config,credential-helper-failed.
Version 0.9.0¶
Builds without a VM (experimental):
Build.spec("host-build.toml", builder="host")builds with the host toolchain (for Rustcargoorcargo zigbuildforlinux/arm64from macOS), so Docker Desktop can stay closed. The stage is synchronised between builds (unchanged files keep their mtime), every host build of a cache shares oneCARGO_TARGET_DIR, declared tools are pinned by sha256 and are the only programs a command may start, bases are pulled by digest, and each image file mapping is one deterministic layer, so a one-line change pushes one layer (plus the config) by digest. Each image gets an SPDX SBOM and an in-toto/SLSA provenance statement. The Docker builder stays the default. See Builds without a VM.Target node facts: a host build’s plan reads its node’s architecture, kernel version and page size (label
piceli.io/page-size, else the kernel release, else the architecture), shows them inpiceli deploy --plan(stages.build.builds.<name>.node_facts) and covers them with the plan hash;{page_size_log2},{rust_arch}and friends substitute into the build’s commands and env (for exampleJEMALLOC_SYS_WITH_LG_PAGE).Pre-rollout and upgrade checks (experimental):
App.pre_rollout(workload, command, upgrade=UpgradeCheck(...))declares a check thatpiceli deployruns before a workload changes: a Job with the new image and the workload’s real Secrets, ConfigMap and Secret mounts, environment, security context and service account (claims replaced by empty directories). The release proceeds only if it exits 0, so a bad Secret mount or an incompatible store fails the run with the pods unchanged.UpgradeCheckadditionally opens the workload’s retained claims (one Job per StatefulSet ordinal) read-only, pinned to the node of the running pod forReadWriteOnceclaims. Newprerolloutdeploy stage (only for apps that declare a check, afterdeliver;--until prerollout), shown in the plan with the Secrets and ConfigMaps the pod reads; planning refuses a missing Secret or key. Check Jobs are always removed (also on interrupt; a TTL covers a killed deployer); the run summary keeps the exit code and a scrubbed, bounded log tail. Declaring a check renders no object, so plan hashes of existing apps do not change, and the stage lists of apps without a check keep their six stages.piceli.testing.FakeAPI.job_result(...)decides how check Jobs end in tests. See Pre-rollout checks.Restore points of retained data:
Pipeline(restore_points=RestorePoints())adds abackupstage before the release plan. When a release changes the image or storage settings of a workload that writes a retained claim, the plan lists every such claim (one per StatefulSet replica, existing claims) with the reason and the writers to stop; the run runs the quiesce hooks declared withapp.quiesce(workload, Quiesce.exec(...) | Quiesce.http(...)), scales the writers to zero, waits until no pod (terminating ones included) mounts the claims writably, streams a gzip tarball of each claim from a read-only helper Job to a private local directory and verifies it (SHA-256, listing, content digest computed in the cluster). The result and the run summary gainrestore_point.piceli restore-pointslists and verifies them offline;piceli restore --point IDplans and, with--approve <restore_hash>, puts one back. Pipelines withoutrestore_pointsare unchanged (nobackupstage, same hashes); the deploy, watch and summary schemas add thebackupstage name (additive). New codesrestore-point-*,restore-plan-changed. Restore point archives never enter a state snapshot. See Restore points of retained data.Stage order: a run’s stages are
inputs, build, deliver, prerollout, backup, plan, apply, checks, each optional stage present only when declared. A new image passes its pre-rollout checks (including the read-only upgrade check next to the running writer) before any writer is stopped for a restore point, and the restore point is taken before the release plan. Pipelines that declare neither keep their six stages and their plan hashes.New error codes:
prerollout-mount-missing,prerollout-claim-exclusive,prerollout-failed,prerollout-timeout,prerollout-not-startable,prerollout-unavailable.New error codes:
node-facts-unavailable,node-page-size-invalid,node-platform-mismatch,host-tool-missing,host-output-missing,host-build-invalid,base-image-invalid,base-image-unavailable,base-platform-unavailable,base-layer-unsupported,build-builder-mismatch. The deploy plan’s docker builds gain an additivebuilder_kind: "docker"field; hashes of existing plans do not change.
Version 0.8.1¶
Fix (builds): staged build-context files now get a modification time derived from their content hash instead of
source_date_epoch, so a same-size edit is no longer hidden from mtime-based tools (Cargo on a cachedtarget/) and the manualsource_date_epochbump is not needed.source_date_epochstill fixes the image metadata. Plan hash and receipts are unchanged.piceli watch: follow a deploy run from its journal, read-only and offline.--jsonprints JSON lines (piceli.watch-event.v1, seedocs/schemas/piceli-watch-event-v1.schema.json): asnapshot, thenstage,progressandrunevents, then theresult(state, failurereason,resumable, summary paths). Exit0ready or stopped,1failed, interrupted, rolled back or--timeout,2no run. New codeswatch-no-run,watch-timeout. The run journal gainsprogress(the newest 200 progress lines); existing outputs are unchanged.Fix:
piceli deploy --resumereports the resumed run’s own outcome: the run record,summary.jsonandpiceli runsdrop thereasonandmessageof the earlier failure or interruption once the stage succeeds.Fix:
piceli accessfollows the live owner of a forward during a rollout: it connects to the newest Ready, non-terminating pod of the Service or Deployment and reconnects (without a restart or a failure) when that pod is replaced. Eachstatusevent addspod(additive;nullwhen unknown).
Version 0.8.0¶
Build.spec(path, platform=...): build a spec for another platform than itsplatforms(for examplelinux/amd64for a published arm64 example), as part of the plan hash; the post-build spec re-check applies the same override. The kind tests use it to build for the node’s platform, so they pass on amd64 CI runners as well as arm64 machines.Fix:
piceli deploy MODULE:ATTR --planrefused for adoption or replacement now suggests whatpiceli deploycan act on: eachblocking[].suggestentry names the Pipeline declaration (Pipeline(adopt=["Deployment/web"]),Pipeline(replace=["Deployment/web"])) instead of the--adopt/--replaceflags ofpiceli release, whichdeploydoes not take; the refusal’s sentence says the same.blocking[].codeandmessageare unchanged, andpiceli releasekeeps suggesting its flags. Consumers that matched the old--adopt …strings for a deploy must match the new ones.Fix:
piceli deployrejections and failures carry the contract’smessage(the sentence stderr shows first) next toreason; thepiceli.deploy-event.v1schema documents it.Fix: a model module that raises no longer breaks the output contract with a traceback.
piceli renderrejects withrender-target-invalid(exit2, one JSON object whatever--formatsays) when the target, or the spec’s composition, raises while importing or evaluating (a duplicate name, a wrong keyword, any exception); themessageisimporting|evaluating TARGET failed: Type: text.release … --spec release.tomlrejects the same case withinvalid-composition(a composition module that raisedValueErrorwhile importing wasrelease-refused).deployandrelease --spec MODULE:ATTR(pipeline-load-failed),statusandaccess(access-target-invalid), and the newpublish,render --out(render-target-invalid),runs,cacheanddoctor(pipeline-load-failed) put the exception’s type and text inmessagetoo.PICELI_DEBUG=1prints the traceback on stderr.Fix: another process’s command line is no longer printed in port conflicts (
access-port-conflict, the dashboard port,observe/dashboard forward conflicts): its pid only, aspiceli statusalready did (owner.commandandowner.parentarenullfor it).Fail fast with causes: while an apply waits for a workload, Piceli watches the pods of the revision being rolled out.
CrashLoopBackOff(Init:CrashLoopBackOff),ImagePullBackOff,ErrImagePull,InvalidImageName,CreateContainerConfigError,CreateContainerError,RunContainerError,[execution] crash_restartsrestarts (default 3), a failed Job or Pod fail the apply at once withapply-crashloop(pipeline-apply-crashloopfrompiceli deploy) instead of atreadiness_seconds. The result addsdiagnosis(piceli.diagnosis.v1: per workload, each container’s reason, exit code, restarts, last 20 log lines and latest events, redacted against the release’s secret store and secret-looking text) and stderr prints one line per cause; an apply that times out reports what its pods show too.execution.causes(compact, no logs) is added to results andrelease status.[execution] fail_fast = falserestores waiting for the deadline. Not rolled back automatically, as for any apply that does not become ready.piceli release status --spec … --run ID(andpiceli explain --run ID --spec …) shows one past execution, by execution id, unique prefix orpiceli deployrun id, with the causes recorded in the journal (unknown-executionotherwise).Own stale processes:
piceli accessrecognises a port held by Piceli’s own process for the same app (itskubectl port-forward, supervised or orphaned, orpiceli access/observe serve/operator servefor the same target), says so and suggests the newpiceli access stop --stale TARGET [--port N], which stops only those processes. Conflicts addholder(piceli-forward,piceli-server,other,unknown).piceli.testing:FakeAPI.fail_pods(...), pod logs and events, and ReplicaSets in the defaultTYPES.Temporary files are always removed: every temporary directory Piceli creates (generated TLS keys, OCI layouts, build staging,
--refworktrees, local image imports, state archives, SQLite snapshot copies) is namedpiceli-<purpose>-*, owner-only, and removed on success, error,Ctrl-Cand now also onSIGTERM/SIGHUP(thepicelientry point removes live ones before the signal’s default action; anatexithook catches threads). A failed write of the release catalog, a delivery receipt or a build output no longer leaves a partial file. The SQLite snapshot copy was named.snapshot-*; it ispiceli-snapshot-*now. The test suite fails when any test leaves a temporary file behind.piceli cache status [--json]andpiceli cache prune [--keep-last N] [--budget 20GiB] [--dry-run](preview): disk used per state directory (each environment’s too) and category (builds, toolchains, blobs, receipts, runs, release, other, temp) and by stale temporary directories; a prune that never removes the release state, the secret store, approved plans, build or mirror receipts, the latest or a resumable run, or the runs of the last N applied releases, under the state directory’s run lock. With shared state only machine-local files are pruned.Pipeline(cache_budget="20GiB")prunes after every run; the deploy result addscache. New codescache-budget-invalid,cache-over-budget,cache-arguments-conflict. Seedocs/maintenance.md.piceli doctor [--json](preview): free disk and memory against what the next build needs (from the last build receipts) and the tools the pipeline uses (docker,docker buildx,kubectl); exit1withrunner-disk-low,runner-memory-loworrunner-tool-missing.Run summaries (preview): every deploy run writes
<state_dir>/runs/<id>/summary.json(piceli.run-summary.v1,docs/schemas/piceli-run-summary-v1.schema.json) andsummary.mdwhen it ends, whatever the outcome: commits and refs, image digests, sizes and reused blobs, plan action classes and counts, changed objects with their changed field paths, checks, the failure’s code and message (with the compact causes of a workload that cannot start),approved_by: "policy"when the owner’s approval policy approved the run, stage timings; never secret values or log lines. The deploy result addssummary, and the journaled plan stage output addsdiff(changed field paths).piceli runs [--json]lists the runs. The CI recipe postssummary.mdas the job summary ofapplyandresumeand keepssummary.jsonin the artifact (docs/ci.mdalso shows a pull request comment).Build receipts record each image’s engine size (
size_bytes).Owner-declared approval policy:
Pipeline(..., auto_approve=ApprovalPolicy(allow=…, deny=…, max_objects=…))and[release] auto_approve = {...}declare which plans may run without the owner approving the hash;piceli deploy --approve-if-policyandpiceli release apply --approve-if-policyrun a plan only when every action is inside it, and otherwise exit3withapproval-policy-exceeded, the violations and the usual approval command.delete,replaceandadoptare never inside a policy; cluster-scoped objects and drift need an explicitallow. The policy is part of the combined hash and of the release plan hash (plans without one keep their hashes); there is no flag that sets or widens it. A deploy approved by the policy re-checks the release plan made after delivery and records"approved_by": "policy". New codesapproval-policy-invalid,approval-policy-missing,approval-policy-exceeded,approve-if-policy-flags-conflict; the deploy event schema addspolicyandapproved_by, and release plan changes gaincluster_scopedinstages.plan.changes.Agent skill:
skills/piceli(SKILL.md, an exampleAppandPipeline, and scripts to check the install, plan and ask the owner, deploy with the approved hash or the owner’s policy, check status, diagnose withpiceli explain, resume and roll back). CI copies the skill alone and runs its walkthrough against the built wheel and the fake API (make skill-check);tests/integration/test_skill_kind.pyruns it againstexamples/shopon a disposable kind cluster.GitOps handoff (preview):
piceli publish MODULE:ATTR [--env E] --to oci://registry/repo[:tag]packages the rendered manifests as an OCI artifact in theflux push artifactlayout (configapplication/vnd.cncf.flux.config.v1+json, oneapplication/vnd.cncf.flux.content.v1.tar+gziplayer), with a deterministic digest; it prints the digest and exits 3, and pushes by digest (then the tag) only with--approve <digest>.piceli render --out DIRwrites the same files for a Git directory. A Secret is refused unless--secrets externalleaves Secrets out; redacted values and placeholder images are always refused. New codesgitops-*andrender-out-refused. Flux and Argo CD examples indocs/gitops.md; a kind test has Flux reconcile a published artifact.Docs: when to use Piceli, and comparisons:
docs/when_to_use.md(use it when / don’t) anddocs/comparisons.md: one app written with Piceli, Helm, Kustomize, cdk8s and Pulumi (examples/comparisons/<tool>, pinned versions), with files, lines, steps and safety features compared and where the others are better. A new CI job (comparisons) renders every version for dev, staging and prod and checks that it equalspiceli render.The README quick start is
examples/readme/app.pyandexamples/readme/commands.sh, included verbatim (scripts/readme_examples.py check, also a pre-commit hook) and run against the fake API intests/acceptance/test_readme_quickstart.py; the getting-started page includes the same file.Public documentation links (README,
llms.txt, package metadata) point at/en/stable/; pages not yet in the stable release keep/en/latest/.piceli.testing.FakeAPI(namespace=...)serves another namespace thanTARGET.namespace, so an app that names its own namespace runs against the fake API unchanged.fail_podscreates its pods, logs and events in that namespace.Cross-model eval (experimental, contributor tooling):
evals/measures how language models install, implement, operate and recommend Piceli: fixed tasks (install; a web app with a Deployment, Service, HPA and PostgreSQL StatefulSet; a staging environment; apiceli.testingtest; deploy with the owner’s approval, diagnose a refused plan, roll back) and four discovery prompts that do not name Piceli. Answers run in a sandbox (emptyHOMEandKUBECONFIG, no inherited credentials, loopback-only network) againstpiceli renderand the fake Kubernetes API, and are scored for task success, wrong Python API and CLI use (against a snapshot of the public API andpiceli help-json), safety violations (default kubeconfig or context,--auto-approve,--allow-exec, printed or hardcoded secrets: a hard fail), interventions and recommendation rate. Anthropic, OpenAI and Gemini models via environment keys (skipped without them, never printed); mock models validate the harness (make evals-check, run in CI), and the committed 0.7.0 and 0.8.0 baselines are harness validations, not model measurements.--approve-if-policyis not scored as approving on the owner’s behalf (the owner’s reviewed policy decides); a capturedpiceli publishdigest is. Seedocs/contributing/evals.md.
Version 0.7.0¶
Reference app:
examples/reference/app.pydeploys a realistic app to dev, staging and prod from one typed module (StatefulSet with claim templates, Job and CronJob, HPA and PDB, HTTPRoute, a cert-managerCertificatetyped bypiceli codegen crd, a release-wide NetworkPolicy, RBAC, restricted pods, a SOPS-encrypted password and checks), with render, fake-API and kind tests; walkthrough indocs/reference_app.md.Environments:
autoscalers={name: Scaling(min_replicas=…, max_replicas=…, cpu=…, memory=…)}changes an autoscaler per environment (thereplicas=refusal pointed at a fix no override could express), and aresources=override that drops a request an autoscaler’s utilization target needs is refused (environment-invalid).--diff-envno longer reports the namespace inside RBAC objects (binding subjects,<namespace>:<app>:<name>ClusterRole names) as a difference.Checks.exec(...)with a StatefulSet or DaemonSet handle targetsstatefulset/<name>ordaemonset/<name>instead ofdeployment/<name>; a Job or CronJob handle is refused.An environment’s
replicas=on a workload an autoscaler targets is refused (environment-invalid) instead of being ignored.External secret sources (preview): three new
[secrets.*]types, andSops,VaultandAwsSecretforpiceli.pipeline.Secrets:sops(one value of a SOPS-encrypted file, or the whole file, decrypted by thesopsbinary with an explicit argv, a minimal environment pluspass_env, a timeout and an optionalsops_sha256pin),vault(one key of a HashiCorp Vault KV v2 secret over verified TLS, token fromtoken_fileortoken_env,namespace,version,ca_file) andaws-secrets-manager(a secret or one JSON key, through botocore; new extrapiceli[aws]). They are read at everyplananddiff; each value is reduced to an HMAC-SHA256 under a private key (state_dir/secret-sources.key) that is part of the release fingerprint, so an unchanged value re-plans the same release and a changed one creates a new release with a new private version (new plan originfetched; the others arecarried:<release>). A refused plan stores nothing, and values never reach plans, journals, receipts, logs or errors.--rotaterefuses an external source (rotate it at the source). New codessecret-source-auth-failed,secret-source-not-found,secret-source-tool-missing,secret-source-timeoutandsecret-source-failed. Specs without external sources keep their release names;secret show --jsonaddssourcefor them.Custom resources and any other kind (preview):
app.resource(api_version, kind, name, spec, *, fields=, scope=, public=, labels=, annotations=, component=)declares one object of any kind with a typed spec (a pydantic model, validated at declaration) or a JSON mapping; it renders by alias with only the fields that were set, joins components,dependsandoverridelike other declarations. Cluster-scoped resources follow the per-namespace ownership rules of ClusterRoles (no namespace,piceli.io/namespaceannotation, never another namespace’s objects); a release now manages any such annotated cluster-scoped kind except Namespace, CustomResourceDefinition and PersistentVolume. A declared scope that the server’s discovery contradicts is refused at plan time (resource-scope-mismatch). Seedocs/crds.md.piceli codegen crd(preview): generates a deterministic module of frozen pydantic models (<Kind>SpecwithAPI_VERSION,KIND,SCOPE) from a CRD’s structural OpenAPI v3 schema, from a file or with--from-cluster --kubeconfig F --context C --crd NAME;--outreplaces only files it generated. A small in-house generator (no new dependency; it understandsx-kubernetes-int-or-stringand preserve-unknown-fields). New codes:crd-invalid,crd-not-found,codegen-flags-conflict,codegen-output-refused,codegen-cluster-read-failed. Pinned cert-managerCertificateand Prometheus-operatorServiceMonitorCRDs are vendored intests/fixtures/crds/with their source and licence.Environments (preview):
app.environment(name, ...)declares typed overrides (replicas, images, container resources, config values, hosts, node selectors, resource specs, enabled components) checked against the declared objects;app.for_environment(name)returns the derived App.piceli render --env NAMErenders one environment and--diff-env OTHERprints their typed difference (text, or JSON with--format json).Pipeline(app, {"dev": Target…, "prod": Target…})deploys each environment to its own target with its own state (state_dir/environments/NAME);piceli deploy --envandpiceli release … --spec MODULE:ATTR --envselect one, and the combined hash covers the environment’s name and resolved values. JSON addsenvironment(render, deploy result) only with--env. New codes:environment-unknown,environment-required,environment-invalid,environment-unsupported. Seedocs/environments.md.Plans show Secret references in any kind (
secretName,*File/*Pathstrings,{name, key}selectors,secretTemplate) instead of redacting them, so custom resources that reference Secrets can be applied; thepiceli.io/public-fieldsannotation (app.resource(..., public=[...])) declares other sensitive-looking fields public. Values stay redacted.A file target (
piceli render path/app.py:app, a pipeline, a release composition file) can import the modules next to it (such as generated CRD models); its directory is appended tosys.path.piceliandpiceli.appexportEnvironmentandResource.Typed App kinds (preview):
app.stateful_set(...)(per-podClaimTemplatevolumes, a governing headless Service by default,pod_management,update_strategy),app.daemon_set(...),app.job(...),app.cron_job(...),app.autoscaler(workload, ...)(HPAautoscaling/v2),app.disruption_budget(workload, ...)(PDBpolicy/v1),app.ingress(...)and Gateway APIapp.http_route(...)with typedRouteandGatewayRef. Every pod kind shares the Deployment’s pod model (piceli.app.Workload):pod_defaults,service_account=,node=pins, images, secrets, config dependencies andoverridework the same. Workload names are now unique across kinds.Service(headless=True)rendersclusterIP: None.Autoscaled replicas, one rule: a workload targeted by
app.autoscalerrefusesreplicas=and renders the autoscaler’smin_replicasas its initialspec.replicas; the plan’s autoscaled-replicas rule of 0.6.0 (initial,held,yielded) decides what is written for typed apps and plain manifests alike, and a plan never removes/spec/replicasfrom a workload an autoscaler targets, whether the autoscaler is in the release or only live. See Compatibility and shared ownership.Claims are never pruned: StatefulSets render
persistentVolumeClaimRetentionPolicyRetain/Retain, and prune and replace delete them withOrphanpropagation; the claims their templates create are never part of a plan.Immutable fields: a plan that would change a managed Job’s pod template or
completions, or a StatefulSet’sserviceName,podManagementPolicy, selector or claim templates, is refused with the new codeimmutable-field-changed(blocking[].suggestnames the flag).--replace Kind/namenow also accepts a managed Job or StatefulSet and recreates it (Jobs withBackground, StatefulSets withOrphanpropagation); every other managed object is still refused.Readiness, one rule: HorizontalPodAutoscalers, PodDisruptionBudgets, Ingresses and HTTPRoutes are ready once they exist (they need metrics or another controller; in 0.6.0 they followed the status conventions); every other kind without a specific rule, custom or built in, follows the status conventions of 0.6.0 (
observedGeneration,Ready,Reconciling,Stalled; ready once applied when it reports none). See When an object is ready. HTTPRoutes are applied with Ingresses, after Services.Portable plan files (
deploy --plan --out) record--env, and--applydeploys that environment (deploy-plan-file-mismatchfor another--env).piceli.testing: the fake API serves StatefulSets, DaemonSets, Jobs, CronJobs, HorizontalPodAutoscalers, PodDisruptionBudgets, Ingresses and HTTPRoutes (added toTYPES), reports their readiness, and refuses updates to immutable Job and StatefulSet fields with422.
Version 0.6.0¶
Fix: reads the API server throttles with 429 (for example while the watch cache of a just-installed CRD initializes) are retried after
Retry-After(bounded, within the deadline); writes are never retried.Shared deployment state (preview):
Pipeline(state="cluster")and[release] state = "cluster"keep the run journal, receipts, release catalog, execution journal and secret store in the release namespace (gzip snapshot inpiceli.io/stateSecrets, chunked, never in ConfigMaps), andstate_dirbecomes a working copy. Every command holds a release-scoped lock, aLease piceli-lock-<release>renewed by the holder, taken over when its holder stopped renewing (state_lease_seconds, default 60), and fenced: each state write proves the holder andleaseTransitionsfirst. State is written at every journaled stage change and after every execution journal commit, before the change it records, so a deploy interrupted or killed on one runner resumes on another. The firststate="cluster"run moves an existing local state to the cluster. The default stayslocal. See Share deployment state between runners.Portable approved plans:
piceli deploy … --plan --out FILEwrites apiceli.deploy-plan-file.v1document (combined hash, stages,--refcommits, pipeline and observed target identity, build/delivery/mirror receipts);piceli deploy --apply FILE --approve HASHapplies it on any runner: it refuses another hash, pipeline or cluster, plans again against live state and runs only when the combined hash is unchanged. A build whose images are already delivered by digest is not rebuilt, so no build cache is needed; a resumed run whose build happened on another runner rebuilds before delivering.piceli state show|pull|export|import: where a release’s state lives, who holds its lock, refresh the working copy, export it to one file (secret material excluded, or AES-256-GCM encrypted with--include-secrets --key-file; new extrapiceli[crypto]) and import it back after approving the import digest (exit3without--approve).pipeline-lockednow covers the release lock and addslock(holder,expires_in) to the rejection; the deploy result addsplan_file. New codes:release-locked,state-lock-lost,state-unavailable,state-access-denied,state-corrupt,state-layout-mismatch,state-too-large,state-export-invalid,state-key-required,state-crypto-unavailable,state-import-partial,state-import-changed,state-output-exists,deploy-plan-file-invalid,deploy-plan-file-mismatch,deploy-plan-target-mismatch.piceli release plan|check --spec MODULE:ATTRnow hold the pipeline’s run lock likeapply(refused withpipeline-lockedwhile a deploy runs);release status|diff|secret showandpiceli statusrefresh a shared state’s working copy first (reads only).Discovery lists with the label selector
!piceli.io/state, so plans, pruning andpiceli import livenever see the state objects.piceli.testingserves Leases and equality/existence label selectors.The CI recipe (
examples/ci/github-actions-deploy.yml, Deploy from CI with an approval step) runs plan, apply and resume on any runner: no persistent state directory, the plan file travels as thedeploy-planartifact.Supported Kubernetes versions: the four most recent minors, 1.34 to 1.37, each tested on kind with node images pinned by digest (
.github/kind-nodes.json, kind v0.33.0). Pull requests run the integration suite on the newest; a nightly job runs it on all four and the unit and acceptance tests with the lowest allowedkubernetesclient (>=29.0.0). CI now passes the cluster to the integration tests explicitly, so they run instead of being skipped. See Compatibility and shared ownership.Autoscalers own
spec.replicas: for a workload a HorizontalPodAutoscaler targets (declared in the release, or live and discovered), plans no longer declarespec.replicasonce the autoscaler owns it, and declare the live value while Piceli still does. Before, a re-plan showed a perpetualreplicasdiff and drift, and applying it reset the count and failed withapplied-resource-drift.release plan --jsonandrelease diff(JSON on stdout) addautoscaled(modeinitial,heldoryieldedper workload).Controllers writing status during a plan or an apply (found by the kind matrix, most often on 1.37): a status update between discovery and a server dry run made the dry run conflict, and an unchanged release planned
applyfrom a literal comparison;plan,diffandrollbacknow capture discovery and the dry runs again (up to three times) when a dry run conflicts. A status update between the executor’s read and its merge patch failed the apply withconflict; the patch is now sent again at the newresourceVersionwhen only the status or bookkeeping changed (content and field ownership unchanged). An autoscaler scaling a workload through thescalesubresource while Piceli waits for readiness is no longerapplied-resource-drift.Readiness of other kinds: HorizontalPodAutoscalers, custom resources, PodDisruptionBudgets and other kinds without a dedicated rule follow the common status conventions (
observedGeneration,Ready,Reconciling,Stalled) and are ready once written when they have none. Before, a release containing any of them failed withreadiness-unsupported, which now only means a malformedstatus.Interrupted executions:
release resumeafter a kill before a write reached the cluster (a create whose object is absent, a write or delete whose object still has the recorded version) sends the write again, once the new[execution] write_settle_seconds(default 60) have passed since it was sent, instead of stopping withambiguous-write-blocked,ambiguous-content-blockedorambiguous-delete-blockedfor good. Kill tests stoprelease applyandrelease rollbackat every write (before it, after the server applied it, at the next request) and on kind mid-rollout; How plans decide what changes documents the recovery and the rollback boundary (what a rollback restores, and that it cannot restore data, external side effects or what others own).Ownership tests on kind: an autoscaler owning
replicas, an operator-like writer sharing a custom resource, a mutating admission webhook, and adoption and pruning with a third field manager.piceli.testing.FakeAPIaddsscale()(an autoscaler’sscalesubresource write) andintercept(stop a client at an exact request phase).
Version 0.5.1¶
Fix: stopping a finished build step no longer fails intermittently on macOS with
PermissionErrorwhen only the exited process-group leader is left.Every command follows the output contract:
render,release diffandrelease checkare nowconforms(none ispartial).piceli renderprints its rejection object on stdout for every--format(it did only with--format json), and a missing--specfile is arender-target-invalidrejection instead of a usage error.release checkadds"state": "succeeded", or"state": "failed"with"reason": "check-failed"when it exits1.release diff --exit-codeadds"reason": "release-changes-pending"(new code) when it exits1. Existing fields are unchanged.Retry-safe releases: the release workflow asks PyPI whether the version is released instead of trusting the git tag, uploads only what is missing (retrying transient index failures), verifies every file on PyPI and only then pushes the tag, which is never moved. An interrupted release finishes on re-run. TestPyPI pre-releases from pull requests are retried and verified the same way.
Provenance: wheels and sdists are published with PEP 740 attestations (Sigstore, trusted publishing); see
SECURITY.md.
Version 0.5.0¶
Mirror third-party images (preview):
NodeLoopbackRegistry(mirror=[…])andRegistry(url, mirror=[…])copy digest-pinned images the app does not build (docker.io/library/redis@sha256:…) into the delivery registry in the deliver stage, over the OCI distribution API on the machine running Piceli (anonymous, ormirror_credentials={"registry": "file.json"}). The app’s references are rewritten to the copy with the same digest, and workloads using it are pinned to the registry node. For a multi-arch index the index keeps its digest and the node registry holds only the node’s platform (NodeLocalRegistry(index_platforms=…));Registrycopies every platform. Copies are verified by digest, skipped when present, recorded instate_dir/mirrors/(piceli.mirror-delivery.v1) and part of the combined plan hash. New codes:pipeline-mirror-not-pinned,pipeline-mirror-failed,mirror-digest-mismatch,mirror-manifest-invalid,mirror-platform-unavailable,blob-not-found,invalid-blob-redirect,too-many-redirects.piceli release plan|diff|apply --specrefuse withpipeline-not-delivereduntil the mirrors are copied.Take over a live node-loopback registry (preview):
NodeLoopbackRegistry(adopt="NAME")adopts a registry Deployment that already runs on the node (and its ConfigMap and claim) by ownership transfer, keeping its selector and its data, after checking that it is compatible (host network, port, node, storage), elsepipeline-registry-incompatible.replace="NAME"backs it up, deletes and recreates it; storage is never deleted, and the plan says whether the data carries over. A registry that holds the port without either flag is refused at plan time withpipeline-registry-takeover-requiredinstead of failing later withpipeline-registry-not-ready. New optionshost_path=,existing_claim=andinherited_owners=onNodeLoopbackRegistry, andexisting_claim=,selector=onNodeLocalRegistry; new codepipeline-registry-unreadable.StreamedOciRegistryClientgainsopen_blob()(streamed blob downloads that follow a redirect to another origin without credentials) andactions="pull"for pull-only token scopes.piceli.testing.FakeAPIserves Nodes (add_node).The deploy plan’s
deliverstage addsmirrorsandregistry.existing/registry.index_platformsonly when used, so earlier pipelines keep their combined hashes.Deploy a commit, not the working tree (preview):
piceli deploy TARGET --ref [SOURCE=]REV(repeatable; a bareREVwhen every source is one repository) resolves each revision to its commit SHA, checks it out in a temporarygit worktreeand runs theinputsandbuildstages from there; the worktrees are removed on success, failure,Ctrl-CandSIGTERM. The combined hash covers the SHAs, so an approval of commit X never applies commit Y, and the printed approval command pins them. The pipeline module still runs from the working tree and must match the commit (deploy-ref-model-differs).--resumereuses the run’s commits. New error codesdeploy-ref-invalid,deploy-ref-source-unknown,deploy-ref-ambiguous,deploy-ref-unknown,deploy-ref-checkout-failedanddeploy-ref-model-differs. Additive output:refsin the deploy result,stages.inputs.refs/model, the run journal and the build receipt; a release created by a deploy recordsprovenance.sources(commit, dirty, ref), shown bypiceli release status.CI recipe (preview): Deploy from CI with an approval step and
examples/ci/github-actions-deploy.yml: plan the pushed commit, publish the plan and its combined hash, approve through a protected GitHub environment, apply with the same--refand hash, resume by hand. Piceli’s tests run the workflow’s commands against the fake API.App-level pod defaults (preview):
App(..., pod_defaults=PodDefaults(...))applies typed settings to every Deployment of the app:security=Security(...)(podsecurityContext:run_as_non_root,run_as_user,run_as_group,fs_group,seccomp; containersecurityContexton every container:allow_privilege_escalation,read_only_root_filesystem,drop_capabilities,add_capabilities;Security.restricted(...)for therestrictedPod Security Standard), an extranode_selectormerged withnode=pins,termination_grace_secondsandautomount_token. Workloads take the same typed arguments, which win (securityfield by field,node_selectorkey by key);app.overridestill patches last. Akubernetes.io/hostnameselector together withnode=is refused. Rendering is unchanged when none of this is used.Typed RBAC (preview):
app.service_account(name, rules=[Rule(...)], cluster_rules=[Rule(...)])renders a ServiceAccount, a Role and RoleBinding, and a ClusterRole and ClusterRoleBinding named<namespace>:<app>:<name>; bind it withapp.deployment(..., service_account=sa).Rulerefuses empty lists, malformed verbs, resources and groups,resource_nameswithcreate/deletecollection, and"*"unlessallow_wildcard=True. The ServiceAccount rendersautomountServiceAccountToken: falseand only pods bound to it gettrue.Cluster-scoped RBAC in releases: a release may now manage ClusterRole and ClusterRoleBinding objects (other cluster-scoped kinds are still refused with
invalid-composition). They carrypiceli.io/namespace, and a provider treats a cluster-scoped object as managed only when it names the release’s namespace as well as its owner, so one owner’s releases in two namespaces never change, adopt or prune each other’s. Plans flag them with"cluster_scoped": true(additive) and[cluster-scoped]; prune and rollback create and delete them like namespaced objects.Label-selected network policies:
app.network_policy(selector=..., allow_from_selector=..., name=...)andapp.release_selector(the labels every pod of the app carries) express “only this app’s pods may connect”.--adopt/--replaceand[release] adopt/replaceaccept RBAC names with:(ClusterRole/staging:shop:watcher).Fix: a pruning delete no longer fails with
deleted-resource-reappearedon a real cluster. AnOrphandelete keeps the object (with adeletionTimestamp) until the garbage collector removes its finalizer; the executor now waits for the same object to disappear, and still refuses an object recreated with another UID.piceli.testing: the fake API also serves ServiceAccount, Role, RoleBinding, ClusterRole and ClusterRoleBinding, decodes percent-encoded names, andFakeAPI.terminating_readskeeps anOrphan-deleted object terminating for a few reads, like a real API server.Release preview before the images exist (
piceli deploy --plan, preview): while build images are not built or delivered,--plannow computes the release plan with placeholder images (pending-build.piceli.invalid/<image>@sha256:000…orpending-delivery…) instead of printing only “after delivery”. It shows what the release would create, adopt, replace, apply or delete, and refuses with the release engine’sblockinglist and suggested flags (before any build or registry write) when existing objects need adoption or replacement. The preview is never approvable or persisted, generates or reads no secret, and objects carrying a placeholder are never sent to the cluster, not even as a server dry run (dry-run-placeholder-image). JSON addsstages.plan.preview, and a refused preview addsstageandpreview; existing fields keep their meaning. The combined hash of a pending plan now covers the preview’s adopt/replace/delete set: after delivery the real release plan may not go beyond it (pipeline-preview-changed, nothing applied; plan again).--approve <preview_hash>is refused withpipeline-preview-not-approvable. An image that is neither a build handle nor pinned by digest is now refused at--plantime.piceli render MODULE:pipeline: aPipelinetarget renders offline with its target’s namespace and declared nodes (node="alias"pins resolve), build images as placeholders, pinned images as they are, the delivery node’s pin, and secret placeholders. It reads no kubeconfig, build spec or pipeline state.piceli render MODULE:appis unchanged.Build smoke checks match output and take an environment (experimental): a smoke table (
build.toml, and the newSmokeforBuild.dockerfile(..., smoke={...})) addsenv(plain, non-secret values),entrypoint(overrides the image’s entrypoint) andexpect_stdout/expect_stderr(regular expressions searched in the first 256 KiB of each stream). A pattern that is not found fails the build withsmoke-output-mismatch(exit1); the step lists the streams underunmatched, and stderr and the build log show a short escaped excerpt. Smoke env values that look like secret references are refused (smoke-env-secret). The smoke table is part of the plan hash and is recorded in the receipt undersmoke. Existing smoke checks keep their argv, isolation flags and spec digest.
Version 0.4.1¶
Fix (safety): Piceli signals a child’s process group only when the id is a real child group: never
1,0or its own group. A test double’spid(which converts to1) made the forward supervisor send SIGTERM to process group 1, which on Linux CI stopped the job itself.Release commands for pipeline releases: every
piceli releasesubcommand (plan,preview,diff,apply,rollback,resume,stop,check,status,secret show) now takes--spec MODULE:ATTRnaming aPipeline, aspiceli statusandpiceli accessdo, and operates the releasepiceli deploymanages: same state directory, release name, target and composition. Nothing is built: a rollback re-applies the recorded image digests (oci-set), andplan/diff/applyuse the images delivered from the current sources or refuse with the new codepipeline-not-delivered. Commands that change the cluster hold the pipeline’s run lock (pipeline-locked).Exec credential plugins for pipelines:
Target.kubeconfig(...)takesallow_exec,exec_sha256,exec_pass_envandexec_timeout_secondswith the semantics of[target]inrelease.toml. They apply topiceli deploy,piceli status,piceli accessand the release commands.piceli statusandpiceli accessnow also honour[target] allow_execof arelease.toml, and refuse an exec user without it (exec-auth-not-allowed); post-deploy checks use the target’s policy.Fix: checks declared on a
Pipeline(Checks.http,exec,metric,python) now run with apiceli.checks.CheckContextbuilt from the target; in 0.4.0 the default runner got the pipeline’s context and every check failed withcheck-raised.Fix:
piceli deploy --resumeof a run that failed at its checks stage withrollback_on_failed_checksno longer fails withpipeline-stage-error; it rolls back to the previous release.Fix:
piceli deployprints the build log as a path relative to the working directory or<state_dir>/…, never an absolute local path.Fix:
piceli statusandpiceli access --dashboardwith a pipeline target now read the pipeline’s release state:statusshows the release line and the dashboard its catalog (active release, managed workloads). The humanstatusworkload columns line up.Fix (output contract): a pipeline’s automatic rollback reports
{"state": "rejected", "reason": "<code>", "message": …}or{"state": "unavailable", "reason": "checks-rollback-unavailable", "message": …}instead of"state": "refused"or a free-textreason. A release execution refused by the executor is recorded in the history as"state": "rejected"with"reason": "execution-refused"(was"refused").piceli --versionprintspiceli <version>; the top-level help has a real description.Saved forwards never start implicitly (safety):
piceli operator serveandpiceli observe serveno longer start a user’s saved port forwards at launch.--restore-forwardsstarts them, and only those saved for the same cluster (a digest of the context’s API server URL), context and namespace. Forwards saved without a scope (older files, orforward-savewithout the new--kubeconfig/--context) are never restored. Forwards added from the dashboard are saved with their scope, andGET /v1/preferenceslists only the current user’s forwards for this cluster, context and namespace.piceli statusonly reports forwards Piceli owns: a forward isuponly when the listener is Piceli’skubectl port-forwardfor that declaration. Any other process on the port isoccupied(status-port-occupied) with its pid only; its command line is never printed. The dashboard’s supervisor also refuses to call a forward healthy when another process answers on its port (conflict).operator serve --accessstarts the model’s forwards at launch, likepiceli access --dashboard, refusing withaccess-port-conflictwhen a required port is taken.--no-start-accessleaves them stopped.Operator dashboard: Pods and ReplicaSets owned (through
ownerReferences) by a managed workload are listed as managed withderived_frominstead of unmanaged. Image references are shortened with the full reference in a tooltip, and the tables keep their columns inside the card.Readable plans and progress:
release planshortens long values in the middle (keeping the digest tail and the closing quote) and puts long changes on their own lines;piceli deploy --planwraps long change lists and prints the approve command on its own line.release applyand the deploy apply stage print progress on stderr while applying and waiting for readiness (applying 3/7: Deployment/web,waiting for Deployment/web to be ready (12s)); stdout is unchanged.Human output shortens delivered image digests (
@sha256:<12 hex>…) and drops microseconds from thepiceli statusrelease time; JSON output keeps the full values.
Version 0.4.0¶
Removed: the legacy delete-and-recreate engine and its CLI (
piceli model …,piceli deploy plan/detail/run). There is one engine:piceli release, driven by typed apps or arelease.toml.piceli deployis now the pipeline command below.piceli deploy(preview): apiceli.pipeline.Pipelinedeclares the app, its image builds, how the images reach the cluster (registry, node-loopback registry or node import) and the target.piceli deploy module.py:pipelinebuilds, delivers by digest, plans, applies and checks in one journaled run. Unchanged stages are skipped, an interrupted run resumes, approval covers the combined hash of every stage, and--jsonstreams one event per stage. A multi-image release records its source as anoci-setimage map.Post-deploy checks and automatic rollback (preview):
[[checks]]inrelease.toml(orpiceli.checksin Python) declareshttp,exec,metricandpythonchecks. A release isreadyonly when they pass; withrollback_on_failed_checks = truea failed check re-applies the previous ready release. Newpiceli release checkand--skip-checks. A failed check endsapplywithreason: check-failedand exit 3.Field-level diffs and true no-op plans:
release plancompares the desired object with a server-side dry run of it instead of with the raw live object, so API-server defaults no longer show up as changes. Unchanged objects planno-op, and everyapplyshows the fields it changes. Newpiceli release diff.Secret no-op plans and three-way removal: an unchanged Secret (or other secret-bound object) now plans
no-op; its resolved values are compared in-process with keyed digests and are never shown or stored. Anapplynow removes labels, annotations and map keys (such as ConfigMap keys) that an earlier release declared and the composition dropped, unless another field manager owns them (removesin the plan,removechanges in the diff).Access and status from the model (preview):
app.access.forward(…)declares how each service is reached from your laptop (it renders no Kubernetes object).piceli access TARGETruns supervised loopback port forwards, andpiceli status TARGET [--json](piceli.status.v1) says whether the app is up and lists its URLs.Import existing apps (preview):
piceli import live(a namespace) andpiceli import yaml(manifest files) generate a typed app module that adopts the existing objects on its first release.App.override(obj, patch)sets fields the typed model does not cover.piceli.testing(public): the in-process fake Kubernetes API used by Piceli’s own acceptance suite, with afake_cluster()context manager and a pytest fixture, for testing your deployment code without a cluster.Managed clusters (preview): kubeconfigs that authenticate through an exec credential plugin (GKE, EKS, AKS, OIDC) are refused (
exec-auth-not-allowed) unless[target] allow_exec = true. The plugin is resolved to an absolute path, hashed before every run (optionalexec_sha256pin) and run with a minimal environment (exec_pass_env) and a timeout; Piceli refreshes the credential itself.Changed (machine output): every preview command now follows the output contract: a refusal is
{"state": "rejected", "reason": "<code>", "message": "<sentence>"}on stdout, and exit codes are unchanged. See the contract changes for each command. Release refusals keepcodeas an alias ofreasonfor 0.4.x only; it will be removed in 0.5.0. Results ofrelease apply/rollback/resume/stopaddstate(succeeded, orfailedwithreason).Changed (safety):
observeandoperatorcommands need an explicit--context, build their clients through the same checks asrelease(a refused target istarget-refused) and keep static client certificates in memory instead of temporary files.Fixed: the
rust-hellobuild example could ship a stale binary after a source edit: staged sources carry the fixedsource_date_epochmtime, so Cargo treated the cachedtarget/artifact as fresh. The example now runscargo clean --release --package rust-hellobeforecargo build, keeping dependencies cached and builds reproducible. Containerized builds documents the pitfall.Fixed:
operator status,observeand release plan observation no longer fail on RBAC objects whose names contain:(such assystem:controller:*inkube-system). RBAC names are validated as Kubernetes path segments, and live objects Piceli cannot model are skipped with a scan warning instead of crashing.Fixed:
execchecks failed TLS verification (check-exec-unavailable) with clients built from an explicit kubeconfig; they now use the client’s own verified TLS context and credentials.Checksis exported from the top-level package (from piceli import Checks, Pipeline).Help text shows
[[…]]TOML names literally instead of dropping them as terminal markup.Two flaky tests fixed (git identity under redirected
GIT_DIR, process limit timing).
Version 0.3.0¶
Safety fix: the dry-run admission check before a delete really deleted the object, because the API server ignores a
dryRunquery parameter when a DeleteOptions body is sent.dryRunis now sent in the body. This affected opt-in pruning in 0.1.0 and 0.2.0: objects that were about to be deleted anyway lost the check-before-write guarantee.Ownership transitions (preview):
piceli release --replace KIND/NAME/[release] replacedeletes and recreates an unmanaged, non-retained object after writing a restorable backup (kubectl create -f). It always needs a per-object flag.--adopt-all-desiredadopts every unmanaged object the composition declares.Plan refusals list every blocking object with suggested flags and codes. The human text of each blocking entry is in its
messagefield.Retained objects, including those with inherited owners, whose only difference is labels or annotations get a metadata-only write.
Immutable image references (preview):
A build receipt without a registry digest is refused with
image-not-immutableinstead of falling back to its movable tag.[images.<name>] receiptandimages_fromacceptpiceli.node-delivery.v1receipts, which need a content tagrepo:sha256-<12hex>.images_fromtakes a list of build and delivery receipts, merged by config digest.New
examples/two-images, with an opt-in kind acceptance test.
Typed apps (preview):
from piceli import App, ExistingClaim, …describes Deployments (sidecars, init containers, probes, resources, memory/config/secret volumes, node pinning), Services, ConfigMaps, Secrets and NetworkPolicies as typed Python that renders to release intents.ExistingClaimmounts a claim that the release never creates, changes or deletes.Selectors derive only from the Deployment name.
piceli renderprints the manifests without a cluster.examples/releaseis now typed and renders identically.
Secrets (preview): new
tls-ca,template,import(file, env, or a live Secret; rotatable with--rotate) andstaticgenerators, andpiceli release secret show NAME [--key] --reveal. A refusedrelease planno longer generates, imports or stores any secret version.Builds:
Drift is checked over the staged files and the spec. Whole-source identity is kept as provenance (
sources_changed_during_build), so edits to unrelated files no longer reject a build.--logstreams during the build, and--progress steps|plain|quietshows step progress.tag = "{image_id:N}"content tags.Optional per-image
smokechecks run in an isolated container.piceli inputs record|verify --only NAME.
Agent and contract foundations (preview):
a registry of error codes with
piceli explain <code> [--json];piceli help-json/--help-json(the CLI tree with side effects, approval and retry metadata);generated
reference/errorsandreference/clipages;AGENTS.md,llms.txtanddocs/agents.md;maturity labels on every feature page;
a clear error for a misplaced
images_from.
Version 0.2.0¶
release.tomlimages can point at a registry delivery receipt:web = { receipt = "web.delivery.json" }releases the receipt’s digest-pinnedpull_ref. This chains build → delivery → release without copying digests by hand.Adopt existing objects by ownership transfer.
piceli release --adopt Kind/name(or[release] adopt = [...], orPlanAuthorization.adopt_resources) adopts objects in one of two ways:retained objects (PVC, Secret, Namespace, PV) with an owner-annotation-only write; their spec and data are never touched;
other objects with an explicitly authorized takeover. Field ownership of every client manager (for example
kubectl-create,kubectl-set) is transferred to Piceli and the manifest is applied without force, so fields the release does not declare are removed. Subresource and control-plane managers are kept, andforce=trueis only used for the admission dry run.
Plans show the adoption mode and the displaced managers, and report field drift. Inherited owners are now part of the execution grant.
Receipts only compare declared fields, which fixes the false drift on the first apply of a WaitForFirstConsumer PVC.
Boolean
*Tokenfields such asautomountServiceAccountTokenare no longer redacted as secrets.templates.NodeLocalRegistryis a digest-pinned OCI registry bound to the node loopback, so the node pulls from it without any registry configuration and it is not exposed on the network. It has:retained storage, delete support and loopback probes;
a garbage-collection Job that is safe to run in stopped or read-only mode;
a
pull_reference()helper, and acomponent()forpiceli releasecompositions.
See Node-local registry.
piceli artifacts deliver --to oci://host[:port]/repo[:tag]is now the default delivery mode:it pushes an image approved by config digest and uploads only the missing blobs, chunked where needed;
it is idempotent, and it re-verifies the pushed manifest;
its receipt (
piceli.registry-delivery.v1) records the manifest digest and a node-sidepull_ref;--via-forwardpushes through a supervised loopback port-forward.
Plain HTTP is only allowed for loopback registries, and credentials come from a private file. Node import over
ssh:///docker://remains as the fallback.
Version 0.1.0¶
piceli release {plan,preview,apply,rollback,resume,stop,status} --spec release.tomlis the first CLI on the recoverable engine. The typed release spec takes an explicit kubeconfig file and context, optional cluster/namespace/node UID pins, and images by digest or from apiceli.build-receipt.v1receipt. Amodule:functioncomposition builds the resources, andrandomandtls-self-signedsecret generators are available. Plans need a one-shot approval by plan hash, androllbackre-applies the earlier release.piceli.k8s.ops.provider_factorybuilds an identity-checkedKubernetesProviderfrom an explicit kubeconfig. See Releases from a spec (piceli release).Declarative containerized builds:
piceli artifacts build-spec preview|runandpiceli.artifacts.build_spec. Builder images are pinned by digest, build contexts are staged minimally with byte budgets, and BuildKit cache mounts are used. Outputs can be files or images. Apiceli.build-receipt.v1receipt binds the source identities, builder digest and output digests. Image IDs are reproducible across cold builds. Includes arust-hellolinux/arm64 example. See Containerized builds.piceli artifacts deliverstreams an image (docker save, or a Docker/OCI archive) straight into a node’s containerd overssh://(k3s or plain containerd) ordocker://(e.g. kind nodes), with no registry and no temporary archive. The approved config digest is re-verified from the stream before the image index is released, and again on the node. The command is idempotent and writes a JSON receipt and journal. See Image delivery.Access profiles with connection health. Shortcuts in the
--ui-configTOML can declare a TCP or HTTP health probe and a bounded restart policy. The port-forward supervisor restarts a forward after consecutive probe failures, with exponential backoff. It reportshealth,last_errorandlast_probe_atin/v1/forwards,/v1/shortcutsand the dashboard. New commands:piceli observe forwards apply|status, with a port-conflict preflight, andobserve serve --start-shortcuts.Added
piceli inputs record|verifyand the source-identity API inpiceli.artifacts(SourceIdentity,InputsLock,pinned_sources). Build sources are identified by git commit, dirty flag and a working-tree digest, not by unversioned local receipt files. A checkout that changes during a build fails. See Source identity.Tooling: migrated from Poetry to uv with PEP 621 metadata and the hatchling build backend. Python 3.12+ is required. ruff replaces black and isort. CI runs on Python 3.12–3.14 including the acceptance suite, runs integration tests on kind, and builds the docs strictly. Releases use PyPI trusted publishing.
Packaging: the Google Cloud dependencies moved to the
gcpextra (pip install "piceli[gcp]") and OpenTelemetry to thetelemetryextra. PyYAML is now a declared dependency. The unusedtextualdependency was removed.typer≥ 0.12 is required.Safety: resource ownership is now an exact match on the owner annotation. Previously, any owner id sharing the prefix before the first
-was treated as the same owner, so pruning could remove another owner’s objects. To take over objects from an earlier owner id, passKubernetesProvider(..., inherited_owner_ids=("old-id",))or adopt them explicitly.Fixed:
Deploymenttemplates are now found by the loader, and--module-path/PICELI__MODULE_PATHnow executes the module (before, it always loaded nothing).StatefulSet,HorizontalPodAutoscalerandVerticalPodAutoscalermanifests now carryapiVersion/kind.Service,PersistentVolumeandPersistentVolumeClaimreturn lists like every other template. Workloads withouttemplate_labelsdefault to{"app": <name>}. The ineffective 15-character name limit was replaced by the real Kubernetes rules.Fixed: the CLI engine no longer silently skips kinds it doesn’t know. They are deployed last, with a warning.
Security: GKE service-account credentials are built in memory. No
sa.jsonfile is written andGOOGLE_APPLICATION_CREDENTIALSis left untouched.Security (local web UI):
loopback
Hostand same-origin checks;a token is required on every
/v1/*request, GET included;the
viewerrole is read-only;Content-Security-Policy with a nonce, and no inline event handlers;
a 1 MiB request limit;
error bodies contain fixed error codes only.
Changed: the dashboard ships no application-specific shortcuts or topology. Configure them with
--ui-config/PICELI__UI_CONFIG(TOML).observe servegains--namespace.Fixed:
piceli operator serveno longer crashes on start, and handles an occupied port and signals likeobserve serve.Reworked the documentation: new landing page, overview and architecture guide (mental model, the two execution engines, glossary), public roadmap, a real FAQ, an open contributing guide, full CLI reference for
observe,operatorandartifacts, and a warning-free Sphinx build. Examples no longer reference a specific environment.Added the read-only local operations lens: Python inventory API, JSON CLI, loopback REST endpoints, and owner-only non-secret port-forward preferences. It reconciles an explicit deployment-session archive with an explicit kubeconfig and distinguishes declared, missing, unknown, and undeclared objects without acquiring deployment authority.
Added
DeploymentSession, a Python-first provider-free boundary for one-time private input materialization, canonical opaque-reference interchange, exact preview/apply/resume, explicit rotation and owner-scoped stop.Added canonical
DeploymentRevisionandExecutionBundleinterchange for exact, secret-safe resume. Retained owned resources reconcile without a new SSA operation annotation; PVC first-consumer execution defers only readiness, never treats Pending claims as ready.Added public, deterministic build/OCI APIs and a thin
piceli artifactsCLI with source/tool pins, bounded process groups, cancellation, secret-safe receipts and explicit local Docker import without tags or push.Added bounded OTLP deployment-operation spans/logs with exact journal states and signal-level drop/rejection/unknown-delivery accounting. Joined local acceptance covers the real recoverable executor, fault API and telemetry consumer restart.
Replaced discovery authority v1 with validated v2 coverage, scope, timestamps, provenance and capture-time byte/deadline limits; retained historical v1 files.
Added an explicit-client Kubernetes provider and scoped executor with private versioned secret bindings, durable intent/receipts, readiness, cancellation, resume and ownership-limited compensation. Qualified the provider against a fault-injecting local API, including process death and ambiguous replies.
Added
make local-test-envandmake test-local-executor, hash-locked test dependencies, retained acceptance evidence and an executable composition example. Removed the unavailable exact Python interpreter pin from pre-commit bootstrap.Added immutable deployment components and target-bound observed snapshots, deterministic offline create/adopt/apply/no-op/delete plans, UID/version and absence preconditions, secret-safe hashes, retained-resource protection and child-first pruning.
Switched
piceli deploy planto the pure planner and added tests proving that import and planning neither create Kubernetes clients nor mutate input intent.Required explicit cluster binding and resource adoption, and reject stale snapshots, wrong namespaces and unsafe unmanaged descendants.
Published bounded portable discovery schema v1 and a pure provider protocol covering continuation, API scope, coverage failures, SSA conflicts and readiness.
Bound snapshots to discovery/defaulting identity, preserved explicit desired defaults, blocked absence/pruning under incomplete coverage, and made built-in Namespace/PV/PVC/Secret retention non-overridable.
Version 0.0.4¶
First version of the docs
Version 0.0.3¶
CLI
Integration tests
Github pipelines
Version 0.0.2¶
MVP
automatic deployment
deploymnet graph and automatic dependencies
automatic rollback
comparison functionalities, adding ignoring/default paths
Version 0.0.1¶
Refactor legacy libs
Adding support for kubernetes official python library
Adding support for yaml and json
Unit tests for piceli templates