Install logging JS app#1932
Conversation
|
install_js_app@15817 aka 20201126.18 vs master ewma over 50 builds from 15287 to 15812 |
| "$INSTALL_PREFIX"/bin/sandbox.sh --verbose & | ||
|
|
||
| # Wait for service to be open | ||
| sleep 45 |
There was a problem hiding this comment.
That seems like a long time, but I guess we don't have a convenient file to wait on anymore.
There was a problem hiding this comment.
Yes I think we should find a better way to wait. We could grep the output of sandbox.sh, or wait for some file to be written by the infra, or have a separate util (in bash or Python) which polls the node until it seems active?
There was a problem hiding this comment.
Good point. I've added a quick check for the service being open with curl.
| source env/bin/activate | ||
| python -m pip install -U -r "$INSTALL_PREFIX"/bin/requirements.txt | ||
| python -m pip install ../../../python | ||
| python ../../../python/tutorial.py ./workspace/sandbox_0/0.ledger/ ./workspace/sandbox_common/ |
There was a problem hiding this comment.
Maybe the waiting ought to happen at the top of tutorial, using the client timeout logic we have in Python anyway?
There was a problem hiding this comment.
As discussed above, we wait for service opening directly inside test_install.sh (where the sleep ... was). I believe this is neater and keeps the tutorial.py untouched.
|
Looks like the daily build failed when testing the install: https://dev.azure.com/MSRC-CCF/CCF/_build/results?buildId=15807&view=logs&j=5435e0ac-25e5-5426-50be-61b0d0ea8d34&t=fe98d859-2537-5570-75af-de67d4290f3a Investigating this now to find out what the issue is. |
| done | ||
|
|
||
| extra_args=("$@") | ||
| if [ ${is_package_specified} == false ] && [ -f "${VERSION_FILE}" ]; then |
There was a problem hiding this comment.
This change makes behaviour different for build vs install tree when only --js-app-bundle is given because the extra args here are added after the user args, overriding them and starting the wrong app.

The primary goal of this PR is to install the logging JS application so that a test CCF service running a simple application can be run with the sandbox. In other words, it is now possible to install the CCF debian package and run the
sandbox.shscript (with no arguments) to get a virtual CCF test service running the logging JS app.Other changes:
loggingapp fromsrc/apps/tosamples/apps/simplebankapp fromsamples/appstosrc/appstest_install.shscript now makes use of sandbox/log/publicendpoints weren't reachable