Skip to content

Commit 8a587db

Browse files
authored
Merge pull request #74 from parca-dev/merge
Update with changes from upstream
2 parents 127abf9 + 2134f67 commit 8a587db

File tree

228 files changed

+7585
-4274
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

228 files changed

+7585
-4274
lines changed

.github/renovate.json5

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
"config:best-practices",
5+
"helpers:pinGitHubActionDigestsToSemver"
6+
],
7+
"packageRules": [
8+
{
9+
"groupName": "Go dependencies",
10+
"matchManagers": ["gomod"],
11+
"schedule": ["before 8am every weekday"],
12+
"automerge": true
13+
},
14+
{
15+
"groupName": "Docker related dependencies",
16+
"matchManagers": ["buildpacks", "devcontainer", "docker-compose", "dockerfile"],
17+
"schedule": ["before 8am every weekday"],
18+
"automerge": true
19+
},
20+
{
21+
"groupName": "GitHub Actions",
22+
"matchManagers": ["github-actions"],
23+
"schedule": ["before 8am every weekday"],
24+
"automerge": true
25+
},
26+
{
27+
"groupName": "Rust dependencies",
28+
"matchManagers": ["cargo"],
29+
"schedule": ["before 8am every weekday"]
30+
}
31+
],
32+
"ignoreDeps": [
33+
"golangci/golangci-lint-action"
34+
],
35+
"labels": [
36+
"dependencies"
37+
]
38+
}

.github/workflows/auto-tag.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Monthly Tagging
2+
on:
3+
workflow_dispatch: # Allows manual triggering of the workflow
4+
schedule:
5+
# Run every month on the 3rd day at 08:15 AM.
6+
- cron: '15 8 3 * *'
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
create-monthly-tag:
13+
permissions:
14+
contents: write # required for pushing git tags
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
19+
20+
- name: Configure Git
21+
run: |
22+
git config user.name "${GITHUB_ACTOR}"
23+
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
24+
25+
- name: Get current year and week number
26+
id: date
27+
run: |
28+
echo "tag_name=v0.0.$(date +%G%V)" >> "$GITHUB_OUTPUT"
29+
30+
- name: Create and push tag
31+
run: |
32+
TAG_NAME="${{ steps.date.outputs.tag_name }}"
33+
# Create an annotated tag on the latest commit of the current branch (main)
34+
git tag -a $TAG_NAME -m "$TAG_NAME"
35+
# Push the newly created tag to the remote repository
36+
git push origin $TAG_NAME

.github/workflows/codeql.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
schedule:
99
- cron: "21 6 * * 1"
1010

11+
permissions: read-all
12+
1113
jobs:
1214
analyze:
1315
name: Analyze Go (${{ matrix.target_arch }})
@@ -18,13 +20,13 @@ jobs:
1820
target_arch: [amd64, arm64]
1921
steps:
2022
- name: Checkout repository
21-
uses: actions/checkout@v4
23+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2224

2325
- name: Set up environment
2426
uses: ./.github/workflows/env
2527

2628
- name: Initialize CodeQL
27-
uses: github/codeql-action/init@v3
29+
uses: github/codeql-action/init@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
2830
with:
2931
languages: go
3032

@@ -33,7 +35,7 @@ jobs:
3335
make TARGET_ARCH=${{ matrix.target_arch }}
3436
3537
- name: Perform CodeQL Analysis
36-
uses: github/codeql-action/analyze@v3
38+
uses: github/codeql-action/analyze@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
3739
with:
3840
category: "/language:Go"
3941
timeout-minutes: 10

.github/workflows/codespell.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ on:
44
branches:
55
- main
66
pull_request:
7+
permissions:
8+
contents: read
79
jobs:
810
codespell:
911
runs-on: ubuntu-latest
1012
steps:
1113
- name: Install codespell
1214
run: sudo apt-get install codespell
1315
- name: Checkout Repo
14-
uses: actions/checkout@v4
16+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1517
- name: Codespell
1618
run: make codespell

.github/workflows/env/action.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
name: Common environment setup
22

3+
inputs:
4+
skip_rust:
5+
description: 'Set to true to skip installing Rust toolchains'
6+
required: false
7+
type: boolean
8+
default: false
9+
310
runs:
411
using: composite
512
steps:
@@ -31,12 +38,13 @@ runs:
3138
libc6-arm64-cross qemu-user-binfmt libc6:arm64 \
3239
musl-dev:amd64 musl-dev:arm64 musl-tools binutils-aarch64-linux-gnu
3340
- name: Set up Go
34-
uses: actions/setup-go@v5
41+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
3542
with:
3643
go-version-file: go.mod
3744
cache-dependency-path: go.sum
3845
id: go
3946
- name: Install Rust
47+
if: ${{ inputs.skip_rust == false }}
4048
uses: dtolnay/rust-toolchain@stable
4149
with:
4250
targets: x86_64-unknown-linux-musl,aarch64-unknown-linux-musl

.github/workflows/fossa.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1717

18-
- uses: fossas/fossa-action@93a52ecf7c3ac7eb40f5de77fd69b1a19524de94 # v1.5.0
18+
- uses: fossas/fossa-action@3ebcea1862c6ffbd5cf1b4d0bd6b3fe7bd6f2cac # v1.7.0
1919
with:
2020
api-key: ${{secrets.FOSSA_API_KEY}}
2121
team: OpenTelemetry

.github/workflows/ossf-scorecard.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
with:
2424
persist-credentials: false
2525

26-
- uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
26+
- uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
2727
with:
2828
results_file: results.sarif
2929
results_format: sarif
@@ -42,6 +42,6 @@ jobs:
4242
# Upload the results to GitHub's code scanning dashboard (optional).
4343
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
4444
- name: "Upload to code-scanning"
45-
uses: github/codeql-action/upload-sarif@5f8171a638ada777af81d42b55959a643bb29017 # v3.28.12
45+
uses: github/codeql-action/upload-sarif@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
4646
with:
4747
sarif_file: results.sarif

.github/workflows/push-docker-image.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,31 @@ on:
66
paths:
77
- "Dockerfile"
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
build-and-push:
1114
runs-on: ubuntu-latest
1215
if: github.repository == 'open-telemetry/opentelemetry-ebpf-profiler'
1316
steps:
1417
- name: Checkout code
15-
uses: actions/checkout@v4
18+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1619
- name: Login to Docker Hub
17-
uses: docker/login-action@v3
20+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
1821
with:
1922
username: ${{ secrets.DOCKER_USERNAME }}
2023
password: ${{ secrets.DOCKER_PASSWORD }}
2124
- name: Set up QEMU
22-
uses: docker/setup-qemu-action@v3
25+
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
2326
- name: Set up Docker Buildx
24-
uses: docker/setup-buildx-action@v3
27+
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
2528
- name: Set current timestamp tag
2629
id: tag
2730
run: |
2831
echo "tag=$(date +%Y%m%d%H%M)" >> $GITHUB_OUTPUT
2932
- name: Build and push
30-
uses: docker/build-push-action@v6
33+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
3134
with:
3235
push: true
3336
file: Dockerfile

.github/workflows/unit-test-on-pull-request.yml

Lines changed: 39 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@ on:
66
pull_request:
77
branches: ["**"]
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
legal:
1114
name: Check licenses of dependencies
1215
runs-on: ubuntu-24.04
1316
steps:
1417
- name: Clone code
15-
uses: actions/checkout@v4
18+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1619
- name: Set up environment
1720
uses: ./.github/workflows/env
1821
- name: Check for changes in licenses of dependencies
@@ -31,24 +34,20 @@ jobs:
3134
target_arch: [amd64, arm64]
3235
steps:
3336
- name: Clone code
34-
uses: actions/checkout@v4
37+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3538
- name: Set up environment
3639
uses: ./.github/workflows/env
3740
- name: Get linter version
3841
id: linter-version
3942
run: (echo -n "version="; make linter-version) >> "$GITHUB_OUTPUT"
40-
- name: golangci-lint
41-
uses: golangci/golangci-lint-action@v6
43+
- name: linter
4244
env:
4345
GOARCH: ${{ matrix.target-arch }}
4446
CGO_ENABLED: 1
45-
with:
46-
version: ${{ steps.linter-version.outputs.version }}
47-
- name: Lint eBPF code
4847
run: |
4948
sudo apt update
5049
sudo apt install -y clang-format-17
51-
make lint -C support/ebpf
50+
make lint
5251
5352
test:
5453
name: Test (${{ matrix.target_arch }})
@@ -58,53 +57,65 @@ jobs:
5857
target_arch: [amd64, arm64]
5958
steps:
6059
- name: Clone code
61-
uses: actions/checkout@v4
60+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
6261
- name: Set up environment
6362
uses: ./.github/workflows/env
63+
with:
64+
skip_rust: true
6465
- name: Cache coredump modules
65-
uses: actions/cache@v4
66+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
6667
with:
6768
path: tools/coredump/modulecache
6869
key: coredumps-${{ matrix.target_arch }}-${{ hashFiles('tools/coredump/testdata/*/*.json') }}
6970
restore-keys: |
7071
coredumps-${{ matrix.target_arch }}
7172
coredumps-
72-
- name: Direct Rust test
73-
run: make rust-tests
7473
- name: Tests
7574
run: make test TARGET_ARCH=${{ matrix.target_arch }}
7675

76+
rust-test:
77+
name: Rust Tests (${{ matrix.target_arch }})
78+
runs-on: ubuntu-24.04
79+
strategy:
80+
matrix:
81+
target_arch: [amd64, arm64]
82+
steps:
83+
- name: Clone code
84+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
85+
- name: Set up environment
86+
uses: ./.github/workflows/env
87+
- name: Tests
88+
run: make rust-tests
89+
7790
check-binary-blobs:
78-
name: Check for differences in the eBPF and Rust binary blobs
91+
name: Check for differences in the eBPF binary blobs
7992
runs-on: ubuntu-24.04
80-
container: otel/opentelemetry-ebpf-profiler-dev:latest
93+
container: otel/opentelemetry-ebpf-profiler-dev:latest@sha256:acce547f366150eb25392e1aff270df430ef6b759baeb4292999116018e70e6e
8194
defaults:
8295
run:
8396
shell: bash --login {0}
8497
steps:
8598
- name: Clone code
86-
uses: actions/checkout@v4
99+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
87100
- name: Hash binary blobs
88101
run: |
89-
sha256sum support/ebpf/tracer.ebpf.release.* > binary-blobs.hash
90-
sha256sum target/x86_64-unknown-linux-musl/release/libsymblib_capi.a >> binary-blobs.hash
91-
sha256sum target/aarch64-unknown-linux-musl/release/libsymblib_capi.a >> binary-blobs.hash
102+
sha256sum support/ebpf/tracer.ebpf.* > binary-blobs.hash
92103
- name: Rebuild eBPF blobs
93104
run: |
94-
rm support/ebpf/tracer.ebpf.release.*
105+
rm support/ebpf/tracer.ebpf.*
95106
make amd64 -C support/ebpf
96107
make arm64 -C support/ebpf
97-
- name: Rebuild Rust blobs
98-
run: |
99-
rm -rf target/
100-
make rust-components TARGET_ARCH=amd64
101-
make rust-components TARGET_ARCH=arm64
102108
- name: Check for differences
103109
run: |
104110
if ! sha256sum --check binary-blobs.hash; then
105111
echo "Please rebuild and commit the updated binary blobs."
106112
exit 1
107113
fi
114+
- if: failure()
115+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
116+
with:
117+
name: binary-blobs
118+
path: support/ebpf/tracer.ebpf.*
108119

109120
build-integration-test-binaries:
110121
name: Build integration test binaries (${{ matrix.target_arch }})
@@ -115,13 +126,13 @@ jobs:
115126
target_arch: [amd64, arm64]
116127
steps:
117128
- name: Clone code
118-
uses: actions/checkout@v4
129+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
119130
- name: Set up environment
120131
uses: ./.github/workflows/env
121132
- name: Prepare integration test binaries for qemu tests
122133
run: make integration-test-binaries TARGET_ARCH=${{ matrix.target_arch }}
123134
- name: Upload integration test binaries
124-
uses: actions/upload-artifact@v4
135+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
125136
with:
126137
name: integration-test-binaries-${{ matrix.target_arch }}
127138
path: support/*.test
@@ -138,7 +149,6 @@ jobs:
138149
# https://github.com/cilium/ci-kernels/pkgs/container/ci-kernels/versions?filters%5Bversion_type%5D=tagged
139150

140151
# AMD64
141-
# - { target_arch: amd64, kernel: 4.19.314 }
142152
- { target_arch: amd64, kernel: 5.4.276 }
143153
- { target_arch: amd64, kernel: 5.10.217 }
144154
- { target_arch: amd64, kernel: 5.15.159 }
@@ -155,7 +165,7 @@ jobs:
155165
- { target_arch: arm64, kernel: 6.12.16 }
156166
steps:
157167
- name: Clone code
158-
uses: actions/checkout@v4
168+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
159169
- name: Install dependencies
160170
run: |
161171
sudo apt-get update -y
@@ -167,7 +177,7 @@ jobs:
167177
go install github.com/florianl/[email protected]
168178
sudo mv ~/go/bin/bluebox /usr/local/bin/.
169179
- name: Fetch integration test binaries
170-
uses: actions/download-artifact@v4
180+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
171181
with: { name: "integration-test-binaries-${{ matrix.target_arch }}" }
172182
- name: Fetch precompiled kernel
173183
run: |

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,3 @@ ebpf-profiler
77
ci-kernels
88
# Ignore target directory
99
target/*
10-
# But not these specific paths
11-
!target/x86_64-unknown-linux-musl/release/libsymblib_capi.a
12-
!target/aarch64-unknown-linux-musl/release/libsymblib_capi.a

0 commit comments

Comments
 (0)