Expand description
The archive-first migration from another release tool.
A migration moves every predecessor file into a workspace under this
tool’s state root, lands a clean greenfield instance, and carries what
the project still needs from the archive one group at a time. The
workspace is the one place a run keeps state across runs: the archived
files, the snapshots no Git holds, and registry.yaml, which only the
rk migrate verbs write and whose per-item history is the migration’s
log. An open migration is visible to every clone through the
migration key of the committed configuration.
inventory is the one detector of predecessor files, registry
owns the workspace’s record, and git is the scrubbed git these
verbs read the repository through.
Modules§
- git
- The git a migration reads the repository through.
- inventory
- The one detector of predecessor files.
- registry
- The migration’s record:
registry.yamlin the workspace.
Constants§
- MIGRATIONS_
DIR - The directory below the state root that holds every workspace.
- REFS_
DIR - The directory inside a workspace that holds the Git snapshots: the bundle of the long-lived branches and the tag list.
- REGISTRY_
FILE - The registry file inside a workspace.
- SCHEMA
- The machine shape every
rk migratereport carries. - SOURCES_
DIR - The directory inside a workspace that holds the archived files, at their target-relative paths.
Functions§
- at
- A history time: UTC to the second,
%Y-%m-%dT%H:%M:%SZ. - claim
- Claim a fresh workspace below
runsfor a migration opened atstamp, and return its identifier with its path. - free_id
- The identifier a claim below
runswould take now, read without creating anything: what a preview reports. - is_id
- Whether
wordis a migration identifier. - none_
open - The refusal for a target with no open migration.
- open_id
- The migration the committed configuration names as open, if any.
- open_
workspace - The workspace of the open migration, where one is open and a state root resolves.
- runs
- The directory that holds every migration workspace of one target:
<state root>/migrations/<repo key>/. - stamp
- A migration identifier: the UTC second it opened,
%Y%m%dT%H%M%SZ. - workspace
- The workspace of migration
idat a target, below the state root:<state root>/migrations/<repo key>/<id>/. - workspace_
missing - The refusal for an open migration whose workspace this host does not hold: the workspace is local state, and another clone rebuilds it.