Skip to content

Commit d8b7efd

Browse files
committed
Merge branch 'main' of github.com:DataDog/lading into lenaic/container-generator
2 parents 92be60e + 31015ae commit d8b7efd

35 files changed

+1417
-767
lines changed

.github/workflows/audit.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
22-
- uses: actions-rust-lang/audit@5c5da92c0334eb692d0735bb94f086fd83e59572 # v1.2.2
22+
- uses: actions-rust-lang/audit@96e0e19d7510f3de04a5b56213388ac8fcede6d0 # v1.2.3
2323
with:
2424
TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/check-changelog.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Check if CHANGELOG.md was modified
2626
id: changelog-check
2727
if: steps.label-check.outputs.has_label == 'false'
28-
uses: tj-actions/changed-files@bab30c2299617f6615ec02a68b9a40d10bd21366 # v45.0.5
28+
uses: tj-actions/changed-files@d6e91a2266cdb9d62096cebf1e8546899c6aa18f # v45.0.6
2929
with:
3030
files: |
3131
CHANGELOG.md

.github/workflows/container.yml

+65-20
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,62 @@ env:
88
IMAGE_NAME: ${{ github.repository }}
99

1010
jobs:
11+
tagging:
12+
name: Determine Tags
13+
runs-on: ubuntu-20.04
14+
permissions:
15+
contents: read
16+
packages: read
17+
outputs:
18+
FINAL_TAG: ${{ steps.tags.outputs.FINAL_TAG }}
19+
SHA_TAG: ${{ steps.tags.outputs.SHA_TAG }}
20+
21+
steps:
22+
- name: Log in to Container Registry
23+
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
24+
with:
25+
registry: ${{ env.REGISTRY }}
26+
username: ${{ github.actor }}
27+
password: ${{ secrets.GITHUB_TOKEN }}
28+
29+
- name: Set up Docker Buildx
30+
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
31+
32+
- name: Extract Docker Metadata
33+
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5.6.1
34+
id: meta
35+
with:
36+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
37+
tags: |
38+
# Tag event produce a semver tag. This will capture tags that begin
39+
# vX.Y.Z and X.Y.Z.
40+
type=semver,pattern={{version}},event=tag
41+
# All other push events (no PR, no semver tag), produce a SHA tag
42+
type=sha,format=long
43+
44+
- name: Determine Final Tag
45+
id: tags
46+
run: |
47+
ALL_TAGS="${{ steps.meta.outputs.tags }}"
48+
SEMVER_TAG=$(echo "$ALL_TAGS" | grep -E '^ghcr.io/.+:[0-9]+\.[0-9]+\.[0-9]+(-rc[0-9]+)?' || true)
49+
SHA_TAG=$(echo "$ALL_TAGS" | grep sha- || true)
50+
51+
if [ -n "$SEMVER_TAG" ]; then
52+
FINAL_TAG="$SEMVER_TAG"
53+
else
54+
FINAL_TAG="$SHA_TAG"
55+
fi
56+
57+
echo "SHA_TAG=$SHA_TAG" >> $GITHUB_OUTPUT
58+
echo "FINAL_TAG=$FINAL_TAG" >> $GITHUB_OUTPUT
59+
60+
- name: Debug Tags
61+
run: |
62+
echo "SHA_TAG: ${{ steps.tags.outputs.SHA_TAG }}"
63+
echo "FINAL_TAG: ${{ steps.tags.outputs.FINAL_TAG }}"
64+
1165
build:
66+
needs: tagging
1267
runs-on: ${{ matrix.runner }}
1368
strategy:
1469
matrix:
@@ -28,7 +83,7 @@ jobs:
2883

2984
- name: Set up Docker Buildx
3085
id: buildx
31-
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
86+
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
3287

3388
- name: Log in to the Container registry
3489
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
@@ -41,27 +96,25 @@ jobs:
4196
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5.6.1
4297
id: meta
4398
with:
99+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
44100
tags: |
45101
type=sha,format=long
46-
type=ref,prefix=pr-,event=pr
47-
type=semver,pattern={{version}},event=tag
48-
type=semver,pattern={{major}}.{{minor}},event=tag
49-
type=semver,pattern={{major}},event=tag
50-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
51102
52103
- name: Build and push Docker image
53104
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
54105
with:
55106
file: Dockerfile
56-
tags: ${{ steps.meta.outputs.tags }}-${{ matrix.arch }}
107+
tags: ${{ needs.tagging.outputs.SHA_TAG }}-${{ matrix.arch }}
57108
push: true
58109
labels: ${{ steps.meta.outputs.labels }}
59110
cache-from: type=registry,ref=ghcr.io/datadog/lading:cache
60111
cache-to: type=registry,ref=ghcr.io/datadog/lading:cache,mode=max
61112

62113
manifest:
63114
name: Create Multi-Arch Manifest
64-
needs: build
115+
needs:
116+
- tagging
117+
- build
65118
runs-on: ubuntu-20.04
66119
permissions:
67120
contents: read
@@ -76,19 +129,11 @@ jobs:
76129
password: ${{ secrets.GITHUB_TOKEN }}
77130

78131
- name: Set up Docker Buildx
79-
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
80-
81-
- name: Extract Docker Metadata
82-
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5.6.1
83-
id: meta
84-
with:
85-
tags: |
86-
type=sha,format=long
87-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
132+
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
88133

89134
- name: Create and Push Multiarch Manifest
90135
run: |
91136
docker buildx imagetools create \
92-
--tag ${{ steps.meta.outputs.tags }} \
93-
${{ steps.meta.outputs.tags }}-amd64 \
94-
${{ steps.meta.outputs.tags }}-arm64
137+
--tag "${{ needs.tagging.outputs.FINAL_TAG }}" \
138+
"${{ needs.tagging.outputs.SHA_TAG }}-amd64" \
139+
"${{ needs.tagging.outputs.SHA_TAG }}-arm64"

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1616

1717
- name: Create GitHub release
18-
uses: taiki-e/create-gh-release-action@72d65cee1f8033ef0c8b5d79eaf0c45c7c578ce3 # v1.8.2
18+
uses: taiki-e/create-gh-release-action@d33396ec937b3c8de323c14ec623aa6bfb93d9a1 # v1.8.3
1919
with:
2020
changelog: CHANGELOG.md
2121
token: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

+27
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,33 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [Unreleased]
8+
## Added
9+
- Introduced the ability for users to configure lading's sample rate,
10+
configuration option `sample_period_milliseconds` in `lading.yaml`.
11+
12+
## [0.25.4]
13+
## Changed
14+
- The `splunk_hec` generator now only requires responses to have an `ackId` when
15+
`acknowledgements` are enabled.
16+
- cgroup.v2 PSI metrics are now parsed. These metrics may change in future
17+
versions of lading as we get more experience with them.
18+
19+
## [0.25.3]
20+
## Changed
21+
- Various dependencies updated, notably `hyper` is now 1.x.
22+
- Error handling in observer made more forgiving of PID death.
23+
24+
## [0.25.2]
25+
## Changed
26+
- The `bytes_received` metric in the HTTP and splunk_heck blackholes now tracks
27+
wire bytes, the former metric is preserved with `decoded_bytes_received`.
28+
- Base image is now bookworm, updated from bullseye.
29+
30+
## [0.25.1]
31+
## Removed
32+
- Revert PR #1148
33+
734
## [0.25.0]
835
## Added
936
- Parse nearly the complete field list of smaps/smaps_rollup in the Linux observer.

0 commit comments

Comments
 (0)