-
Notifications
You must be signed in to change notification settings - Fork 6
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
fix migration test #81
Conversation
- Rename deploy script used in test to `...ForTest`. - Add missing variable `IS_REVERT` to .env file. - Remove most logs because they are noisy but keep them if DEBUG=true, use DEBUG=true in CI. - Remove repeated calls to `forge update`. - Recursively init submodules to make sure we have submodules of submodules. - Print out how long we are waiting for confirmed nodes. - Output environment variables we are setting.
- Hide docker compose warnings due to orphan containers. These warnings show up a lot because of the ephemeral script containers.
This reverts commit b9e0c81.
@tbro, Jeremy fixed the test it was broken due to my accidental change to one of the scripts used. |
@ImJeremyHe @zacshowa @Sneh1999 this should be ready for review. |
The test output (without DEBUG=true) looks like this now
|
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 👍
function run { | ||
echo -e "\033[34m>>> $*\033[0m" | ||
"$@" 2>&1 | fmt | ||
} | ||
|
||
function cd { | ||
emph "cd $*" | ||
builtin cd "$@" | ||
} | ||
|
||
function emph { | ||
echo -e "\033[34m>>> $*\033[0m\n" | ||
} | ||
|
||
# Display only the last line of piped input, continuously updating | ||
function fmt { | ||
# Leave output unchanged in DEBUG mode | ||
if [ "$DEBUG" = "true" ]; then | ||
cat | ||
return | ||
fi | ||
# rewrite the last line to avoid noisy output | ||
while read -r line; do | ||
tput cr | ||
tput el | ||
echo "$line" | cut -c -"$(tput cols)" | tr -d '\r\n' | ||
done | ||
echo | ||
} | ||
|
||
# Show something with a comment in front, to distinguish it from console output. | ||
function info { | ||
echo "# $@" | ||
} | ||
|
||
# Remove log files on exit | ||
trap "exit" INT TERM | ||
trap cleanup EXIT | ||
function cleanup { | ||
exit_code=$? | ||
if [ $exit_code -ne 0 ]; then | ||
echo | ||
echo "An error occurred." | ||
if [ -s "$ESPRESSO_DEVNODE_LOG_FILE" ]; then | ||
echo "Espresso dev node logs:" | ||
cat "$ESPRESSO_DEVNODE_LOG_FILE" | ||
exit $exit_code | ||
elif [ -s "$TESTNODE_LOG_FILE" ]; then | ||
echo "Nitro testnode logs:" | ||
cat "$TESTNODE_LOG_FILE" | ||
exit $exit_code | ||
fi | ||
else | ||
rm -vf "$TESTNODE_LOG_FILE" | ||
rm -vf "$ESPRESSO_DEVNODE_LOG_FILE" | ||
fi | ||
} |
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.
I love these improvements!
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin celestia-integration
git worktree add -d .worktree/backport-81-to-celestia-integration origin/celestia-integration
cd .worktree/backport-81-to-celestia-integration
git switch --create backport-81-to-celestia-integration
git cherry-pick -x b5932549a1461557bb6e1eba27280ac0605ef50a |
Migration test fixes and improvements.
DeployAndInitEspressoSequencerInbox
migration-test
script