Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Site
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software/vole.git

Self-hosted forge that lives in your Git repo.

Let a release change until a channel names it

214e7ea67ccb37d356a52097f8ce838bdf4c1731 · Keenan Nemetz · 17d ago · parent 502119f4

Let a release change until a channel names it

A release is mutable again. Notes can be edited and files added, replaced,
or removed after publication, because a mistyped note or a rebuilt binary
is not a reason to cut a new version. Editing the notes re-tags the same
commit, which the old rule refused from the first attached file.

The one thing that stays frozen is a release a channel names. A channel
records the tag name and the tag object, so a re-tag would dangle it and a
changed pointer would serve different bytes under a URL a package manager
already cached. Pre-receive reads the channel table from the instance
database and refuses every change to a channeled release — tag moves and
deletes, and added, replaced, or removed pointers alike — naming the
channel and how to move it. The browser applies the same rule: the edit
form, the attach form, and the list link are all drawn from it.

Attaching also works from the browser now, at parity with the CLI. The
Artifacts card takes files, or a directory, and an optional directory to
publish under; the handler streams each part to a temp file while hashing
it, checks the object-store quota before storing anything, writes bytes
first and pointers second, and calls the same metadata writer the CLI
does. A directory upload keeps its paths, which is why the body is read as
a multipart stream rather than through ParseForm.

docs/releases.md +38−8

@@ -27,7 +27,9 @@ to overwrite an existing tag.
27 27 A maintainer can instead use **Releases → New release** in the browser. Choose a
28 28 target from the repository's branches and tags, name the tag, and write the
29 29 notes; Vole creates an annotated tag with the signed-in account as tagger.
30 **Edit notes** changes an annotated tag's message only before files are attached.
30 **Edit notes** rewrites an annotated tag's message. A release is editable after
31 publication; see [Editing a release](#editing-a-release) for the one case that
32 freezes it.
31 33
32 34 ## Attach files
33 35
@@ -52,6 +54,13 @@ vole release attach v1.0.0 dist/apt
52 54 A path is slash-separated. Empty segments, `.`, `..`, backslashes, and control
53 55 characters are refused, and a path cannot be both a file and a directory.
54 56
57 A maintainer can attach from the browser too: the **Artifacts** card on the
58 release page takes files, or a directory, and an optional directory to publish
59 them under. It writes the same pointers as the CLI, so a file attached in the
60 browser is indistinguishable from one attached by `vole release attach` —
61 including for a clone of the metadata branch. A browser upload is bounded by the
62 instance's per-object limit; attach a bigger set from the shell.
63
55 64 Vole uploads the bytes into shared storage and writes pointers to the `vole`
56 65 branch. It refuses a pointer without an uploaded object, so a published download
57 66 cannot point at a missing file. Attaching identical content again reuses the
@@ -71,8 +80,10 @@ in private repositories.
71 80
72 81 ## Channels
73 82
74 A channel is a mutable alias for one annotated release. The release stays
75 immutable; moving the channel changes only which release its URL follows.
83 A channel is a mutable alias for one annotated release. The channel is the
84 mutable part: moving it changes only which release its URL follows. While a
85 channel targets a release, that release cannot be edited — see
86 [Editing a release](#editing-a-release).
76 87
77 88 ```sh
78 89 vole release channel set stable v1.0.0 -m "Recommended for production"
@@ -136,14 +147,33 @@ artifacts:
136 147 The workflow writes the same attachment pointers as `vole release attach`. See
137 148 [Build a release](workflows.md#build-a-release) for a complete trigger and job.
138 149
139 ## Immutability
150 ## Editing a release
151
152 A release is mutable. Its notes can be edited, files can be added, and an
153 attached path can be replaced or removed. Editing the notes re-tags the same
154 commit, so the tag object changes: a clone that already fetched that tag keeps
155 the old notes until `git fetch --tags --force`. Source archives use the tag
156 object as their `ETag`, so an edited release re-downloads its tarball even though
157 the tree did not change.
158
159 The one exception is a channel. A channel records the tag name and the tag
160 object, because it is the promise that one URL keeps serving one release. While a
161 channel targets a release, Vole refuses every change to it — notes, additions,
162 replacements, and removals — until the channel names another release:
163
164 ```sh
165 vole release channel set stable v1.0.1 -m "Recommended for production"
166 # now v1.0.0 can be edited again
167 ```
140 168
141 After a file is attached, Vole refuses to move or delete the tag, remove a path,
142 or reuse a path for different bytes. You can add another path without changing
143 existing downloads. An admin repair is recorded in `data/audit.log`.
169 The same rule applies to a push and to the browser, so a channel cannot be worked
170 around by editing with the CLI. An admin override is recorded in
171 `data/audit.log`.
144 172
173 Adding, replacing, or removing a file rewrites the pointers on the `vole` branch.
145 174 Release pointers participate in storage reachability, so `vole admin gc` retains
146 their objects. Treat a release as permanent before publishing it.
175 an object only while a pointer names it: removing the last pointer to a file
176 makes its bytes collectable after the grace period.
147 177
148 178 ## Next
149 179