-
Notifications
You must be signed in to change notification settings - Fork 45
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
Chain Upgrade Test #163
Closed
Closed
Chain Upgrade Test #163
Changes from 23 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
251590c
created upgrade test folder
hannydevelop 0d25ff9
logic for keys creation completed
hannydevelop 3275203
orchestrator file containing instanceName ready
hannydevelop e65bd35
validator file ready
hannydevelop 27451f5
completed genesis file
hannydevelop 4c3b612
chain.go file ready
hannydevelop 0ecc1c4
setup complete
hannydevelop b367bdb
chain spinup test successful
hannydevelop 968db1c
test run works
hannydevelop dcce050
ran golint
hannydevelop 1cc9f31
added SommChainUpgrade to CI
hannydevelop ab261eb
removed nolint:unparam from upgrade_test
hannydevelop b760e3b
changed golangci-lint version
hannydevelop dc541ee
changed package name
hannydevelop ded2cbc
upgrade test works theoretically
hannydevelop bd93714
upgrade suite secluded to run v3.1.1
hannydevelop 7ee9737
worked on github job, test should pass
hannydevelop b916669
updated integration_tests yml and make file
hannydevelop acd993a
fixed 4.0.1 binary
hannydevelop 8f2bfb3
changed version of sommelier to upgrade
hannydevelop 41c6a43
added somm image to make file
hannydevelop 62a476a
sending to somm cellarfee address to avoid remove module error
hannydevelop 5298b61
chain upgrade for sommelier ready for review
hannydevelop e80f083
merged main
hannydevelop File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -398,3 +398,58 @@ fail: | |
@docker logs orchestrator2 > testlogs/orchestrator2.log 2>&1 || true | ||
@docker logs orchestrator3 > testlogs/orchestrator3.log 2>&1 || true | ||
@false | ||
|
||
|
||
##################### | ||
# Upgrade test # | ||
##################### | ||
|
||
ORCHESTRATOR_IMAGE := "ghcr.io/peggyjv/gravity-bridge-orchestrator:v0.3.8" | ||
SOMMELIER_IMAGE := "ghcr.io/peggyjv/sommelier-sommelier:v3.1.0" | ||
ETHEREUM_IMAGE := "ghcr.io/peggyjv/sommelier-hardhat:v3.1.0" | ||
SOMM_IMAGE := hannydevelop/sommelier:4.0.1 | ||
|
||
e2e_build_upgrade_images: e2e_clean_slate | ||
@docker pull $(ORCHESTRATOR_IMAGE) | ||
@docker tag $(ORCHESTRATOR_IMAGE) orchestrator:3.1.0 | ||
@docker build -t sommelier:4.0.1 -f Dockerfile . | ||
@docker pull $(ETHEREUM_IMAGE) | ||
@docker tag $(ETHEREUM_IMAGE) ethereum:3.1.0 | ||
@docker pull $(SOMMELIER_IMAGE) | ||
@docker tag $(SOMMELIER_IMAGE) sommelier:3.1.0 | ||
e2e_clean_upgrade_slate: | ||
@docker rm --force \ | ||
$(shell docker ps -qa --filter="name=ethereum") \ | ||
$(shell docker ps -qa --filter="name=sommelier") \ | ||
$(shell docker ps -qa --filter="name=orchestrator") \ | ||
1>/dev/null \ | ||
2>/dev/null \ | ||
|| true | ||
@docker wait \ | ||
$(shell docker ps -qa --filter="name=ethereum") \ | ||
$(shell docker ps -qa --filter="name=sommelier") \ | ||
$(shell docker ps -qa --filter="name=orchestrator") \ | ||
1>/dev/null \ | ||
2>/dev/null \ | ||
|| true | ||
@docker network prune --force 1>/dev/null 2>/dev/null || true | ||
@cd upgrade_tests && go test -c | ||
|
||
e2e_test_chain: e2e_clean_upgrade_slate | ||
@upgrade_tests/upgrade_tests.test -test.run TestChain -test.failfast -test.v || make -s fail | ||
|
||
e2e_upgrade: e2e_clean_upgrade_slate | ||
@E2E_SKIP_CLEANUP=true upgrade_tests/upgrade_tests.test -test.failfast -test.v -test.run UpgradeTestSuite -testify.m TestSommChainUpgrade || make -s fail | ||
|
||
fail: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This overwrites another task named
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch!! |
||
@echo 'test failed; dumping container logs into ./testlogs for review' | ||
@docker logs ethereum > testlogs/ethereum.log 2>&1 || true | ||
@docker logs sommelier0 > testlogs/sommelier0.log 2>&1 || true | ||
@docker logs sommelier1 > testlogs/sommelier1.log 2>&1 || true | ||
@docker logs sommelier2 > testlogs/sommelier2.log 2>&1 || true | ||
@docker logs sommelier3 > testlogs/sommelier3.log 2>&1 || true | ||
@docker logs orchestrator0 > testlogs/orchestrator0.log 2>&1 || true | ||
@docker logs orchestrator1 > testlogs/orchestrator1.log 2>&1 || true | ||
@docker logs orchestrator2 > testlogs/orchestrator2.log 2>&1 || true | ||
@docker logs orchestrator3 > testlogs/orchestrator3.log 2>&1 || true | ||
@false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
I couldn't find a way to spin up the chain, using their version number. I've initated an upgrade module, containing the `go.mod` and `go.sum` files. Here's how this suite works: | ||
|
||
- Seclude suite to conform previous chain version. | ||
- Run upgrade to current version. | ||
- Interact with upgraded version to ensure upgrade was successful. | ||
|
||
## Usage For Testing New Upgrades | ||
- Change Sommelier and Gravity versions in `go.mod`. | ||
- Work on suite setup files to reflect changes in Sommelier and Gravity. | ||
- Build docker image of the upgrade version. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I think you meant to use the
SOMM_IMAGE
(line 410) var here? Something like "SOMM4_IMAGE" may help disambiguate it from SOMMELIER_IMAGEThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching that, line 410 isn't necessary, I'm removing that in the next commit. As you can see, it's not used here, or anywhere.
I was using it to debug