From 51d15bdb32aaaeeb37f9f840e22f8018e0afd30a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Apr 2024 05:33:31 +0000 Subject: [PATCH 1/8] Bump google.golang.org/protobuf from 1.27.1 to 1.33.0 Bumps google.golang.org/protobuf from 1.27.1 to 1.33.0. --- updated-dependencies: - dependency-name: google.golang.org/protobuf dependency-type: indirect ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 8feab985..d42be7bc 100644 --- a/go.mod +++ b/go.mod @@ -40,6 +40,6 @@ require ( github.com/smartystreets/goconvey v1.7.2 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect golang.org/x/sys v0.1.0 // indirect - google.golang.org/protobuf v1.27.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/ini.v1 v1.63.2 // indirect ) diff --git a/go.sum b/go.sum index 291cfaef..4efa008e 100644 --- a/go.sum +++ b/go.sum @@ -511,8 +511,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From c980a8e9f26f14b87d4a895e338e084b161c6770 Mon Sep 17 00:00:00 2001 From: Victoria Martinez de la Cruz Date: Mon, 29 Apr 2024 14:54:13 +0200 Subject: [PATCH 2/8] Bump actions checkout to v4 Bump actions checkout to v4 since Node.js 16 actions are deprecated. We need to update to Node.js 20, which is included in actions/checkout@v4. Also bumps setup-go, actions-goveralls and github-script --- .github/workflows/integration.yml | 8 ++++---- .github/workflows/tests.yml | 12 ++++++------ .github/workflows/updates.yml | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 12309ac4..70ad60ec 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -25,7 +25,7 @@ jobs: PROMETHEUS_IMAGE: prom/prometheus:latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4.1.3 - name: Prepare environment run: | mkdir -p /opt/stack/ @@ -119,7 +119,7 @@ jobs: PROMETHEUS_IMAGE: prom/prometheus:latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4.1.3 - name: Prepare environment run: | mkdir -p /opt/stack/ @@ -217,7 +217,7 @@ jobs: PROMETHEUS_IMAGE: prom/prometheus:latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4.1.3 - name: Prepare environment run: | mkdir -p /opt/stack/ @@ -299,7 +299,7 @@ jobs: RSYSLOG_VOLUME: "--volume ${{ github.workspace }}/ci/service_configs/rsyslog/rsyslog_config.conf:/etc/rsyslog.d/integration.conf:z" steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4.1.3 # start data store services - name: Start Elasticsearch service run: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d1a34cff..4b5bfa4a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -21,10 +21,10 @@ jobs: runs-on: ubuntu-20.04 container: 'quay.io/plmr/sg-core-ci' steps: - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: go-version: '1.20' - - uses: actions/checkout@v3 + - uses: actions/checkout@v4.1.3 #- name: download libraries # run: go mod download - name: golangci-lint @@ -39,7 +39,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4.1.3 # start services - name: Start Elasticsearch service run: | @@ -68,15 +68,15 @@ jobs: --volume ${{ github.workspace }}:$PROJECT_ROOT:z --workdir $PROJECT_ROOT \ $TEST_IMAGE bash $PROJECT_ROOT/ci/unit/run_tests.sh - name: Send coverage - uses: shogo82148/actions-goveralls@v1 + uses: shogo82148/actions-goveralls@v1.8.0 with: path-to-profile: ${{ github.workspace }}/profile.cov image-build: name: Image build runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 - - uses: actions/setup-go@v2 + - uses: actions/checkout@v4.1.3 + - uses: actions/setup-go@v5 with: go-version: '1.20' - name: Verify image builds diff --git a/.github/workflows/updates.yml b/.github/workflows/updates.yml index 24e3b89e..4bcdcd42 100644 --- a/.github/workflows/updates.yml +++ b/.github/workflows/updates.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: update PR with coveralls badge - uses: actions/github-script@v3 + uses: actions/github-script@v7 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | From 04dcb34edd2c234b378222d2f9a17e15c0dad936 Mon Sep 17 00:00:00 2001 From: Emma Foley Date: Tue, 4 Jun 2024 11:23:16 -0400 Subject: [PATCH 3/8] Update repo info for opstools Centos8s went EOL on 31.05.2024 so the packages have been moved to centos vault mirror the repo config we use needs to be updated --- build/repos/opstools.repo | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/repos/opstools.repo b/build/repos/opstools.repo index aee21884..2d95a92d 100644 --- a/build/repos/opstools.repo +++ b/build/repos/opstools.repo @@ -11,8 +11,8 @@ enabled=0 [centos-opstools] name=CentOS-OpsTools - collectd -mirrorlist=http://mirrorlist.centos.org/?arch=$basearch&release=$releasever-stream&repo=opstools-collectd-5 -#baseurl=http://mirror.centos.org/$contentdir/$releasever-stream/opstools/$basearch/collectd-5/ +#mirrorlist=http://mirrorlist.centos.org/?arch=$basearch&release=$releasever-stream&repo=opstools-collectd-5 +baseurl=http://vault.centos.org/$releasever-stream/opstools/$basearch/collectd-5/ gpgcheck=0 enabled=1 skip_if_unavailable=1 From f20ff64891a87b51be09e784fb73763e064d101b Mon Sep 17 00:00:00 2001 From: Chris Sibbitt Date: Tue, 4 Jun 2024 15:30:33 -0400 Subject: [PATCH 4/8] Temporary value to test new opstool repo defs in GHA tests --- .github/workflows/integration.yml | 2 +- .github/workflows/tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 70ad60ec..56d146d6 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -1,7 +1,7 @@ name: Integration testing env: PROJECT_ROOT: /root/go/src/github.com/infrawatch/sg-core - OPSTOOLS_REPO: https://git.centos.org/rpms/centos-release-opstools/raw/c8s-sig-opstools/f/SOURCES/CentOS-OpsTools.repo + OPSTOOLS_REPO: https://raw.githubusercontent.com/infrawatch/sg-core/04dcb34edd2c234b378222d2f9a17e15c0dad936/build/repos/opstools.repo QDR_IMAGE: quay.io/interconnectedcloud/qdrouterd:1.17.0 QDR_VOLUME: "--volume=${{ github.workspace }}/ci/service_configs/qdr:/etc/qpid-dispatch:ro" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4b5bfa4a..91f52ff0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,7 +1,7 @@ name: CI env: PROJECT_ROOT: /root/go/src/github.com/infrawatch/sg-core - OPSTOOLS_REPO: https://git.centos.org/rpms/centos-release-opstools/raw/c8s-sig-opstools/f/SOURCES/CentOS-OpsTools.repo + OPSTOOLS_REPO: https://raw.githubusercontent.com/infrawatch/sg-core/04dcb34edd2c234b378222d2f9a17e15c0dad936/build/repos/opstools.repo LOKI_IMAGE: quay.io/infrawatch/loki:2.4.2 LOKI_VOLUME: "--volume=${{ github.workspace }}/ci/service_configs/loki:/etc/loki:ro" From d8ffe88341407924ef4cdd8723e03072a2b416d6 Mon Sep 17 00:00:00 2001 From: Emma Foley Date: Tue, 4 Jun 2024 15:34:08 -0400 Subject: [PATCH 5/8] [ci] Update integration tests to use vault mirror CentOS 8 Stream is EOL since 31-05-2024 --- ci/integration/logging/run_sg.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ci/integration/logging/run_sg.sh b/ci/integration/logging/run_sg.sh index c6160aad..eb23fe19 100644 --- a/ci/integration/logging/run_sg.sh +++ b/ci/integration/logging/run_sg.sh @@ -7,6 +7,9 @@ set -ex # enable required repo(s) curl -o /etc/yum.repos.d/CentOS-OpsTools.repo $OPSTOOLS_REPO sed -i 's/gpgcheck=1/gpgcheck=0/g' /etc/yum.repos.d/CentOS-OpsTools.repo +# Update to use the vault mirror since Centos 8s is EOL +sed -i 's/^#baseurl.*$/baseurl=http:\/\/vault.centos.org\/$releasever-stream\/opstools\/$basearch\/collectd-5/g' /etc/yum.repos.d/CentOS-OpsTools.repo +sed -i 's/^mirror/#mirror/g' /etc/yum.repos.d/CentOS-OpsTools.repo dnf install -y git golang gcc make qpid-proton-c-devel From 026d3ad8f647f8e4dc1fdd4ec91b2e27787d7bb4 Mon Sep 17 00:00:00 2001 From: Jaromir Wysoglad Date: Wed, 12 Jun 2024 11:08:15 +0200 Subject: [PATCH 6/8] Fix integration CI This disables the logging job. Logging wasn't ever actually used. We can reenable the job if we ever decide it's useful in the future. This also adds some more debug output to other jobs. --- .github/workflows/integration.yml | 8 ++++++++ .github/workflows/tests.yml | 1 - ci/integration/logging/run_bridge.sh | 2 +- ci/integration/metrics/run_bridge.sh | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 56d146d6..ca925243 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -102,6 +102,8 @@ jobs: docker logs qdr echo "========================= sg-core =======================" && \ docker logs sgcore + echo "========================= sg-bridge =======================" && \ + docker logs sgbridge echo "======================== prometheus =====================" && \ docker logs prometheus - name: Validate metrics processing @@ -200,6 +202,8 @@ jobs: docker logs qdr echo "========================= sg-core =======================" && \ docker logs sgcore + echo "========================= sg-bridge =======================" && \ + docker logs sgbridge echo "========================= ceilometer ====================" && \ sudo journalctl -xu devstack@ceilometer-anotification.service echo "======================== prometheus =====================" && \ @@ -283,6 +287,10 @@ jobs: $TEST_IMAGE bash $PROJECT_ROOT/ci/integration/metrics/ceilometer/run_validation.sh #------------------------------------------------------------------------------- logging: + # Disable Logging CI job, because it's failing. This functionality was never + # used in the downstream product. We can re-enable and fix the job if we + # determine the functionality is useful. + if: false name: "[logging] handler: logs; application: elasticsearch, loki" runs-on: ubuntu-22.04 env: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 91f52ff0..a3cef223 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,7 +19,6 @@ jobs: golangci: name: Linting runs-on: ubuntu-20.04 - container: 'quay.io/plmr/sg-core-ci' steps: - uses: actions/setup-go@v5 with: diff --git a/ci/integration/logging/run_bridge.sh b/ci/integration/logging/run_bridge.sh index d6a5f241..b086cd69 100644 --- a/ci/integration/logging/run_bridge.sh +++ b/ci/integration/logging/run_bridge.sh @@ -18,4 +18,4 @@ git checkout $BRANCH || true make touch $BRIDGE_SOCKET -./bridge --amqp_url amqp://localhost:5666/rsyslog/logs --gw_unix=$BRIDGE_SOCKET +./bridge --amqp_url amqp://localhost:5666/rsyslog/logs --gw_unix=$BRIDGE_SOCKET --stat_period 1 diff --git a/ci/integration/metrics/run_bridge.sh b/ci/integration/metrics/run_bridge.sh index fa0e0b68..f25d0672 100644 --- a/ci/integration/metrics/run_bridge.sh +++ b/ci/integration/metrics/run_bridge.sh @@ -20,4 +20,4 @@ git checkout $BRANCH || true make touch $BRIDGE_SOCKET -./bridge --amqp_url amqp://localhost:5666/$CHANNEL --gw_unix=$BRIDGE_SOCKET +./bridge --amqp_url amqp://localhost:5666/$CHANNEL --gw_unix=$BRIDGE_SOCKET --stat_period 1 From 92c34b8530e90a1d1566ce86c8502e900c12f689 Mon Sep 17 00:00:00 2001 From: Jaromir Wysoglad Date: Thu, 13 Jun 2024 15:14:44 +0200 Subject: [PATCH 7/8] Fix sg-bridge in integration CI --- .github/workflows/integration.yml | 6 +++--- ci/integration/logging/run_bridge.sh | 2 +- ci/integration/metrics/run_bridge.sh | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index ca925243..81ae99d8 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -75,7 +75,7 @@ jobs: run: | docker run --name=sgbridge --network host $BRIDGE_VOLUME -d -uroot \ -e GITHUB_REF -e BRIDGE_SOCKET -e QDR_CHANNEL -e OPSTOOLS_REPO \ - --workdir=$(dirname $BRIDGE_SOCKET) \ + --workdir=$(dirname $BRIDGE_SOCKET) --volume ${{ github.workspace }}:$PROJECT_ROOT:z \ $TEST_IMAGE bash $PROJECT_ROOT/ci/integration/metrics/run_bridge.sh - name: Install collectd run: | @@ -171,7 +171,7 @@ jobs: run: | docker run --name=sgbridge --network host $BRIDGE_VOLUME -d -uroot \ -e GITHUB_REF -e BRIDGE_SOCKET -e QDR_CHANNEL -e OPSTOOLS_REPO \ - --workdir=$(dirname $BRIDGE_SOCKET) \ + --workdir=$(dirname $BRIDGE_SOCKET) --volume ${{ github.workspace }}:$PROJECT_ROOT:z \ $TEST_IMAGE bash $PROJECT_ROOT/ci/integration/metrics/run_bridge.sh - name: Set Ceilometer pipelines to QDR output and restart notification agent run: | @@ -334,7 +334,7 @@ jobs: if: steps.bridge_branch.outcome == 'success' run: | docker run --name=sgbridge $BRIDGE_VOLUME -d -uroot --network host -e OPSTOOLS_REPO \ - -e GITHUB_REF -e BRIDGE_SOCKET --workdir=$(dirname $BRIDGE_SOCKET) \ + -e GITHUB_REF -e BRIDGE_SOCKET --workdir=$(dirname $BRIDGE_SOCKET) --volume ${{ github.workspace }}:$PROJECT_ROOT:z \ $TEST_IMAGE bash $PROJECT_ROOT/ci/integration/logging/run_bridge.sh - name: Run rsyslog to produce log messages run: | diff --git a/ci/integration/logging/run_bridge.sh b/ci/integration/logging/run_bridge.sh index b086cd69..59edfa7a 100644 --- a/ci/integration/logging/run_bridge.sh +++ b/ci/integration/logging/run_bridge.sh @@ -8,7 +8,7 @@ set -ex curl -o /etc/yum.repos.d/CentOS-OpsTools.repo $OPSTOOLS_REPO sed -i 's/gpgcheck=1/gpgcheck=0/g' /etc/yum.repos.d/CentOS-OpsTools.repo -dnf install -y git gcc make qpid-proton-c-devel +dnf install -y git gcc make qpid-proton-c-devel redhat-rpm-config # install and start sg-bridge BRANCH="$(echo ${GITHUB_REF#refs/heads/})" diff --git a/ci/integration/metrics/run_bridge.sh b/ci/integration/metrics/run_bridge.sh index f25d0672..0c73d1da 100644 --- a/ci/integration/metrics/run_bridge.sh +++ b/ci/integration/metrics/run_bridge.sh @@ -10,7 +10,7 @@ CHANNEL=$QDR_CHANNEL curl -o /etc/yum.repos.d/CentOS-OpsTools.repo $OPSTOOLS_REPO sed -i 's/gpgcheck=1/gpgcheck=0/g' /etc/yum.repos.d/CentOS-OpsTools.repo -dnf install -y git gcc make qpid-proton-c-devel +dnf install -y git gcc make qpid-proton-c-devel redhat-rpm-config # install and start sg-bridge BRANCH="$(echo ${GITHUB_REF#refs/heads/})" From c1ad7e0b7672dc6a4ae1997b2dd86642875e633b Mon Sep 17 00:00:00 2001 From: "vimartin@redhat.com" Date: Mon, 26 Aug 2024 11:23:27 +0200 Subject: [PATCH 8/8] Update coveralls update job Since github-script v5, the correct syntax for adding a comment is github.rest.issues.createComment instead of github.issues.createComment Also updates the github-script to latest available version --- .github/workflows/updates.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/updates.yml b/.github/workflows/updates.yml index 4bcdcd42..7cad2c5a 100644 --- a/.github/workflows/updates.yml +++ b/.github/workflows/updates.yml @@ -19,12 +19,12 @@ jobs: runs-on: ubuntu-20.04 steps: - name: update PR with coveralls badge - uses: actions/github-script@v7 + uses: actions/github-script@v7.0.1 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | var BRANCH_NAME = process.env.BRANCH_NAME; - github.issues.createComment({ + github.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo,