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 Cosmos relayer process inside TestIBCCallFromSmartContract integration test #673

Closed
wants to merge 10 commits into from

Conversation

ysv
Copy link
Contributor

@ysv ysv commented Oct 13, 2023

Description

This PR changes TestIBCCallFromSmartContract to start and stop cosmos relayer inside test.
We need this to fully remove Cosmos Relayer from crust because that is the only place where we need it.

Reviewers checklist:

  • Try to write more meaningful comments with clear actions to be taken.
  • Nit-picking should be unblocking. Focus on core issues.

Authors checklist

  • Provide a concise and meaningful description
  • Review the code yourself first, before making the PR.
  • Annotate your PR in places that require explanation.
  • Think and try to split the PR to smaller PR if it is big.

This change is Reviewable

@ysv ysv requested a review from a team as a code owner October 13, 2023 12:22
@ysv ysv requested review from dzmitryhil, miladz68 and wojtek-coreum and removed request for a team October 13, 2023 12:22
Copy link
Contributor

@dzmitryhil dzmitryhil left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 2 files reviewed, 2 unresolved discussions (waiting on @miladz68, @wojtek-coreum, and @ysv)


integration-tests/ibc/ibc.go line 69 at r1 (raw file):

	pathName := fmt.Sprintf("%s-%s", srcChain.ChainSettings.ChainID, dstChain.ChainSettings.ChainID)

	// port name samples:

Why do we need that here?


integration-tests/ibc/ibc.go line 110 at r1 (raw file):

	go func() {
		err := <-relErrCh
		if !errors.Is(err, context.Canceled) {

Why do you ignore all errors a part form context.Canceled ?

Copy link
Contributor

@dzmitryhil dzmitryhil left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @miladz68, @wojtek-coreum, and @ysv)

@ysv ysv requested a review from dzmitryhil October 16, 2023 08:25
Copy link
Contributor Author

@ysv ysv left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 of 2 files reviewed, 2 unresolved discussions (waiting on @dzmitryhil, @miladz68, and @wojtek-coreum)


integration-tests/ibc/ibc.go line 69 at r1 (raw file):

Previously, dzmitryhil (Dzmitry Hil) wrote…

Why do we need that here?

removed


integration-tests/ibc/ibc.go line 110 at r1 (raw file):

Previously, dzmitryhil (Dzmitry Hil) wrote…

Why do you ignore all errors a part form context.Canceled ?

fixed, good point

The idea is to ignore context.Canceled and don't report it as test failure but do report all other errors

miladz68
miladz68 previously approved these changes Oct 16, 2023
Copy link
Contributor

@miladz68 miladz68 left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 2 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @dzmitryhil and @wojtek-coreum)

Copy link
Collaborator

@wojtek-coreum wojtek-coreum left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 2 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @dzmitryhil and @ysv)


integration-tests/ibc/ibc.go line 110 at r2 (raw file):

			return
		}
		require.NoError(t, err, "Cosmos Relayer start error")

require.* functions don't work as expected inside goroutines and cannot be used there


integration-tests/ibc/wasm_test.go line 162 at r2 (raw file):

// TestIBCCallFromSmartContract tests the WASM contract calls via WASM IBC channel.
func TestIBCCallFromSmartContract(t *testing.T) {
	// Temporary skip this test because it is incompatible with crust but crust PR needs changes from coreum.

Add TODO or FIXME here

Copy link
Contributor

@dzmitryhil dzmitryhil left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @ysv)


integration-tests/ibc/ibc.go line 110 at r1 (raw file):

Previously, ysv (Yaroslav Savchuk) wrote…

fixed, good point

The idea is to ignore context.Canceled and don't report it as test failure but do report all other errors

With this I'm OK.

Copy link
Contributor Author

@ysv ysv left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 3 files reviewed, 3 unresolved discussions (waiting on @dzmitryhil, @miladz68, and @wojtek-coreum)


integration-tests/ibc/ibc.go line 110 at r1 (raw file):

Previously, dzmitryhil (Dzmitry Hil) wrote…

With this I'm OK.

Done.


integration-tests/ibc/ibc.go line 110 at r2 (raw file):

Previously, wojtek-coreum (Wojtek) wrote…

require.* functions don't work as expected inside goroutines and cannot be used there

refactored


integration-tests/ibc/wasm_test.go line 162 at r2 (raw file):

Previously, wojtek-coreum (Wojtek) wrote…

Add TODO or FIXME here

Done.

Copy link
Contributor Author

@ysv ysv left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 3 files reviewed, 4 unresolved discussions (waiting on @dzmitryhil, @miladz68, and @wojtek-coreum)

a discussion (no related file):
It seems that we don't need these changes


@ysv
Copy link
Contributor Author

ysv commented Oct 17, 2023

Not needed
Relaying via Hermes works

@ysv ysv closed this Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants