diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 81ae99d8..8ba1fab6 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://raw.githubusercontent.com/infrawatch/sg-core/04dcb34edd2c234b378222d2f9a17e15c0dad936/build/repos/opstools.repo + OPENSTACK_REPO: https://trunk.rdoproject.org/centos9-caracal/delorean-deps.repo QDR_IMAGE: quay.io/interconnectedcloud/qdrouterd:1.17.0 QDR_VOLUME: "--volume=${{ github.workspace }}/ci/service_configs/qdr:/etc/qpid-dispatch:ro" @@ -10,7 +10,7 @@ env: BRIDGE_IMAGE: quay.io/infrawatch/sg-bridge:latest BRIDGE_VOLUME: "--volume=${{ github.workspace }}/tmp:/tmp/sg-bridge:z" - TEST_IMAGE: registry.access.redhat.com/ubi8 + TEST_IMAGE: registry.access.redhat.com/ubi9 TEST_PORT: "-p 3000:3000" on: [push, pull_request] @@ -22,7 +22,7 @@ jobs: env: QDR_CHANNEL: collectd/metrics BRIDGE_SOCKET: /tmp/sg-bridge/test-socket - PROMETHEUS_IMAGE: prom/prometheus:latest + PROMETHEUS_IMAGE: quay.io/prometheus/prometheus:latest steps: - name: Checkout code uses: actions/checkout@v4.1.3 @@ -74,7 +74,7 @@ jobs: if: steps.bridge_branch.outcome == 'success' run: | docker run --name=sgbridge --network host $BRIDGE_VOLUME -d -uroot \ - -e GITHUB_REF -e BRIDGE_SOCKET -e QDR_CHANNEL -e OPSTOOLS_REPO \ + -e GITHUB_HEAD_REF -e BRIDGE_SOCKET -e QDR_CHANNEL -e OPENSTACK_REPO \ --workdir=$(dirname $BRIDGE_SOCKET) --volume ${{ github.workspace }}:$PROJECT_ROOT:z \ $TEST_IMAGE bash $PROJECT_ROOT/ci/integration/metrics/run_bridge.sh - name: Install collectd @@ -86,7 +86,7 @@ jobs: sudo collectd -C ci/integration/metrics/collectd/collectd.conf - name: Run sg-core to process metrics run: | - docker run --name=sgcore -d -uroot --network host $BRIDGE_VOLUME -e OPSTOOLS_REPO \ + docker run --name=sgcore -d -uroot --network host $BRIDGE_VOLUME -e OPENSTACK_REPO \ --volume ${{ github.workspace }}:$PROJECT_ROOT:z --workdir $PROJECT_ROOT \ $TEST_IMAGE bash $PROJECT_ROOT/ci/integration/metrics/collectd/run_sg.sh - name: Run Prometheus to store metrics @@ -118,7 +118,7 @@ jobs: env: QDR_CHANNEL: anycast/ceilometer/metering.sample BRIDGE_SOCKET: /tmp/sg-bridge/test-socket - PROMETHEUS_IMAGE: prom/prometheus:latest + PROMETHEUS_IMAGE: quay.io/prometheus/prometheus:latest steps: - name: Checkout code uses: actions/checkout@v4.1.3 @@ -170,7 +170,7 @@ jobs: if: steps.bridge_branch.outcome == 'success' run: | docker run --name=sgbridge --network host $BRIDGE_VOLUME -d -uroot \ - -e GITHUB_REF -e BRIDGE_SOCKET -e QDR_CHANNEL -e OPSTOOLS_REPO \ + -e GITHUB_HEAD_REF -e BRIDGE_SOCKET -e QDR_CHANNEL -e OPENSTACK_REPO \ --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 @@ -186,7 +186,7 @@ jobs: sudo systemctl restart devstack@ceilometer-anotification.service - name: Run sg-core to process metrics run: | - docker run --name=sgcore -d -uroot --network host $BRIDGE_VOLUME -e OPSTOOLS_REPO \ + docker run --name=sgcore -d -uroot --network host $BRIDGE_VOLUME -e OPENSTACK_REPO \ --volume ${{ github.workspace }}:$PROJECT_ROOT:z --workdir $PROJECT_ROOT \ $TEST_IMAGE bash $PROJECT_ROOT/ci/integration/metrics/ceilometer/bridge/run_sg.sh - name: Run Prometheus to store metrics @@ -218,7 +218,7 @@ jobs: name: "[metrics] transport: socket(tcp); handler: ceilometer-metrics; application: prometheus" runs-on: ubuntu-22.04 env: - PROMETHEUS_IMAGE: prom/prometheus:latest + PROMETHEUS_IMAGE: quay.io/prometheus/prometheus:latest steps: - name: Checkout code uses: actions/checkout@v4.1.3 @@ -263,7 +263,7 @@ jobs: sudo systemctl restart devstack@ceilometer-anotification.service - name: Run sg-core to process metrics run: | - docker run --name=sgcore -d -uroot --network host $BRIDGE_VOLUME -e OPSTOOLS_REPO \ + docker run --name=sgcore -d -uroot --network host $BRIDGE_VOLUME -e OPENSTACK_REPO \ --volume ${{ github.workspace }}:$PROJECT_ROOT:z --workdir $PROJECT_ROOT \ $TEST_IMAGE bash $PROJECT_ROOT/ci/integration/metrics/ceilometer/tcp/run_sg.sh - name: Run Prometheus to store metrics @@ -333,8 +333,8 @@ jobs: - name: Start sg-bridge with same branch 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) --volume ${{ github.workspace }}:$PROJECT_ROOT:z \ + docker run --name=sgbridge $BRIDGE_VOLUME -d -uroot --network host -e OPENSTACK_REPO \ + -e GITHUB_HEAD_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: | @@ -395,7 +395,7 @@ jobs: # run integration tests - name: Run sg-core to process log messages run: | - docker run --name=sgcore -d -uroot --network host $TEST_PORT $BRIDGE_VOLUME -e OPSTOOLS_REPO \ + docker run --name=sgcore -d -uroot --network host $TEST_PORT $BRIDGE_VOLUME -e OPENSTACK_REPO \ --volume ${{ github.workspace }}:$PROJECT_ROOT:z --workdir $PROJECT_ROOT \ $TEST_IMAGE bash $PROJECT_ROOT/ci/integration/logging/run_sg.sh - name: sg-core debug output diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a3cef223..53f8b0e4 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://raw.githubusercontent.com/infrawatch/sg-core/04dcb34edd2c234b378222d2f9a17e15c0dad936/build/repos/opstools.repo + OPENSTACK_REPO: https://trunk.rdoproject.org/centos9-caracal/delorean-deps.repo LOKI_IMAGE: quay.io/infrawatch/loki:2.4.2 LOKI_VOLUME: "--volume=${{ github.workspace }}/ci/service_configs/loki:/etc/loki:ro" @@ -10,7 +10,7 @@ env: ELASTIC_IMAGE: docker.elastic.co/elasticsearch/elasticsearch:7.10.2 ELASTIC_PORT: "-p 9200:9200 -p 9300:9300" - TEST_IMAGE: registry.access.redhat.com/ubi8 + TEST_IMAGE: registry.access.redhat.com/ubi9 COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }} on: [push, pull_request] @@ -18,24 +18,24 @@ on: [push, pull_request] jobs: golangci: name: Linting - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/setup-go@v5 with: - go-version: '1.20' + go-version: '1.22.6' - uses: actions/checkout@v4.1.3 #- name: download libraries # run: go mod download - name: golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v6.1.0 with: # Caching conflicts happen in GHA, so just disable for now skip-cache: true # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. - version: v1.51 + version: v1.59.1 unit-tests: name: Unit tests - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Checkout code uses: actions/checkout@v4.1.3 @@ -63,7 +63,7 @@ jobs: docker logs loki - name: Run sg-core unit test suite run: | - docker run --name=testsuite -uroot --network host -e COVERALLS_REPO_TOKEN -e OPSTOOLS_REPO \ + docker run --name=testsuite -uroot --network host -e COVERALLS_REPO_TOKEN -e OPENSTACK_REPO \ --volume ${{ github.workspace }}:$PROJECT_ROOT:z --workdir $PROJECT_ROOT \ $TEST_IMAGE bash $PROJECT_ROOT/ci/unit/run_tests.sh - name: Send coverage @@ -72,12 +72,12 @@ jobs: path-to-profile: ${{ github.workspace }}/profile.cov image-build: name: Image build - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4.1.3 - uses: actions/setup-go@v5 with: - go-version: '1.20' + go-version: '1.22.6' - name: Verify image builds run: | docker build --tag infrawatch/sg-core:latest --file build/Dockerfile . diff --git a/.github/workflows/updates.yml b/.github/workflows/updates.yml index 4bcdcd42..8c90f93c 100644 --- a/.github/workflows/updates.yml +++ b/.github/workflows/updates.yml @@ -16,7 +16,7 @@ jobs: # (github.event.issue.author_association == 'CONTRIBUTOR') || # (github.event.issue.author_association == 'MEMBER') # ) - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: update PR with coveralls badge uses: actions/github-script@v7 diff --git a/.golangci.yaml b/.golangci.yaml index d53d3f01..fa20ad44 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -1,11 +1,3 @@ -run: - skip-dirs: - - plugins/transport/dummy-alertmanager - - plugins/transport/dummy-events - - plugins/transport/dummy-metrics - - plugins/transport/dummy-logs - - plugins/application/print - - devenv issues: exclude-rules: - linters: @@ -21,12 +13,19 @@ issues: - staticcheck # https://staticcheck.io/docs/checks#SA4008 (The variable in the loop condition never changes, are you incrementing the wrong variable?) text: "SA4008:" + exclude-dirs: + - plugins/transport/dummy-alertmanager + - plugins/transport/dummy-events + - plugins/transport/dummy-metrics + - plugins/transport/dummy-logs + - plugins/application/print + - devenv linters: disable-all: true enable: - bodyclose - - depguard + # - depguard - dogsled - dupl - errcheck @@ -39,7 +38,7 @@ linters: - gofmt - goimports - goprintffuncname - - gosec + # - gosec - gosimple - govet - ineffassign @@ -47,7 +46,7 @@ linters: - nakedret - noctx - nolintlint - - revive + # - revive - staticcheck - stylecheck - typecheck diff --git a/build/Dockerfile b/build/Dockerfile index c11c13b9..0f472bf2 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,19 +1,19 @@ # --- build smart gateway --- -FROM registry.access.redhat.com/ubi8:latest AS builder +FROM registry.access.redhat.com/ubi9:latest AS builder ENV GOPATH=/go -ENV D=/go/src/github.com/infrawatch/sg-core +ENV SGCORE_DIR=/go/src/github.com/infrawatch/sg-core -WORKDIR $D -COPY . $D/ +WORKDIR $SGCORE_DIR +COPY . $SGCORE_DIR/ # dependencies for qpid-proton-c -COPY build/repos/opstools.repo /etc/yum.repos.d/opstools.repo +COPY build/repos/centos9-caracal.repo /etc/yum.repos.d/centos9-caracal.repo RUN dnf install golang git qpid-proton-c-devel -y --setopt=tsflags=nodocs -RUN go install golang.org/dl/go1.20@latest && /go/bin/go1.20 download && PRODUCTION_BUILD=false CONTAINER_BUILD=true GOCMD=/go/bin/go1.20 ./build.sh +RUN go install golang.org/dl/go1.22.6@latest && /go/bin/go1.22.6 download && PRODUCTION_BUILD=false CONTAINER_BUILD=true GOCMD=/go/bin/go1.22.6 ./build.sh # --- end build, create smart gateway layer --- -FROM registry.access.redhat.com/ubi8-minimal:latest +FROM registry.access.redhat.com/ubi9-minimal:latest LABEL io.k8s.display-name="Smart Gateway" \ io.k8s.description="A component of the Service Telemetry Framework on the server side that ingests data from AMQP 1.x and provides a metrics scrape endpoint for Prometheus, and forwards events to ElasticSearch" \ diff --git a/build/repos/centos9-caracal.repo b/build/repos/centos9-caracal.repo new file mode 100644 index 00000000..f00fa338 --- /dev/null +++ b/build/repos/centos9-caracal.repo @@ -0,0 +1,18 @@ +# CentOS 9 OpenStack repos +# +# Please see https://trunk.rdoproject.org/ and +# https://trunk.rdoproject.org/centos9-caracal/report.html for more information + +[delorean-caracal-testing] +name=dlrn-caracal-testing +baseurl=https://trunk.rdoproject.org/centos9-caracal/deps/latest/ +enabled=1 +gpgcheck=0 +module_hotfixes=1 + +[centos9-opstools] +name=centos9-opstools +baseurl=http://mirror.stream.centos.org/SIGs/9-stream/opstools/$basearch/collectd-5/ +enabled=1 +gpgcheck=0 +module_hotfixes=1 diff --git a/build/repos/opstools.repo b/build/repos/opstools.repo deleted file mode 100644 index 2d95a92d..00000000 --- a/build/repos/opstools.repo +++ /dev/null @@ -1,19 +0,0 @@ -# CentOS-OpsTools.repo -# -# Please see http://wiki.centos.org/SpecialInterestGroup/OpsTools for more -# information - -[centos-opstools-testing] -name=CentOS-OpsTools - testing repo -baseurl=https://buildlogs.centos.org/centos/$releasever-stream/opstools/$basearch/collectd-5/ -gpgcheck=0 -enabled=0 - -[centos-opstools] -name=CentOS-OpsTools - collectd -#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 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-OpsTools diff --git a/ci/integration/logging/run_bridge.sh b/ci/integration/logging/run_bridge.sh index 59edfa7a..79b108b3 100644 --- a/ci/integration/logging/run_bridge.sh +++ b/ci/integration/logging/run_bridge.sh @@ -5,8 +5,7 @@ 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 +curl -o /etc/yum.repos.d/centos9-caracal.repo $OPENSTACK_REPO dnf install -y git gcc make qpid-proton-c-devel redhat-rpm-config diff --git a/ci/integration/logging/run_sg.sh b/ci/integration/logging/run_sg.sh index eb23fe19..8a91070b 100644 --- a/ci/integration/logging/run_sg.sh +++ b/ci/integration/logging/run_sg.sh @@ -1,26 +1,22 @@ #!/bin/env bash -# CI script for UBI8 job +# CI script for UBI9 job # purpose: spawn sg-core to process messages sent by rsyslog 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 +curl -o /etc/yum.repos.d/centos9-caracal.repo $OPENSTACK_REPO dnf install -y git golang gcc make qpid-proton-c-devel export GOBIN=$GOPATH/bin export PATH=$PATH:$GOBIN -go install golang.org/dl/go1.20@latest -go1.20 download +go install golang.org/dl/go1.22.6@latest +go1.22.6 download # install sg-core and start sg-core mkdir -p /usr/lib64/sg-core -PLUGIN_DIR=/usr/lib64/sg-core/ GOCMD=go1.20 BUILD_ARGS=-buildvcs=false ./build.sh +PLUGIN_DIR=/usr/lib64/sg-core/ GOCMD=go1.22.6 BUILD_ARGS=-buildvcs=false ./build.sh ./sg-core -config ./ci/integration/logging/sg_config.yaml diff --git a/ci/integration/metrics/ceilometer/bridge/run_sg.sh b/ci/integration/metrics/ceilometer/bridge/run_sg.sh index 747d3362..eb284ff3 100644 --- a/ci/integration/metrics/ceilometer/bridge/run_sg.sh +++ b/ci/integration/metrics/ceilometer/bridge/run_sg.sh @@ -1,23 +1,22 @@ #!/bin/env bash -# CI script for UBI8 job +# CI script for UBI9 job # purpose: spawn sg-core to process messages sent by rsyslog 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 +curl -o /etc/yum.repos.d/centos9-caracal.repo $OPENSTACK_REPO dnf install -y git golang gcc make qpid-proton-c-devel export GOBIN=$GOPATH/bin export PATH=$PATH:$GOBIN -go install golang.org/dl/go1.20@latest -go1.20 download +go install golang.org/dl/go1.22.6@latest +go1.22.6 download # install sg-core and start sg-core mkdir -p /usr/lib64/sg-core -PLUGIN_DIR=/usr/lib64/sg-core/ GOCMD=go1.20 BUILD_ARGS=-buildvcs=false ./build.sh +PLUGIN_DIR=/usr/lib64/sg-core/ GOCMD=go1.22.6 BUILD_ARGS=-buildvcs=false ./build.sh ./sg-core -config ./ci/integration/metrics/ceilometer/bridge/sg_config.yaml diff --git a/ci/integration/metrics/ceilometer/tcp/run_sg.sh b/ci/integration/metrics/ceilometer/tcp/run_sg.sh index 1ef16839..730deb8f 100644 --- a/ci/integration/metrics/ceilometer/tcp/run_sg.sh +++ b/ci/integration/metrics/ceilometer/tcp/run_sg.sh @@ -1,23 +1,22 @@ #!/bin/env bash -# CI script for UBI8 job +# CI script for UBI9 job # purpose: spawn sg-core to process messages sent by rsyslog 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 +curl -o /etc/yum.repos.d/centos9-caracal.repo $OPENSTACK_REPO dnf install -y git golang gcc make qpid-proton-c-devel export GOBIN=$GOPATH/bin export PATH=$PATH:$GOBIN -go install golang.org/dl/go1.20@latest -go1.20 download +go install golang.org/dl/go1.22.6@latest +go1.22.6 download # install sg-core and start sg-core mkdir -p /usr/lib64/sg-core -PLUGIN_DIR=/usr/lib64/sg-core/ GOCMD=go1.20 BUILD_ARGS=-buildvcs=false ./build.sh +PLUGIN_DIR=/usr/lib64/sg-core/ GOCMD=go1.22.6 BUILD_ARGS=-buildvcs=false ./build.sh ./sg-core -config ./ci/integration/metrics/ceilometer/tcp/sg_config.yaml diff --git a/ci/integration/metrics/collectd/run_sg.sh b/ci/integration/metrics/collectd/run_sg.sh index ea1cd4cc..14f478fe 100644 --- a/ci/integration/metrics/collectd/run_sg.sh +++ b/ci/integration/metrics/collectd/run_sg.sh @@ -1,23 +1,22 @@ #!/bin/env bash -# CI script for UBI8 job +# CI script for UBI9 job # purpose: spawn sg-core to process messages sent by rsyslog 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 +curl -o /etc/yum.repos.d/centos9-caracal.repo $OPENSTACK_REPO dnf install -y git golang gcc make qpid-proton-c-devel export GOBIN=$GOPATH/bin export PATH=$PATH:$GOBIN -go install golang.org/dl/go1.20@latest -go1.20 download +go install golang.org/dl/go1.22.6@latest +go1.22.6 download # install sg-core and start sg-core mkdir -p /usr/lib64/sg-core -PLUGIN_DIR=/usr/lib64/sg-core/ GOCMD=go1.20 BUILD_ARGS=-buildvcs=false ./build.sh +PLUGIN_DIR=/usr/lib64/sg-core/ GOCMD=go1.22.6 BUILD_ARGS=-buildvcs=false ./build.sh ./sg-core -config ./ci/integration/metrics/collectd/sg_config.yaml diff --git a/ci/integration/metrics/run_bridge.sh b/ci/integration/metrics/run_bridge.sh index 0c73d1da..ace404f7 100644 --- a/ci/integration/metrics/run_bridge.sh +++ b/ci/integration/metrics/run_bridge.sh @@ -1,5 +1,5 @@ #!/bin/env bash -# CI script for UBI8 job +# CI script for UBI9 job # purpose: spawn sg-bridge for message bus connection set -ex @@ -7,8 +7,7 @@ set -ex CHANNEL=$QDR_CHANNEL # 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 +curl -o /etc/yum.repos.d/centos9-caracal.repo $OPENSTACK_REPO dnf install -y git gcc make qpid-proton-c-devel redhat-rpm-config diff --git a/ci/unit/run_tests.sh b/ci/unit/run_tests.sh index 83a4c92e..b223b0cd 100644 --- a/ci/unit/run_tests.sh +++ b/ci/unit/run_tests.sh @@ -1,12 +1,11 @@ #!/bin/env bash -# CI script for CentOS8 job -# purpose: runt unit test suite and submit code coverage +# CI script for CentOS9 job +# purpose: run unit test suite and submit code coverage 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 +curl -o /etc/yum.repos.d/centos9-caracal.repo $OPENSTACK_REPO # without glibc-langpack-en locale setting in CentOS8 is broken without this package yum install -y git golang gcc make glibc-langpack-en qpid-proton-c-devel @@ -14,8 +13,7 @@ yum install -y git golang gcc make glibc-langpack-en qpid-proton-c-devel export GOBIN=$GOPATH/bin export PATH=$PATH:$GOBIN -go install golang.org/dl/go1.20@latest -go1.20 download +go install golang.org/dl/go1.22.6@latest +go1.22.6 download - -go1.20 test -v -coverprofile=profile.cov ./... +go1.22.6 test -v -coverprofile=profile.cov ./... diff --git a/go.mod b/go.mod index d42be7bc..d8886906 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/infrawatch/sg-core -go 1.20 +go 1.22 require ( collectd.org v0.5.0 @@ -39,7 +39,8 @@ require ( github.com/prometheus/procfs v0.6.0 // indirect 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.33.0 // indirect + golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect + golang.org/x/sys v0.19.0 // indirect + google.golang.org/protobuf v1.34.0 // indirect gopkg.in/ini.v1 v1.63.2 // indirect ) diff --git a/go.sum b/go.sum index 4efa008e..2654b5e0 100644 --- a/go.sum +++ b/go.sum @@ -267,8 +267,9 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0 h1:hb9wdF1z5waM+dSIICn1l0DkLVDT3hqhhQsDNUmHPRE= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -378,8 +379,8 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -511,8 +512,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.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.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=