Skip to content

Migrate CI to dda #33587

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

Merged
merged 9 commits into from
Mar 5, 2025
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ jobs:
- run:
name: check go version
command: |
inv -e check-go-version
dda inv -e check-go-version
- run:
name: grab go deps
command: |
inv -e deps
dda inv -e deps
- run:
name: install go tooling
command: |
inv -e install-tools
dda inv -e install-tools
- save_cache:
<<: *save_deps
paths:
Expand All @@ -87,7 +87,7 @@ jobs:
- setup_remote_docker
- run:
name: run integration tests
command: inv -e integration-tests --race --remote-docker
command: dda inv -e integration-tests --race --remote-docker

docker_tests:
<<: *job_template
Expand All @@ -97,7 +97,7 @@ jobs:
- setup_remote_docker
- run:
name: run docker image tests
command: inv -e docker.test
command: dda inv -e docker.test

workflows:
version: 2
Expand Down
4 changes: 2 additions & 2 deletions .copyright-overrides.yml
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ go.opentelemetry.io/otel/semconv/internal: Copyright The OpenTelemetry Authors
go.opentelemetry.io/otel/semconv/v1.12.0: Copyright The OpenTelemetry Authors
golang.org/x/crypto/chacha20poly1305: Copyright (c) 2009 The Go Authors. All rights reserved

# Not added by inv generate-licenses but spotted by inv-e lint-licenses
# Not added by `dda inv generate-licenses` but spotted by `dda inv -e lint-licenses`
github.com/AdaLogics/go-fuzz-headers: AdamKorcz <[email protected]>|AdamKorcz <[email protected]>|Sebastiaan van Stijn <[email protected]>|AdaLogics <[email protected]>|Kazuyoshi Kato <[email protected]>
github.com/AdamKorcz/go-118-fuzz-build/testing: AdamKorcz <[email protected]>|AdamKorcz <[email protected]>|John Howard <[email protected]>|Kazuyoshi Kato <[email protected]>|Khaled Yakdan <[email protected]>|AdamKorcz <[email protected]>|Sebastiaan van Stijn <[email protected]>
github.com/Microsoft/go-winio/pkg/bindfilter: Copyright (c) 2015 Microsoft
Expand Down Expand Up @@ -395,4 +395,4 @@ github.com/jaegertracing/jaeger-idl/model/v1: ["Copyright (c) 2019 The Jaeger Au
github.com/jaegertracing/jaeger-idl/proto-gen/api_v2: ["Copyright (c) 2019 The Jaeger Authors.", "Copyright (c) 2017 Uber Technologies, Inc."]
github.com/jaegertracing/jaeger-idl/thrift-gen/agent: ["Copyright (c) 2019 The Jaeger Authors.", "Copyright (c) 2017 Uber Technologies, Inc."]
github.com/jaegertracing/jaeger-idl/thrift-gen/jaeger: ["Copyright (c) 2019 The Jaeger Authors.", "Copyright (c) 2017 Uber Technologies, Inc."]
github.com/jaegertracing/jaeger-idl/thrift-gen/zipkincore: ["Copyright (c) 2019 The Jaeger Authors.", "Copyright (c) 2017 Uber Technologies, Inc."]
github.com/jaegertracing/jaeger-idl/thrift-gen/zipkincore: ["Copyright (c) 2019 The Jaeger Authors.", "Copyright (c) 2017 Uber Technologies, Inc."]
1 change: 1 addition & 0 deletions .dda/version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.5.0
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@
/omnibus/config/software/snmp-traps.rb @DataDog/ndm-core
/omnibus/resources/*/msi/ @DataDog/windows-agent

# The following is managed by `inv lint-components` -- DO NOT EDIT
# The following is managed by `dda inv lint-components` -- DO NOT EDIT
# BEGIN COMPONENTS
/comp @DataDog/agent-runtimes
/comp/agent @DataDog/agent-runtimes
Expand Down
25 changes: 25 additions & 0 deletions .github/actions/install-dda/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Install dda
description: Installs the defined version of dda
inputs:
version:
description: The version of dda to install
required: false
default: ""
features:
description: A space-separated list of features to install
required: false
default: ""

runs:
using: composite
steps:
- name: Set version
id: set-version
run: echo "version=$(cat .dda/version)" >> $GITHUB_OUTPUT
shell: bash

- name: Install dda
uses: DataDog/datadog-agent-dev@e1806a36cb1da98f3a4852c6620b628bc31d81b6
with:
version: ${{ inputs.version || steps.set-version.outputs.version }}
features: ${{ inputs.features }}
4 changes: 2 additions & 2 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ updates:
- dependency-name: github.com/DataDog/datadog-agent/*
# Ignore golang.org/x/... deps to avoid noise, they are updated together, pretty regularly
- dependency-name: golang.org/x/*
# OpenTelemetry collector packages need to be updated with inv rather than dependabot
# OpenTelemetry collector packages need to be updated with `dda inv` rather than dependabot
- dependency-name: go.opentelemetry.io/collector/*
- dependency-name: github.com/open-telemetry/opentelemetry-collector-contrib/*
schedule:
Expand Down Expand Up @@ -53,7 +53,7 @@ updates:
- dependency-name: github.com/mailru/easyjson
# Ignore golang.org/x/... deps to avoid noise, they are updated together, pretty regularly
- dependency-name: golang.org/x/*
# OpenTelemetry collector packages need to be updated with inv rather than dependabot
# OpenTelemetry collector packages need to be updated with `dda inv` rather than dependabot
- dependency-name: go.opentelemetry.io/collector/*
- dependency-name: github.com/open-telemetry/opentelemetry-collector-contrib/*
schedule:
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/ask_dependabot_pr_review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ jobs:
with:
python-version-file: .python-version
cache: 'pip'
cache-dependency-path: '**/requirements*.txt'
cache-dependency-path: '.dda/version'

- name: Install dda
uses: ./.github/actions/install-dda
with:
features: legacy-tasks

- name: Install dependencies
run: pip install -r requirements.txt -r tasks/requirements.txt

# Use a token so that the ask-review workflow is triggered
- uses: actions/create-github-app-token@0d564482f06ca65fa9e77e2510873638c82206f2 # v1.11.5
id: app-token
Expand All @@ -43,4 +45,4 @@ jobs:
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
run: inv -e issue.add-reviewers -p $PR_NUMBER
run: dda inv -e issue.add-reviewers -p $PR_NUMBER
11 changes: 5 additions & 6 deletions .github/workflows/assess_permissions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,13 @@ jobs:
python-version-file: .python-version
cache: "pip"

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r tasks/libs/requirements-github.txt
- name: Install dda
uses: ./.github/actions/install-dda
with:
features: legacy-tasks legacy-github

- name: Assess Repository Permissions
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_DATADOG_AGENT_BOT_TOKEN: ${{ secrets.SLACK_DATADOG_AGENT_BOT_TOKEN }}
run: inv -e github.check-permissions --repo ${{ matrix.value }}
run: dda inv -e github.check-permissions --repo ${{ matrix.value }}
8 changes: 5 additions & 3 deletions .github/workflows/assign_issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
auto_assign_issue:
runs-on: ubuntu-latest
container:
container:
image: ghcr.io/datadog/agent-issue-auto-assign:latest
credentials:
username: ${{ github.actor }}
Expand All @@ -22,10 +22,12 @@ jobs:
- name: Install dependencies
# Dependencies are installed at runtime. Otherwise it would create a huge image see https://hub.docker.com/r/pytorch/pytorch/tags
run: |
pip install --upgrade pip && pip install --no-compile --no-cache-dir torch transformers invoke codeowners slack-sdk PyGithub python-gitlab semver
pip install --upgrade pip
pip install --no-compile --no-cache-dir torch transformers "git+https://github.com/DataDog/datadog-agent-dev.git@v$(cat .dda/version)"
dda self dep sync -f legacy-tasks
- name: Assign issue
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_DATADOG_AGENT_BOT_TOKEN : ${{ secrets.SLACK_DATADOG_AGENT_BOT_TOKEN }}
run: |
inv -e issue.assign-owner -i ${{ github.event.issue.number }}
dda inv -e issue.assign-owner -i ${{ github.event.issue.number }}
17 changes: 9 additions & 8 deletions .github/workflows/buildimages-update.yml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you have a chance to test the workflows to make sure they still work ?
The same change in buildimages broke a similar workflow...

Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,20 @@ jobs:
# in case it's a Go update PR
go-version: ${{ inputs.go_version }}

- name: Install python dependencies
run: |
python3 -m pip install -r requirements.txt
- name: Install dda
uses: ./.github/actions/install-dda
with:
features: legacy-tasks

- name: Get current Go version
id: current_go_version
run: |
echo "GO_VERSION=$(inv go-version)" >> $GITHUB_OUTPUT
echo "GO_VERSION=$(dda inv go-version)" >> $GITHUB_OUTPUT
- name: Get current buildimage tag
id: current_buildimage_tag
run: |
echo "BUILDIMAGE_TAG=$(inv buildimages.get-tag)" >> $GITHUB_OUTPUT
echo "BUILDIMAGE_TAG=$(dda inv buildimages.get-tag)" >> $GITHUB_OUTPUT
- name: Update buildimages IDs and Go version
id: update_build_images
Expand All @@ -96,10 +97,10 @@ jobs:
IMAGES_ID: ${{ inputs.images_id }}
run: |
if [ "$CURRENT_GO_VERSION" = "$INPUT_GO_VERSION" ]; then
inv -e buildimages.update --tag "$IMAGES_ID" "$TEST_VERSION_FLAG"
dda inv -e buildimages.update --tag "$IMAGES_ID" "$TEST_VERSION_FLAG"
echo "MESSAGE=Update buildimages ID to $IMAGES_ID" >> $GITHUB_OUTPUT
else
inv -e update-go --image-tag "$IMAGES_ID" "$TEST_VERSION_FLAG" $INCLUDE_OTEL_MODULES -v "$INPUT_GO_VERSION"
dda inv -e update-go --image-tag "$IMAGES_ID" "$TEST_VERSION_FLAG" $INCLUDE_OTEL_MODULES -v "$INPUT_GO_VERSION"
echo "MESSAGE=Update Go version to $INPUT_GO_VERSION" >> $GITHUB_OUTPUT
fi
Expand Down Expand Up @@ -151,7 +152,7 @@ jobs:
GITHUB_REF: ${{ github.ref }}
run: |
# Generate the PR description
inv -e buildimages.generate-pr-body \
dda inv -e buildimages.generate-pr-body \
"$CURRENT_BUILDIMAGE_TAG" \
"$IMAGES_ID" \
"$CURRENT_GO_VERSION" \
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/bump_integrations_core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,11 @@ jobs:
python-version-file: .python-version
cache: "pip"

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r tasks/libs/requirements-github.txt
pip install -r tasks/requirements_release_tasks.txt
- name: Install dda
uses: ./.github/actions/install-dda
with:
features: legacy-tasks legacy-github legacy-release

- name: Bump Integrations Core
run: |
inv release.bump-integrations-core --slack-webhook ${{ secrets.BUMP_INTEGRATIONS_CORE_SLACK_WEBHOOK }}
dda inv release.bump-integrations-core --slack-webhook ${{ secrets.BUMP_INTEGRATIONS_CORE_SLACK_WEBHOOK }}
10 changes: 5 additions & 5 deletions .github/workflows/chase_for_qa_cards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ jobs:
with:
python-version-file: .python-version
cache: "pip"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt -r tasks/libs/requirements-github.txt -r tasks/requirements_release_tasks.txt
- name: Install dda
uses: ./.github/actions/install-dda
with:
features: legacy-tasks legacy-github legacy-release
- name: Chase for QA cards
env:
ATLASSIAN_USERNAME : ${{ secrets.ATLASSIAN_USERNAME }}
ATLASSIAN_PASSWORD : ${{ secrets.ATLASSIAN_PASSWORD }}
SLACK_DATADOG_AGENT_BOT_TOKEN : ${{ secrets.SLACK_DATADOG_AGENT_BOT_TOKEN }}
VERSION: ${{ github.event.inputs.version }}
run: |
inv -e release.chase-for-qa-cards -v "$VERSION"
dda inv -e release.chase-for-qa-cards -v "$VERSION"
10 changes: 5 additions & 5 deletions .github/workflows/chase_release_managers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ jobs:
with:
python-version-file: .python-version
cache: "pip"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt -r tasks/libs/requirements-github.txt -r tasks/requirements_release_tasks.txt
- name: Install dda
uses: ./.github/actions/install-dda
with:
features: legacy-tasks
- name: Chase release managers
env:
ATLASSIAN_USERNAME : ${{ secrets.ATLASSIAN_USERNAME }}
ATLASSIAN_PASSWORD : ${{ secrets.ATLASSIAN_PASSWORD }}
SLACK_DATADOG_AGENT_BOT_TOKEN : ${{ secrets.SLACK_DATADOG_AGENT_BOT_TOKEN }}
VERSION: ${{ github.event.inputs.version }}
run: |
inv -e release.chase-release-managers --version "$VERSION"
dda inv -e release.chase-release-managers --version "$VERSION"
10 changes: 6 additions & 4 deletions .github/workflows/code_review_complexity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ jobs:
with:
python-version-file: .python-version
cache: 'pip'
cache-dependency-path: '**/requirements*.txt'
- name: Install dependencies
run: pip install -r requirements.txt -r tasks/requirements.txt
cache-dependency-path: '.dda/version'
- name: Install dda
uses: ./.github/actions/install-dda
with:
features: legacy-tasks
- name: Check code review complexity
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
run: inv -e github.assign-codereview-label --pr-id="$PR_NUMBER"
run: dda inv -e github.assign-codereview-label --pr-id="$PR_NUMBER"
18 changes: 9 additions & 9 deletions .github/workflows/collector-generate-and-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ jobs:
with:
go-version-file: .go-version

- name: Install Dependencies
run: |
python3 -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install dda
uses: ./.github/actions/install-dda
with:
features: legacy-tasks

- name: Run Collector Update Script
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
inv -e install-tools
inv -e collector.update
inv -e collector.generate
inv -e generate-licenses
inv -e collector.pull-request
dda inv -e install-tools
dda inv -e collector.update
dda inv -e collector.generate
dda inv -e generate-licenses
dda inv -e collector.pull-request
Loading