-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Configure renovate to automatically update workspace devcontainer #49873
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
gh-worker-dd-mergequeue-cf854d
merged 50 commits into
main
from
kfairise/auto-workspace-update
Apr 29, 2026
+91
−0
Merged
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 09aa095
Add workspace feature for devcontainer
KevinFairise2 a6d3b74
Update config
KevinFairise2 e8a2204
Try prebuild devcontainer
KevinFairise2 69220be
remove secret
KevinFairise2 d5fee43
Update devcontainer prebuilt image reference (#48729)
gh-worker-campaigns-3e9aa4[bot] af727e3
Remove onCreate
KevinFairise2 523a493
Update devcontainer prebuilt image reference (#48740)
gh-worker-campaigns-3e9aa4[bot] e13eebb
Update devcontainer prebuilt image reference (#48741)
gh-worker-campaigns-3e9aa4[bot] b890acb
Remove all runtime options devcontainer
KevinFairise2 8dc6682
Update devcontainer prebuilt image reference (#49049)
gh-worker-campaigns-3e9aa4[bot] 49332b2
Update prebuild ref
KevinFairise2 8ea3daa
Merge branch 'kfairise/devcontainer-git' of github.com:DataDog/datado…
KevinFairise2 43cdbd0
Update
KevinFairise2 54421e0
Fix syntax
KevinFairise2 3cd2d6c
Update devcontainer prebuilt image reference (#49121)
gh-worker-campaigns-3e9aa4[bot] 718ac8e
Update
KevinFairise2 3d683b8
Update devcontainer prebuilt image reference (#49146)
gh-worker-campaigns-3e9aa4[bot] 2fb272a
Update
KevinFairise2 c91a840
Update
KevinFairise2 48c9464
Update devcontainer prebuilt image reference (#49188)
gh-worker-campaigns-3e9aa4[bot] a032f39
Update devenv
KevinFairise2 9d831de
Update
KevinFairise2 4ba624f
Another try
KevinFairise2 c5a32d6
update
KevinFairise2 93648bc
Use not so modified buildimage
KevinFairise2 3e39dbf
New one
KevinFairise2 3d497a9
New
KevinFairise2 15cc096
Another one
KevinFairise2 8886314
Post create command to fix paths, and move claude binary
KevinFairise2 883ca0e
Update devcontainer prebuilt image reference (#49593)
gh-worker-campaigns-3e9aa4[bot] 03d594b
Fix docker group issue and install-tools
KevinFairise2 34fa9c3
Merge branch 'kfairise/devcontainer-git' of github.com:DataDog/datado…
KevinFairise2 cbecca1
Update again with latest one
KevinFairise2 2c176c8
Update devcontainer prebuilt image reference (#49653)
gh-worker-campaigns-3e9aa4[bot] db229f0
Update devcontainer prebuilt image reference (#49665)
gh-worker-campaigns-3e9aa4[bot] 84e2c10
Update devcontainer prebuilt image reference (#49717)
gh-worker-campaigns-3e9aa4[bot] cca075a
Update post create
KevinFairise2 b6d4e7e
Update permissions
KevinFairise2 9a29687
Update install.sh to copy postCreate
KevinFairise2 a837a10
Update devcontainer prebuilt image reference (#49726)
gh-worker-campaigns-3e9aa4[bot] 5f97d00
Remove su and update image
KevinFairise2 7bd8618
Update waitFor
KevinFairise2 39a7def
Update
KevinFairise2 2c77e8c
Update postCreate env variables
KevinFairise2 b985141
update
KevinFairise2 455506b
Merge branch 'main' into kfairise/devcontainer-git
KevinFairise2 c6d4bf6
Fix gitignore
KevinFairise2 1f72ca4
Add renovate + check to make sure the image is prebuild
KevinFairise2 2944356
Merge branch 'main' of github.com:DataDog/datadog-agent into kfairise…
KevinFairise2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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)" | ||
| 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" | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When this script runs from the new GitLab job, none of
DDCI_PULL_REQUEST_*orSOURCE_REF/TARGET_REFare set by the workflow, so it falls back togit symbolic-ref -q refs/remotes/origin/HEAD. In GitLab-style checkouts created bygit init/fetch(and in this workspace), that symbolic ref can be absent; withset -ethe assignment exits immediately with status 1 before either diff runs, causingprebuild-workspace-image-checkto fail for any matching.devcontainer/datadog/defaultchange without the intended error message. Fall back to the configured compare branch (for exampleorigin/$COMPARE_TO_BRANCH) or tolerate the missing symbolic ref before proceeding.Useful? React with 👍 / 👎.
There was a problem hiding this comment.
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