From a2d7dede737947d7c6afa20a88e1f0c64e0eb96c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 10 Aug 2023 11:18:52 +0200 Subject: Merging upstream version 1.42.0. Signed-off-by: Daniel Baumann --- .github/data/distros.yml | 109 ++++++++++++++++++++---- .github/labeler.yml | 127 ++++++++++------------------ .github/workflows/build.yml | 5 +- .github/workflows/generate-integrations.yml | 98 +++++++++++++++++++++ .github/workflows/review.yml | 2 +- 5 files changed, 242 insertions(+), 99 deletions(-) create mode 100644 .github/workflows/generate-integrations.yml (limited to '.github') diff --git a/.github/data/distros.yml b/.github/data/distros.yml index 8376b1f03..827378502 100644 --- a/.github/data/distros.yml +++ b/.github/data/distros.yml @@ -20,6 +20,8 @@ include: - &alpine distro: alpine version: edge + support_type: Community + notes: '' eol_check: false env_prep: | apk add -U bash @@ -27,18 +29,31 @@ include: apk del json-c-dev test: ebpf-core: true + - <<: *alpine + version: "3.18" + support_type: Core + notes: '' + eol_check: true - <<: *alpine version: "3.17" + support_type: Intermediate + notes: '' eol_check: true - <<: *alpine version: "3.16" + support_type: Intermediate + notes: '' eol_check: true - <<: *alpine version: "3.15" + support_type: Intermediate + notes: '' eol_check: true - distro: archlinux version: latest + support_type: Intermediate + notes: '' eol_check: false env_prep: | pacman --noconfirm -Syu && pacman --noconfirm -Sy grep libffi @@ -48,6 +63,8 @@ include: - &alma distro: almalinux version: "9" + support_type: Core + notes: '' jsonc_removal: | dnf remove -y json-c-devel eol_check: true @@ -74,6 +91,8 @@ include: - &amzn distro: amazonlinux version: "2" + support_type: Core + notes: '' eol_check: 'amazon-linux' packages: &amzn_packages type: rpm @@ -92,6 +111,8 @@ include: - distro: centos version: "7" + support_type: Core + notes: '' eol_check: false packages: type: rpm @@ -107,6 +128,8 @@ include: - &debian distro: debian version: "12" + support_type: Core + notes: '' base_image: debian:bookworm eol_check: true env_prep: | @@ -143,6 +166,8 @@ include: - &fedora distro: fedora version: "38" + support_type: Core + notes: '' eol_check: true jsonc_removal: | dnf remove -y json-c-devel @@ -164,27 +189,25 @@ include: - &opensuse distro: opensuse - version: "tumbleweed" + version: "15.5" + support_type: Core + notes: '' eol_check: true - base_image: opensuse/tumbleweed + base_image: opensuse/leap:15.5 jsonc_removal: | zypper rm -y libjson-c-devel packages: &opensuse_packages type: rpm - repo_distro: opensuse/tumbleweed + repo_distro: opensuse/leap:15.4 arches: - x86_64 - aarch64 test: ebpf-core: true - - <<: *opensuse - version: "15.5" - base_image: opensuse/leap:15.5 - packages: - <<: *opensuse_packages - repo_distro: opensuse/15.5 - <<: *opensuse version: "15.4" + support_type: Core + notes: '' base_image: opensuse/leap:15.4 packages: <<: *opensuse_packages @@ -193,6 +216,8 @@ include: - &oracle distro: oraclelinux version: "8" + support_type: Core + notes: '' eol_check: true jsonc_removal: | dnf remove -y json-c-devel @@ -212,7 +237,9 @@ include: - &ubuntu distro: ubuntu - version: "22.10" + version: "22.04" + support_type: Core + notes: '' eol_check: true env_prep: | rm -f /etc/apt/apt.conf.d/docker && apt-get update @@ -220,7 +247,7 @@ include: apt-get remove -y libjson-c-dev packages: &ubuntu_packages type: deb - repo_distro: ubuntu/kinetic + repo_distro: ubuntu/jammy arches: - amd64 - armhf @@ -232,13 +259,63 @@ include: packages: <<: *ubuntu_packages repo_distro: ubuntu/lunar - - <<: *ubuntu - version: "22.04" - packages: - <<: *ubuntu_packages - repo_distro: ubuntu/jammy - <<: *ubuntu version: "20.04" packages: <<: *ubuntu_packages repo_distro: ubuntu/focal +no_include: # Info for platforms not covered in CI + - distro: docker + version: "19.03 or newer" + support_type: Core + notes: '' + packages: + arches: + - linux/i386 + - linux/amd64 + - linux/arm/v7 + - linux/arm64 + - linux/ppc64le + + - distro: clearlinux + version: latest + support_type: Community + notes: '' + + - &rhel + distro: rhel + version: "9.x" + support_type: Core + notes: '' + packages: + arches: + - x86_64 + - aarch64 + - <<: *rhel + version: "8.x" + - <<: *rhel + version: "7.x" + packages: + arches: + - x86_64 + + - &freebsd + distro: freebsd + version: 13-STABLE + support_type: Community + notes: '' + + - &macos + distro: macos + version: '13' + support_type: Community + notes: '' + - <<: *macos + version: '12' + - <<: *macos + version: '11' + + - distro: gentoo + version: latest + support_type: Community + notes: '' diff --git a/.github/labeler.yml b/.github/labeler.yml index 44c493b10..1dd4d472a 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -11,8 +11,7 @@ # Please keep the labels sorted and deduplicated. area/ACLK: - - aclk/* - - aclk/**/* + - aclk/** - database/sqlite/sqlite_aclk* - mqtt_websockets @@ -20,169 +19,137 @@ area/claim: - claim/* area/exporting: - - exporting/* - - exporting/**/* + - exporting/** area/build: - - build/* - - build/**/* - - build_external/* - - build_external/**/* + - build/** + - build_external/** - CMakeLists.txt - configure.ac - Makefile.am - "**/Makefile.am" area/ci: - - .github/* - - .github/**/* + - .github/** area/daemon: - - daemon/* - - daemon/**/* + - daemon/** area/database: - - database/* - - database/**/* + - database/** area/docs: - "*.md" - "**/*.md" - "**/*.mdx" - - diagrams/* - - diagrams/**/* + - diagrams/** # -----------------collectors---------------------- area/collectors: - - collectors/* - - collectors/**/* + - collectors/** collectors/plugins.d: - - collectors/plugins.d/* - - collectors/plugins.d/**/* + - collectors/plugins.d/** collectors/apps: - - collectors/apps.plugin/* - - collectors/apps.plugin/**/* + - collectors/apps.plugin/** collectors/cgroups: - - collectors/cgroups.plugin/* - - collectors/cgroups.plugin/**/* + - collectors/cgroups.plugin/** collectors/charts.d: - - collectors/charts.d.plugin/* - - collectors/charts.d.plugin/**/* + - collectors/charts.d.plugin/** collectors/cups: - - collectors/cups.plugin/* - - collectors/cups.plugin/**/* + - collectors/cups.plugin/** collectors/debugfs: - - collectors/debugfs.plugin/* - - collectors/debugfs.plugin/**/* + - collectors/debugfs.plugin/** collectors/diskspace: - - collectors/diskspace.plugin/* - - collectors/diskspace.plugin/**/* + - collectors/diskspace.plugin/** collectors/ebpf: - - collectors/ebpf.plugin/* - - collectors/ebpf.plugin/**/* + - collectors/ebpf.plugin/** collectors/freebsd: - - collectors/freebsd.plugin/* - - collectors/freebsd.plugin/**/* + - collectors/freebsd.plugin/** collectors/freeipmi: - - collectors/freeipmi.plugin/* - - collectors/freeipmi.plugin/**/* + - collectors/freeipmi.plugin/** collectors/idlejitter: - - collectors/idlejitter.plugin/* - - collectors/idlejitter.plugin/**/* + - collectors/idlejitter.plugin/** collectors/ioping: - - collectors/ioping.plugin/* - - collectors/ioping.plugin/**/* + - collectors/ioping.plugin/** collectors/macos: - - collectors/macos.plugin/* - - collectors/macos.plugin/**/* + - collectors/macos.plugin/** collectors/nfacct: - - collectors/nfacct.plugin/* - - collectors/nfacct.plugin/**/* + - collectors/nfacct.plugin/** collectors/perf: - - collectors/perf.plugin/* - - collectors/perf.plugin/**/* + - collectors/perf.plugin/** collectors/proc: - - collectors/proc.plugin/* - - collectors/proc.plugin/**/* + - collectors/proc.plugin/** collectors/python.d: - - collectors/python.d.plugin/* - - collectors/python.d.plugin/**/* + - collectors/python.d.plugin/** collectors/slabinfo: - - collectors/slabinfo.plugin/* - - collectors/slabinfo.plugin/**/* + - collectors/slabinfo.plugin/** collectors/statsd: - - collectors/statsd.plugin/* - - collectors/statsd.plugin/**/* + - collectors/statsd.plugin/** + +collectors/systemd-journal: + - collectors/systemd-journal.plugin/** collectors/tc: - - collectors/tc.plugin/* - - collectors/tc.plugin/**/* + - collectors/tc.plugin/** collectors/timex: - - collectors/timex.plugin/* - - collectors/timex.plugin/**/* + - collectors/timex.plugin/** collectors/xenstat: - - collectors/xenstat.plugin/* - - collectors/xenstat.plugin/**/* + - collectors/xenstat.plugin/** # ----------------/collectors---------------------- area/health: - - health/* - - health/**/* + - health/** + +area/metadata: + - "**/*metadata.yaml" + - integrations/** area/ml: - - ml/* - - ml/**/* + - ml/** area/packaging: - - contrib/* - - contrib/**/* - - packaging/* - - packaging/**/* - - system/* - - system/**/* + - contrib/** + - packaging/** + - system/** - Dockerfile* - netdata-installer.sh - netdata.spec.in area/registry: - - registry/* - - registry/**/* + - registry/** area/streaming: - - streaming/* - - streaming/**/* + - streaming/** area/tests: - - tests/* - - tests/**/* + - tests/** - daemon/unit_test* - coverity-scan.sh - cppcheck.sh - netdata.cppcheck area/web: - - web/* - - web/**/* + - web/** diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 114eb2c53..012f75ac5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -519,6 +519,7 @@ jobs: mv ../static-archive/* . || exit 1 ln -s ${{ needs.build-dist.outputs.distfile }} netdata-latest.tar.gz || exit 1 cp ../packaging/version ./latest-version.txt || exit 1 + cp ../integrations/integrations.js ./integrations.js || exit 1 sha256sum -b ./* > sha256sums.txt || exit 1 cat sha256sums.txt - name: Store Artifacts @@ -753,7 +754,7 @@ jobs: with: allowUpdates: false artifactErrorsFailBuild: true - artifacts: 'final-artifacts/sha256sums.txt,final-artifacts/netdata-*.tar.gz,final-artifacts/netdata-*.gz.run' + artifacts: 'final-artifacts/sha256sums.txt,final-artifacts/netdata-*.tar.gz,final-artifacts/netdata-*.gz.run,final-artifacts/integrations.js' owner: netdata repo: netdata-nightlies body: Netdata nightly build for ${{ steps.version.outputs.date }}. @@ -823,7 +824,7 @@ jobs: with: allowUpdates: false artifactErrorsFailBuild: true - artifacts: 'final-artifacts/sha256sums.txt,final-artifacts/netdata-*.tar.gz,final-artifacts/netdata-*.gz.run' + artifacts: 'final-artifacts/sha256sums.txt,final-artifacts/netdata-*.tar.gz,final-artifacts/netdata-*.gz.run,final-artifacts/integrations.js' draft: true tag: ${{ needs.normalize-tag.outputs.tag }} token: ${{ secrets.NETDATABOT_GITHUB_TOKEN }} diff --git a/.github/workflows/generate-integrations.yml b/.github/workflows/generate-integrations.yml new file mode 100644 index 000000000..599cefbc0 --- /dev/null +++ b/.github/workflows/generate-integrations.yml @@ -0,0 +1,98 @@ +--- +# CI workflow used to regenerate `integrations/integrations.js` when +# relevant source files are changed. +name: Generate Integrations +on: + push: + branches: + - master + paths: # If any of these files change, we need to regenerate integrations.js. + - 'collectors/**/metadata.yaml' + - 'exporting/**/metadata.yaml' + - 'health/notifications/**/metadata.yaml' + - 'integrations/templates/**' + - 'integrations/categories.yaml' + - 'integrations/deploy.yaml' + - 'integrations/cloud-notifications/metadata.yaml' + - 'integrations/gen_integrations.py' + - 'packaging/go.d.version' + workflow_dispatch: null +concurrency: # This keeps multiple instances of the job from running concurrently for the same ref. + group: integrations-${{ github.ref }} + cancel-in-progress: true +jobs: + generate-integrations: + name: Generate Integrations + runs-on: ubuntu-latest + if: github.repository == 'netdata/netdata' + steps: + - name: Checkout Agent + id: checkout-agent + uses: actions/checkout@v3 + with: + fetch-depth: 1 + submodules: recursive + - name: Get Go Ref + id: get-go-ref + run: echo "go_ref=$(cat packaging/go.d.version)" >> "${GITHUB_ENV}" + - name: Checkout Go + id: checkout-go + uses: actions/checkout@v3 + with: + fetch-depth: 1 + path: go.d.plugin + repository: netdata/go.d.plugin + ref: ${{ env.go_ref }} + - name: Prepare Dependencies + id: prep-deps + run: | + sudo apt-get install python3-venv + python3 -m venv ./virtualenv + source ./virtualenv/bin/activate + pip install jsonschema referencing jinja2 ruamel.yaml + - name: Generate Integrations + id: generate + run: | + source ./virtualenv/bin/activate + python3 integrations/gen_integrations.py + - name: Clean Up Temporary Data + id: clean + run: rm -rf go.d.plugin virtualenv + - name: Create PR + id: create-pr + uses: peter-evans/create-pull-request@v5 + with: + token: ${{ secrets.NETDATABOT_GITHUB_TOKEN }} + commit-message: Regenerate integrations.js + branch: integrations-regen + title: Regenerate integrations.js + body: | + Regenerate `integrations/integrations.js` based on the + latest code. + + This PR was auto-generated by + `.github/workflows/generate-integrations.yml`. + - name: Failure Notification + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_COLOR: 'danger' + SLACK_FOOTER: '' + SLACK_ICON_EMOJI: ':github-actions:' + SLACK_TITLE: 'Integrations regeneration failed:' + SLACK_USERNAME: 'GitHub Actions' + SLACK_MESSAGE: |- + ${{ github.repository }}: Failed to create PR rebuilding integrations.js + Checkout Agent: ${{ steps.checkout-agent.outcome }} + Get Go Ref: ${{ steps.get-go-ref.outcome }} + Checkout Go: ${{ steps.checkout-go.outcome }} + Prepare Dependencies: ${{ steps.prep-deps.outcome }} + Generate Integrations: ${{ steps.generate.outcome }} + Clean Up Temporary Data: ${{ steps.clean.outcome }} + Create PR: ${{ steps.create-pr.outcome }} + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} + if: >- + ${{ + failure() + && startsWith(github.ref, 'refs/heads/master') + && github.repository == 'netdata/netdata' + }} diff --git a/.github/workflows/review.yml b/.github/workflows/review.yml index 6a580afa6..7e76717ed 100644 --- a/.github/workflows/review.yml +++ b/.github/workflows/review.yml @@ -54,7 +54,7 @@ jobs: run: | if [ "${{ contains(github.event.pull_request.labels.*.name, 'run-ci/eslint') }}" = "true" ]; then echo "run=true" >> "${GITHUB_OUTPUT}" - elif git diff --name-only origin/${{ github.base_ref }} HEAD | grep -v "web/gui/v1" | grep -v "web/gui/v2" | grep -Eq '.*\.js|node\.d\.plugin\.in' ; then + elif git diff --name-only origin/${{ github.base_ref }} HEAD | grep -v "web/gui/v1" | grep -v "web/gui/v2" | grep -v "integrations/" | grep -Eq '.*\.js' ; then echo "run=true" >> "${GITHUB_OUTPUT}" echo 'JS files have changed, need to run ESLint.' else -- cgit v1.2.3