diff --git a/.github/workflows/backend_check.yml b/.github/workflows/backend_check.yml index 939874d96..387289912 100644 --- a/.github/workflows/backend_check.yml +++ b/.github/workflows/backend_check.yml @@ -37,7 +37,7 @@ jobs: override: true - name: Rust Cache - uses: Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # v2.7.1 + uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3 with: workspaces: backend diff --git a/.github/workflows/backend_docs.yml b/.github/workflows/backend_docs.yml index 15102f73b..1774d1560 100644 --- a/.github/workflows/backend_docs.yml +++ b/.github/workflows/backend_docs.yml @@ -37,7 +37,7 @@ jobs: override: true - name: Rust Cache - uses: Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # v2.7.1 + uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3 with: workspaces: backend diff --git a/.github/workflows/backend_tests.yml b/.github/workflows/backend_tests.yml index 34b89c4cc..25bb8dba5 100644 --- a/.github/workflows/backend_tests.yml +++ b/.github/workflows/backend_tests.yml @@ -37,7 +37,7 @@ jobs: override: true - name: Rust Cache - uses: Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # v2.7.1 + uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3 with: workspaces: backend diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7b0d4cc36..39ec6ec75 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,16 +12,6 @@ variables: CONTAINER_REPO: "" DOCKERFILE_DIRECTORY: "" - # Deploy Variables (Mandatory) - HELM_NAMESPACE: "substrate-telemetry" - HELM_RELEASE_NAME: "substrate-telemetry" - HELM_CHART: "parity/substrate-telemetry" - - # Deploy Variables (Optional) - HELM_REPO_NAME: "parity" - HELM_REPO_URL: "https://paritytech.github.io/helm-charts/" - HELM_CONFIGMAP_NAME: "helm-custom-values" - HELM_CONFIGMAP_KEYNAME: "values-parity.yaml" # Manual Variables (Optional) ## Could be used in the webconsole when triggering the pipeline manually @@ -114,37 +104,21 @@ stages: - kubernetes-parity-build .deploy: &deploy - image: paritytech/kubetools:3.5.3 + image: quay.io/argoproj/argocd:v2.7.9 + variables: + ARGOCD_OPTS: --grpc-web --grpc-web-root-path /$ENVIRONMENT + APP: substrate-telemetry + environment: + name: $ENVIRONMENT script: - - |- - echo generating an empty custom-values.yaml file - touch custom-values.yaml - - |- - echo fetching the custom values file from the configmap if HELM_CONFIGMAP_NAME is specified - if [[ $HELM_CONFIGMAP_NAME ]]; then - # escape dot characters - HELM_CONFIGMAP_KEYNAME=`echo $HELM_CONFIGMAP_KEYNAME | sed 's/\./\\\./g'` - kubectl get cm $HELM_CONFIGMAP_NAME -n $HELM_NAMESPACE -o jsonpath="{.data.$HELM_CONFIGMAP_KEYNAME}" \ - > custom-values.yaml - fi - - |- - echo adding the helm repository if HELM_REPO_URL is specified - if [[ $HELM_REPO_URL ]]; then - helm repo add $HELM_REPO_NAME $HELM_REPO_URL - helm repo update - fi - - echo installing the helm chart - - helm upgrade - --install - --atomic - --timeout 300s - --namespace $HELM_NAMESPACE - --values custom-values.yaml - --set image.backend.repository="${CONTAINER_REPO_BACKEND}" - --set image.backend.tag="${DOCKER_IMAGE_TAG}" - --set image.frontend.repository="${CONTAINER_REPO_FRONTEND}" - --set image.frontend.tag="${DOCKER_IMAGE_TAG}" - ${HELM_RELEASE_NAME} ${HELM_CHART} + - argocd app list + - argocd app set $APP + --helm-set substrate-telemetry.image.backend.repository="${CONTAINER_REPO_BACKEND}" + --helm-set substrate-telemetry.image.backend.tag="${DOCKER_IMAGE_TAG}" + --helm-set substrate-telemetry.image.frontend.repository="${CONTAINER_REPO_FRONTEND}" + --helm-set substrate-telemetry.image.frontend.tag="${DOCKER_IMAGE_TAG}" + - argocd app sync $APP + - argocd app wait $APP --timeout 180 tags: - kubernetes-parity-build @@ -205,10 +179,9 @@ deploy-commit-to-staging: variables: CONTAINER_REPO_BACKEND: "docker.io/paritypr/substrate-telemetry-backend" CONTAINER_REPO_FRONTEND: "docker.io/paritypr/substrate-telemetry-frontend" + ENVIRONMENT: "parity-stg" stage: deploy-commit-to-staging - <<: *deploy - environment: - name: parity-stg + extends: .deploy rules: - if: '$CI_COMMIT_BRANCH =~ /^[0-9]+/' when: manual @@ -218,10 +191,9 @@ deploy-master-to-staging: variables: CONTAINER_REPO_BACKEND: "docker.io/parity/substrate-telemetry-backend" CONTAINER_REPO_FRONTEND: "docker.io/parity/substrate-telemetry-frontend" + ENVIRONMENT: "parity-stg" stage: deploy-master-to-staging - <<: *deploy - environment: - name: parity-stg + extends: .deploy rules: - if: '$CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+.*$/' # i.e. v1.0, v2.1rc1 - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' @@ -231,10 +203,9 @@ deploy-production: variables: CONTAINER_REPO_BACKEND: "docker.io/parity/substrate-telemetry-backend" CONTAINER_REPO_FRONTEND: "docker.io/parity/substrate-telemetry-frontend" + ENVIRONMENT: "parity-prod" stage: deploy-production - <<: *deploy - environment: - name: parity-prod + extends: .deploy rules: - if: '$CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+.*$/' # i.e. v1.0, v2.1rc1 when: manual diff --git a/backend/telemetry_core/src/GeoLite2-City.mmdb b/backend/telemetry_core/src/GeoLite2-City.mmdb index 0bd679ad7..861044123 100644 Binary files a/backend/telemetry_core/src/GeoLite2-City.mmdb and b/backend/telemetry_core/src/GeoLite2-City.mmdb differ diff --git a/backend/telemetry_core/src/find_location.rs b/backend/telemetry_core/src/find_location.rs index fcec10b15..1c8800f64 100644 --- a/backend/telemetry_core/src/find_location.rs +++ b/backend/telemetry_core/src/find_location.rs @@ -81,13 +81,15 @@ struct Locator { } impl Locator { - /// GeoLite database release data: 2023-10-13 - /// + /// GeoLite database release data: 2024-03-29 + /// Database and Contents Copyright (c) 2024 MaxMind, Inc. /// To download the latest version visit: https://dev.maxmind.com/geoip/geolite2-free-geolocation-data. /// - /// This database incorporates GeoNames [https://www.geonames.org] geographical data, which is made available - /// under the Creative Commons Attribution 4.0 License. - /// To view a copy of this license,visit https://creativecommons.org/licenses/by/4.0/. + /// Use of this MaxMind product is governed by MaxMind's GeoLite2 End User License Agreement, + /// which can be viewed at https://www.maxmind.com/en/geolite2/eula. + /// This database incorporates GeoNames [https://www.geonames.org] geographical data, + /// which is made available under the Creative Commons Attribution 4.0 License. + /// To view a copy of this license, visit https://creativecommons.org/licenses/by/4.0/. const CITY_DATA: &'static [u8] = include_bytes!("GeoLite2-City.mmdb"); pub fn new(cache: FxHashMap>) -> Self { @@ -144,6 +146,6 @@ mod tests { fn locate_random_ip() { let ip = "12.5.56.25".parse().unwrap(); let node_location = Locator::new(Default::default()).locate(ip).unwrap(); - assert_eq!(&*node_location.city, "Riverside"); + assert_eq!(&*node_location.city, "Gardena"); } } diff --git a/backend/telemetry_core/tests/e2e_tests.rs b/backend/telemetry_core/tests/e2e_tests.rs index 5248321c4..5b88e9be4 100644 --- a/backend/telemetry_core/tests/e2e_tests.rs +++ b/backend/telemetry_core/tests/e2e_tests.rs @@ -463,7 +463,7 @@ async fn e2e_feed_add_and_remove_shard() { })) .unwrap(); - // Keep what we need to to keep connection alive and let us kill a shard: + // Keep what we need to keep connection alive and let us kill a shard: shards.push((shard_id, node_tx)); } diff --git a/backend/test_utils/src/server/server.rs b/backend/test_utils/src/server/server.rs index 293422487..495ffbed0 100644 --- a/backend/test_utils/src/server/server.rs +++ b/backend/test_utils/src/server/server.rs @@ -84,7 +84,7 @@ pub enum ServerMode { shards: DenseMap, }, ConnectToExistingMode { - /// The hosts that we can connect to to submit things. + /// The hosts that we can connect to submit things. submit_hosts: Vec, /// Which host do we use next (we'll cycle around them /// as shards are "added"). diff --git a/frontend/src/components/List/Column/ImplementationColumn.tsx b/frontend/src/components/List/Column/ImplementationColumn.tsx index 4b1ff8a80..e28bf8acf 100644 --- a/frontend/src/components/List/Column/ImplementationColumn.tsx +++ b/frontend/src/components/List/Column/ImplementationColumn.tsx @@ -40,6 +40,7 @@ import totemIcon from '../../../icons/totem.svg'; import nodleIcon from '../../../icons/nodle.svg'; import zeroIcon from '../../../icons/zero.svg'; import crustIcon from '../../../icons/crust.svg'; +import gossamerIcon from '../../../icons/gossamer.svg'; const ICONS = { 'parity-polkadot': parityPolkadotIcon, @@ -66,6 +67,7 @@ const ICONS = { 'Nodle Chain Node': nodleIcon, subzero: zeroIcon, Crust: crustIcon, + Gossamer: gossamerIcon, }; const SEMVER_PATTERN = /^\d+\.\d+\.\d+/; diff --git a/frontend/src/components/List/Column/NetworkIdColumn.tsx b/frontend/src/components/List/Column/NetworkIdColumn.tsx index b3a01ea57..0b13cdafa 100644 --- a/frontend/src/components/List/Column/NetworkIdColumn.tsx +++ b/frontend/src/components/List/Column/NetworkIdColumn.tsx @@ -18,8 +18,7 @@ import * as React from 'react'; import { Maybe } from '../../../common'; import { ColumnProps } from './'; import { Node } from '../../../state'; -import { Truncate } from '../../'; -import { Tooltip } from '../../'; +import { Tooltip, TooltipCopyCallback } from '../../'; import icon from '../../../icons/fingerprint.svg'; export class NetworkIdColumn extends React.Component { @@ -30,6 +29,7 @@ export class NetworkIdColumn extends React.Component { public static readonly sortBy = ({ networkId }: Node) => networkId || ''; private data: Maybe; + private copy: Maybe; public shouldComponentUpdate(nextProps: ColumnProps) { return this.data !== nextProps.node.networkId; @@ -45,10 +45,22 @@ export class NetworkIdColumn extends React.Component { } return ( - - - + + + {networkId} ); } + + private onCopy = (copy: TooltipCopyCallback) => { + this.copy = copy; + }; + + private onClick = (event: React.MouseEvent) => { + event.stopPropagation(); + + if (this.copy != null) { + this.copy(); + } + }; } diff --git a/frontend/src/icons/gossamer.svg b/frontend/src/icons/gossamer.svg new file mode 100644 index 000000000..7d0f16181 --- /dev/null +++ b/frontend/src/icons/gossamer.svg @@ -0,0 +1,24 @@ + + + + + +