Skip to content

Commit 7316b72

Browse files
authored
Merge branch 'main' into pmartinez/race-condition
2 parents 1dcc8f6 + 7c51ea2 commit 7316b72

9 files changed

Lines changed: 71 additions & 18 deletions

File tree

.github/workflows/publish-serverless-init-to-ghcr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
crane version
4444
4545
- name: Login to GHCR
46-
uses: docker/login-action@v3
46+
uses: docker/login-action@v4
4747
with:
4848
registry: ghcr.io
4949
username: ${{ github.actor }}

.github/workflows/release-serverless-init.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
path: datadog-agent
5555

5656
- name: Set up QEMU
57-
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 #v3.7.0
57+
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a #v4.0.0
5858

5959
- name: Set up Docker Buildx
6060
uses: docker/setup-buildx-action@v3
@@ -78,7 +78,7 @@ jobs:
7878
cp ./scripts/serverless_init_dotnet.sh ./scripts/bin/
7979
8080
- name: Login to GHCR
81-
uses: docker/login-action@v3
81+
uses: docker/login-action@v4
8282
with:
8383
registry: ${{ env.REGISTRY }}
8484
username: ${{ github.actor }}

.github/workflows/rs_ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
unzip "protoc-${{ env.PB_VERSION }}-${{ env.PB_TARGET }}.zip" -d "$HOME/.local"
4545
export PATH="$PATH:$HOME/.local/bin"
4646
47-
- uses: actions-rust-lang/setup-rust-toolchain@v1.15.2
47+
- uses: actions-rust-lang/setup-rust-toolchain@v1.15.3
4848
with:
4949
cache: false
5050
- uses: mozilla-actions/sccache-action@v0.0.9
@@ -72,7 +72,7 @@ jobs:
7272
unzip "protoc-${{ env.PB_VERSION }}-${{ env.PB_TARGET }}.zip" -d "$HOME/.local"
7373
export PATH="$PATH:$HOME/.local/bin"
7474
75-
- uses: actions-rust-lang/setup-rust-toolchain@v1.15.2
75+
- uses: actions-rust-lang/setup-rust-toolchain@v1.15.3
7676
with:
7777
components: clippy
7878
cache: false
@@ -104,7 +104,7 @@ jobs:
104104
unzip "protoc-${{ env.PB_VERSION }}-${{ env.PB_TARGET }}.zip" -d "$HOME/.local"
105105
export PATH="$PATH:$HOME/.local/bin"
106106
107-
- uses: actions-rust-lang/setup-rust-toolchain@v1.15.2
107+
- uses: actions-rust-lang/setup-rust-toolchain@v1.15.3
108108
with:
109109
cache: false
110110
- uses: mozilla-actions/sccache-action@v0.0.9
@@ -132,7 +132,7 @@ jobs:
132132
unzip "protoc-${{ env.PB_VERSION }}-${{ env.PB_TARGET }}.zip" -d "$HOME/.local"
133133
export PATH="$PATH:$HOME/.local/bin"
134134
135-
- uses: actions-rust-lang/setup-rust-toolchain@v1.15.2
135+
- uses: actions-rust-lang/setup-rust-toolchain@v1.15.3
136136
with:
137137
cache: false
138138
- uses: taiki-e/install-action@v2
@@ -150,7 +150,7 @@ jobs:
150150
os: [ubuntu-22.04, macos-latest]
151151
steps:
152152
- uses: actions/checkout@v6.0.2
153-
- uses: actions-rust-lang/setup-rust-toolchain@v1.15.2
153+
- uses: actions-rust-lang/setup-rust-toolchain@v1.15.3
154154
with:
155155
components: rustfmt
156156
cache: false

.github/workflows/serverless-init-vulnerability-scan.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ jobs:
1616
runs-on: ubuntu-22.04
1717
steps:
1818
- name: Scan latest serverless-init image with trivy
19-
uses: aquasecurity/trivy-action@e368e328979b113139d6f9068e03accaed98a518 # v0.34.1
19+
uses: aquasecurity/trivy-action@97e0b3872f55f89b95b2f65b3dbab56962816478 # v0.34.2
2020
with:
2121
image-ref: "datadog/serverless-init:latest"
2222
ignore-unfixed: true
2323
exit-code: 1
2424
format: table
2525

2626
- name: Scan latest-alpine serverless-init image with trivy
27-
uses: aquasecurity/trivy-action@e368e328979b113139d6f9068e03accaed98a518 # v0.34.1
27+
uses: aquasecurity/trivy-action@97e0b3872f55f89b95b2f65b3dbab56962816478 # v0.34.2
2828
with:
2929
image-ref: "datadog/serverless-init:latest-alpine"
3030
ignore-unfixed: true
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Test QEMU versions for arm64 emulation
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
test-qemu:
8+
runs-on: ubuntu-22.04
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
qemu_image:
13+
# v10.x - current era
14+
- "tonistiigi/binfmt:qemu-v10.2.1" # current latest, known broken
15+
- "tonistiigi/binfmt:qemu-v10.1.3" # released Feb 17 2026, day of last good build
16+
- "tonistiigi/binfmt:qemu-v10.0.4" # Jan 2026
17+
# v9.x
18+
- "tonistiigi/binfmt:qemu-v9.2.2" # reportedly has fix for segfault issue
19+
- "tonistiigi/binfmt:qemu-v9.2.0" # known broken (Feb 2025 incident)
20+
# v8.x
21+
- "tonistiigi/binfmt:qemu-v8.1.5" # reported working in issue #245
22+
- "tonistiigi/binfmt:qemu-v8.1.4"
23+
- "tonistiigi/binfmt:qemu-v8.0.4"
24+
# v7.x - known good baseline
25+
- "tonistiigi/binfmt:qemu-v7.0.0-28"
26+
name: "QEMU ${{ matrix.qemu_image }}"
27+
steps:
28+
- name: Set up QEMU
29+
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a #v4.0.0
30+
with:
31+
image: ${{ matrix.qemu_image }}
32+
33+
- name: Show QEMU version
34+
run: docker run --rm --privileged ${{ matrix.qemu_image }} --version
35+
36+
- name: Set up Docker Buildx
37+
uses: docker/setup-buildx-action@v3
38+
39+
- name: "Test: ubuntu:22.04 apt-get install (matching compresser stage)"
40+
run: |
41+
docker run --rm --platform linux/arm64 ubuntu:22.04 \
42+
bash -c "apt-get update && apt-get install -y zip binutils && echo 'SUCCESS: apt-get completed'"
43+
44+
- name: "Test: alpine:3.16 apk add (matching builder stage)"
45+
run: |
46+
docker run --rm --platform linux/arm64 alpine:3.16 \
47+
sh -c "apk add --no-cache git make musl-dev gcc && echo 'SUCCESS: apk completed'"

.github/workflows/vulnerability-scan.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ jobs:
1717
runs-on: ubuntu-22.04
1818
steps:
1919
- name: Scan latest released image with trivy
20-
uses: aquasecurity/trivy-action@e368e328979b113139d6f9068e03accaed98a518 # v0.34.1
20+
uses: aquasecurity/trivy-action@97e0b3872f55f89b95b2f65b3dbab56962816478 # v0.34.2
2121
with:
2222
image-ref: "public.ecr.aws/datadog/lambda-extension:latest"
2323
ignore-unfixed: true
2424
exit-code: 1
2525
format: table
2626

2727
- name: Scan latest-alpine released image with trivy
28-
uses: aquasecurity/trivy-action@e368e328979b113139d6f9068e03accaed98a518 # v0.34.1
28+
uses: aquasecurity/trivy-action@97e0b3872f55f89b95b2f65b3dbab56962816478 # v0.34.2
2929
with:
3030
image-ref: "public.ecr.aws/datadog/lambda-extension:latest-alpine"
3131
ignore-unfixed: true

bottlecap/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bottlecap/src/lifecycle/invocation/processor.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,10 @@ impl Processor {
285285
/// This is used to create a cold start span, since this telemetry event does not
286286
/// provide a `request_id`, we try to guess which invocation is the cold start.
287287
pub fn on_platform_init_start(&mut self, time: DateTime<Utc>, runtime_version: Option<String>) {
288-
if runtime_version.as_deref().map_or(false, |rv| rv.contains("DurableFunction")) {
288+
if runtime_version
289+
.as_deref()
290+
.is_some_and(|rv| rv.contains("DurableFunction"))
291+
{
289292
self.enhanced_metrics.set_durable_function_tag();
290293
}
291294
let start_time: i64 = SystemTime::from(time)

bottlecap/src/logger.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ where
7979

8080
let message = format!("DD_EXTENSION | {level} | {span_prefix}{}", visitor.0);
8181

82-
write!(writer, "{{\"level\":\"{level}\",\"message\":\"")?;
82+
// Setting specifically `status` as opposed to `level` since AWS
83+
// filters out logs by the `level` field. This allows our logs to
84+
// appear in CWL regardless of the log level.
85+
write!(writer, "{{\"status\":\"{level}\",\"message\":\"")?;
8386
write_json_escaped(&mut writer, &message)?;
8487
writeln!(writer, "\"}}")
8588
}
@@ -187,7 +190,7 @@ mod tests {
187190
let parsed: serde_json::Value =
188191
serde_json::from_str(output.trim()).expect("output should be valid JSON");
189192

190-
assert_eq!(parsed["level"], "INFO");
193+
assert_eq!(parsed["status"], "INFO");
191194
assert!(
192195
parsed["message"]
193196
.as_str()
@@ -204,7 +207,7 @@ mod tests {
204207

205208
let parsed: serde_json::Value =
206209
serde_json::from_str(output.trim()).expect("output should be valid JSON");
207-
assert_eq!(parsed["level"], "ERROR");
210+
assert_eq!(parsed["status"], "ERROR");
208211
assert!(
209212
parsed["message"]
210213
.as_str()
@@ -221,7 +224,7 @@ mod tests {
221224

222225
let parsed: serde_json::Value =
223226
serde_json::from_str(output.trim()).expect("output should be valid JSON");
224-
assert_eq!(parsed["level"], "DEBUG");
227+
assert_eq!(parsed["status"], "DEBUG");
225228
assert!(
226229
parsed["message"]
227230
.as_str()

0 commit comments

Comments
 (0)