Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
55e4029
try to git devcontainer for usage in workspaces
KevinFairise2 Mar 16, 2026
09aa095
Add workspace feature for devcontainer
KevinFairise2 Mar 16, 2026
a6d3b74
Update config
KevinFairise2 Mar 30, 2026
e8a2204
Try prebuild devcontainer
KevinFairise2 Apr 1, 2026
69220be
remove secret
KevinFairise2 Apr 1, 2026
d5fee43
Update devcontainer prebuilt image reference (#48729)
gh-worker-campaigns-3e9aa4[bot] Apr 1, 2026
af727e3
Remove onCreate
KevinFairise2 Apr 1, 2026
523a493
Update devcontainer prebuilt image reference (#48740)
gh-worker-campaigns-3e9aa4[bot] Apr 1, 2026
e13eebb
Update devcontainer prebuilt image reference (#48741)
gh-worker-campaigns-3e9aa4[bot] Apr 1, 2026
b890acb
Remove all runtime options devcontainer
KevinFairise2 Apr 8, 2026
8dc6682
Update devcontainer prebuilt image reference (#49049)
gh-worker-campaigns-3e9aa4[bot] Apr 8, 2026
49332b2
Update prebuild ref
KevinFairise2 Apr 9, 2026
8ea3daa
Merge branch 'kfairise/devcontainer-git' of github.com:DataDog/datado…
KevinFairise2 Apr 9, 2026
43cdbd0
Update
KevinFairise2 Apr 9, 2026
54421e0
Fix syntax
KevinFairise2 Apr 9, 2026
3cd2d6c
Update devcontainer prebuilt image reference (#49121)
gh-worker-campaigns-3e9aa4[bot] Apr 9, 2026
718ac8e
Update
KevinFairise2 Apr 9, 2026
3d683b8
Update devcontainer prebuilt image reference (#49146)
gh-worker-campaigns-3e9aa4[bot] Apr 9, 2026
2fb272a
Update
KevinFairise2 Apr 10, 2026
c91a840
Update
KevinFairise2 Apr 10, 2026
48c9464
Update devcontainer prebuilt image reference (#49188)
gh-worker-campaigns-3e9aa4[bot] Apr 10, 2026
a032f39
Update devenv
KevinFairise2 Apr 13, 2026
9d831de
Update
KevinFairise2 Apr 13, 2026
4ba624f
Another try
KevinFairise2 Apr 13, 2026
c5a32d6
update
KevinFairise2 Apr 13, 2026
93648bc
Use not so modified buildimage
KevinFairise2 Apr 16, 2026
3e39dbf
New one
KevinFairise2 Apr 17, 2026
3d497a9
New
KevinFairise2 Apr 17, 2026
15cc096
Another one
KevinFairise2 Apr 20, 2026
8886314
Post create command to fix paths, and move claude binary
KevinFairise2 Apr 20, 2026
883ca0e
Update devcontainer prebuilt image reference (#49593)
gh-worker-campaigns-3e9aa4[bot] Apr 20, 2026
03d594b
Fix docker group issue and install-tools
KevinFairise2 Apr 20, 2026
34fa9c3
Merge branch 'kfairise/devcontainer-git' of github.com:DataDog/datado…
KevinFairise2 Apr 20, 2026
cbecca1
Update again with latest one
KevinFairise2 Apr 21, 2026
2c176c8
Update devcontainer prebuilt image reference (#49653)
gh-worker-campaigns-3e9aa4[bot] Apr 21, 2026
db229f0
Update devcontainer prebuilt image reference (#49665)
gh-worker-campaigns-3e9aa4[bot] Apr 21, 2026
84e2c10
Update devcontainer prebuilt image reference (#49717)
gh-worker-campaigns-3e9aa4[bot] Apr 22, 2026
cca075a
Update post create
KevinFairise2 Apr 22, 2026
b6d4e7e
Update permissions
KevinFairise2 Apr 22, 2026
9a29687
Update install.sh to copy postCreate
KevinFairise2 Apr 22, 2026
a837a10
Update devcontainer prebuilt image reference (#49726)
gh-worker-campaigns-3e9aa4[bot] Apr 23, 2026
5f97d00
Remove su and update image
KevinFairise2 Apr 23, 2026
7bd8618
Update waitFor
KevinFairise2 Apr 23, 2026
39a7def
Update
KevinFairise2 Apr 24, 2026
2c77e8c
Update postCreate env variables
KevinFairise2 Apr 24, 2026
b985141
update
KevinFairise2 Apr 24, 2026
455506b
Merge branch 'main' into kfairise/devcontainer-git
KevinFairise2 Apr 24, 2026
c6d4bf6
Fix gitignore
KevinFairise2 Apr 24, 2026
1f72ca4
Add renovate + check to make sure the image is prebuild
KevinFairise2 Apr 24, 2026
2944356
Merge branch 'main' of github.com:DataDog/datadog-agent into kfairise…
KevinFairise2 Apr 28, 2026
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
13 changes: 13 additions & 0 deletions .gitlab/.pre/common/prebuild-workspace-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
prebuild-workspace-image-check:
image: registry.ddbuild.io/ci/datadog-agent-buildimages/linux$CI_IMAGE_LINUX_SUFFIX:$CI_IMAGE_LINUX
needs: []
stage: setup
tags: ["arch:amd64", "specific:true"]
rules:
- !reference [.except_main_release_or_mq]
- changes:
paths:
- .devcontainer/datadog/default/**/*
compare_to: $COMPARE_TO_BRANCH
script:
- bash tools/prebuild-devcontainer-check.sh
3 changes: 3 additions & 0 deletions .gitlab/JOBOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -274,3 +274,6 @@ validate_experiment_systemd_units @DataDog/fleet

# Fuzz testing
test_fuzz @DataDog/chaos-engineering

# Workspaces
prebuild-workspace-image-check @DataDog/agent-devx
10 changes: 10 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,16 @@
"versioningTemplate": "loose",
"datasourceTemplate": "custom.linux-images"
},
{
"customType": "regex",
"managerFilePatterns": [".devcontainer/datadog/default/prebuild-devcontainer.json"],
"matchStrings": [
"\"image\":\\s*\"registry.ddbuild.io/ci/datadog-agent-buildimages/dev-env-workspace:(?<currentValue>v[^\"]+)\""
],
"depNameTemplate": "linux-images",
"versioningTemplate": "loose",
"datasourceTemplate": "custom.linux-images"
},
{
"customType": "regex",
"managerFilePatterns": [".gitlab-ci.yml"],
Expand Down
65 changes: 65 additions & 0 deletions tools/prebuild-devcontainer-check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#!/usr/bin/env bash

set -euo pipefail

# This script is designed to be standalone, for use in any repo, and as part of a pre-commit hook,
# so it must not have any external dependencies beyond `git`

# logs-backend will make SOURCE_REF/TARGET_REF available as part of the CI; DDCI will make DDCI_*
# variables available. They have opposite meanings (see https://github.com/DataDog/dd-source/pull/194529#issuecomment-2775985239).
source_ref="${DDCI_PULL_REQUEST_TARGET_SHA:-${SOURCE_REF:-}}"
if [[ -z "$source_ref" ]]; then
source_ref="$(git symbolic-ref -q refs/remotes/origin/HEAD)"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Handle missing origin/HEAD before diffing devcontainer changes

When this script runs from the new GitLab job, none of DDCI_PULL_REQUEST_* or SOURCE_REF/TARGET_REF are set by the workflow, so it falls back to git symbolic-ref -q refs/remotes/origin/HEAD. In GitLab-style checkouts created by git init/fetch (and in this workspace), that symbolic ref can be absent; with set -e the assignment exits immediately with status 1 before either diff runs, causing prebuild-workspace-image-check to fail for any matching .devcontainer/datadog/default change without the intended error message. Fall back to the configured compare branch (for example origin/$COMPARE_TO_BRANCH) or tolerate the missing symbolic ref before proceeding.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That script is copy pasted from Workspaces doc

source_ref="${source_ref##refs/remotes/}"
fi
target_ref="${DDCI_PULL_REQUEST_SOURCE_SHA:-${TARGET_REF:-HEAD}}"

# Get any dirs containing changed prebuild-devcontainer.json files, and make sure that those dirs
# are _also_ present in the list of dirs containing changed devcontainer.json files.

devcontainer_prebuild_changed_dirs=()
while IFS='' read -r line; do
devcontainer_prebuild_changed_dirs+=("$(dirname "$line")")
done < <(git diff --name-only "$source_ref...$target_ref" -- '**/prebuild-devcontainer.json')

devcontainer_changed_dirs=()
while IFS='' read -r line; do
devcontainer_changed_dirs+=("$(dirname "$line")")
done < <(git diff --name-only "$source_ref...$target_ref" -- '**/devcontainer.json')

bad_dirs=()
exitcode=0
for devcontainer_prebuild_dir in "${devcontainer_prebuild_changed_dirs[@]}"; do

matched=0
for devcontainer_dir in "${devcontainer_changed_dirs[@]}"; do
if [[ "$devcontainer_prebuild_dir" == "$devcontainer_dir" ]]; then
matched=1
break
fi
done

if (( !matched )); then
bad_dirs+=("$devcontainer_prebuild_dir")
fi

done

if (( ${#bad_dirs[@]} > 0 )); then
printf $'\033[91m\033[1m'"ERROR:"$'\033[0m'" "
cat <<EOF
The following prebuild-devcontainer.json files were modified but the associated devcontainer.json
files were not. If this is a feature branch, then a campaigner PR will be opened against it with
updated devcontainer.json files; if this doesn't happen soon, please contact #workspaces in slack.
For more information, see
https://datadoghq.atlassian.net/wiki/spaces/DEVX/pages/4194009834/Creating+Specialized+Dev+Containers+and+Features#How-Can-a-Dev-Container-Launch-Faster"
EOF

for bad_dir in "${bad_dirs[@]}"; do
echo " - $bad_dir/prebuild-devcontainer.json"
done

exitcode=1
fi

exit "$exitcode"
Loading