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

Enhancement: Nightly e2e test upload #3849

Merged
merged 11 commits into from
Apr 11, 2022
Merged

Enhancement: Nightly e2e test upload #3849

merged 11 commits into from
Apr 11, 2022

Conversation

AlgoStephenAkiki
Copy link
Contributor

@AlgoStephenAkiki AlgoStephenAkiki commented Mar 30, 2022

Every night, the e2e test results should be uploaded to the s3 bucket so that indexer tests can be run against the latest test results.

Resolves #940

Adds a keep temps flag to the build to allow for the indexer to have
updated test packages
@codecov-commenter
Copy link

codecov-commenter commented Apr 11, 2022

Codecov Report

Merging #3849 (f678cd6) into master (d8ea805) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #3849      +/-   ##
==========================================
- Coverage   49.99%   49.98%   -0.01%     
==========================================
  Files         393      393              
  Lines       68390    68390              
==========================================
- Hits        34190    34186       -4     
- Misses      30463    30469       +6     
+ Partials     3737     3735       -2     
Impacted Files Coverage Δ
ledger/blockqueue.go 82.18% <0.00%> (-2.88%) ⬇️
agreement/cryptoVerifier.go 68.08% <0.00%> (-2.13%) ⬇️
agreement/proposalManager.go 96.07% <0.00%> (-1.97%) ⬇️
cmd/tealdbg/debugger.go 71.42% <0.00%> (-0.99%) ⬇️
ledger/acctupdates.go 68.51% <0.00%> (-0.66%) ⬇️
network/wsPeer.go 68.05% <0.00%> (ø)
catchup/service.go 69.38% <0.00%> (ø)
network/wsNetwork.go 62.99% <0.00%> (+0.19%) ⬆️
data/transactions/verify/txn.go 45.02% <0.00%> (+0.86%) ⬆️
catchup/peerSelector.go 100.00% <0.00%> (+1.04%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d8ea805...f678cd6. Read the comment docs.

@AlgoStephenAkiki AlgoStephenAkiki changed the title Nightly/auto e2e Enhancement: Nightly e2e test upload Apr 11, 2022
@AlgoStephenAkiki AlgoStephenAkiki marked this pull request as ready for review April 11, 2022 16:54
@AlgoStephenAkiki
Copy link
Contributor Author

@algojack Please leave comments showing how to enable only for nightly builds.

Copy link
Contributor

@winder winder left a comment

Choose a reason for hiding this comment

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

Looks close. The main thing left is making sure it only runs for the nightly build. Maybe KEEP_TEMPS is still good when combined with the arm64 test.

Comment on lines 161 to 179
if [ $E2E_PLATFORM == "arm64" ]; then
echo "Keeping temporary running"
"${TEMPDIR}/ve/bin/python3" e2e_client_runner.py --keep-temps ${RUN_KMD_WITH_UNSAFE_SCRYPT} "$SRCROOT"/test/scripts/e2e_subs/*.{sh,py}

pushd "${TEMPDIR}" || exit 1

aws configure list

tar -j -c -f net_done.tar.bz2 --exclude node.log --exclude agreement.cdv net
rm -rf "${TEMPDIR}/net"
RSTAMP=$(TZ=UTC python -c 'import time; print("{:08x}".format(0xffffffff - int(time.time() - time.mktime((2020,1,1,0,0,0,-1,-1,-1)))))')
echo aws s3 cp --acl public-read "${TEMPDIR}/net_done.tar.bz2" s3://algorand-testdata/indexer/e2e4/"${RSTAMP}"/net_done.tar.bz2
aws s3 cp "${TEMPDIR}/net_done.tar.bz2" s3://algorand-testdata/indexer/e2e4/"${RSTAMP}"/net_done.tar.bz2
# aws s3 cp "${TEMPDIR}/net_done.tar.bz2" s3://algorand-testdata-sandbox/indexer/e2e4/"${RSTAMP}"/net_done.tar.bz2
popd

else
"${TEMPDIR}/ve/bin/python3" e2e_client_runner.py ${RUN_KMD_WITH_UNSAFE_SCRYPT} "$SRCROOT"/test/scripts/e2e_subs/*.{sh,py}
fi
Copy link
Contributor

Choose a reason for hiding this comment

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

Use spaces instead of tabs.

Remove commented out test.

Add a comment about why we are using --keep-temps, and that the artifact is used by Indexer.

Could you adjust the code to call e2e_client_runner.py once instead of with an if/else? Pass --keep-temps as a variable like we do with ${RUN_KMD_WITH_UNSAFE_SCRYPT}. This way if we change e2e_client_runner in the future, we don't need to change as many places (i.e. in the lines below we still have *.sh, which might be wrong).

After the job finishes, you can check if "${TEMPDIR}/net" exists and use that to trigger the upload.

@algojack
Copy link
Contributor

talked to Stephen, explained we can remove E2E_PLATFORM: << parameters.platform >> form non-nightly e2e_subs. Other than what Will already said, lgtm

algojack
algojack previously approved these changes Apr 11, 2022
winder
winder previously approved these changes Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants