Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from netdata:master #18

Merged
merged 12 commits into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 8 additions & 8 deletions .codacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ exclude_paths:
- src/collectors/python.d.plugin/python_modules/third_party/**
- contrib/**
- packaging/makeself/**
- web/gui/css/**
- web/gui/lib/**
- web/gui/old/**
- web/gui/src/**
- web/gui/v1/**
- web/gui/v2/**
- web/gui/main.js
- src/web/gui/css/**
- src/web/gui/lib/**
- src/web/gui/old/**
- src/web/gui/src/**
- src/web/gui/v1/**
- src/web/gui/v2/**
- src/web/gui/main.js
- tests/**
- aclk/tests/**
- src/libnetdata/libjudy/**
- src/database/sqlite/sqlite3.c
- src/ml/dlib/**
- web/server/h2o/libh2o/**
- src/web/server/h2o/libh2o/**
- build/**
- build_external/**
- packaging/**
Expand Down
8 changes: 4 additions & 4 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ exclude_patterns:
- ".githooks/"
- "tests/"
- "m4/"
- "web/css/"
- "web/lib/"
- "web/fonts/"
- "web/old/"
- "src/web/css/"
- "src/web/lib/"
- "src/web/fonts/"
- "src/web/old/"
- "collectors/python.d.plugin/python_modules/pyyaml2/"
- "collectors/python.d.plugin/python_modules/pyyaml3/"
- "collectors/python.d.plugin/python_modules/urllib3/"
5 changes: 3 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ src/exporting/ @thiagoftsm
src/daemon/ @thiagoftsm @vkalintiris
src/database/ @thiagoftsm @vkalintiris
docs/ @tkatsoulas @Ancairon
src/go/ @ilyam8
src/health/ @thiagoftsm @vkalintiris
src/health/health.d/ @thiagoftsm
src/health/notifications/ @Ferroin @thiagoftsm
Expand All @@ -29,8 +30,8 @@ src/registry/ @novykh
src/streaming/ @thiagoftsm
system/ @Ferroin @tkatsoulas
tests/ @Ferroin @vkalintiris @tkatsoulas
web/ @thiagoftsm @vkalintiris
web/gui/ @novykh
src/web/ @thiagoftsm @vkalintiris
src/web/gui/ @novykh
src/logsmanagement/ @thiagoftsm

# Ownership by filetype (overwrites ownership by directory)
Expand Down
5 changes: 2 additions & 3 deletions .github/codeql/python-config.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
paths-ignore:
- .github
- build_external/
- ml/dlib
- ml/json
- src/ml/dlib
- tests/api
- web/gui
- src/web/gui
- src/collectors/python.d.plugin/python_modules/pyyaml*
- src/collectors/python.d.plugin/python_modules/third_party
- src/collectors/python.d.plugin/python_modules/urllib3
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@ updates:
labels:
- "no changelog"
- "area/ci"
- package-ecosystem: gomod
directory: /src/go/collectors/go.d.plugin
schedule:
interval: weekly
labels:
- "area/go"
19 changes: 15 additions & 4 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ area/docs:
- "*.md"
- "**/*.md"
- "**/*.mdx"
- diagrams/**
- docs/diagrams/**

# -----------------collectors----------------------

Expand All @@ -75,6 +75,7 @@ area/collectors:
- changed-files:
- any-glob-to-any-file:
- src/collectors/**
- src/go/collectors/go.d.plugin/**

collectors/plugins.d:
- any:
Expand Down Expand Up @@ -136,6 +137,12 @@ collectors/freeipmi:
- any-glob-to-any-file:
- src/collectors/freeipmi.plugin/**

collectors/go.d.plugin:
- any:
- changed-files:
- any-glob-to-any-file:
- src/go/collectors/go.d.plugin/**

collectors/idlejitter:
- any:
- changed-files:
Expand Down Expand Up @@ -216,6 +223,12 @@ collectors/xenstat:

# ----------------/collectors----------------------

area/go:
- any:
- changed-files:
- any-glob-to-any-file:
- src/go/**

area/health:
- any:
- changed-files:
Expand Down Expand Up @@ -265,14 +278,12 @@ area/tests:
- tests/**
- src/daemon/unit_test*
- coverity-scan.sh
- cppcheck.sh
- netdata.cppcheck

area/web:
- any:
- changed-files:
- any-glob-to-any-file:
- web/**
- src/web/**

area/logs-management:
- any:
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,17 @@ jobs:
src/aclk/aclk-schemas/
src/ml/dlib/
src/fluent-bit/
web/server/h2o/libh2o/
src/web/server/h2o/libh2o/
files_ignore: |
netdata.spec.in
**/*.md
- name: List all modified files in pattern
- name: List all changed files in pattern
continue-on-error: true
env:
ALL_MODIFIED_FILES: ${{ steps.check-files.outputs.all_modified_files }}
ALL_CHANGED_FILES: ${{ steps.check-files.outputs.all_changed_files }}
run: |
for file in ${ALL_MODIFIED_FILES}; do
echo "$file was modified"
for file in ${ALL_CHANGED_FILES}; do
echo "$file was changed"
done
- name: Check Run
id: check-run
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,17 @@ jobs:
src/aclk/aclk-schemas/
src/ml/dlib/
src/fluent-bit/
web/server/h2o/libh2o/
src/web/server/h2o/libh2o/
files_ignore: |
netdata.spec.in
**/*.md
- name: List all modified files in pattern
- name: List all changed files in pattern
continue-on-error: true
env:
ALL_MODIFIED_FILES: ${{ steps.check-files.outputs.all_modified_files }}
ALL_CHANGED_FILES: ${{ steps.check-files.outputs.all_changed_files }}
run: |
for file in ${ALL_MODIFIED_FILES}; do
echo "$file was modified"
for file in ${ALL_CHANGED_FILES}; do
echo "$file was changed"
done
- name: Check Run
id: check-run
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
outputs:
cpp: ${{ steps.cpp.outputs.run }}
python: ${{ steps.python.outputs.run }}
go: ${{ steps.go.outputs.run }}
steps:
- name: Clone repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -66,6 +67,19 @@ jobs:
else
echo "run=true" >> "${GITHUB_OUTPUT}"
fi
- name: Check for Go changes
id: go
run: |
if [ "${{ steps.always.outputs.run }}" = "false" ]; then
if git diff --name-only origin/${{ github.base_ref }} HEAD | grep -Eq 'src/go/*\.go' ; then
echo "run=true" >> "${GITHUB_OUTPUT}"
echo '::notice::Go code has changed, need to run CodeQL.'
else
echo "run=false" >> "${GITHUB_OUTPUT}"
fi
else
echo "run=true" >> "${GITHUB_OUTPUT}"
fi

analyze-cpp:
name: Analyze C/C++
Expand Down Expand Up @@ -116,3 +130,33 @@ jobs:
uses: github/codeql-action/analyze@v3
with:
category: "/language:python"

analyze-go:
name: Analyze Go
runs-on: ubuntu-latest
needs: prepare
if: needs.prepare.outputs.go == 'true'
strategy:
matrix:
tree:
- src/go/collectors/go.d.plugin
permissions:
security-events: write
steps:
- name: Git clone repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: go
- name: Autobuild
uses: github/codeql-action/autobuild@v3
with:
working-directory: ${{ matrix.tree }}
- name: Run CodeQL
uses: github/codeql-action/analyze@v3
with:
category: "/language:go"
2 changes: 1 addition & 1 deletion .github/workflows/dashboard-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Update Files
id: update
run: |
web/gui/bundle_dashboard_v1.py ${{ github.event.inputs.dashboard_version }}
src/web/gui/bundle_dashboard_v1.py ${{ github.event.inputs.dashboard_version }}
- name: Create Pull Request
id: pr
uses: peter-evans/create-pull-request@v6
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,17 @@ jobs:
src/aclk/aclk-schemas/
src/ml/dlib/
src/fluent-bit/
web/server/h2o/libh2o/
src/web/server/h2o/libh2o/
files_ignore: |
netdata.spec.in
**/*.md
- name: List all modified files in pattern
- name: List all changed files in pattern
continue-on-error: true
env:
ALL_MODIFIED_FILES: ${{ steps.check-files.outputs.all_modified_files }}
ALL_CHANGED_FILES: ${{ steps.check-files.outputs.all_changed_files }}
run: |
for file in ${ALL_MODIFIED_FILES}; do
echo "$file was modified"
for file in ${ALL_CHANGED_FILES}; do
echo "$file was changed"
done
- name: Check Run
id: check-run
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,16 @@ jobs:
src/aclk/aclk-schemas/
src/ml/dlib/
src/fluent-bit/
web/server/h2o/libh2o/
src/web/server/h2o/libh2o/
files_ignore: |
**/*.md
- name: List all modified files in pattern
- name: List all changed files in pattern
continue-on-error: true
env:
ALL_MODIFIED_FILES: ${{ steps.check-files.outputs.all_modified_files }}
ALL_CHANGED_FILES: ${{ steps.check-files.outputs.all_changed_files }}
run: |
for file in ${ALL_MODIFIED_FILES}; do
echo "$file was modified"
for file in ${ALL_CHANGED_FILES}; do
echo "$file was changed"
done
- name: Check Run
id: check-run
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
actionlint: ${{ steps.actionlint.outputs.run }}
clangformat: ${{ steps.clangformat.outputs.run }}
flake8: ${{ steps.flake8.outputs.run }}
golangci-lint: ${{ steps.golangci-lint.outputs.run }}
hadolint: ${{ steps.hadolint.outputs.run }}
shellcheck: ${{ steps.shellcheck.outputs.run }}
yamllint: ${{ steps.yamllint.outputs.run }}
Expand Down Expand Up @@ -59,6 +60,17 @@ jobs:
else
echo "run=false" >> "${GITHUB_OUTPUT}"
fi
- name: Check files for golangci-lint
id: golangci-lint
run: |
if [ "${{ contains(github.event.pull_request.labels.*.name, 'run-ci/golangci-lint') }}" = "true" ]; then
echo "run=true" >> "${GITHUB_OUTPUT}"
elif git diff --name-only origin/${{ github.base_ref }} HEAD -- | grep -Eq '.*\.go' ; then
echo "run=true" >> $GITHUB_OUTPUT
echo 'Go code has changed, need to run golangci-lint.'
else
echo "run=false" >> $GITHUB_OUTPUT
fi
- name: Check files for hadolint
id: hadolint
run: |
Expand Down Expand Up @@ -164,6 +176,26 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-check

golangci-lint:
name: golangci-lint
needs: prep-review
if: needs.prep-review.outputs.golangci-lint == 'true'
strategy:
matrix:
tree:
- src/go/collectors/go.d.plugin
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run golangci-lint
uses: reviewdog/action-golangci-lint@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-check
golangci_lint_flags: '--timeout=10m'
workdir: ${{ matrix.tree }}

hadolint:
name: hadolint
needs: prep-review
Expand Down
Loading
Loading