Skip to content
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

Generate eBPF files as part of the build process #1666

Merged
merged 21 commits into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ jobs:
repository: grafana/grafana-github-actions
path: ./actions
ref: main
lfs: true
- name: Install Actions
run: npm install --production --prefix ./actions
- name: Run backport
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/check_ebpf_integrity.yml

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
lfs: true

- name: Install Clang-Format
run: sudo apt-get install clang-format
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/clang-tidy-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
lfs: true

- name: Install clang-tidy
run: |
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/generator-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand Down Expand Up @@ -55,4 +53,4 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
tags: |
"${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.timestamp.outputs.ts }}"
"${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main"
"${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main"
40 changes: 0 additions & 40 deletions .github/workflows/git-lfs-check.yml

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/helm-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0 # required for chart-testing to work
lfs: true

- name: Regenerate docs
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- uses: grafana/writers-toolkit/publish-technical-documentation-release@publish-technical-documentation-release/v2
with:
release_tag_regexp: '^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$'
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/publish_dockerhub_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ jobs:
steps:
- id: checkout
uses: actions/checkout@v4
with:
lfs: true

- id: push-beyla-to-dockerhub
uses: grafana/shared-workflows/actions/build-push-to-dockerhub@main
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/publish_dockerhub_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ jobs:
steps:
- id: checkout
uses: actions/checkout@v4
with:
lfs: true

- id: push-beyla-to-dockerhub
uses: grafana/shared-workflows/actions/build-push-to-dockerhub@main
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@ jobs:
go: [ '1.23' ]
steps:
- uses: actions/checkout@v3
with:
lfs: true
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: Run verification and unit tests
run: make verify cov-exclude-generated
run: make docker-generate verify cov-exclude-generated
- name: Report coverage
uses: codecov/codecov-action@v4
env:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/pull_request_check_license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ jobs:
go: [ '1.23' ]
steps:
- uses: actions/checkout@v3
with:
lfs: true
- name: Set up Go
uses: actions/setup-go@v3
with:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/pull_request_integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ jobs:
go: [ '1.23' ]
steps:
- uses: actions/checkout@v3
with:
lfs: true
- name: Set up Go
uses: actions/setup-go@v3
with:
Expand All @@ -26,7 +24,7 @@ jobs:
docker system prune -af
docker volume prune -f
- name: Run integration tests
run: make integration-test
run: make docker-generate integration-test
timeout-minutes: 60
- name: Upload integration test logs
uses: actions/upload-artifact@v4
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/pull_request_integration_tests_arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ jobs:
go: [ '1.23' ]
steps:
- uses: actions/checkout@v3
with:
lfs: true
- name: Set up Go
uses: actions/setup-go@v3
with:
Expand All @@ -26,7 +24,7 @@ jobs:
docker system prune -af
docker volume prune -f
- name: Run integration tests
run: make integration-test-arm
run: make docker-generate integration-test-arm
timeout-minutes: 60
- name: Upload integration test logs
uses: actions/upload-artifact@v4
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/pull_request_k8s_integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ jobs:
go: [ '1.23' ]
steps:
- uses: actions/checkout@v3
with:
lfs: true
- name: Set up Go
uses: actions/setup-go@v3
with:
Expand All @@ -26,7 +24,7 @@ jobs:
docker system prune -af
docker volume prune -f
- name: Run integration tests
run: make integration-test-k8s
run: make docker-generate integration-test-k8s
timeout-minutes: 60
- name: Upload integration test logs
uses: actions/upload-artifact@v4
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/pull_request_oats_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ jobs:
go: [ '1.23' ]
steps:
- uses: actions/checkout@v3
with:
lfs: true
- name: Set up Go
uses: actions/setup-go@v3
with:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/release-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ jobs:
go: [ '1.23' ]
steps:
- uses: actions/checkout@v3
with:
lfs: true
- name: Set up Go
uses: actions/setup-go@v3
with:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/update-offsets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ jobs:
steps:
- name: "Checkout repo"
uses: actions/checkout@v3
with:
lfs: true
- name: "Update Go"
uses: actions/setup-go@v4
with:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/workflow_integration_tests_vm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ jobs:
go: [ '1.22' ]
steps:
- uses: actions/checkout@v3
with:
lfs: true
- name: Clean up disk space
run: |
docker system prune -af
Expand All @@ -37,6 +35,7 @@ jobs:
sudo apt-get install -y --no-install-recommends qemu-utils qemu-system-x86
- name: Run VM integration tests
run: |
make docker-generate
sudo make -C test/vm KERNEL_VER=${{ inputs.kernel-version }} ARCH=${{ inputs.arch }} && [ -f testoutput/success ]
timeout-minutes: ${{ inputs.timeout-minutes }}
- name: Upload integration test logs
Expand Down
18 changes: 9 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# Build the autoinstrumenter binary
FROM golang:1.23 AS builder
FROM ghcr.io/grafana/beyla-ebpf-generator:main AS builder

# TODO: embed software version in executable

ARG TARGETARCH

ENV GOARCH=$TARGETARCH

WORKDIR /opt/app-root
WORKDIR /src

RUN apt-get update
RUN apt-get install -qy ca-certificates
RUN apk add make git bash

# Copy the go manifests and source
COPY .git/ .git/
Expand All @@ -26,6 +25,7 @@ COPY NOTICE NOTICE
COPY third_party_licenses.csv third_party_licenses.csv

# Build
RUN /generate.sh
RUN make compile

# Create final image from minimal + built binary
Expand All @@ -35,11 +35,11 @@ LABEL maintainer="Grafana Labs <[email protected]>"

WORKDIR /

COPY --from=builder /opt/app-root/bin/beyla .
COPY --from=builder /opt/app-root/LICENSE .
COPY --from=builder /opt/app-root/NOTICE .
COPY --from=builder /opt/app-root/third_party_licenses.csv .
COPY --from=builder /src/bin/beyla .
COPY --from=builder /src/LICENSE .
COPY --from=builder /src/NOTICE .
COPY --from=builder /src/third_party_licenses.csv .

COPY --from=builder /etc/ssl/certs /etc/ssl/certs

ENTRYPOINT [ "/beyla" ]
ENTRYPOINT [ "/beyla" ]
Loading
Loading