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.

metadata/releases_test.go −6

@@ -110,12 +110,6 @@ func TestReleaseArtifactsNested(t *testing.T) {
110 110 if len(byTag["v1"]) != 3 {
111 111 t.Fatalf("LoadArtifactsAt = %+v, want three artifacts", byTag)
112 112 }
113 if !TagWithArtifacts(g, "v1") {
114 t.Fatal("TagWithArtifacts = false for a tag with nested artifacts")
115 }
116 if TagWithArtifacts(g, "missing") {
117 t.Fatal("TagWithArtifacts = true for a tag with no artifacts")
118 }
119 113 if missing, err := ListReleaseArtifacts(g, "missing"); err != nil || len(missing) != 0 {
120 114 t.Fatalf("missing tag = %v, %v; want an empty list", missing, err)
121 115 }