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

Update CI to account for multiple types of relayers #3043

Conversation

chatton
Copy link
Contributor

@chatton chatton commented Jan 23, 2023

Description

closes: #3041

Commit Message / Changelog Entry

N/A

see the guidelines for commit messages. (view raw markdown for examples)


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.

@@ -5,6 +5,7 @@
"test": [
"TestClientUpdateProposal_Succeeds"
],
"relayer-type": ["COSMOS"],
Copy link
Contributor Author

@chatton chatton Jan 23, 2023

Choose a reason for hiding this comment

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

this change as it currently stands will not change the number of tests that run, once a second entry is added (HERMES) this will double the number of tests that run in each compatibility test matrix.

e.g. "relayer-type": ["COSMOS", "HERMES"],

Copy link
Contributor

Choose a reason for hiding this comment

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

should we call them golang and rust instead of cosmos and hermes? not super opinionated here but jw

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hm I agree golang could work, but I don't think rust would be a good name, the language doesn't really matter for a relayer I feel like the explicit name is more valuable information (as you could have many relayers written in rust or golang. )

Copy link
Contributor

Choose a reason for hiding this comment

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

I think my vote would be for the binary name in lowercase. E.g. hermes or rly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah I'm happy with hermes/rly

Comment on lines 55 to 62
relayer-type:
default: COSMOS
description: 'The relayer to use'
required: true
type: choice
options:
- COSMOS
- HERMES
Copy link
Contributor Author

Choose a reason for hiding this comment

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

adds a drop down when running a single test.

Comment on lines +124 to +125
RELAYER_TAG: "${{ inputs.relayer-tag }}"
RELAYER_TYPE: "${{ inputs.relayer-type }}"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is the workflow that gets imported in other workflows

Comment on lines 50 to 52
func newHermesRelayer() ibc.Relayer {
panic("hermes relayer not yet implemented for ibctest")
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

place holder function to flesh out once the hermes implementation exists.

Comment on lines 44 to 53
func newCosmosRelayer(t *testing.T, tag string, logger *zap.Logger, dockerClient *dockerclient.Client, network string) ibc.Relayer {
customImageOption := relayer.CustomDockerImage(cosmosRelayerRepository, tag, cosmosRelayerUser)
relayerProcessingOption := relayer.StartupFlags("-p", "events") // relayer processes via events

relayerFactory := ibctest.NewBuiltinRelayerFactory(ibc.CosmosRly, logger, customImageOption, relayerProcessingOption)

return relayerFactory.Build(
t, dockerClient, network,
)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this function we already had and was just moved.

Comment on lines 130 to 137
if rlyTag == "" {
if relayerType == relayer.Cosmos {
rlyTag = defaultCosmosRelayerTag
}
if relayerType == relayer.Hermes {
// TODO: set default hermes version
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this one env var has to have 2 different defaults depending on the relayer type. If additional relayers are added, this could be moved to a map, with just two I decided to keep it simple.

@chatton chatton marked this pull request as ready for review January 23, 2023 17:03
@codecov-commenter
Copy link

codecov-commenter commented Feb 10, 2023

Codecov Report

Merging #3043 (a35f89c) into main (65f7038) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3043   +/-   ##
=======================================
  Coverage   78.53%   78.54%           
=======================================
  Files         179      179           
  Lines       12436    12440    +4     
=======================================
+ Hits         9767     9771    +4     
  Misses       2243     2243           
  Partials      426      426           
Impacted Files Coverage Δ
modules/apps/29-fee/keeper/grpc_query.go 75.93% <100.00%> (+0.39%) ⬆️
modules/core/keeper/msg_server.go 55.17% <100.00%> (+0.09%) ⬆️

Copy link
Contributor

@crodriguezvega crodriguezvega 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, @chatton. Looking forward to running the tests with hermes as well. :)

Copy link
Contributor

@damiannolan damiannolan left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @chatton!

@chatton chatton merged commit bc963bc into main Feb 13, 2023
@chatton chatton deleted the cian/issue#3041-add-wiring-to-support-running-multiple-relayers-in-our-e2e branch February 13, 2023 11:53
stackman27 pushed a commit to stackman27/ibc-go that referenced this pull request Mar 13, 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.

Add wiring to support running multiple relayers in our E2E
5 participants