Skip to content

Commit

Permalink
chore: simplifying upgrade configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
chatton committed Nov 29, 2024
1 parent 748d4df commit acf7e08
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 147 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/e2e-test-workflow-call.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ on:
description: 'The tag to use for chain B'
required: true
type: string
chain-upgrade-tag:
default: ''
description: 'The image tag that the chain will be upgraded to'
required: false
type: string
# upgrade-plan-name is only required during upgrade tests, and is otherwise ignored.
upgrade-plan-name:
default: ''
Expand Down Expand Up @@ -77,7 +72,6 @@ jobs:
run: |
echo "Chain A Tag: ${{ inputs.chain-a-tag }}"
echo "Chain B Tag: ${{ inputs.chain-b-tag }}"
echo "Chain Upgrade Tag: ${{ inputs.chain-upgrade-tag }}"
echo "Upgrade Plan Name: ${{ inputs.upgrade-plan-name }}"
echo "Test Entry Point: ${{ inputs.test-entry-point }}"
echo "Test: ${{ inputs.test }}"
Expand Down Expand Up @@ -201,6 +195,7 @@ jobs:
- docker-build
- docker-build-wasm
env:
CHAIN_UPGRADE_PLAN: '${{ inputs.upgrade-plan-name }}'
CHAIN_A_TAG: '${{ inputs.chain-a-tag }}'
CHAIN_B_TAG: '${{ inputs.chain-b-tag }}'
E2E_CONFIG_PATH: '${{ inputs.e2e-config-path }}'
Expand Down
129 changes: 12 additions & 117 deletions .github/workflows/e2e-upgrade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,215 +5,110 @@ on:
branches:
- main
paths:
# upgrade tests will run on any changes to the upgrade_test.go file.
# upgrade tests will run on any changes to the upgrade_test.go file,
# and changes to the workflow itself.
- 'e2e/tests/upgrades/upgrade_test.go'
- '.github/workflows/e2e-upgrade.yaml'
schedule:
- cron: '0 0 * * *'


jobs:
upgrade-v7-hermes:
upgrade-v7:
uses: ./.github/workflows/e2e-test-workflow-call.yml
with:
chain-image: ghcr.io/cosmos/ibc-go-simd
chain-binary: simd
chain-a-tag: v6.1.0
chain-b-tag: v6.1.0
chain-upgrade-tag: v7.0.0
upgrade-plan-name: "v7"
test-entry-point: "TestUpgradeTestSuite"
test: "TestV6ToV7ChainUpgrade"
upload-logs: true
relayer-type: hermes

upgrade-v7_1-hermes:
upgrade-v7_1:
uses: ./.github/workflows/e2e-test-workflow-call.yml
with:
chain-image: ghcr.io/cosmos/ibc-go-simd
chain-binary: simd
chain-a-tag: v7.0.0
chain-b-tag: v7.0.0
chain-upgrade-tag: v7.1.0
upgrade-plan-name: "v7.1"
test-entry-point: "TestUpgradeTestSuite"
test: "TestV7ToV7_1ChainUpgrade"
upload-logs: true
relayer-type: hermes

upgrade-v8-hermes:
upgrade-v8:
uses: ./.github/workflows/e2e-test-workflow-call.yml
with:
chain-image: ghcr.io/cosmos/ibc-go-simd
chain-binary: simd
chain-a-tag: v7.0.0
chain-b-tag: v7.0.0
chain-upgrade-tag: v8.0.0
upgrade-plan-name: "v8"
test-entry-point: "TestUpgradeTestSuite"
test: "TestV7ToV8ChainUpgrade"
upload-logs: true
relayer-type: hermes

upgrade-v8_1-hermes:
upgrade-v8_1:
uses: ./.github/workflows/e2e-test-workflow-call.yml
with:
chain-image: ghcr.io/cosmos/ibc-go-simd
chain-binary: simd
chain-a-tag: v8.0.0
chain-b-tag: v8.0.0
chain-upgrade-tag: v8.1.0
upgrade-plan-name: "v8.1"
test-entry-point: "TestUpgradeTestSuite"
test: "TestV8ToV8_1ChainUpgrade"
upload-logs: true
relayer-type: hermes

upgrade-v8_1-channel-upgrades-hermes:
upgrade-v8_1-channel-upgrades:
uses: ./.github/workflows/e2e-test-workflow-call.yml
with:
chain-image: ghcr.io/cosmos/ibc-go-simd
chain-binary: simd
chain-a-tag: v8.0.0
chain-b-tag: v8.0.0
chain-upgrade-tag: v8.1.0
upgrade-plan-name: "v8.1"
test-entry-point: "TestUpgradeTestSuite"
test: "TestV8ToV8_1ChainUpgrade_FeeMiddlewareChannelUpgrade"
upload-logs: true
relayer-type: hermes

upgrade-v7-rly:
uses: ./.github/workflows/e2e-test-workflow-call.yml
with:
chain-image: ghcr.io/cosmos/ibc-go-simd
chain-binary: simd
chain-a-tag: v6.1.0
chain-b-tag: v6.1.0
chain-upgrade-tag: v7.0.0
upgrade-plan-name: "v7"
test-entry-point: "TestUpgradeTestSuite"
test: "TestV6ToV7ChainUpgrade"
upload-logs: true
relayer-type: rly
relayer-image: ghcr.io/cosmos/relayer
relayer-tag: latest

upgrade-v7_1-rly:
uses: ./.github/workflows/e2e-test-workflow-call.yml
with:
chain-image: ghcr.io/cosmos/ibc-go-simd
chain-binary: simd
chain-a-tag: v7.0.0
chain-b-tag: v7.0.0
chain-upgrade-tag: v7.1.0
upgrade-plan-name: "v7.1"
test-entry-point: "TestUpgradeTestSuite"
test: "TestV7ToV7_1ChainUpgrade"
upload-logs: true
relayer-type: rly
relayer-image: ghcr.io/cosmos/relayer
relayer-tag: latest

upgrade-v8-rly:
uses: ./.github/workflows/e2e-test-workflow-call.yml
with:
chain-image: ghcr.io/cosmos/ibc-go-simd
chain-binary: simd
chain-a-tag: v7.0.0
chain-b-tag: v7.0.0
chain-upgrade-tag: v8.0.0
upgrade-plan-name: "v8"
test-entry-point: "TestUpgradeTestSuite"
test: "TestV7ToV8ChainUpgrade"
upload-logs: true
relayer-type: rly
relayer-image: ghcr.io/cosmos/relayer
relayer-tag: latest

upgrade-v8_1-rly:
uses: ./.github/workflows/e2e-test-workflow-call.yml
with:
chain-image: ghcr.io/cosmos/ibc-go-simd
chain-binary: simd
chain-a-tag: v8.0.0
chain-b-tag: v8.0.0
chain-upgrade-tag: v8.1.0
upgrade-plan-name: "v8.1"
test-entry-point: "TestUpgradeTestSuite"
test: "TestV8ToV8_1ChainUpgrade"
upload-logs: true
relayer-type: rly
relayer-image: ghcr.io/cosmos/relayer
relayer-tag: latest

upgrade-ibcwasm-v8-hermes:
upgrade-ibcwasm-v8:
uses: ./.github/workflows/e2e-test-workflow-call.yml
with:
chain-image: ghcr.io/cosmos/ibc-go-wasm-simd
chain-binary: simd
chain-a-tag: v7.3.0-e2e-upgrade
chain-b-tag: v7.3.0-e2e-upgrade
chain-upgrade-tag: v8.0.0-e2e-upgrade
upgrade-plan-name: "ibcwasm-v8"
test-entry-point: "TestIBCWasmUpgradeTestSuite"
test: "TestIBCWasmChainUpgrade"
upload-logs: true
relayer-type: hermes

upgrade-v9-hermes:
uses: ./.github/workflows/e2e-test-workflow-call.yml
with:
chain-image: ghcr.io/cosmos/ibc-go-simd
chain-binary: simd
chain-a-tag: v8.4.0
chain-b-tag: v8.4.0
chain-upgrade-tag: main # TODO: Update tag to v9.0.0 once it is (pre)released
upgrade-plan-name: "v9"
test-entry-point: "TestUpgradeTestSuite"
test: "TestV8ToV9ChainUpgrade"
upload-logs: true
relayer-type: hermes

upgrade-v9-rly:
upgrade-v9:
uses: ./.github/workflows/e2e-test-workflow-call.yml
with:
chain-image: ghcr.io/cosmos/ibc-go-simd
chain-binary: simd
chain-a-tag: v8.4.0
chain-b-tag: v8.4.0
chain-upgrade-tag: main # TODO: Update tag to v9.0.0 once it is (pre)released
upgrade-plan-name: "v9"
test-entry-point: "TestUpgradeTestSuite"
test: "TestV8ToV9ChainUpgrade"
upload-logs: true
relayer-type: rly
relayer-image: ghcr.io/cosmos/relayer
relayer-tag: latest

upgrade-v9-localhost:
uses: ./.github/workflows/e2e-test-workflow-call.yml
with:
chain-image: ghcr.io/cosmos/ibc-go-simd
chain-binary: simd
chain-a-tag: v8.4.0
chain-b-tag: v8.4.0
chain-upgrade-tag: main # TODO: Update tag to v9.0.0 once it is (pre)released
upgrade-plan-name: "v9"
test-entry-point: "TestUpgradeTestSuite"
test: "TestV8ToV9ChainUpgrade_Localhost"
upload-logs: true
relayer-type: hermes

upgrade-v9-channel-upgrades-hermes:
upgrade-v9-channel-upgrades:
uses: ./.github/workflows/e2e-test-workflow-call.yml
with:
chain-image: ghcr.io/cosmos/ibc-go-simd
chain-binary: simd
chain-a-tag: v8.4.0
chain-b-tag: main # TODO: Update tag to v9.0.0 once it is (pre)released
chain-upgrade-tag: main # TODO: Update tag to v9.0.0 once it is (pre)released
chain-b-tag: v8.4.0
upgrade-plan-name: "v9"
test-entry-point: "TestUpgradeTestSuite"
test: "TestV8ToV9ChainUpgrade_ICS20v2ChannelUpgrade"
upload-logs: true
relayer-type: hermes
39 changes: 27 additions & 12 deletions e2e/ci-e2e-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@
---
chains:
# the entry at index 0 corresponds to CHAIN_A
- chainId: chainA-1
numValidators: 4
numFullNodes: 1
image: ghcr.io/cosmos/ibc-go-simd # override with CHAIN_IMAGE
binary: simd # override with CHAIN_BINARY

# the entry at index 1 corresponds to CHAIN_B
- chainId: chainB-1
numValidators: 4
numFullNodes: 1
image: ghcr.io/cosmos/ibc-go-simd # override with CHAIN_IMAGE
binary: simd # override with CHAIN_BINARY
- chainId: chainA-1
numValidators: 4
numFullNodes: 1
image: ghcr.io/cosmos/ibc-go-simd # override with CHAIN_IMAGE
binary: simd # override with CHAIN_BINARY

# the entry at index 1 corresponds to CHAIN_B
- chainId: chainB-1
numValidators: 4
numFullNodes: 1f
image: ghcr.io/cosmos/ibc-go-simd # override with CHAIN_IMAGE
binary: simd # override with CHAIN_BINARY

activeRelayer: hermes # override with RELAYER_ID
relayers:
Expand All @@ -51,3 +51,18 @@ debug:
dumpLogs: false
# settings this value to true will keep the containers running after the test finishes.
keepContainers: true

upgradePlanName: ""
upgrades:
- planName: "v7"
tag: "v7.0.0"
- planName: "v7.1"
tag: "v7.1.0"
- planName: "v8"
tag: "v8.0.0"
- planName: "v8.1"
tag: "v8.1.0"
- planName: "v9"
tag: "v9.0.0"
- planName: "ibcwasm-v8"
tag: "v8.0.0-e2e-upgrade"
20 changes: 14 additions & 6 deletions e2e/sample.config.extended.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,17 @@ debug:
# settings this value to true will keep the containers running after the test finishes.
keepContainers: true

# Required only for upgrade tests.
# Chain A will be upgraded the specified tag.
# The plan name must be registered as an upgrade handler in the given tag.
upgrade:
planName: "" # override with CHAIN_UPGRADE_PLAN
tag: "" # override with CHAIN_UPGRADE_TAG
upgradePlanName: "" # specify a value that matches a planName in the upgrades list below.
upgrades:
- planName: "v7"
tag: "v7.0.0"
- planName: "v7.1"
tag: "v7.1.0"
- planName: "v8"
tag: "v8.0.0"
- planName: "v8.1"
tag: "v8.1.0"
- planName: "v9"
tag: "v9.0.0"
- planName: "ibcwasm-v8"
tag: "v8.0.0-e2e-upgrade"
2 changes: 1 addition & 1 deletion e2e/tests/upgrades/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const (

func TestUpgradeTestSuite(t *testing.T) {
testCfg := testsuite.LoadConfig()
if testCfg.UpgradeConfig.Tag == "" || testCfg.UpgradeConfig.PlanName == "" {
if testCfg.UpgradePlanName == "" {
t.Fatalf("%s and %s must be set when running an upgrade test", testsuite.ChainUpgradeTagEnv, testsuite.ChainUpgradePlanEnv)
}

Expand Down
Loading

0 comments on commit acf7e08

Please sign in to comment.