Make start evidence atomic and recover only bound durable outcomes
Rust development slice / linux (push) Failing after 7s
Rust development slice / linux (push) Failing after 7s
This commit is contained in:
@@ -26,6 +26,7 @@ STATE = ROOT / 'devstate/shared-core/acceptance'
|
||||
PROFILES = {
|
||||
'original': {'linux': {'contracts':5, 'reconcile':20}, 'windows': {'contracts':4, 'reconcile':20}},
|
||||
'helper-sync-v1': {'linux': {'contracts':5, 'reconcile':21, 'helper-reconcile':22, 'linux-helper':21}, 'windows': {'contracts':4, 'reconcile':21, 'helper-reconcile':22}},
|
||||
'durable-outcome-v1': {'linux': {'contracts':7, 'reconcile':26, 'helper-reconcile':22, 'linux-helper':21}, 'windows': {'contracts':6, 'reconcile':26, 'helper-reconcile':22}},
|
||||
}
|
||||
KINDS = ('contracts', 'reconcile') # Historical original qualification only.
|
||||
REMOTE_LINUX = '/var/lib/rmm-shared-core-acceptance'
|
||||
@@ -44,11 +45,11 @@ def source_paths(profile):
|
||||
contract.require(profile in PROFILES, 'fixed qualification profile')
|
||||
sources = [ROOT/'Cargo.toml', ROOT/'Cargo.lock', ROOT/'rust-toolchain.toml']
|
||||
crates = ['agent-core', 'domain', 'protocol']
|
||||
if profile == 'helper-sync-v1': crates.extend(('agent', 'agent-linux', 'privileged-helper'))
|
||||
if profile in ('helper-sync-v1','durable-outcome-v1'): crates.extend(('agent', 'agent-linux', 'privileged-helper'))
|
||||
for name in crates:
|
||||
sources.extend(p for p in (ROOT/'crates'/name).rglob('*') if p.is_file() and (p.suffix == '.rs' or p.name == 'Cargo.toml'))
|
||||
sources.extend((ROOT/'proto').glob('*.proto'))
|
||||
if profile == 'helper-sync-v1':
|
||||
if profile in ('helper-sync-v1','durable-outcome-v1'):
|
||||
sources.extend(ROOT/p for p in ('tools/apt-transaction/apt_transaction.py', 'tools/apt-transaction/hook', 'deploy/linux/rmm-apt-helper.service', 'tests/apt_transaction/fixtures/planning-canonical.json'))
|
||||
return sources
|
||||
|
||||
@@ -83,7 +84,7 @@ def linux_case(payload):
|
||||
require(ident == payload['id'] and payload['action'] in ('prepare', 'run', 'read'), 'fixed case')
|
||||
entries = payload['artifacts']
|
||||
profile=payload.get('profile','original')
|
||||
profiles={'original':{'contracts':5,'reconcile':20},'helper-sync-v1':{'contracts':5,'reconcile':21,'helper-reconcile':22,'linux-helper':21}}
|
||||
profiles={'original':{'contracts':5,'reconcile':20},'helper-sync-v1':{'contracts':5,'reconcile':21,'helper-reconcile':22,'linux-helper':21},'durable-outcome-v1':{'contracts':7,'reconcile':26,'helper-reconcile':22,'linux-helper':21}}
|
||||
require(profile in profiles and set(entries)==set(profiles[profile]), 'fixed qualification artifacts')
|
||||
for kind, item in entries.items():
|
||||
require(len(item['binary_sha256']) == 64 and all(c in '0123456789abcdef' for c in item['binary_sha256']), 'fixed hash')
|
||||
@@ -141,8 +142,8 @@ WINDOWS = r'''
|
||||
$ErrorActionPreference='Stop'
|
||||
$p=([Console]::In.ReadLine() | ConvertFrom-Json)
|
||||
if (!$p.profile) {$p | Add-Member -NotePropertyName profile -NotePropertyValue 'original'}
|
||||
$kinds=@('contracts','reconcile');if ($p.profile -eq 'helper-sync-v1') {$kinds+=@('helper-reconcile')}
|
||||
if ($p.profile -notin @('original','helper-sync-v1')) {throw 'Fixed qualification profile'}
|
||||
$kinds=@('contracts','reconcile');if ($p.profile -in @('helper-sync-v1','durable-outcome-v1')) {$kinds+=@('helper-reconcile')}
|
||||
if ($p.profile -notin @('original','helper-sync-v1','durable-outcome-v1')) {throw 'Fixed qualification profile'}
|
||||
if ([string]([guid]$p.id) -cne $p.id -or $p.kind -notin $kinds -or $p.action -notin @('run','read') -or $p.sha256 -notmatch '^[0-9a-f]{64}$' -or $p.linux_evidence_sha256 -notmatch '^[0-9a-f]{64}$') {throw 'Fixed native core case'}
|
||||
$root='C:\ProgramData\RustDiscoveryBootstrap'
|
||||
$case=Join-Path $root ('shared-core-'+$p.id)
|
||||
|
||||
Reference in New Issue
Block a user