Build Container Runner as a regular fourth release variant

This commit is contained in:
Pavel Isaev 2026-11-10 02:43:10 +03:00
parent 81e17e340c
commit 302fcd7c91
6 changed files with 89 additions and 28 deletions

View file

@ -17,9 +17,11 @@ task from the Core of run `20261109T212500Z`:
- existing `stable/core|gnome|kde` refs and the ISO catalog are unchanged.
No acceptance scenarios were run for this edition (explicit D-100 decision). The
scheduled cycle does not build the `container` variant yet; the ref is updated only
by the manual procedure until that wiring is done. D-101 (ttyS0 units) is not in this
Core because the cycle had already frozen its source; it ships with the next cycle.
scheduled driver now supports it as a fourth regular variant (`container_variant`):
three-day cycles publish `stable/container`, day-30 cycles also publish the ISO. The
desktop publisher preserves the Container Runner media/record when it rotates a
generation. D-101 (ttyS0 units) is not in this Core because the cycle had already
frozen its source; it ships with the next cycle.
## D-098 Rust/manual testing, split cadence and storage compaction (2026-11-09)

View file

@ -9,8 +9,11 @@ the driver. Publication is split: OSTree refs every three days (anchored 2026-11
00:00 UTC) and ISO media on calendar day 30, dispatched by
`deploy/archipelago-release-schedule.service` from a daily 00:00 UTC timer. Public
OSTree keeps only the current commit of each ref; three ISO media per variant are
retained and each embeds its own repository. Contract:
`rfc/spec/release-cadence-and-testing.md`.
retained and each embeds its own repository. The cycle builds four regular variants
when `container_variant` is set: Core, GNOME, KDE and Container Runner; the latter
uses `--purpose container-runner`, its own ISO name and
`publish-container-runner.py`, and its media/record are carried across desktop
generation rotations. Contract: `rfc/spec/release-cadence-and-testing.md`.
2026-11-09: the user removed the redundant full `ostree fsck` from the publisher
after import/prune. The driver's archive fsck remains, as do signatures and public

View file

@ -18,9 +18,11 @@ TITLES = {
'building-core-then-purpose': 'Building Core and Purpose',
'building-gnome-purpose': 'Building GNOME Purpose',
'building-kde-purpose': 'Building KDE Purpose',
'building-container-runner': 'Building Container Runner Purpose',
'archiving-artifacts': 'Archiving artifacts on terra',
'preparing-publication': 'Validating release evidence',
'signing-and-publishing': 'Signing and publishing',
'publishing-container-runner': 'Publishing Container Runner refs',
'verifying-public-endpoints': 'Verifying public downloads',
'cleaning-worker': 'Cleaning build workspace',
'complete': 'Release cycle complete',

View file

@ -24,7 +24,7 @@ def main():
parser.add_argument('public', type=Path)
parser.add_argument('build', type=Path)
parser.add_argument('--version', required=True)
parser.add_argument('--iso', type=Path, required=True)
parser.add_argument('--iso', type=Path)
parser.add_argument('--gpg-home', type=Path, required=True)
parser.add_argument('--gpg-key', required=True)
args = parser.parse_args()
@ -33,7 +33,7 @@ def main():
core_layer = publisher.ostree(build_repo, 'rev-parse', 'layers/core')
purpose_layer = publisher.ostree(build_repo, 'rev-parse', 'layers/purpose/server/container-runner')
iso = args.iso
sha256 = publisher.digest(iso)
sha256 = publisher.digest(iso) if iso else None
with (args.public / '.publish.lock').open('a') as lock:
fcntl.flock(lock, fcntl.LOCK_EX)
current = (args.public / 'current').resolve(strict=True)
@ -53,25 +53,26 @@ def main():
publisher.ostree(repo, 'gpg-sign', '--gpg-homedir=' + str(args.gpg_home), commit, args.gpg_key)
publisher.ostree(repo, 'summary', '--update', '--gpg-sign=' + args.gpg_key,
'--gpg-homedir=' + str(args.gpg_home))
name = 'archipelago-container-runner.iso'
destination = current / 'iso/container' / args.version
destination.mkdir(parents=True, exist_ok=True)
target = destination / name
shutil.copyfile(iso, target)
if publisher.digest(target) != sha256:
raise ValueError('Copied ISO checksum mismatch')
(destination / (name + '.sha256')).write_text(sha256 + ' ' + name + '\n')
alias = current / 'iso' / name
if alias.exists():
alias.unlink()
os.link(target, alias)
(current / 'iso' / (name + '.sha256')).write_text(sha256 + ' ' + name + '\n')
record = dict(apiVersion='archipelago.container-runner/v1', version=args.version,
image_commit=image, layer_commit=core_layer,
purpose_layer_commit=purpose_layer, sha256=sha256,
size_bytes=target.stat().st_size,
url='/archipelago/iso/container/' + args.version + '/' + name,
acceptance='not requested (D-100)')
purpose_layer_commit=purpose_layer, sha256=None, size_bytes=None,
url=None, acceptance='not requested (D-100)')
if iso:
name = 'archipelago-container-runner.iso'
destination = current / 'iso/container' / args.version
destination.mkdir(parents=True, exist_ok=True)
target = destination / name
shutil.copyfile(iso, target)
if publisher.digest(target) != sha256:
raise ValueError('Copied ISO checksum mismatch')
(destination / (name + '.sha256')).write_text(sha256 + ' ' + name + '\n')
alias = current / 'iso' / name
if alias.exists():
alias.unlink()
os.link(target, alias)
(current / 'iso' / (name + '.sha256')).write_text(sha256 + ' ' + name + '\n')
record.update(sha256=sha256, size_bytes=target.stat().st_size,
url='/archipelago/iso/container/' + args.version + '/' + name)
(current / 'v1').mkdir(exist_ok=True)
(current / 'v1/container-runner.json').write_text(json.dumps(record, indent=2) + '\n')
print(json.dumps(record, indent=2))

View file

@ -108,6 +108,18 @@ def publish(public, records, gpg_home=None, gpg_key=None, archives=None, validat
try:
for directory in ('iso', 'v1', 'ostree'):
(stage / directory).mkdir()
if previous:
# D-100: Container Runner media and record belong to the same public
# tree but are published by a separate step; carry them into every
# new generation instead of dropping them on the next desktop cycle.
if (previous / 'iso/container').is_dir():
shutil.copytree(previous / 'iso/container', stage / 'iso/container',
copy_function=os.link, dirs_exist_ok=True)
for name in ('archipelago-container-runner.iso', 'archipelago-container-runner.iso.sha256'):
if (previous / 'iso' / name).is_file():
os.link(previous / 'iso' / name, stage / 'iso' / name)
if (previous / 'v1/container-runner.json').is_file():
shutil.copyfile(previous / 'v1/container-runner.json', stage / 'v1/container-runner.json')
history = json.loads((previous / 'history.json').read_text()) if previous else {}
iso_history_path = previous / 'iso-history.json' if previous else None
iso_history = json.loads(iso_history_path.read_text()) if iso_history_path and iso_history_path.exists() else json.loads(json.dumps(history))

View file

@ -64,8 +64,14 @@ def main():
if variants not in (('core', 'gnome'), ('core', 'gnome', 'kde')):
raise ValueError('Supported cycle order: core, gnome, optionally kde')
desktops = variants[1:]
# D-100: Container Runner is a regular fourth variant. Its build path is the
# explicit `--purpose container-runner` adapter, not the GNOME/KDE template.
container = bool(config.get('container_variant'))
build_variants = variants + (('container',) if container else ())
def iso_name(variant):
return 'archipelago-core-latest.iso' if variant == 'core' else 'archipelago-' + variant + '-probe.iso'
return {'core': 'archipelago-core-latest.iso', 'gnome': 'archipelago-gnome-probe.iso',
'kde': 'archipelago-kde-probe.iso',
'container': 'archipelago-container-runner.iso'}[variant]
base = Path(config['coordinator_root'])
parent = base / 'data/private/release-cycle'
parent.mkdir(parents=True, exist_ok=True)
@ -226,7 +232,7 @@ find {remote_root}/probes -type f -name '*.py' -exec sha256sum {{}} + >> {remote
' > ' + shlex.quote(remote_root + '/discover-adapter.log') + ' 2>&1', 14400)
call(['rsync', '-a', f'{worker}:{remote_root}/discover-adapter/', str(run / 'discover-adapter') + '/'])
phase('building-core')
builds = {v: remote_root + '/' + v + '/build' for v in variants}
builds = {v: remote_root + '/' + v + '/build' for v in build_variants}
build_env = dict(config['build_environment'], ARCHIPELAGO_SOFTWARE_PLUGIN=remote_root + '/software-adapter/libgs_plugin_archipelago.so',
ARCHIPELAGO_BUILD_OUTPUT=mode,
ARCHIPELAGO_LOG_DIR=remote_root + '/cli-logs')
@ -262,11 +268,20 @@ rm -rf {builds['core']}/iso-work {builds['core']}/profile {builds['core']}/extra
'ARCHIPELAGO_CORE_BUILD=' + builds['core'], remote_root + '/archipelago',
'build', 'iso', '--purpose', 'kde', builds['kde'], config['bootstrap']])
remote(f'mkdir -p {remote_root}/kde; {kde_command} > {remote_root}/kde/build.log 2>&1', 14400)
if container:
phase('building-container-runner')
container_env = dict(build_env)
container_env.pop('ARCHIPELAGO_SOFTWARE_PLUGIN', None)
container_env.pop('ARCHIPELAGO_PLASMA_SETUP_PACKAGE', None)
container_command = shlex.join(['env', *[k + '=' + v for k, v in container_env.items()],
'ARCHIPELAGO_CORE_BUILD=' + builds['core'], remote_root + '/archipelago',
'build', 'iso', '--purpose', 'container-runner', builds['container'], config['bootstrap']])
remote(f'mkdir -p {remote_root}/container; {container_command} > {remote_root}/container/build.log 2>&1', 14400)
state['vm_acceptance'] = {'state': 'manual-only', 'policy': 'D-098'}
phase('archiving-artifacts')
if shutil.disk_usage(base / 'data').free < config.get('minimum_coordinator_free_bytes', 50000000000):
raise ValueError('Insufficient coordinator space for artifact archive and publication')
for variant in variants:
for variant in build_variants:
dest = run / variant / 'build'
dest.mkdir(parents=True)
# Stream immutable completed trees: rsync's per-file round trips are
@ -338,6 +353,32 @@ rm -rf {builds['core']}/iso-work {builds['core']}/profile {builds['core']}/extra
with urllib.request.urlopen(address + '.sha256', timeout=60) as response:
if response.read().decode().split()[0] != item['sha256']:
raise ValueError('Public checksum mismatch')
if container:
phase('publishing-container-runner')
iso_arguments = []
if mode == 'iso':
iso_arguments = ['--iso', str(run / 'container/build/output' / iso_name('container'))]
call(tools(['python3', '/pipeline/publish-container-runner.py', str(base / 'data/public'),
str(run / 'container/build'), '--version', stamp, '--gpg-home', '/signing',
'--gpg-key', config['signing_key'], *iso_arguments], True))
with urllib.request.urlopen(url + '/v1/container-runner.json', timeout=60) as response:
container_record = json.load(response)
for kind, key in (('images', 'image_commit'), ('layers', 'layer_commit')):
with urllib.request.urlopen(url + '/ostree/' + kind + '/refs/heads/stable/container', timeout=60) as response:
if response.read().decode().strip() != container_record[key]:
raise ValueError('Container Runner ref identity mismatch')
with urllib.request.urlopen(url + '/ostree/layers/refs/heads/purpose/server/container-runner', timeout=60) as response:
if response.read().decode().strip() != container_record['purpose_layer_commit']:
raise ValueError('Container Runner purpose ref mismatch')
if mode == 'iso':
address = url.split('/archipelago')[0] + container_record['url']
with urllib.request.urlopen(urllib.request.Request(address, method='HEAD'), timeout=60) as response:
if response.status != 200 or int(response.headers['Content-Length']) != container_record['size_bytes']:
raise ValueError('Container Runner ISO size mismatch')
with urllib.request.urlopen(address + '.sha256', timeout=60) as response:
if response.read().decode().split()[0] != container_record['sha256']:
raise ValueError('Container Runner checksum mismatch')
state['container'] = container_record
phase('cleaning-worker', releases=current)
# Local terra worker logs must survive removal of the build workspace.
# Preserve every nested build/CLI/guest/serial log, not just log tails.
@ -365,7 +406,7 @@ rm -rf {builds['core']}/iso-work {builds['core']}/profile {builds['core']}/extra
'composed', 'layer', 'purpose-layer', 'purpose-input', 'flatpak-seed', '*.qcow2',
'/core/build/core', '/gnome/build/core', '/kde/build/core']
if state.get('artifacts_archived'):
excluded += ['/core/build', '/gnome/build', '/kde/build']
excluded += ['/core/build', '/gnome/build', '/kde/build', '/container/build']
destination = run / 'failure-evidence'
destination.mkdir(parents=True, exist_ok=True)
archive_command = ['tar', '-C', remote_root,