-
Notifications
You must be signed in to change notification settings - Fork 3
Add monitoring and some housekeeping #156
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
base: main
Are you sure you want to change the base?
Changes from all commits
601bb50
26d36d3
01a1263
f0ef07f
77f19f2
e64ae62
f9a32c4
af07e92
933b7a7
c259e00
ec185cc
8e7bc5b
9511cab
56e2027
6828443
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,15 +14,15 @@ help: | |
| @echo "Docs are in the README and the repo: https://github.com/paritytech/ahm-dryrun\n" | ||
| @just --list --unsorted | ||
|
|
||
| # Initial setup after you cloned the repo. Run it once. | ||
| # Initialize or update the submodules. | ||
| init: | ||
| git submodule update --init --recursive | ||
|
|
||
| # Install all dependencies. Run it once. | ||
| setup: | ||
| git submodule update --remote --merge | ||
| # Install all dependencies. Run it when changing branches or pulling. | ||
| setup: init | ||
| just install-doppelganger | ||
| just install-zombie-bite | ||
| just install-monitor | ||
|
|
||
| # ------------------------- INSTALLING DEPENDENCIES ------------- | ||
|
|
||
|
|
@@ -32,12 +32,21 @@ install-doppelganger: | |
| --bin doppelganger-parachain \ | ||
| --bin polkadot-execute-worker \ | ||
| --bin polkadot-prepare-worker \ | ||
| --locked --root ${DOPPELGANGER_PATH} | ||
| --locked --force --root ${DOPPELGANGER_PATH} | ||
|
|
||
| # Install the `zombie-bite` binary on your system. | ||
| install-zombie-bite: | ||
| cargo install --git https://github.com/pepoviola/zombie-bite --bin zombie-bite --locked --force | ||
|
|
||
| # Install the AHM Monitor | ||
| install-monitor: | ||
| mkdir -p ./ahm-monitor/backend/data | ||
| cd ahm-monitor/backend \ | ||
| && npm install \ | ||
| && npm run migrate \ | ||
| && npm run push \ | ||
| && npm run build | ||
|
|
||
| # ------------------------- BUILDING RUNTIMES ------------------- | ||
|
|
||
| # only run once, per the runtime that you want to test. | ||
|
|
@@ -61,3 +70,20 @@ build runtime: | |
|
|
||
| e2e-tests *TEST: | ||
| cd ${PET_PATH} && yarn && yarn test {{ TEST }} | ||
|
|
||
| # ------------------------- CLEANING UP ------------------------- | ||
|
|
||
| # Clean up some generated clutter. | ||
| clean: | ||
| rm -rf migration-run-* | ||
| git checkout HEAD -- .papi/descriptors/{package.json,dist/{index.d.ts,index.js,index.mjs}} | ||
| rm -f zombie-bite/doppelganger/{.crates.toml,.crates2.json} | ||
|
|
||
| # Clean up everything. | ||
| clean-harder: clean | ||
|
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. yeah man, I would love this :)) the repo still generates so many things that should be git-ignored on each run. |
||
| rm -f package-lock.json .package.json.sum | ||
| rm -rf logs node_modules dist | ||
| rm -rf paseo-runtimes/target | ||
| rm -rf runtimes/target | ||
| rm -rf polkadot-ecosystem-tests/node_modules | ||
| rm -rf ahm-monitor/backend/{node_modules,dist,data} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,13 +40,6 @@ _npm-build: | |
| sha256sum -c .package.json.sum || (npm install && sha256sum package.json > .package.json.sum && echo "✅ npm install" && echo "✅ sha256sum saved") | ||
| npm run build | ||
|
|
||
| # (Untested) Run the Asset Hub Migration Monitor | ||
| # Run the Asset Hub Migration Monitor | ||
| monitor: | ||
| @echo "Currently not implemented, please check https://github.com/paritytech/asset-hub-migration-monitor" | ||
| @echo "You can run the following commands to run the monitor:\n" | ||
| @echo "git clone https://github.com/paritytech/asset-hub-migration-monitor && cd asset-hub-migration-monitor" | ||
| @echo "export ASSET_HUB_URL="ws://localhost:9945"" | ||
| @echo "export RELAY_CHAIN_URL="ws://localhost:9944"" | ||
| @echo "just run-backend" | ||
| @echo "open https://migration.paritytech.io/?backend_url=http://localhost:3000" | ||
| # TODO @donal: Monitoring here | ||
| cd ahm-monitor/backend && yarn run start | ||
|
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. Yarn here vs npm above? will it cause issues? 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. yarn is enforced in the overall package.json, I found a way round it (it's basically just for tests) but forgot to revert this line |
||
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.
&&instead of#!/usr/bin/env bash+set -efor brevity or why?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.
&&really mainly for staying in same dir,justruns each line of a recipe with working directory as the root. I.e. herecdchanges directory from the root toahm-monitor/backend, then the next line is run in the root:you'd end up with the behaviour of
touch ./test, rather than the expectedtouch ./tmp/testYou can fix it with a shebang so it runs it all in the same instance, but I slightly prefer this as the recipes are then consistent, rather than throwing a shebang into some recipes but not others. don't feel too strongly about it though, happy to change if you think it's better style