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.

Add named release channels and a generic channel file route

24019cb30892b9fc0118697e8b89cd61e9fab576 · Keenan Nemetz · 19d ago · parent 4f8a3da8

Add named release channels and a generic channel file route

A channel is a mutable pointer, channels/<name>.md, to one immutable annotated
release. The target tag object is recorded so a rewritten tag is detected rather
than silently followed.

- metadata: channel parse/render/validate, closed-layout and size checks,
  set/clear writers
- CLI: vole release channel set|list|clear; a dangling target is reported
- server: maintain/admin path gate and audit for channel.set/clear
- index: release_channels table, incremental refresh, per-tag badge query
- web: /channels list, /channels/<name> redirect, and
  /channels/<name>/<path...> serving the target release's tree with OID ETags,
  Range, revalidation, and octet-stream responses
- tests: metadata round trips, index moves, hook role/audit, page/tree/dangling/
  private, and the CLI end to end

No apt, yum, or other package-manager code is involved: a package layout is a
directory in the release tree.

Refs: 01M7BPHANWMSW5HK2GT0PY74QZ

forge/index/index.go +15

@@ -247,6 +247,21 @@ CREATE TABLE IF NOT EXISTS artifacts (
247 247 PRIMARY KEY (repo_id, tag, name)
248 248 );
249 249
250 -- release_channels maps a mutable channel name to the release it currently
251 -- promotes. The target tag object is stored so a rewritten tag is detected
252 -- rather than silently followed.
253 CREATE TABLE IF NOT EXISTS release_channels (
254 repo_id TEXT NOT NULL,
255 name TEXT NOT NULL,
256 tag TEXT NOT NULL,
257 tag_object TEXT NOT NULL,
258 updated_by TEXT NOT NULL DEFAULT '',
259 updated_at INTEGER NOT NULL DEFAULT 0,
260 description TEXT NOT NULL DEFAULT '',
261 PRIMARY KEY (repo_id, name)
262 );
263 CREATE INDEX IF NOT EXISTS release_channels_tag ON release_channels(repo_id, tag);
264
250 265 -- state_changes is the closed/reopened/merged history the activity feed shows.
251 266 -- It is derived from the metadata commit subjects, and keyed by the commit so a
252 267 -- refresh that sees the same range twice cannot duplicate an event.