Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

e2e: adding ibcwasm e2e upgrade test #5333

Merged
merged 6 commits into from
Dec 7, 2023
Merged

Conversation

damiannolan
Copy link
Member

@damiannolan damiannolan commented Dec 7, 2023

Description


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md).
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards and Go style guide.
  • Wrote unit and integration tests.
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/).
  • Added relevant godoc comments.
  • Provide a commit message to be used for the changelog entry in the PR description for review.
  • Re-reviewed Files changed in the Github PR explorer.
  • Review Codecov Report in the comment section below once CI passes.

Copy link
Contributor

@colin-axner colin-axner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you thank you thank you @damiannolan!! 🙏

Comment on lines +115 to +116
timeoutCtx, timeoutCtxCancel = context.WithTimeout(ctx, time.Minute*2)
defer timeoutCtxCancel()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious, there's now two defers in this function. Does this reset the context timeout?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question! I copied this from the other chain upgrade test file.
As far as I know defer in go operates like the statement following defer is wrapped inside a function.
It can be pretty weird at times. I'm kind of curious now as to see what exactly happens here too. I might play around with some code to test things out.

@damiannolan
Copy link
Member Author

damiannolan commented Dec 7, 2023

Heads up - the job on this PR https://github.com/cosmos/ibc-go/actions/runs/7130649117/job/19417804360?pr=5333 running the chain upgrade test fails because the automated workflow doesn't provide the chain upgrade tag and plan name.

When this PR is merged, I can rerun the E2E Upgrade workflow which should run all upgrade e2e tests. I've tested this locally with success:

=== NAME  TestIBCWasmUpgradeTestSuite/TestIBCWasmChainUpgrade
    testsuite.go:382: test passed, not uploading logs
    setup.go:210: Pruned 2 volumes, reclaiming approximately 14.8 MB
    setup.go:242: Pruned unused networks: [interchaintest-laulbrlj]
--- PASS: TestIBCWasmUpgradeTestSuite (801.24s)
    --- PASS: TestIBCWasmUpgradeTestSuite/TestIBCWasmChainUpgrade (801.24s)
        --- PASS: TestIBCWasmUpgradeTestSuite/TestIBCWasmChainUpgrade/create_and_exec_store_code_proposal (308.40s)
        --- PASS: TestIBCWasmUpgradeTestSuite/TestIBCWasmChainUpgrade/upgrade_chain (453.82s)
        --- PASS: TestIBCWasmUpgradeTestSuite/TestIBCWasmChainUpgrade/query_wasm_checksums (0.01s)
PASS
ok      github.com/cosmos/ibc-go/e2e/tests/wasm 802.086s

EDIT: I think I need to exclude this test from automated workflows

@damiannolan damiannolan added the priority PRs that need prompt reviews label Dec 7, 2023
@@ -63,4 +63,4 @@ jobs:
chain-b-tag: '${{ needs.determine-image-tag.outputs.simd-tag }}'
chain-binary: 'simd'
# on regular PRs we won't run upgrade tests.
test-exclusions: 'TestUpgradeTestSuite,TestGrandpaTestSuite'
test-exclusions: 'TestUpgradeTestSuite,TestGrandpaTestSuite,TestIBCWasmChainUpgrade'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

almost forgot about you :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah but e2e setup magic has a similar easily forgettable trick up its sleeve for forks:

TEST_EXCLUSIONS: 'TestUpgradeTestSuite,TestGrandpaTestSuite'

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch!

@damiannolan damiannolan enabled auto-merge (squash) December 7, 2023 17:19
Copy link
Contributor

@DimitrisJim DimitrisJim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

amazing! 💪

@damiannolan damiannolan merged commit d76ee9b into main Dec 7, 2023
68 of 70 checks passed
@damiannolan damiannolan deleted the damian/ibcwasm-upgrade-e2e branch December 7, 2023 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority PRs that need prompt reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants