-
Notifications
You must be signed in to change notification settings - Fork 592
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: chain initialization refactor for extensibility #1898
Conversation
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.
Personally untested, but all of the logic here is sound to me. Well done 👍
# Docker ARGs are not expanded in ENTRYPOINT in the exec mode. At the same time, | ||
# it is impossible to add CMD arguments when running a container in the shell mode. | ||
# As a workaround, we create the entrypoint.sh script to bypass these issues. | ||
RUN echo "#!/bin/bash\n${E2E_SCRIPT_NAME} \"\$@\"" >> entrypoint.sh && chmod +x entrypoint.sh |
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.
For my learning, what are the semantics here \"\$@\""
? I have never seen this before.
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.
This is bash syntax for expanding cmd line parameters.
Basically, since we want to call chain init and node init scripts by providing them with certain initialization arguments via Docker, we need to be able to expand them in the bash script.
This post points to a relevant man page about the syntax:
https://stackoverflow.com/questions/3898665/what-is-in-bash
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.
LGTM aside from lack of udnerstanding the added main package
Co-authored-by: Adam Tucker <adam@osmosis.team>
Thanks for the reviews, all comments are addressed so I'm going to merge this. |
Part of: #1879
What is the purpose of the change
Our current chain initialization design does not allow for spinning up single nodes. This functionality is useful for testing feautes like state-sync.
This PR introduced the barebones structure to initialize single nodes via Docker. To build a single node initialization image, run:
Additional information about the new design can be found in
tests/e2e/initialization/README.md
Brief Changelog
initialzation
packageARG
Testing and Verifying
This change is a trivial rework / code cleanup without any test coverage.
Documentation and Release Note
Unreleased
section inCHANGELOG.md
? no