From 96a5cb07e47d213f7ccb278c2a912255a32e61f0 Mon Sep 17 00:00:00 2001 From: Mateusz Galazyn Date: Tue, 30 Apr 2024 10:57:00 +0200 Subject: [PATCH] REMOVEME: Enable multiple retries --- .github/workflows/haskell.yml | 14 ++------------ .../test/Spec/Chairman/Cardano.hs | 2 +- .../Testnet/Test/Cli/Babbage/LeadershipSchedule.hs | 2 +- .../Testnet/Test/Cli/Babbage/StakeSnapshot.hs | 2 +- .../Testnet/Test/Cli/Conway/StakeSnapshot.hs | 2 +- .../Cardano/Testnet/Test/Cli/KesPeriodInfo.hs | 2 +- .../Cardano/Testnet/Test/Cli/QuerySlotNumber.hs | 2 +- .../Cardano/Testnet/Test/Gov/DRepRetirement.hs | 2 +- .../Cardano/Testnet/Test/Gov/TreasuryWithdrawal.hs | 2 +- .../Cardano/Testnet/Test/Node/Shutdown.hs | 6 +++--- 10 files changed, 13 insertions(+), 23 deletions(-) diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index 88b85f902d1..74143280702 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -40,6 +40,7 @@ jobs: # see https://github.com/haskell/stm/issues/76 ghc: ["9.6", "9.10"] cabal: ["3.12"] + n: [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20] sys: - { os: windows-latest, shell: 'C:/msys64/usr/bin/bash.exe -e {0}' } - { os: ubuntu-latest, shell: bash } @@ -62,17 +63,6 @@ jobs: MSYS2_PATH_TYPE: inherit MSYSTEM: MINGW64 - concurrency: - group: > - a+${{ github.event_name }} - b+${{ github.workflow_ref }} - c+${{ github.job }} - d+${{ matrix.ghc }} - e+${{ matrix.cabal }} - f+${{ matrix.sys.os }} - g+${{ (startsWith(github.ref, 'refs/heads/gh-readonly-queue/') && github.run_id) || github.event.pull_request.number || github.ref }} - cancel-in-progress: true - steps: - name: Concurrency group run: > @@ -180,7 +170,7 @@ jobs: if: ${{ failure() }} uses: actions/upload-artifact@v4 with: - name: failed-test-workspaces-${{ matrix.sys.os }}-ghc${{ matrix.ghc }}-cabal${{ matrix.cabal }}.tgz + name: failed-test-workspaces-${{ matrix.sys.os }}-ghc${{ matrix.ghc }}-cabal${{ matrix.cabal }}-${{ matrix.n }}.tgz path: ${{ runner.temp }}/workspaces.tgz - name: "Tar artifacts" diff --git a/cardano-node-chairman/test/Spec/Chairman/Cardano.hs b/cardano-node-chairman/test/Spec/Chairman/Cardano.hs index fee7a3d7a86..9f55e77cdc6 100644 --- a/cardano-node-chairman/test/Spec/Chairman/Cardano.hs +++ b/cardano-node-chairman/test/Spec/Chairman/Cardano.hs @@ -16,7 +16,7 @@ import Spec.Chairman.Chairman (chairmanOver) -- TODO: Conway broken in conway hprop_chairman :: H.Property -hprop_chairman = integrationRetryWorkspace 2 "cardano-chairman" $ \tempAbsPath' -> do +hprop_chairman = integrationRetryWorkspace 0 "cardano-chairman" $ \tempAbsPath' -> do conf <- mkConf tempAbsPath' allNodes' <- fmap nodeName . allNodes <$> cardanoTestnetDefault def def conf diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Babbage/LeadershipSchedule.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Babbage/LeadershipSchedule.hs index 14f771e951b..575c688ee7f 100644 --- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Babbage/LeadershipSchedule.hs +++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Babbage/LeadershipSchedule.hs @@ -56,7 +56,7 @@ import qualified Hedgehog.Extras.Test.TestWatchdog as H -- | Execute me with: -- @DISABLE_RETRIES=1 cabal test cardano-testnet-test --test-options '-p "/leadership-schedule/"'@ hprop_leadershipSchedule :: Property -hprop_leadershipSchedule = integrationRetryWorkspace 2 "babbage-leadership-schedule" $ \tempAbsBasePath' -> H.runWithDefaultWatchdog_ $ do +hprop_leadershipSchedule = integrationRetryWorkspace 0 "babbage-leadership-schedule" $ \tempAbsBasePath' -> H.runWithDefaultWatchdog_ $ do H.note_ SYS.os conf@Conf { tempAbsPath=tempAbsPath@(TmpAbsolutePath work) } <- mkConf tempAbsBasePath' let tempBaseAbsPath = makeTmpBaseAbsPath tempAbsPath diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Babbage/StakeSnapshot.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Babbage/StakeSnapshot.hs index ec2667c24ba..a38242a8d73 100644 --- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Babbage/StakeSnapshot.hs +++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Babbage/StakeSnapshot.hs @@ -31,7 +31,7 @@ import qualified Hedgehog.Extras.Test.Base as H import qualified Hedgehog.Extras.Test.TestWatchdog as H hprop_stakeSnapshot :: Property -hprop_stakeSnapshot = integrationRetryWorkspace 2 "babbage-stake-snapshot" $ \tempAbsBasePath' -> H.runWithDefaultWatchdog_ $ do +hprop_stakeSnapshot = integrationRetryWorkspace 0 "babbage-stake-snapshot" $ \tempAbsBasePath' -> H.runWithDefaultWatchdog_ $ do H.note_ SYS.os conf@Conf { tempAbsPath } <- mkConf tempAbsBasePath' let tempAbsPath' = unTmpAbsPath tempAbsPath diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Conway/StakeSnapshot.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Conway/StakeSnapshot.hs index 6d319cbd72d..49970059ab5 100644 --- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Conway/StakeSnapshot.hs +++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Conway/StakeSnapshot.hs @@ -30,7 +30,7 @@ import qualified Hedgehog.Extras.Test.Base as H import qualified Hedgehog.Extras.Test.TestWatchdog as H hprop_stakeSnapshot :: Property -hprop_stakeSnapshot = integrationRetryWorkspace 2 "conway-stake-snapshot" $ \tempAbsBasePath' -> H.runWithDefaultWatchdog_ $ do +hprop_stakeSnapshot = integrationRetryWorkspace 0 "conway-stake-snapshot" $ \tempAbsBasePath' -> H.runWithDefaultWatchdog_ $ do H.note_ SYS.os conf@Conf { tempAbsPath } <- mkConf tempAbsBasePath' let tempAbsPath' = unTmpAbsPath tempAbsPath diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/KesPeriodInfo.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/KesPeriodInfo.hs index a1ebb99f318..391f07839ca 100644 --- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/KesPeriodInfo.hs +++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/KesPeriodInfo.hs @@ -50,7 +50,7 @@ import qualified Hedgehog.Extras.Test.File as H import qualified Hedgehog.Extras.Test.TestWatchdog as H hprop_kes_period_info :: Property -hprop_kes_period_info = integrationRetryWorkspace 2 "kes-period-info" $ \tempAbsBasePath' -> H.runWithDefaultWatchdog_ $ do +hprop_kes_period_info = integrationRetryWorkspace 0 "kes-period-info" $ \tempAbsBasePath' -> H.runWithDefaultWatchdog_ $ do H.note_ SYS.os conf@Conf { tempAbsPath=tempAbsPath@(TmpAbsolutePath work) } -- TODO: Move yaml filepath specification into individual node options diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/QuerySlotNumber.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/QuerySlotNumber.hs index cdc30d965db..f89b40abdeb 100644 --- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/QuerySlotNumber.hs +++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/QuerySlotNumber.hs @@ -36,7 +36,7 @@ import qualified Hedgehog.Internal.Property as H -- | Tests @query slot-number@ cardano-cli command that it returns correct slot numbers for provided utc time hprop_querySlotNumber :: Property -hprop_querySlotNumber = integrationRetryWorkspace 2 "query-slot-number" $ \tempAbsBasePath' -> H.runWithDefaultWatchdog_ $ do +hprop_querySlotNumber = integrationRetryWorkspace 0 "query-slot-number" $ \tempAbsBasePath' -> H.runWithDefaultWatchdog_ $ do H.note_ SYS.os conf <- mkConf tempAbsBasePath' diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/DRepRetirement.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/DRepRetirement.hs index 52756141539..b83fab358c2 100644 --- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/DRepRetirement.hs +++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/DRepRetirement.hs @@ -39,7 +39,7 @@ sbe = ShelleyBasedEraConway -- Execute this test with: -- @DISABLE_RETRIES=1 cabal test cardano-testnet-test --test-options '-p "/DRepRetirement/"'@ hprop_drep_retirement :: Property -hprop_drep_retirement = integrationRetryWorkspace 2 "drep-retirement" $ \tempAbsBasePath' -> H.runWithDefaultWatchdog_ $ do +hprop_drep_retirement = integrationRetryWorkspace 0 "drep-retirement" $ \tempAbsBasePath' -> H.runWithDefaultWatchdog_ $ do -- Start a local test net conf@Conf { tempAbsPath } <- H.noteShowM $ mkConf tempAbsBasePath' let tempAbsPath' = unTmpAbsPath tempAbsPath diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/TreasuryWithdrawal.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/TreasuryWithdrawal.hs index e1f24828e37..d396da59b45 100644 --- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/TreasuryWithdrawal.hs +++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/TreasuryWithdrawal.hs @@ -49,7 +49,7 @@ import Hedgehog import qualified Hedgehog.Extras as H hprop_ledger_events_treasury_withdrawal:: Property -hprop_ledger_events_treasury_withdrawal = integrationRetryWorkspace 1 "treasury-withdrawal" $ \tempAbsBasePath' -> H.runWithDefaultWatchdog_ $ do +hprop_ledger_events_treasury_withdrawal = integrationRetryWorkspace 0 "treasury-withdrawal" $ \tempAbsBasePath' -> H.runWithDefaultWatchdog_ $ do conf@Conf { tempAbsPath } <- H.noteShowM $ mkConf tempAbsBasePath' let tempAbsPath' = unTmpAbsPath tempAbsPath tempBaseAbsPath = makeTmpBaseAbsPath tempAbsPath diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Node/Shutdown.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Node/Shutdown.hs index a3e41f0a0dc..473dae5682c 100644 --- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Node/Shutdown.hs +++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Node/Shutdown.hs @@ -61,7 +61,7 @@ import qualified Hedgehog.Extras.Test.TestWatchdog as H -- -- TODO: Use cardanoTestnet in hprop_shutdown hprop_shutdown :: Property -hprop_shutdown = integrationRetryWorkspace 2 "shutdown" $ \tempAbsBasePath' -> H.runWithDefaultWatchdog_ $ do +hprop_shutdown = integrationRetryWorkspace 0 "shutdown" $ \tempAbsBasePath' -> H.runWithDefaultWatchdog_ $ do conf <- mkConf tempAbsBasePath' let tempBaseAbsPath' = makeTmpBaseAbsPath $ tempAbsPath conf tempAbsPath' = unTmpAbsPath $ tempAbsPath conf @@ -187,7 +187,7 @@ hprop_shutdown = integrationRetryWorkspace 2 "shutdown" $ \tempAbsBasePath' -> H hprop_shutdownOnSlotSynced :: Property -hprop_shutdownOnSlotSynced = integrationRetryWorkspace 2 "shutdown-on-slot-synced" $ \tempAbsBasePath' -> H.runWithDefaultWatchdog_ $ do +hprop_shutdownOnSlotSynced = integrationRetryWorkspace 0 "shutdown-on-slot-synced" $ \tempAbsBasePath' -> H.runWithDefaultWatchdog_ $ do -- Start a local test net -- TODO: Move yaml filepath specification into individual node options conf <- mkConf tempAbsBasePath' @@ -238,7 +238,7 @@ hprop_shutdownOnSlotSynced = integrationRetryWorkspace 2 "shutdown-on-slot-synce -- Execute this test with: -- @DISABLE_RETRIES=1 cabal test cardano-testnet-test --test-options '-p "/ShutdownOnSigint/"'@ hprop_shutdownOnSigint :: Property -hprop_shutdownOnSigint = integrationRetryWorkspace 2 "shutdown-on-sigint" $ \tempAbsBasePath' -> H.runWithDefaultWatchdog_ $ do +hprop_shutdownOnSigint = integrationRetryWorkspace 0 "shutdown-on-sigint" $ \tempAbsBasePath' -> H.runWithDefaultWatchdog_ $ do -- Start a local test net -- TODO: Move yaml filepath specification into individual node options conf <- mkConf tempAbsBasePath'