From cd4377fab21e0f500bef7f06543fa848a039c1e0 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 20 Jul 2023 06:50:01 +0200 Subject: Merging upstream version 1.41.0. Signed-off-by: Daniel Baumann --- .github/CODEOWNERS | 4 +- .github/data/distros.yml | 12 +++- .github/workflows/build-dummy.yml | 127 ++++++++++++++++++++++++++++++++++ .github/workflows/build.yml | 26 ++++++- .github/workflows/checks-dummy.yml | 42 +++++++++++ .github/workflows/checks.yml | 36 +++++++++- .github/workflows/dashboard-pr.yml | 2 +- .github/workflows/docker-dummy.yml | 51 ++++++++++++++ .github/workflows/docker.yml | 24 ++++++- .github/workflows/packaging-dummy.yml | 80 +++++++++++++++++++++ .github/workflows/packaging.yml | 23 ++++++ .github/workflows/release.yml | 6 +- .github/workflows/review.yml | 24 +++---- 13 files changed, 433 insertions(+), 24 deletions(-) create mode 100644 .github/workflows/build-dummy.yml create mode 100644 .github/workflows/checks-dummy.yml create mode 100644 .github/workflows/docker-dummy.yml create mode 100644 .github/workflows/packaging-dummy.yml (limited to '.github') diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index bea69deac..bc4fd0b32 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -26,12 +26,12 @@ health/notifications/ @Ferroin @thiagoftsm @MrZammler ml/ @andrewm4894 @vkalintiris libnetdata/ @thiagoftsm @vkalintiris packaging/ @Ferroin @tkatsoulas -registry/ @jacekkolasa +registry/ @novykh streaming/ @thiagoftsm system/ @Ferroin @tkatsoulas tests/ @Ferroin @vkalintiris @tkatsoulas web/ @thiagoftsm @vkalintiris -web/gui/ @jacekkolasa +web/gui/ @novykh # Ownership by filetype (overwrites ownership by directory) *.am @Ferroin @tkatsoulas diff --git a/.github/data/distros.yml b/.github/data/distros.yml index 355378f5a..8376b1f03 100644 --- a/.github/data/distros.yml +++ b/.github/data/distros.yml @@ -164,14 +164,14 @@ include: - &opensuse distro: opensuse - version: "15.4" + version: "tumbleweed" eol_check: true - base_image: opensuse/leap:15.4 + base_image: opensuse/tumbleweed jsonc_removal: | zypper rm -y libjson-c-devel packages: &opensuse_packages type: rpm - repo_distro: opensuse/15.4 + repo_distro: opensuse/tumbleweed arches: - x86_64 - aarch64 @@ -183,6 +183,12 @@ include: packages: <<: *opensuse_packages repo_distro: opensuse/15.5 + - <<: *opensuse + version: "15.4" + base_image: opensuse/leap:15.4 + packages: + <<: *opensuse_packages + repo_distro: opensuse/15.4 - &oracle distro: oraclelinux diff --git a/.github/workflows/build-dummy.yml b/.github/workflows/build-dummy.yml new file mode 100644 index 000000000..6bf327e2d --- /dev/null +++ b/.github/workflows/build-dummy.yml @@ -0,0 +1,127 @@ +--- +# Ci code for building release artifacts. +# +# This workflow exists so we can require these checks to pass, but skip +# them on PRs that have nothing to do with the source code. +name: Build +on: + pull_request: # PR checks only validate the build and generate artifacts for testing. + paths-ignore: # This MUST be kept in-sync with the paths-ignore key for the build-dummy.yml workflow. + - '**.c' + - '**.cc' + - '**.h' + - '**.hh' + - '**.in' + - '!netdata.spec.in' + - 'configure.ac' + - 'netdata-installer.sh' + - '**/Makefile*' + - 'Makefile*' + - '.github/workflows/build.yml' + - '.github/scripts/build-static.sh' + - '.github/scripts/get-static-cache-key.sh' + - '.github/scripts/gen-matrix-build.py' + - '.github/scripts/run-updater-check.sh' + - 'build/**' + - 'packaging/makeself/**' + - 'packaging/installer/**' + - 'aclk/aclk-schemas/' + - 'ml/dlib/' + - 'mqtt_websockets' + - 'web/server/h2o/libh2o' + - '!**.md' +concurrency: # This keeps multiple instances of the job from running concurrently for the same ref and event type. + group: build-${{ github.ref }}-${{ github.event_name }} + cancel-in-progress: true +jobs: + build-dist: # Build the distribution tarball and store it as an artifact. + name: Build Distribution Tarball + runs-on: ubuntu-latest + steps: + - run: echo 'NOT REQUIRED' + + build-static: # Build the static binary archives, and store them as artifacts. + name: Build Static + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - x86_64 + - armv7l + - aarch64 + - ppc64le + steps: + - run: echo 'NOT REQUIRED' + + matrix: # Generate the shared build matrix for our build tests. + name: Prepare Build Matrix + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + steps: + - name: Checkout + id: checkout + uses: actions/checkout@v3 + - name: Prepare tools + id: prepare + run: | + sudo apt-get update && sudo apt-get install -y python3-ruamel.yaml + - name: Read build matrix + id: set-matrix + run: | + matrix="$(.github/scripts/gen-matrix-build.py)" + echo "Generated matrix: ${matrix}" + echo "matrix=${matrix}" >> "${GITHUB_OUTPUT}" + + prepare-test-images: # Prepare the test environments for our build checks. This also checks dependency handling code for each tested environment. + name: Prepare Test Environments + runs-on: ubuntu-latest + needs: + - matrix + env: + RETRY_DELAY: 300 + strategy: + fail-fast: false + matrix: ${{ fromJson(needs.matrix.outputs.matrix) }} + steps: + - run: echo 'NOT REQUIRED' + + source-build: # Test various source build arrangements. + name: Test Source Build + runs-on: ubuntu-latest + needs: + - matrix + strategy: + fail-fast: false + matrix: ${{ fromJson(needs.matrix.outputs.matrix) }} + steps: + - run: echo 'NOT REQUIRED' + + updater-check: # Test the generated dist archive using the updater code. + name: Test Generated Distfile and Updater Code + runs-on: ubuntu-latest + needs: + - matrix + strategy: + fail-fast: false + matrix: ${{ fromJson(needs.matrix.outputs.matrix) }} + steps: + - run: echo 'NOT REQUIRED' + + prepare-upload: # Consolidate the artifacts for uploading or releasing. + name: Prepare Artifacts + runs-on: ubuntu-latest + steps: + - run: echo 'NOT REQUIRED' + + artifact-verification-dist: # Verify the regular installer works with the consolidated artifacts. + name: Test Consolidated Artifacts (Source) + runs-on: ubuntu-latest + steps: + - run: echo 'NOT REQUIRED' + + artifact-verification-static: # Verify the static installer works with the consolidated artifacts. + name: Test Consolidated Artifacts (Static) + runs-on: ubuntu-latest + steps: + - run: echo 'NOT REQUIRED' diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index da828f51e..114eb2c53 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,7 +5,31 @@ on: push: # Master branch checks only validate the build and generate artifacts for testing. branches: - master - pull_request: null # PR checks only validate the build and generate artifacts for testing. + pull_request: # PR checks only validate the build and generate artifacts for testing. + paths: # This MUST be kept in-sync with the paths-ignore key for the build-dummy.yml workflow. + - '**.c' + - '**.cc' + - '**.h' + - '**.hh' + - '**.in' + - '!netdata.spec.in' + - 'configure.ac' + - 'netdata-installer.sh' + - '**/Makefile*' + - 'Makefile*' + - '.github/workflows/build.yml' + - '.github/scripts/build-static.sh' + - '.github/scripts/get-static-cache-key.sh' + - '.github/scripts/gen-matrix-build.py' + - '.github/scripts/run-updater-check.sh' + - 'build/**' + - 'packaging/makeself/**' + - 'packaging/installer/**' + - 'aclk/aclk-schemas/' + - 'ml/dlib/' + - 'mqtt_websockets' + - 'web/server/h2o/libh2o' + - '!**.md' workflow_dispatch: # Dispatch runs build and validate, then push to the appropriate storage location. inputs: type: diff --git a/.github/workflows/checks-dummy.yml b/.github/workflows/checks-dummy.yml new file mode 100644 index 000000000..369d70ff9 --- /dev/null +++ b/.github/workflows/checks-dummy.yml @@ -0,0 +1,42 @@ +--- +name: Checks +on: + pull_request: + paths-ignore: # This MUST be kept in sync with the paths key for the checks.yml workflow. + - '**.c' + - '**.cc' + - '**.h' + - '**.hh' + - '**.in' + - '!netdata.spec.in' + - 'configure.ac' + - '**/Makefile*' + - 'Makefile*' + - '.gitignore' + - '.github/workflows/checks.yml' + - 'build/**' + - 'aclk/aclk-schemas/' + - 'ml/dlib/' + - 'mqtt_websockets' + - 'web/server/h2o/libh2o' +env: + DISABLE_TELEMETRY: 1 +concurrency: + group: checks-${{ github.ref }} + cancel-in-progress: true +jobs: + libressl-checks: + name: LibreSSL + runs-on: ubuntu-latest + steps: + - run: "echo 'NOT REQUIRED'" + clang-checks: + name: Clang + runs-on: ubuntu-latest + steps: + - run: "echo 'NOT REQUIRED'" + gitignore-check: + name: .gitignore + runs-on: ubuntu-latest + steps: + - run: "echo 'NOT REQUIRED'" diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 799f8d991..4c892ffce 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -2,9 +2,43 @@ name: Checks on: push: + paths: + - '**.c' + - '**.cc' + - '**.h' + - '**.hh' + - '**.in' + - '!netdata.spec.in' + - 'configure.ac' + - '**/Makefile*' + - 'Makefile*' + - '.gitignore' + - '.github/workflows/checks.yml' + - 'build/**' + - 'aclk/aclk-schemas/' + - 'ml/dlib/' + - 'mqtt_websockets' + - 'web/server/h2o/libh2o' branches: - master - pull_request: null + pull_request: + paths: # This MUST be kept in-sync with the paths-ignore key for the checks-dummy.yml workflow. + - '**.c' + - '**.cc' + - '**.h' + - '**.hh' + - '**.in' + - '!netdata.spec.in' + - 'configure.ac' + - '**/Makefile*' + - 'Makefile*' + - '.gitignore' + - '.github/workflows/checks.yml' + - 'build/**' + - 'aclk/aclk-schemas/' + - 'ml/dlib/' + - 'mqtt_websockets' + - 'web/server/h2o/libh2o' env: DISABLE_TELEMETRY: 1 concurrency: diff --git a/.github/workflows/dashboard-pr.yml b/.github/workflows/dashboard-pr.yml index c7d14c486..ac414da10 100644 --- a/.github/workflows/dashboard-pr.yml +++ b/.github/workflows/dashboard-pr.yml @@ -25,7 +25,7 @@ jobs: - name: Update Files id: update run: | - web/gui/bundle_dashboard.py ${{ github.event.inputs.dashboard_version }} + web/gui/bundle_dashboard_v1.py ${{ github.event.inputs.dashboard_version }} - name: Create Pull Request id: pr uses: peter-evans/create-pull-request@v5 diff --git a/.github/workflows/docker-dummy.yml b/.github/workflows/docker-dummy.yml new file mode 100644 index 000000000..64131dac5 --- /dev/null +++ b/.github/workflows/docker-dummy.yml @@ -0,0 +1,51 @@ +--- +name: Docker +on: + pull_request: + paths-ignore: # This MUST be kept in-sync with the paths key for the dummy.yml workflow. + - '**.c' + - '**.cc' + - '**.h' + - '**.hh' + - '**.in' + - '!netdata.spec.in' + - '.dockerignore' + - 'configure.ac' + - 'netdata-installer.sh' + - '**/Makefile*' + - 'Makefile*' + - '.github/workflows/docker.yml' + - '.github/scripts/docker-test.sh' + - 'build/**' + - 'packaging/docker/**' + - 'packaging/installer/**' + - 'aclk/aclk-schemas/' + - 'ml/dlib/' + - 'mqtt_websockets' + - 'web/server/h2o/libh2o' + - '!**.md' +env: + DISABLE_TELEMETRY: 1 +concurrency: + group: docker-${{ github.ref }}-${{ github.event_name }} + cancel-in-progress: true +jobs: + docker-test: + name: Docker Runtime Test + runs-on: ubuntu-latest + steps: + - run: echo 'NOT REQUIRED' + + docker-ci: + name: Docker Alt Arch Builds + needs: docker-test + runs-on: ubuntu-latest + strategy: + matrix: + platforms: + - linux/i386 + - linux/arm/v7 + - linux/arm64 + - linux/ppc64le + steps: + - run: echo 'NOT REQUIRED' diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 5eec3df74..aad83ced5 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -4,7 +4,29 @@ on: push: branches: - master - pull_request: null + pull_request: + paths: # This MUST be kept in-sync with the paths-ignore key for the docker-dummy.yml workflow. + - '**.c' + - '**.cc' + - '**.h' + - '**.hh' + - '**.in' + - '!netdata.spec.in' + - '.dockerignore' + - 'configure.ac' + - 'netdata-installer.sh' + - '**/Makefile*' + - 'Makefile*' + - '.github/workflows/docker.yml' + - '.github/scripts/docker-test.sh' + - 'build/**' + - 'packaging/docker/**' + - 'packaging/installer/**' + - 'aclk/aclk-schemas/' + - 'ml/dlib/' + - 'mqtt_websockets' + - 'web/server/h2o/libh2o' + - '!**.md' workflow_dispatch: inputs: version: diff --git a/.github/workflows/packaging-dummy.yml b/.github/workflows/packaging-dummy.yml new file mode 100644 index 000000000..653227e1c --- /dev/null +++ b/.github/workflows/packaging-dummy.yml @@ -0,0 +1,80 @@ +--- +# Handles building of binary packages for the agent. +# +# This workflow exists so that we can make these required checks but +# still skip running them on PRs where they are not relevant. +name: Packages +on: + pull_request: + types: + - opened + - reopened + - labeled + - synchronize + paths-ignore: # This MUST be kept in-sync with the paths key for the packaging.yml workflow. + - '**.c' + - '**.cc' + - '**.h' + - '**.hh' + - '**.in' + - 'netdata.spec.in' + - 'configure.ac' + - '**/Makefile*' + - 'Makefile*' + - '.github/workflows/packaging.yml' + - '.github/scripts/gen-matrix-packaging.py' + - '.github/scripts/pkg-test.sh' + - 'build/**' + - 'packaging/*.sh' + - 'packaging/*.checksums' + - 'packaging/*.version' + - 'contrib/debian/**' + - 'aclk/aclk-schemas/' + - 'ml/dlib/' + - 'mqtt_websockets' + - 'web/server/h2o/libh2o' + - '!**.md' +env: + DISABLE_TELEMETRY: 1 + REPO_PREFIX: netdata/netdata +concurrency: + group: packages-${{ github.ref }}-${{ github.event_name }} + cancel-in-progress: true +jobs: + matrix: + name: Prepare Build Matrix + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + steps: + - name: Checkout + id: checkout + uses: actions/checkout@v3 + - name: Prepare tools + id: prepare + run: | + sudo apt-get update && sudo apt-get install -y python3-ruamel.yaml + - name: Read build matrix + id: set-matrix + run: | + if [ "${{ github.event_name }}" = "pull_request" ] && \ + [ "${{ !contains(github.event.pull_request.labels.*.name, 'run-ci/packaging') }}" = "true" ]; then + matrix="$(.github/scripts/gen-matrix-packaging.py 1)" + else + matrix="$(.github/scripts/gen-matrix-packaging.py 0)" + fi + echo "Generated matrix: ${matrix}" + echo "matrix=${matrix}" >> "${GITHUB_OUTPUT}" + + build: + name: Build + runs-on: ubuntu-latest + env: + DOCKER_CLI_EXPERIMENTAL: enabled + needs: + - matrix + strategy: + matrix: ${{ fromJson(needs.matrix.outputs.matrix) }} + fail-fast: false + steps: + - run: echo 'NOT REQUIRED' diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml index a8d502847..7e8c7e527 100644 --- a/.github/workflows/packaging.yml +++ b/.github/workflows/packaging.yml @@ -8,6 +8,29 @@ on: - reopened - labeled - synchronize + paths: # This MUST be kept in-sync with the paths-ignore key for the packaging-dummy.yml workflow. + - '**.c' + - '**.cc' + - '**.h' + - '**.hh' + - '**.in' + - 'netdata.spec.in' + - 'configure.ac' + - '**/Makefile*' + - 'Makefile*' + - '.github/workflows/packaging.yml' + - '.github/scripts/gen-matrix-packaging.py' + - '.github/scripts/pkg-test.sh' + - 'build/**' + - 'packaging/*.sh' + - 'packaging/*.checksums' + - 'packaging/*.version' + - 'contrib/debian/**' + - 'aclk/aclk-schemas/' + - 'ml/dlib/' + - 'mqtt_websockets' + - 'web/server/h2o/libh2o' + - '!**.md' branches: - master push: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ef9bf94b4..e675d789f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -125,7 +125,7 @@ jobs: with: token: ${{ secrets.NETDATABOT_GITHUB_TOKEN }} repo: ${{ github.repository }} - workflow: Build + workflow: build.yml ref: ${{ needs.update-changelogs.outputs.ref }} inputs: '{"version": "${{ needs.update-changelogs.outputs.version }}", "type": "${{ needs.update-changelogs.outputs.type }}"}' - name: Failure Notification @@ -160,7 +160,7 @@ jobs: with: token: ${{ secrets.NETDATABOT_GITHUB_TOKEN }} repo: ${{ github.repository }} - workflow: Docker + workflow: docker.yml ref: ${{ needs.update-changelogs.outputs.ref }} inputs: '{"version": "${{ needs.update-changelogs.outputs.version }}"}' - name: Failure Notification @@ -195,7 +195,7 @@ jobs: with: token: ${{ secrets.NETDATABOT_GITHUB_TOKEN }} repo: ${{ github.repository }} - workflow: Packages + workflow: packaging.yml ref: ${{ needs.update-changelogs.outputs.ref }} inputs: '{"version": "${{ needs.update-changelogs.outputs.version }}", "type": "${{ needs.update-changelogs.outputs.type }}"}' - name: Failure Notification diff --git a/.github/workflows/review.yml b/.github/workflows/review.yml index 5756e4b21..6a580afa6 100644 --- a/.github/workflows/review.yml +++ b/.github/workflows/review.yml @@ -38,23 +38,23 @@ jobs: else echo "run=false" >> "${GITHUB_OUTPUT}" fi - - name: Check files for clang-format - id: clangformat - run: | - if [ "${{ contains(github.event.pull_request.labels.*.name, 'run-ci/clang-format') }}" = "true" ]; then - echo "run=true" >> "${GITHUB_OUTPUT}" - elif git diff --name-only origin/${{ github.base_ref }} HEAD | grep -Eq '\.cpp$|\.cxx$|\.c$|\.hpp$|\.hxx$|\.h$' ; then - echo "run=true" >> "${GITHUB_OUTPUT}" - echo 'C/C++ code has changed, need to run clang-format.' - else - echo "run=false" >> "${GITHUB_OUTPUT}" - fi + # - name: Check files for clang-format + # id: clangformat + # run: | + # if [ "${{ contains(github.event.pull_request.labels.*.name, 'run-ci/clang-format') }}" = "true" ]; then + # echo "run=true" >> "${GITHUB_OUTPUT}" + # elif git diff --name-only origin/${{ github.base_ref }} HEAD | grep -Eq '\.cpp$|\.cxx$|\.c$|\.hpp$|\.hxx$|\.h$' ; then + # echo "run=true" >> "${GITHUB_OUTPUT}" + # echo 'C/C++ code has changed, need to run clang-format.' + # else + # echo "run=false" >> "${GITHUB_OUTPUT}" + # fi - name: Check files for eslint id: eslint 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/dashboard" | 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 -Eq '.*\.js|node\.d\.plugin\.in' ; then echo "run=true" >> "${GITHUB_OUTPUT}" echo 'JS files have changed, need to run ESLint.' else -- cgit v1.2.3