Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/go_modules/github.com/containerd/…
Browse files Browse the repository at this point in the history
…cgroups/v3-3.0.4
  • Loading branch information
L3n41c authored Nov 28, 2024
2 parents baa0e7d + b1170d5 commit 77c5679
Show file tree
Hide file tree
Showing 862 changed files with 18,345 additions and 15,541 deletions.
171 changes: 0 additions & 171 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,6 @@ jobs:
name: grab go deps
command: |
inv -e deps
- run:
name: build rtloader
command: |
inv rtloader.make --install-prefix=/go/src/github.com/DataDog/datadog-agent/dev
inv rtloader.install
- run:
name: lint rtloader
command: |
inv rtloader.format --raise-if-changed
- run:
name: test rtloader
command: |
inv rtloader.test
- run:
name: install go tooling
command: |
Expand All @@ -91,19 +78,6 @@ jobs:
- /go/src/github.com/DataDog/datadog-agent/dev
- /usr/local/bin

unit_tests:
<<: *job_template
resource_class: xlarge
steps:
- restore_cache: *restore_source
- restore_cache: *restore_deps
- run:
name: run unit tests
no_output_timeout: 20m
command: inv -e test --rerun-fails=2 --coverage --race --profile --cpus 8 --build-stdlib --test-washer
environment:
GO_TEST_SKIP_FLAKE: "true"

integration_tests:
<<: *job_template
resource_class: large
Expand All @@ -115,80 +89,6 @@ jobs:
name: run integration tests
command: inv -e integration-tests --race --remote-docker

go_linting:
<<: *job_template
resource_class: xlarge
steps:
- restore_cache: *restore_source
- restore_cache: *restore_deps
- run:
name: run go linters
no_output_timeout: 20m
command: inv -e linter.go

licenses_linting:
<<: *job_template
steps:
- restore_cache: *restore_source
- restore_cache: *restore_deps
- run:
name: run license linting
command: inv -e lint-licenses

copyrights_linting:
<<: *job_template
steps:
- restore_cache: *restore_source
- restore_cache: *restore_deps
- run:
name: run copyrights linting
command: inv -e linter.copyrights

filename_linting:
<<: *job_template
steps:
- restore_cache: *restore_source
- restore_cache: *restore_deps
- run:
name: run filename linting
command: inv -e linter.filenames

shell_linting:
<<: *job_template
steps:
- restore_cache: *restore_source
- restore_cache: *restore_deps
- run:
name: Install shellcheck
command: inv -e install-shellcheck
- run:
name: Print shellcheck version
command: shellcheck --version
- run:
name: Run shellcheck
#Excludes:
#SC2028: echo may not expand escape sequences. Use printf.
#SC2059: Don't use variables in the printf format string. Use printf "..%s.." "$foo".
command: shellcheck --severity=info -e SC2059 -e SC2028 --shell=bash ./cmd/**/*.sh ./omnibus/package-scripts/*/*

component_linting:
<<: *job_template
steps:
- restore_cache: *restore_source
- restore_cache: *restore_deps
- run:
name: run component linting
command: inv -e lint-components lint-fxutil-oneshot-test

codeowner_linting:
<<: *job_template
steps:
- restore_cache: *restore_source
- restore_cache: *restore_deps
- run:
name: run CODEOWNER linting
command: inv -e github.lint-codeowner

docker_tests:
<<: *job_template
steps:
Expand All @@ -202,40 +102,6 @@ jobs:
name: run docker image integration tests
command: inv -e docker.integration-tests

build_binaries:
<<: *job_template
resource_class: large
steps:
- restore_cache: *restore_source
- restore_cache: *restore_deps
- run:
name: build dogstatsd
command: inv -e dogstatsd.build --static
- run:
name: build agent
command: inv -e agent.build --exclude-rtloader

build_iot_agent:
<<: *job_template
steps:
- restore_cache: *restore_source
- restore_cache: *restore_deps
- run:
name: build iot agent
command: inv -e agent.build --flavor iot
- run:
name: test iot agent
command: DD_HOSTNAME=test-circleci-hostname ./bin/agent/agent -c ./bin/agent/dist check cpu

documentation_generation:
<<: *job_template
steps:
- restore_cache: *restore_source
- restore_cache: *restore_deps
- run:
name: generate doxygen documentation
command: inv -e rtloader.generate-doc

workflows:
version: 2
test_and_build:
Expand All @@ -244,46 +110,9 @@ workflows:
- dependencies:
requires:
- checkout_code
- unit_tests:
requires:
- dependencies
- integration_tests:
requires:
- dependencies
- go_linting:
requires:
- dependencies
- licenses_linting:
requires:
- dependencies
- copyrights_linting:
requires:
- dependencies
- filename_linting:
requires:
- dependencies
- shell_linting:
requires:
- dependencies
- component_linting:
requires:
- dependencies
- codeowner_linting:
requires:
- dependencies
- docker_tests:
requires:
- dependencies
- documentation_generation:
requires:
- dependencies
- build_binaries:
requires:
- unit_tests
- integration_tests
- docker_tests
- build_iot_agent:
requires:
- unit_tests
- integration_tests
- docker_tests
5 changes: 3 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@
/cmd/otel-agent/ @DataDog/opentelemetry
/cmd/process-agent/ @DataDog/processes
/cmd/serverless/ @DataDog/serverless @Datadog/serverless-aws
/cmd/serverless/dependencies*.txt @DataDog/serverless @DataDog/agent-shared-components
/cmd/serverless-init/ @DataDog/serverless
/cmd/system-probe/ @DataDog/ebpf-platform
/cmd/system-probe/config/adjust_npm.go @DataDog/ebpf-platform @DataDog/Networks
Expand All @@ -238,6 +237,7 @@
/cmd/system-probe/windows_resources/ @DataDog/windows-kernel-integrations
/cmd/system-probe/main_windows*.go @DataDog/windows-kernel-integrations
/cmd/system-probe/api/client/client_windows.go @DataDog/windows-kernel-integrations
/cmd/system-probe/api/server/listener_windows.go @DataDog/windows-kernel-integrations
/cmd/systray/ @DataDog/windows-agent
/cmd/security-agent/ @DataDog/agent-security
/cmd/installer/ @DataDog/fleet @DataDog/windows-agent
Expand Down Expand Up @@ -372,6 +372,7 @@
/pkg/clusteragent/autoscaling/ @DataDog/container-integrations
/pkg/clusteragent/admission/mutate/autoscaling @DataDog/container-integrations
/pkg/clusteragent/admission/mutate/autoinstrumentation/ @DataDog/container-platform @DataDog/injection-platform
/pkg/clusteragent/admission/mutate/cwsinstrumentation @Datadog/agent-security
/pkg/clusteragent/orchestrator/ @DataDog/container-app
/pkg/clusteragent/telemetry/ @DataDog/apm-trace-storage
/pkg/collector/ @DataDog/agent-metrics-logs
Expand Down Expand Up @@ -464,6 +465,7 @@
/pkg/util/pdhutil/ @DataDog/windows-agent
/pkg/util/winutil/ @DataDog/windows-agent
/pkg/util/testutil/flake @DataDog/agent-devx-loops
/pkg/util/testutil/docker @DataDog/universal-service-monitoring @DataDog/ebpf-platform
/pkg/util/trie @DataDog/container-integrations
/pkg/languagedetection @DataDog/processes @DataDog/universal-service-monitoring
/pkg/linters/ @DataDog/agent-devx-loops
Expand All @@ -487,7 +489,6 @@
/pkg/process/monitor/ @DataDog/universal-service-monitoring
/pkg/process/net/ @DataDog/universal-service-monitoring @DataDog/Networks
/pkg/process/net/common_windows.go @DataDog/windows-agent
/pkg/process/net/windows_pipe.go @DataDog/windows-kernel-integrations
/pkg/proto/datadog/remoteconfig/ @DataDog/remote-config
/pkg/proto/pbgo/ # do not notify anyone
/pkg/proto/pbgo/trace @DataDog/agent-apm
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
go-version-file: ".go-version"

- name: Initialize CodeQL
uses: github/codeql-action/init@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
uses: github/codeql-action/init@4f3212b61783c3c68e8309a0f18a699764811cda # v3.27.1
with:
languages: ${{ matrix.language }}
config: |
Expand All @@ -67,4 +67,4 @@ jobs:
invoke agent.build --build-exclude=systemd
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
uses: github/codeql-action/analyze@4f3212b61783c3c68e8309a0f18a699764811cda # v3.27.1
72 changes: 72 additions & 0 deletions .github/workflows/collector-generate-and-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Update OTel Collector Dependencies and Generate OTel Agent

on:
schedule:
- cron: '0 12 * * 3'
workflow_dispatch:

jobs:
update-and-generate:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Set date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT

- name: Checkout repository
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- name: Set up Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: '3.12.6'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run update task
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: inv -e collector.update

- name: Run generate task
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: inv -e collector.generate

- name: Check for changes
id: check_changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .
if git diff-index --quiet HEAD; then
echo "No changes detected"
echo "changes_detected=false" >> $GITHUB_OUTPUT
else
echo "Changes detected"
echo "changes_detected=true" >> $GITHUB_OUTPUT
fi
- name: Commit changes
if: steps.check_changes.outputs.changes_detected == 'true'
run: |
git switch -c update-otel-collector-dependencies-${{ steps.date.outputs.date }}
git commit -m "Update OTel Collector dependencies and generate OTel Agent"
git push -u origin update-otel-collector-dependencies-${{ steps.date.outputs.date }}
- name: Install GitHub CLI
if: steps.check_changes.outputs.changes_detected == 'true'
run: |
sudo apt-get update
sudo apt-get install gh
- name: Create draft pull request
if: steps.check_changes.outputs.changes_detected == 'true'
run: |
gh auth login --with-token <<< ${{ secrets.GITHUB_TOKEN }}
gh pr create --title "Update OTel collector dependencies" --body "This PR updates the OTel Collector dependencies to the latest version. Please ensure that all tests pass before marking ready for review." --base main --head update-otel-collector-dependencies-${{ steps.date.outputs.date }} --draft
2 changes: 1 addition & 1 deletion .github/workflows/label-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ jobs:
with:
ref: ${{ github.head_ref }}
- name: Setup python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: 3.11
cache: 'pip'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/report-merged-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
persist-credentials: false

- name: Setup Python3
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: "3.12.6"
cache: "pip"
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/serverless-binary-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: "Serverless Binary Size"

on:
pull_request:
paths:
- 'cmd/serverless/**'
- 'cmd/serverless-init/**'
- 'pkg/serverless/**'

env:
SIZE_ALLOWANCE: fromJSON(1000000) # 1 MB
Expand Down
Loading

0 comments on commit 77c5679

Please sign in to comment.