Skip to content

Commit

Permalink
REMOVEME: Enable multiple retries
Browse files Browse the repository at this point in the history
  • Loading branch information
carbolymer committed May 3, 2024
1 parent 03b946f commit baee90f
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 31 deletions.
22 changes: 3 additions & 19 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,29 +28,13 @@ jobs:
# If you edit these versions, make sure the version in the lonely macos-latest job below is updated accordingly
ghc: ["9.6.4", "9.8.1"]
cabal: ["3.10.2.1"]
os: [windows-latest, ubuntu-latest]
include:
# Using include, to make sure there will only be one macOS job, even if the matrix gets expanded later on.
# We want a single job, because macOS runners are scarce.
- os: macos-latest
cabal: "3.10.2.1"
ghc: "9.6.4"
os: [ubuntu-latest]
n: [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]

env:
# Modify this value to "invalidate" the cabal cache.
CABAL_CACHE_VERSION: "2024-04-24"

concurrency:
group: >
a+${{ github.event_name }}
b+${{ github.workflow_ref }}
c+${{ github.job }}
d+${{ matrix.ghc }}
e+${{ matrix.cabal }}
f+${{ matrix.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: >
Expand Down Expand Up @@ -154,7 +138,7 @@ jobs:
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: failed-test-workspaces-${{ matrix.os }}-ghc${{ matrix.ghc }}-cabal${{ matrix.cabal }}.tgz
name: failed-test-workspaces-${{ matrix.os }}-ghc${{ matrix.ghc }}-cabal${{ matrix.cabal }}-${{ matrix.n }}.tgz
path: ${{ runner.temp }}/workspaces.tgz

- name: "Tar artifacts"
Expand Down
2 changes: 1 addition & 1 deletion cardano-node-chairman/test/Spec/Chairman/Cardano.hs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import Spec.Chairman.Chairman (chairmanOver)

-- TODO: Conway broken in conway
hprop_chairman :: H.Property
hprop_chairman = H.integrationRetryWorkspace 2 "cardano-chairman" $ \tempAbsPath' -> do
hprop_chairman = H.integrationRetryWorkspace 0 "cardano-chairman" $ \tempAbsPath' -> do
conf <- H.mkConf tempAbsPath'

allNodes <- fmap H.nodeName . H.allNodes <$> H.cardanoTestnetDefault H.cardanoDefaultTestnetOptions conf
Expand Down
2 changes: 1 addition & 1 deletion cardano-node-chairman/testnet/Testnet/Run.hs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import qualified Hedgehog.Extras.Test.Process as H
import qualified Test.Base as H

testnetProperty :: (H.Conf -> H.Integration ()) -> H.Property
testnetProperty tn = H.integrationRetryWorkspace 2 "testnet-chairman" $ \tempAbsPath' -> do
testnetProperty tn = H.integrationRetryWorkspace 0 "testnet-chairman" $ \tempAbsPath' -> do
base <- H.note =<< H.noteIO . IO.canonicalizePath =<< H.getProjectBase
configurationTemplate <- H.noteShow $ base </> "configuration/defaults/byron-mainnet/configuration.yaml"
conf <- H.mkConf tempAbsPath'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ import qualified Hedgehog.Extras.Test.File as H
-- | Execute me with:
-- @DISABLE_RETRIES=1 cabal test cardano-testnet-test --test-options '-p "/leadership-schedule/"'@
hprop_leadershipSchedule :: Property
hprop_leadershipSchedule = H.integrationRetryWorkspace 2 "babbage-leadership-schedule" $ \tempAbsBasePath' -> runWithDefaultWatchdog_ $ do
hprop_leadershipSchedule = H.integrationRetryWorkspace 0 "babbage-leadership-schedule" $ \tempAbsBasePath' -> runWithDefaultWatchdog_ $ do
H.note_ SYS.os
conf@Conf { tempAbsPath=tempAbsPath@(TmpAbsolutePath work) } <- mkConf tempAbsBasePath'
let tempBaseAbsPath = makeTmpBaseAbsPath tempAbsPath
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import qualified Hedgehog.Extras.Stock.IO.Network.Sprocket as IO
import qualified Hedgehog.Extras.Test.Base as H

hprop_stakeSnapshot :: Property
hprop_stakeSnapshot = H.integrationRetryWorkspace 2 "babbage-stake-snapshot" $ \tempAbsBasePath' -> runWithDefaultWatchdog_ $ do
hprop_stakeSnapshot = H.integrationRetryWorkspace 0 "babbage-stake-snapshot" $ \tempAbsBasePath' -> runWithDefaultWatchdog_ $ do
H.note_ SYS.os
conf@Conf { tempAbsPath } <- mkConf tempAbsBasePath'
let tempAbsPath' = unTmpAbsPath tempAbsPath
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = H.integrationRetryWorkspace 2 "drep-retirement" $ \tempAbsBasePath' -> runWithDefaultWatchdog_ $ do
hprop_drep_retirement = H.integrationRetryWorkspace 0 "drep-retirement" $ \tempAbsBasePath' -> runWithDefaultWatchdog_ $ do
-- Start a local test net
conf@Conf { tempAbsPath } <- H.noteShowM $ mkConf tempAbsBasePath'
let tempAbsPath' = unTmpAbsPath tempAbsPath
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import qualified Hedgehog.Extras.Stock.IO.Network.Sprocket as IO
import qualified Hedgehog.Extras.Test.Base as H

hprop_stakeSnapshot :: Property
hprop_stakeSnapshot = H.integrationRetryWorkspace 2 "conway-stake-snapshot" $ \tempAbsBasePath' -> runWithDefaultWatchdog_ $ do
hprop_stakeSnapshot = H.integrationRetryWorkspace 0 "conway-stake-snapshot" $ \tempAbsBasePath' -> runWithDefaultWatchdog_ $ do
H.note_ SYS.os
conf@Conf { tempAbsPath } <- mkConf tempAbsBasePath'
let tempAbsPath' = unTmpAbsPath tempAbsPath
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import qualified Hedgehog.Extras.Test.Base as H
import qualified Hedgehog.Extras.Test.File as H

hprop_kes_period_info :: Property
hprop_kes_period_info = H.integrationRetryWorkspace 2 "kes-period-info" $ \tempAbsBasePath' -> runWithDefaultWatchdog_ $ do
hprop_kes_period_info = H.integrationRetryWorkspace 0 "kes-period-info" $ \tempAbsBasePath' -> runWithDefaultWatchdog_ $ do
H.note_ SYS.os
conf@Conf { tempAbsPath=tempAbsPath@(TmpAbsolutePath work) }
-- TODO: Move yaml filepath specification into individual node options
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,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 = H.integrationRetryWorkspace 2 "query-slot-number" $ \tempAbsBasePath' -> runWithDefaultWatchdog_ $ do
hprop_querySlotNumber = H.integrationRetryWorkspace 0 "query-slot-number" $ \tempAbsBasePath' -> runWithDefaultWatchdog_ $ do
H.note_ SYS.os
conf <- mkConf tempAbsBasePath'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ instance Show FoldBlocksException where
-- events and block, and on reception writes this to the `lock` `MVar`
-- that main thread blocks on.
prop_foldBlocks :: H.Property
prop_foldBlocks = H.integrationRetryWorkspace 2 "foldblocks" $ \tempAbsBasePath' -> runWithDefaultWatchdog_ $ do
prop_foldBlocks = H.integrationRetryWorkspace 0 "foldblocks" $ \tempAbsBasePath' -> runWithDefaultWatchdog_ $ do
-- Start testnet
conf <- TN.mkConf tempAbsBasePath'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ import qualified Hedgehog.Extras.Test.Process as H
--
-- TODO: Use cardanoTestnet in hprop_shutdown
hprop_shutdown :: Property
hprop_shutdown = H.integrationRetryWorkspace 2 "shutdown" $ \tempAbsBasePath' -> runWithDefaultWatchdog_ $ do
hprop_shutdown = H.integrationRetryWorkspace 0 "shutdown" $ \tempAbsBasePath' -> runWithDefaultWatchdog_ $ do
conf <- mkConf tempAbsBasePath'
let tempBaseAbsPath' = makeTmpBaseAbsPath $ tempAbsPath conf
tempAbsPath' = unTmpAbsPath $ tempAbsPath conf
Expand Down Expand Up @@ -184,7 +184,7 @@ hprop_shutdown = H.integrationRetryWorkspace 2 "shutdown" $ \tempAbsBasePath' ->


hprop_shutdownOnSlotSynced :: Property
hprop_shutdownOnSlotSynced = H.integrationRetryWorkspace 2 "shutdown-on-slot-synced" $ \tempAbsBasePath' -> runWithDefaultWatchdog_ $ do
hprop_shutdownOnSlotSynced = H.integrationRetryWorkspace 0 "shutdown-on-slot-synced" $ \tempAbsBasePath' -> runWithDefaultWatchdog_ $ do
-- Start a local test net
-- TODO: Move yaml filepath specification into individual node options
conf <- mkConf tempAbsBasePath'
Expand Down Expand Up @@ -233,7 +233,7 @@ hprop_shutdownOnSlotSynced = H.integrationRetryWorkspace 2 "shutdown-on-slot-syn
-- Execute this test with:
-- @DISABLE_RETRIES=1 cabal test cardano-testnet-test --test-options '-p "/ShutdownOnSigint/"'@
hprop_shutdownOnSigint :: Property
hprop_shutdownOnSigint = H.integrationRetryWorkspace 2 "shutdown-on-sigint" $ \tempAbsBasePath' -> runWithDefaultWatchdog_ $ do
hprop_shutdownOnSigint = H.integrationRetryWorkspace 0 "shutdown-on-sigint" $ \tempAbsBasePath' -> runWithDefaultWatchdog_ $ do
-- Start a local test net
-- TODO: Move yaml filepath specification into individual node options
conf <- mkConf tempAbsBasePath'
Expand Down

0 comments on commit baee90f

Please sign in to comment.