751 Commits

Author SHA1 Message Date
arshamparity 83aca45509 CI - enabling deploy-production stage (#409) 2021-09-22 17:10:36 +03:00
arshamparity ec4c986501 fixing gitlab-ci (#407) 2021-09-21 18:54:05 +03:00
James Wilson b4b128f9fe Tidy up stale connections. (#406)
* If messageId changes and network ID doesn't, remove 'old' message_id

* Boot nodes/connection when no recent messages received for it

* Separate task needed for soketto recv to avoid cancel-safety issues with new interval

* Wee tidy up

* cargo fmt

* Add some logging around node adding/removing

* Another log info msg

* a bit of tidy up

* bump stale node timeout to 60s
2021-09-21 15:49:42 +01:00
arshamparity 0bf1968fa3 adding dual deployment gitlab-ci (#402)
* adding dual deployment gitlab-ci

* adding the vault tempalte to the build stages

* fix typo

Co-authored-by: James Wilson <james@jsdw.me>

* fix typo

Co-authored-by: James Wilson <james@jsdw.me>

* adding variables to deploy-production stage

* fix

Co-authored-by: James Wilson <james@jsdw.me>
2021-09-21 11:45:37 +03:00
Sergejs Kostjucenko e0ad18a5ad Change CI to use Vault secrets (#400) 2021-09-15 12:59:32 +03:00
James Wilson 0b0cec0512 Make soak tests work again now that we subscribe by genesis hash (#399)
* Make soak tests work again with genesis hash subscribing

* cargo fmt

* derive hex from hash

* actually compile code

* fmt

Co-authored-by: David Palm <dvdplm@gmail.com>
2021-09-10 11:28:34 +01:00
cybai 3ea2f88b19 Make Tooltip as a function component with react hooks (#391)
* Refactor `Tooltip` into function component with hooks

With using hooks, we don't need to maintain the checking in sCU and also
don't need to assign the value of `ref` manually.

* Show block number beside the tooltip instead of its children
2021-09-09 13:02:10 +02:00
James Wilson fe19a75414 Un-brittle-ify backend E2E tests and have them run by default again in CI (#397)
* test running tests

* Add delay so that core knows about node before feed subscribes to limit chance of race

* move delaye to the right place

* Don't do expensive docker step untill we will be pushing the image

* docker test skipped as hoped, so push to 'true'

* just remove docker steps in github CI entirely since they aren't needed by anything (gitlab CI does this stuff now)

* run CI on pull requests too to catch PRs from forks
2021-09-06 11:30:17 +01:00
James Wilson a3ffaf3c44 Flume fix part 2: avoid using flume in a couple of cases, and revert attempted fix#1 (#396)
* A second attempt to avoid the flume memory leak, since the first didn't actually work

* No luck with second flume fix, so revert to futures::mpsc in a few places)

* cargo fmt

* Add a comment to cover use of into_stream
2021-09-03 15:55:25 +01:00
James Wilson 2932075783 Avoid using flume::Receiver::into_stream() to avoid memory leaks until the issue is resolved upstream (#394)
* Tweak rolling_total test to also confirm capacity doesn't go nuts

* Use Jemalloc

* Avoid flume's into_stream and use a workaround for now

* cargo fmt

* Improve comments now that there's an issue to point to
2021-09-03 08:40:43 +01:00
Maciej Hirsz a4069e4b3d Subscribe to chains by genesis hash (#395)
* Handle subscription by hash in the frontend

* Forward-ported backend changes

* Fix unit tests

* Remove unused `chains_by_label`

* fmt

* Updated but failing E2E tests

* subscribe by genesis hash in tests

* fmt

* Copy `BlockHash` instead of returning a ref

* Pin chains by genesisHash

Co-authored-by: James Wilson <james@jsdw.me>
2021-09-02 17:54:19 +02:00
James Wilson ec5db0fbbf Bump tokio to 1.10 and add a test to confirm memory usage of rolling_total (#392) 2021-08-31 20:18:46 +02:00
arshamparity 699c19736f Gitlab ci (#390)
* adding values-parity.yaml to the project again

* removing the custom values file

* replacing the namespace with variable

* removing the default configuration for frontend nginx

* fixing the CI
2021-08-31 16:11:13 +03:00
cybai d477cb8045 frontend: Upgrade TypeScript from 2.9.2 to 4.4.2 (#387)
* Upgrade TS from 2.9.2 to 4.4.2

* Avoid mutating a readonly array

`list` is a readonly array but `sort` will mutate the array in-place.
In newer version of TS, it can catch this unexpected behavior.

To avoid mutating a readonly array, we can sort with a new array with
either `[...list]` or `list.slice()`.

* Fix arguments of `window.location.reload`

The `reload` function type definition in `lib.dom.d.ts` takes 0
arguments now. So, we cannot pass a boolean to it.

Also, based on the documentation on MDN, Firefox is the only browser who
supports passing a `forceForget` boolean to `reload` function.
So, I wonder it should be fine to remove the boolean argument and align
the behavior to other browsers.

Ref: https://developer.mozilla.org/en-US/docs/Web/API/Location/reload
2021-08-27 16:33:42 +01:00
James Wilson 87866b2d42 Improve logging and error reporting around IP and location info (#386)
* Beef up error reporting of IP and location info

* Tidy up error reporting after some manual testing of it

* Don't cache erroneous locations; try again when asked again

* cargo fmt
2021-08-27 16:16:26 +01:00
arshamparity fc73a2f27a removing the default nginx configuration (#385)
* adding values-parity.yaml to the project again

* removing the custom values file

* replacing the namespace with variable

* removing the default configuration for frontend nginx
2021-08-27 16:10:16 +03:00
arshamparity 0ed652a827 adding values-parity.yaml to the project again (#382)
* adding values-parity.yaml to the project again

* removing the custom values file

* replacing the namespace with variable
2021-08-27 10:46:07 +03:00
James Wilson 7a3e30cb01 Don't remove all feeds subscribed to a chain when one disconnects (#383)
* Only remove the feed that disconnected to not break the rest...

* use multimap struct to avoid sync issues between feed and chain

* add a remove test, too

* cargo fmt

* fix name of test

* move multimap to common so we can doctest it and add 'unique' to name

* cargo fmt

* Return old key if value moved to make uniqueness more obvious
2021-08-27 08:05:44 +01:00
Chevdor 19db1a48ef Hardening of the Backend docker image (#379)
* Add script to build the backend
* harden the backend docker image
* fix docker-compose
* fix doc
2021-08-26 14:32:11 +02:00
Chevdor 238d529eae Hardening of the Frontend docker image (#377)
* move the env-config script to a sub folder
* fix doc
* fix ports and ref to the official image
* add hardening to the docker-compose examples
2021-08-26 12:20:01 +02:00
arshamparity c201ece634 Merge pull request #376 from arshamparity/master
gitlab-ci: changing docker repositories
2021-08-25 14:11:00 +03:00
Arsham Teymouri 4fe1aabea2 added beta postfix to docker tags 2021-08-25 13:20:40 +03:00
Arsham Teymouri bcd9f32b18 removing the latest tag 2021-08-25 13:11:33 +03:00
Arsham Teymouri 427ae445e5 gitlab-ci: changing docker repositories 2021-08-24 11:38:50 +03:00
arshamparity 05f165e148 Merge pull request #374 from arshamparity/master
removing the helm chart
2021-08-23 19:55:59 +03:00
Arsham Teymouri a74f21afd3 remove --version from helm upgrade commands 2021-08-23 16:04:43 +03:00
Arsham Teymouri 0a758c10ed pushing the image with additional latest tag 2021-08-23 13:48:30 +03:00
Arsham Teymouri 20dfc13186 adding latest tag to buildah 2021-08-23 13:26:28 +03:00
Arsham Teymouri dd38a08e0f fixing CI 2021-08-23 12:08:49 +03:00
Arsham Teymouri f86ef16c66 moved helm values file address to masked variables 2021-08-23 11:49:58 +03:00
Arsham Teymouri cfe1363958 removing the helm chart 2021-08-23 11:26:12 +03:00
Niklas Adolfsson 64816c14e5 Merge pull request #362 from paritytech/dependabot/npm_and_yarn/frontend/path-parse-1.0.7
chore(deps): bump path-parse from 1.0.6 to 1.0.7 in /frontend
2021-08-16 17:17:00 +02:00
Niklas Adolfsson edbba7e3b7 Merge pull request #363 from paritytech/dependabot/npm_and_yarn/frontend/url-parse-1.5.3
Bump url-parse from 1.4.7 to 1.5.3 in /frontend
2021-08-16 17:16:35 +02:00
Niklas Adolfsson 5d361a1868 Merge pull request #364 from paritytech/dependabot/npm_and_yarn/frontend/ws-5.2.3
Bump ws from 5.2.2 to 5.2.3 in /frontend
2021-08-16 17:16:07 +02:00
James Wilson 1e05000e8d Merge pull request #372 from arshamparity/fix-ci
fixing the ci
2021-08-16 16:01:29 +01:00
Arsham Teymouri 01d7318731 fixing the ci 2021-08-16 17:57:49 +03:00
James Wilson 01748185f0 Merge pull request #371 from arshamparity/helm-servicemonitor
Helm servicemonitor
2021-08-16 15:46:17 +01:00
Arsham Teymouri 0b4ca0903f remove nginx configs as they are copied to the container in the build time 2021-08-16 17:40:43 +03:00
Arsham Teymouri a620b8eb5d remove swp file 2021-08-16 17:16:23 +03:00
Arsham Teymouri 1a16f06df0 tweaking nginx conf 2021-08-16 16:42:33 +03:00
James Wilson c0bceb7fc0 Merge pull request #368 from paritytech/jsdw-simpler-docker
Simplify Helm/Docker usage
2021-08-16 14:26:32 +01:00
James Wilson 701a431ac1 Remove parity specific bit in nginx file (not needed anyway), name default network, tweak a dockerfile comment 2021-08-16 14:08:28 +01:00
Arsham Teymouri 3e8e7e40ec adding servicemonitor for the core service
changing the ci to trigger automatically
2021-08-16 09:46:27 +03:00
James Wilson 65eac5c3e8 Add env to frontend image of docker-compose (since it doesnt proxy internally now) 2021-08-14 12:15:49 +01:00
James Wilson 53f7769146 Make frontend nginx conf suitable for k8s or local deployment (no need for 'old' deployment bits) 2021-08-14 11:57:52 +01:00
James Wilson 8793d0fd5b pass the feed URL via env var rather than config map so that standalone Docker usage is simplified 2021-08-14 11:32:48 +01:00
James Wilson 502fd2e91a Merge pull request #367 from paritytech/jsdw-sharding-gatekeeper
Flume, Metrics and Message control when overloaded
2021-08-13 14:35:43 +01:00
James Wilson 46b0641dfd Clarify wording 2021-08-13 11:45:03 +01:00
James Wilson 77460ffc27 cargo fmt 2021-08-13 11:35:24 +01:00
James Wilson b842c7fc8b expose dropped message counts and fix some typos/wording 2021-08-13 11:33:53 +01:00