feat: qualify bound configure-only recovery runtime on cloud VM
Rust development slice / linux (push) Failing after 6s

This commit is contained in:
2026-11-13 18:07:46 +01:00
parent b24314da9e
commit 2230235dfb
21 changed files with 1749 additions and 80 deletions
+12 -4
View File
@@ -12,14 +12,15 @@ function readPrivate(file) {
return JSON.parse(fs.readFileSync(file, 'utf8'));
}
function checkAction(p, expected) {
const native = ['apt_install_retry', 'apt_native_update'].includes(expected.case);
const version = expected.case === 'apt_install_retry' ? '1.0' : '1.1';
const recovery = expected.case === 'apt_configure_recovery';
const native = recovery || ['apt_install_retry', 'apt_native_update'].includes(expected.case);
const version = recovery || expected.case === 'apt_install_retry' ? '1.0' : '1.1';
const recipe = version === '1.0' ? 'rmm-apt-fixture-install-1.0' : 'rmm-apt-fixture-update-1.1';
const action = p.action; const m = action.apt_manifest; const tx = m.resolved_apt_transaction;
assert(action.action === (native ? 'apt_native_acceptance' : expected.case));
assert(p.execution_identity === 'root' && p.max_runtime_seconds === 300 && p.max_output_bytes === 65536);
assert(m.type === 'rmm.apt.helper-action' && m.execution_profile === 'dev-test' && m.action === (native ? 'apt-native-acceptance' : 'apt-execute'));
assert(m.schema_version === (expected.case === 'apt_install_retry' ? 3 : 2));
assert(m.schema_version === (recovery ? 4 : expected.case === 'apt_install_retry' ? 3 : 2));
assert(tx.recipe_id === recipe && tx.recipe_version === '1' && tx.no_reboot === true && tx.packages.length === 1);
const pkg = tx.packages[0];
const sha = version === '1.0' ? '74036ae81223deab3aae994fd2a2a695af408741777e1ce17dcb4e32f1235867' : 'ef67c9fe0ba1443fcfe465768e1204763063c369a2a1da04af6027d8a9c00491';
@@ -27,6 +28,13 @@ function checkAction(p, expected) {
assert(crypto.createHash('sha256').update(Buffer.from(m.transaction_bytes)).digest('hex') === m.transaction_sha256);
assert(equal(JSON.parse(Buffer.from(m.transaction_bytes)), tx));
assert(equal(m, expected.request.parameters.apt_manifest));
if (recovery) {
assert(tx.schema_version === 2 && tx.operation === 'configure_only' && pkg.old_version === '1.0');
assert(m.native_retry === undefined && m.native_recovery.schema_version === 1);
assert(m.native_recovery.previous_grant_id === '31ef5e5e-5dbd-4428-a9a1-cbd15de2f5a0');
assert(m.native_recovery.previous_attempt_id !== p.attempt_id);
assert(m.native_recovery.partial_proof_sha256 === 'dc3bf3870ea77c12f9291bac712c53ae72194eaec980a8646155a7fb5c0dbe21');
} else assert(tx.schema_version === 1 && tx.operation === undefined);
if (expected.case === 'apt_install_retry') {
assert(m.native_retry.schema_version === 1 && m.native_retry.bootstrap_marker_sha256 === 'ec84aa4df8065f0b54b282bd273a6f342f07a6d47312289608389d05c7fb6053');
assert(m.native_retry.previous_attempt_id !== p.attempt_id);
@@ -34,7 +42,7 @@ function checkAction(p, expected) {
}
(async () => {
const file = path.resolve(process.argv[2]); const expected = readPrivate(file);
assert(expected.profile === 'dev/test' && ['apt_install_retry', 'apt_native_update', 'ensure_package', 'apply_updates'].includes(expected.case) && expected.expected_principal === 'simulated-testprincipal-a');
assert(expected.profile === 'dev/test' && ['apt_configure_recovery', 'apt_install_retry', 'apt_native_update', 'ensure_package', 'apply_updates'].includes(expected.case) && expected.expected_principal === 'simulated-testprincipal-a');
const login = readPrivate(path.join(root, 'credentials/server-browser-login.json'));
const browsers = path.join(root, 'web/node_modules/.cache/playwright-browsers');
const version = fs.readdirSync(browsers).find(x => /^chromium-/.test(x));