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

Run WASM E2E tests only when relevant changes are made #5092

Conversation

chatton
Copy link
Contributor

@chatton chatton commented Nov 13, 2023

Description

Marking as R4R to run tests.

closes: #5090

This PR adds an additional workflow that will run only the wasm tests. This workflow runs whenever relevant files are changed.

The WASM tests have been removed from the regular e2e.yml workflow.

This would be possible by building and tagging an image that looks like ghcr.io/cosmos/ibc-go-wasm-simd:latest, however we should probably instead also make it so this image does not get hard coded for this test, and is passed correctly. This could be done in a follow up I think.


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.

misko9 and others added 30 commits July 6, 2023 08:34
Co-authored-by: Jack Zampolin <jack.zampolin@gmail.com>
Co-authored-by: antstalepresh <stalepresh121@outlook.com>
Co-authored-by: Vladislav Markushin <negigic@gmail.com>
Co-authored-by: Blas Rodriguez Irizar <rodrigblas@gmail.com>
Co-authored-by: Jacob Gadikian <jacobgadikian@gmail.com>
Co-authored-by: vuong <nguyenvuong1122000@gmail.com>
Co-authored-by: Carlos Rodriguez <carlos@interchain.io>
* new error

* changed all the errors

* feat: Changed some more erros from sdkerrors to errorsmod

* added ibcerrors

* fixes and linting

---------

Co-authored-by: Carlos Rodriguez <carlos@interchain.io>
* imp: add separate go.mod for 08-wasm

* fix e2e build

* remove import

* lint

* Amend CI testing to not build on arm, correctly cross compile on arm64. (#4065)

* Use alpine for building simd in docker. Link statically. (#4066)

---------

Co-authored-by: Charly <charly@interchain.berlin>
Co-authored-by: Jim Fasarakis-Hilliard <d.f.hilliard@gmail.com>
* remove code ID key from genesis type

* address review comment
* bump wasmvm to v1.2.4

* go mod tidy e2e

* Update Dockerfile

* update libwasm sha

* more go mod tidy

---------

Co-authored-by: Jim Fasarakis-Hilliard <d.f.hilliard@gmail.com>
* build and test wasm-client on pull request

* add arm64 for wasm build only
* merge functions

* address review comment
* pin code to the wasm VM cache

* follow ibc-go error wrapping standards

* Update modules/light-clients/08-wasm/keeper/keeper.go

Co-authored-by: Reece Williams <31943163+Reecepbcups@users.noreply.github.com>

---------

Co-authored-by: Damian Nolan <damiannolan@gmail.com>
* renaming to align with x/wasm naming

* fix typo

* Update docs/architecture/adr-027-ibc-wasm.md

Co-authored-by: Damian Nolan <damiannolan@gmail.com>

* address review comments

* review comment

---------

Co-authored-by: Damian Nolan <damiannolan@gmail.com>
* disallow submessage execution

* fix error code

* alignment

* fix
# Conflicts:
#	Dockerfile
#	testing/chain.go
* Add linting for 08-wasm.

* Go mod tidy.

* Please the linter.
* add 08-wasm global store key

* Update client_state.go

* Update modules/light-clients/08-wasm/types/vm.go

Co-authored-by: Jim Fasarakis-Hilliard <d.f.hilliard@gmail.com>

---------

Co-authored-by: Jim Fasarakis-Hilliard <d.f.hilliard@gmail.com>
…n `initialize` to contract (#4033)

* remove calls to set client state and consensus state from initialize

* linting

* Update contracts

* use errorsmod

---------

Co-authored-by: Vladislav Markushin <negigic@gmail.com>
…etrieve it (#4034)

* imp: remove timestamp from consensus state

* more linting

* make types unexported

* make proto-all

* code hash for code id

* Use hasConsensusState instead of GetConsensusState (#4171)

* Use hasConsensusState instead of GetConsensusState.

* Use wasmQuery for the rest of the query functions. (#4176)

* Use wasmQuery for the rest of the query functions.

---------

Co-authored-by: Carlos Rodriguez <carlos@interchain.io>

* review comments

* Remove check for consensus state.

* Add linting for 08-wasm module (#4206)

* Add linting for 08-wasm.

* Go mod tidy.

* Please the linter.

* add 08-wasm global store key (#4185)

* add 08-wasm global store key

* Update client_state.go

* Update modules/light-clients/08-wasm/types/vm.go

Co-authored-by: Jim Fasarakis-Hilliard <d.f.hilliard@gmail.com>

---------

Co-authored-by: Jim Fasarakis-Hilliard <d.f.hilliard@gmail.com>

* solve conflicts

* review comments/fix linter warnings

* address comments

* add missing check

* remove check that was wrong

---------

Co-authored-by: Jim Fasarakis-Hilliard <d.f.hilliard@gmail.com>
…our` (#4049)

* imp: merge header and misbehaviour types

* remove unused code
…calls (#4133)

* defined query and sudo message types to encapsulate all variants for calls

* pass client message

* add ClientMessage from #4049

* address review comments

* linter

* gofumpt

* review comment

* more gofumpt
…ce (#4109)

* add constructor that accepts pointer to Wasm VM instance

* typo

* add functions that returns wasm config with default values

* review comment

* Apply suggestions from code review

Co-authored-by: Cian Hatton <cian@interchain.io>

* review comments

* rename constructor function

* address review comments

* set contract debug mode to false

---------

Co-authored-by: Cian Hatton <cian@interchain.io>
* Rename from call to wasmCall.

* Move wasmQuery, wasmCall into vm.

* Add wasmInit, mirroring wasmCall and wasmQuery.

* Directly return after wasmInit.
# Conflicts:
#	testing/config.go
crodriguezvega and others added 16 commits November 14, 2023 14:41
* imp: unpin contract when removing code hash

* test: add cov for failing unpin.

* add test case for failed contract pin

* Update modules/light-clients/08-wasm/keeper/msg_server_test.go

Co-authored-by: Charly <charly@interchain.io>

---------

Co-authored-by: DimitrisJim <d.f.hilliard@gmail.com>
Co-authored-by: Charly <charly@interchain.io>
* imp: client is unauthorized if code hash not stored

* change comment
* add 08-wasm code owners

* fix
)

* imp: check response for wasm instantiate and migrate calls

* Apply suggestions from code review

Co-authored-by: DimitrisJim <d.f.hilliard@gmail.com>

---------

Co-authored-by: DimitrisJim <d.f.hilliard@gmail.com>
* Add an error-ing implementation for GoAPI.

* Move var to top level, add assertions in tests.

* Clean up responses in sucess cases.
* Rename occurences of codehash in proto files.

* Documentation. Output code_hash as json key for encoded client state.

* Rename occurences triggering the compiler.

* Fix issues triggering the linter.

* First round of renames.

* Fix rename in e2e/

* Use new contract with renamed code hash.

* gzip it.

* Additional soft renames.

* Final one, fingers crossed.

* Replace occurences in e2e/, cli.
@chatton chatton mentioned this pull request Nov 16, 2023
9 tasks
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.

Thanks @chatton! 🙌

@colin-axner
Copy link
Contributor

looks like the pr needs to be rebased since the feature branch was merged

@chatton chatton requested a review from srdtrk as a code owner November 16, 2023 15:40
@github-actions github-actions bot added dependencies Issues or PRs to update a dependency 08-wasm e2e labels Nov 16, 2023
@chatton chatton changed the base branch from feat/wasm-clients to main November 16, 2023 16:33
@chatton chatton merged commit f177b21 into main Nov 16, 2023
68 checks passed
@chatton chatton deleted the cian/issue#5090-run-wasm-e2e-tests-only-when-relevant-changes-are-made branch November 16, 2023 16:33
hoangdv2429 pushed a commit to hoangdv2429/ibc-go that referenced this pull request Dec 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
08-wasm dependencies Issues or PRs to update a dependency e2e github_actions Pull requests that update Github_actions code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run WASM E2E tests only when relevant changes are made