Record explicit hash-bound one-run VM waiver for existing image publication
This commit is contained in:
parent
39eb8fc92f
commit
b835097a5e
3 changed files with 40 additions and 6 deletions
|
|
@ -1,5 +1,16 @@
|
|||
# Daily release cycle
|
||||
|
||||
## One-run VM waiver (2026-11-09)
|
||||
|
||||
The user explicitly authorized publishing the already built D-Bus images from
|
||||
20261109T090622Z without repeating VM acceptance, for manual hardware testing.
|
||||
The driver accepts `--vm-acceptance-waiver FILE` only with `--existing --archive`.
|
||||
The JSON records `authorized_by: user`, a reason, and `iso_sha256` for every variant.
|
||||
Preparation verifies those hashes and records `vm_acceptance: waived-by-user`;
|
||||
it does not fabricate passed VM summaries. Archive identity, OSTree fsck, signing
|
||||
and HTTPS publication checks remain mandatory. This option is not set in the
|
||||
scheduled service configuration; any temporary invocation override must be removed.
|
||||
|
||||
## Terra-only execution (2026-11-08)
|
||||
|
||||
The user requested moving all builds, Flatpak preparation and VM acceptance to
|
||||
|
|
|
|||
|
|
@ -19,7 +19,12 @@ def prepare(config):
|
|||
iso = root / 'build/output' / item['iso_name']
|
||||
repo = root / 'build/repo'
|
||||
sha = digest(iso)
|
||||
if item['variant'] == 'core':
|
||||
waiver = None
|
||||
if item.get('vm_acceptance_waiver'):
|
||||
waiver = json.loads(Path(item['vm_acceptance_waiver']).read_text())
|
||||
if waiver.get('authorized_by') != 'user' or not waiver.get('reason') or waiver.get('iso_sha256', {}).get(item['variant']) != sha:
|
||||
raise ValueError('VM acceptance waiver missing or mismatched')
|
||||
if item['variant'] == 'core' and waiver is None:
|
||||
summary = json.loads(Path(item['core_summary']).read_text())
|
||||
if summary.get('passed') is not True or summary.get('iso_sha256') != sha:
|
||||
raise ValueError('Core VM acceptance missing or mismatched')
|
||||
|
|
@ -43,7 +48,8 @@ def prepare(config):
|
|||
if item.get('expected_image_commit') and record['image_commit'] != item['expected_image_commit']:
|
||||
raise ValueError('Reviewed image differs from repository')
|
||||
Path(record['acceptance']).write_text(json.dumps(record | dict(scope='hardware-test',
|
||||
accepted=True, checks=checks, limitations=item.get('limitations', [])), indent=2) + '\n')
|
||||
accepted=True, vm_acceptance='waived-by-user' if waiver else 'passed',
|
||||
checks=checks, limitations=item.get('limitations', [])), indent=2) + '\n')
|
||||
records.append(record)
|
||||
Path(config['output']).write_text(json.dumps(records, indent=2) + '\n')
|
||||
|
||||
|
|
|
|||
|
|
@ -61,11 +61,14 @@ def main():
|
|||
parser.add_argument('--existing', help='JSON mapping core/gnome to existing worker build directories')
|
||||
parser.add_argument('--archive', type=Path, help='Reuse matching archived inputs; seed delta transfer when rebuilding Purpose')
|
||||
parser.add_argument('--core-build', help='Reuse a completed worker Core build; rebuild only Purpose and repeat both VM checks')
|
||||
parser.add_argument('--vm-acceptance-waiver', type=Path, help='Explicit one-run user authorization bound to existing ISO hashes')
|
||||
args = parser.parse_args()
|
||||
if args.core_build and (args.existing or not Path(args.core_build).is_absolute()):
|
||||
parser.error('--core-build requires an absolute path and cannot accompany --existing')
|
||||
if args.archive and (not (args.existing or args.core_build) or not args.archive.is_absolute()):
|
||||
parser.error('--archive requires --existing or --core-build and an absolute coordinator path')
|
||||
if args.vm_acceptance_waiver and not (args.existing and args.archive):
|
||||
parser.error('--vm-acceptance-waiver requires --existing and --archive')
|
||||
config = json.loads(Path(args.config).read_text())
|
||||
variants = tuple(config.get('variants', ['core', 'gnome']))
|
||||
if variants not in (('core', 'gnome'), ('core', 'gnome', 'kde')):
|
||||
|
|
@ -302,7 +305,14 @@ 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)
|
||||
validate_pair()
|
||||
if args.vm_acceptance_waiver:
|
||||
waiver = json.loads(args.vm_acceptance_waiver.read_text())
|
||||
if waiver.get('authorized_by') != 'user' or not waiver.get('reason') or set(waiver.get('iso_sha256', {})) != set(variants):
|
||||
raise ValueError('Invalid explicit VM acceptance waiver')
|
||||
atomic(run / 'vm-acceptance-waiver.json', waiver)
|
||||
state['vm_acceptance'] = {'state': 'waived-by-user', 'reason': waiver['reason']}
|
||||
else:
|
||||
validate_pair()
|
||||
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')
|
||||
|
|
@ -351,11 +361,11 @@ rm -rf {builds['core']}/iso-work {builds['core']}/profile {builds['core']}/extra
|
|||
call(['rsync', '-a', f'{worker}:{remote_root}/cli-logs/', str(run / 'cli-logs') + '/'])
|
||||
phase('preparing-publication')
|
||||
core_summaries = list((run / 'core/vms').glob('*/summary.json'))
|
||||
if len(core_summaries) != 1:
|
||||
if not args.vm_acceptance_waiver and len(core_summaries) != 1:
|
||||
raise ValueError('Missing or ambiguous Core acceptance')
|
||||
review = {'output': str(run / 'candidates.json'), 'candidates': [
|
||||
dict(variant='core', version=stamp, directory=str(run / 'core'), iso_name='archipelago-core-latest.iso',
|
||||
core_summary=str(core_summaries[0]), checks=[{'path': str(core_summaries[0])}]),
|
||||
core_summary=str(core_summaries[0]) if core_summaries else '', checks=[{'path': str(core_summaries[0])}] if core_summaries else []),
|
||||
dict(variant='gnome', version=stamp, directory=str(run / 'gnome'), iso_name='archipelago-gnome-probe.iso',
|
||||
native_summary=str(run / 'gnome/acceptance/native-acceptance.json'),
|
||||
checks=[{'path': str(run / 'gnome/acceptance/native-acceptance.json')},
|
||||
|
|
@ -371,6 +381,13 @@ rm -rf {builds['core']}/iso-work {builds['core']}/profile {builds['core']}/extra
|
|||
limitations=['Private KDE candidate; D-089 selects product direction, not public release admission',
|
||||
'First-image UI calibration does not prove autonomous onboarding acceptance',
|
||||
*review['candidates'][0]['limitations'][1:]]))
|
||||
if args.vm_acceptance_waiver:
|
||||
for item in review['candidates']:
|
||||
item.pop('core_summary', None)
|
||||
item.pop('native_summary', None)
|
||||
item['vm_acceptance_waiver'] = str(run / 'vm-acceptance-waiver.json')
|
||||
item['checks'] = [{'path': str(run / 'vm-acceptance-waiver.json')}]
|
||||
item['limitations'].append('VM acceptance waived by explicit user authorization for this publication: ' + waiver['reason'])
|
||||
atomic(run / 'review.json', review)
|
||||
call(tools(['python3', '/pipeline/prepare-hardware-pair.py', run / 'review.json']))
|
||||
records = json.loads((run / 'candidates.json').read_text())
|
||||
|
|
@ -381,7 +398,7 @@ rm -rf {builds['core']}/iso-work {builds['core']}/profile {builds['core']}/extra
|
|||
for r in records if r['variant'] not in publish_variants]
|
||||
atomic(run / 'release-authorization.json', {
|
||||
'channel': 'stable', 'decision': config['kde_release_decision'] if 'kde' in publish_variants else 'D-087',
|
||||
'reason': 'Explicit user authorization for daily stable publication and installed-ISO update continuity',
|
||||
'reason': waiver['reason'] if args.vm_acceptance_waiver else 'Explicit user authorization for daily stable publication and installed-ISO update continuity',
|
||||
'limitations': review['candidates'][0]['limitations'],
|
||||
'candidates': [{k: r[k] for k in ('variant', 'version', 'sha256', 'image_commit', 'layer_commit')}
|
||||
for r in publication_records]})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue