From 9706b01b16f0087d3c45230f8eee92aa9a9e13b6 Mon Sep 17 00:00:00 2001 From: Nikola Milosavljevic <73236646+NikolaMilosa@users.noreply.github.com> Date: Mon, 17 Jun 2024 14:52:29 +0200 Subject: [PATCH] feat(msd): adding label for api boundary nodes (#483) --- .github/workflows/msd-diff.yaml | 3 +++ .../src/builders/prometheus_config_structure.rs | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/msd-diff.yaml b/.github/workflows/msd-diff.yaml index b37dcb52e..998242d66 100644 --- a/.github/workflows/msd-diff.yaml +++ b/.github/workflows/msd-diff.yaml @@ -15,6 +15,8 @@ jobs: msd-diff: runs-on: labels: dre-runner-custom + # This image is based on ubuntu:20.04 + container: ghcr.io/dfinity/dre/actions-runner:0.2.1 steps: - uses: actions/checkout@v4 with: @@ -32,6 +34,7 @@ jobs: - name: "🔭 Compute MSD" id: msd-diff + shell: bash run: | set -exuo pipefail REGISTRY_DIR_MAIN="$HOME/tmp/main-registry" diff --git a/rs/ic-observability/multiservice-discovery-shared/src/builders/prometheus_config_structure.rs b/rs/ic-observability/multiservice-discovery-shared/src/builders/prometheus_config_structure.rs index 9199ddb53..8d5c49f9d 100644 --- a/rs/ic-observability/multiservice-discovery-shared/src/builders/prometheus_config_structure.rs +++ b/rs/ic-observability/multiservice-discovery-shared/src/builders/prometheus_config_structure.rs @@ -33,6 +33,7 @@ pub const IC_NAME: &str = "ic"; pub const IC_NODE: &str = "ic_node"; pub const IC_SUBNET: &str = "ic_subnet"; pub const JOB: &str = "job"; +pub const API_BOUNDARY_NODE: &str = "api_boundary_node"; // TODO: Re-add the labels below once we resolve the issues with the public dashboard queries // https://dfinity.atlassian.net/browse/OB-442 // const DC: &str = "dc"; @@ -65,6 +66,10 @@ pub fn map_target_group(target_groups: Vec) -> Vec vec![(IC_SUBNET.into(), subnet_id.to_string())], None => vec![], }) + .chain(match tg.is_api_bn { + true => vec![(API_BOUNDARY_NODE.into(), "1".into())], + false => vec![], + }) .chain(tg.custom_labels.clone().into_iter()) .collect() // TODO: Re-add the labels below once we resolve the issues with the public dashboard queries