diff --git a/.github/workflows/rustfs-functional-chain.yml b/.github/workflows/rustfs-functional-chain.yml index 7bf8a6792..b4fc0e886 100644 --- a/.github/workflows/rustfs-functional-chain.yml +++ b/.github/workflows/rustfs-functional-chain.yml @@ -316,7 +316,7 @@ jobs: - name: Select exact-source race native evidence id: race_native - if: ${{ inputs.validation_case == 'heal.race-unversioned-overwrite' || inputs.validation_case == 'heal.race-versioned-put' || inputs.validation_case == 'heal.race-version-delete' || inputs.validation_case == 'heal.race-markers-and-batch-delete' }} + if: ${{ inputs.validation_case == 'heal.race-unversioned-overwrite' || inputs.validation_case == 'heal.race-versioned-put' || inputs.validation_case == 'heal.race-version-delete' || inputs.validation_case == 'heal.race-markers-and-batch-delete' || inputs.validation_case == 'heal.admin-nolock-safety' || inputs.validation_case == 'heal.race-copy-and-metadata-update' }} env: CANDIDATE_SHA: ${{ steps.candidate.outputs.source_sha }} VALIDATION_CASE_ID: ${{ inputs.validation_case }} @@ -342,7 +342,9 @@ jobs: 8380466f3a27c3c3ef4115084178a0ab99a78f32:heal.race-unversioned-overwrite | \ 8380466f3a27c3c3ef4115084178a0ab99a78f32:heal.race-versioned-put | \ 8380466f3a27c3c3ef4115084178a0ab99a78f32:heal.race-version-delete | \ - 8380466f3a27c3c3ef4115084178a0ab99a78f32:heal.race-markers-and-batch-delete) reviewed=true ;; + 8380466f3a27c3c3ef4115084178a0ab99a78f32:heal.race-markers-and-batch-delete | \ + 757b751482bb970bc321e92059690a7698554358:heal.admin-nolock-safety | \ + 757b751482bb970bc321e92059690a7698554358:heal.race-copy-and-metadata-update) reviewed=true ;; esac if [ "${reviewed}" = true ] && [ "${required}" != true ]; then printf 'Race candidate requires its reviewed native collector before fleet execution\n' >&2 @@ -395,8 +397,12 @@ jobs: --directory "${NATIVE_DIRECTORY}" --candidate "${VALIDATION_ROOT}/candidate.json" \ --testing-commit "${AUTO_TESTING_SHA}" --case-id "${VALIDATION_CASE_ID}" \ > "${VALIDATION_ROOT}/native-race-manifest.json" + runtime_driver=race.py + if [ "${VALIDATION_CASE_ID}" = 'heal.admin-nolock-safety' ]; then + runtime_driver=nolock.py + fi VALIDATION_HEAL_NATIVE_DIRECTORY="${NATIVE_DIRECTORY}" \ - python3 -B auto-testing/scripts/validation_heal/race.py preflight \ + python3 -B "auto-testing/scripts/validation_heal/${runtime_driver}" preflight \ --candidate "${VALIDATION_ROOT}/candidate.json" --testing-commit "${AUTO_TESTING_SHA}" \ --case-id "${VALIDATION_CASE_ID}" \ > "${VALIDATION_ROOT}/native-race-runtime-preflight.json" diff --git a/scripts/test_functional_chain.py b/scripts/test_functional_chain.py index be52434a3..d6ea51bc7 100644 --- a/scripts/test_functional_chain.py +++ b/scripts/test_functional_chain.py @@ -35,6 +35,8 @@ class RaceNativeToolsWorkflowTests(unittest.TestCase): (g01, 'heal.race-versioned-put', 'heal.race-version-delete')] reviewed += [('8380466f3a27c3c3ef4115084178a0ab99a78f32', case) for case in (g01, 'heal.race-versioned-put', 'heal.race-version-delete', 'heal.race-markers-and-batch-delete')] + reviewed += [('757b751482bb970bc321e92059690a7698554358', case) for case in + ('heal.admin-nolock-safety', 'heal.race-copy-and-metadata-update')] for source, case in reviewed: cases += [(False, 2, 1, None, source, case), (True, 2, 1, None, source, case), (True, 0, 0, 'true', source, case)] @@ -57,19 +59,20 @@ class RaceNativeToolsWorkflowTests(unittest.TestCase): def test_race_actual_admission_requires_native_and_runtime_before_exporting_directory(self): shell = self.chain_shell_step('Verify exact-source race native and runtime evidence') for case in ('heal.race-unversioned-overwrite', 'heal.race-versioned-put', 'heal.race-version-delete', - 'heal.race-markers-and-batch-delete'): + 'heal.race-markers-and-batch-delete', 'heal.admin-nolock-safety', 'heal.race-copy-and-metadata-update'): for native_exit, runtime in [(0, 0), (42, 0), (0, 42), (0, 'missing'), (0, 'collector-only')]: with self.subTest(case=case, native_exit=native_exit, runtime=runtime), tempfile.TemporaryDirectory() as name: root = Path(name) env = self.fixture(root, new_helper=True) directory = root / 'auto-testing/scripts/validation_heal' + runtime_driver = 'nolock.py' if case == 'heal.admin-nolock-safety' else 'race.py' (directory / 'race_native_evidence.py').write_text( 'import os,sys\nprint("{}")\nsys.exit(int(os.environ["VERIFY_EXIT"]))\n') if runtime == 'collector-only': - (directory / 'race.py').write_text( + (directory / runtime_driver).write_text( 'import argparse\np=argparse.ArgumentParser()\np.add_argument("--rc-bin", required=True)\np.parse_args()\n') elif runtime != 'missing': - (directory / 'race.py').write_text( + (directory / runtime_driver).write_text( 'import json,os,pathlib,sys\n' 'assert not pathlib.Path(os.environ["GITHUB_ENV"]).exists()\n' 'assert sys.argv[1] == "preflight"\n' @@ -99,6 +102,8 @@ class RaceNativeToolsWorkflowTests(unittest.TestCase): workflow.index('Run selected canonical validation case')) self.assertIn("steps.race_native.outputs.required == 'true'", workflow) self.assertIn("inputs.validation_case == 'heal.race-markers-and-batch-delete'", workflow) + self.assertIn("inputs.validation_case == 'heal.admin-nolock-safety'", workflow) + self.assertIn("inputs.validation_case == 'heal.race-copy-and-metadata-update'", workflow) def shell_step(self, name): from check_test_wiring import yaml_block