Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions .github/workflows/update-agent-protobuf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,8 @@ jobs:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.24.0"
- run: sudo apt-get update
- run: sudo apt-get -y install protobuf-compiler
- run: protoc --version && go version
- name: Generate descriptor
run: utils/scripts/update_protobuf.sh
run: docker run --rm -v "$(pwd):/work" -w /work golang:1.24.5 /work/utils/scripts/update_protobuf.sh
- uses: DataDog/dd-octo-sts-action@acaa02eee7e3bb0839e4272dacb37b8f3b58ba80 # v1.0.3
id: octo-sts
with:
Expand Down
5 changes: 3 additions & 2 deletions utils/scripts/compute_impacted_scenario.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,16 +182,17 @@ def main() -> None:
scenario_groups.open_telemetry,
scenario_groups.external_processing,
],
r"utils/scripts/add-system-tests-label-on-known-tickets\.py": None,
r"utils/scripts/ai/.*": None,
r"utils/scripts/check_version\.sh": None,
r"utils/scripts/compute_impacted_scenario\.py": None,
r"utils/scripts/replay_scenarios\.sh": None,
r"utils/scripts/get-nightly-logs\.py": None,
r"utils/scripts/get-workflow-summary\.py": None,
r"utils/scripts/grep-nightly-logs.py\.py": None,
r"utils/scripts/add-system-tests-label-on-known-tickets\.py": None,
r"utils/scripts/parametric/.*": scenarios.parametric,
r"utils/scripts/replay_scenarios\.sh": None,
r"utils/scripts/ssi_wizards/.*": None,
r"utils/scripts/update_protobuf\.sh": None,
r"utils/virtual_machine/.*": scenario_groups.onboarding,
r"utils/.*": scenario_groups.all,
r"\.cursorrules": None,
Expand Down
17 changes: 15 additions & 2 deletions utils/scripts/update_protobuf.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/usr/bin/env bash

# this bash script is supposed to be executed with this command:
# docker run --rm -v "$(pwd):/work" -w /work golang:1.24.5 /work/utils/scripts/update_protobuf.sh

set -eu

SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
Expand All @@ -8,6 +12,7 @@ readonly BINARIES_DIR="$ROOT_DIR/binaries"
export GOPATH="$BINARIES_DIR/go"
export GO111MODULE=off


function git_clone_or_update() {
local -r repo="$1" path="$2"
echo "Updating $repo"
Expand All @@ -22,10 +27,16 @@ function git_clone_or_update() {
fi
}

echo "go get github.com/gogo/protobuf/gogoproto"
go get github.com/gogo/protobuf/gogoproto
apt-get update
apt-get -y install protobuf-compiler
protoc --version && go version

# Ensure GOPATH structure exists
mkdir -p "$GOPATH/src" "$GOPATH/bin" "$GOPATH/pkg"

mkdir -p "$GOPATH/src/github.com/DataDog"
mkdir -p "$GOPATH/src/github.com/gogo"
git_clone_or_update https://github.com/gogo/protobuf.git "$GOPATH/src/github.com/gogo/protobuf"
git_clone_or_update https://github.com/DataDog/datadog-agent.git "$GOPATH/src/github.com/DataDog/datadog-agent"
git_clone_or_update https://[email protected]/DataDog/agent-payload.git "$GOPATH/src/github.com/DataDog/agent-payload"

Expand All @@ -45,3 +56,5 @@ protoc \
--descriptor_set_out="$ROOT_DIR/utils/proxy/_decoders/agent.descriptor" \
"$GOPATH/src/github.com/DataDog/datadog-agent/pkg/proto/datadog/trace/agent_payload.proto" \
"$GOPATH/src/github.com/DataDog/agent-payload/proto/metrics/agent_payload.proto"

echo "Success"