Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelroquetto committed Feb 26, 2025
1 parent ff0facf commit f905c0a
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ concurrency:
jobs:
build_linux:
name: Build on Linux
runs-on: ubuntu-latest
runs-on: github-hosted-ubuntu-x64-large
container: grafana/alloy-build-image:v0.1.8
strategy:
matrix:
Expand All @@ -35,7 +35,7 @@ jobs:

build_linux_boringcrypto:
name: Build on Linux (boringcrypto)
runs-on: ubuntu-latest
runs-on: github-hosted-ubuntu-x64-large
container: grafana/alloy-build-image:v0.1.8-boringcrypto
strategy:
matrix:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
- uses: actions/checkout@v4
- name: Build image
run: |
make generate-beyla
docker build -t alloy-test:latest -f Dockerfile .
windows:
Expand Down
14 changes: 10 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ else
$(GO_ENV) go build $(GO_FLAGS) -o $(ALLOY_BINARY) .
endif

alloy-for-image:
$(GO_ENV) go build $(GO_FLAGS) -o $(ALLOY_BINARY) .

# alloy-service is not included in binaries since it's Windows-only.
alloy-service:
ifeq ($(USE_CONTAINER),1)
Expand Down Expand Up @@ -201,8 +204,8 @@ endif
.PHONY: images alloy-image
images: alloy-image

alloy-image:
DOCKER_BUILDKIT=1 docker build $(DOCKER_FLAGS) -t $(ALLOY_IMAGE) -f Dockerfile .
alloy-image: generate-beyla
DOCKER_BUILDKIT=1 docker build $(DOCKER_FLAGS) --debug -t $(ALLOY_IMAGE) -f Dockerfile .

.PHONY: images-windows alloy-image-windows
images: alloy-image-windows
Expand Down Expand Up @@ -278,10 +281,13 @@ drone: generate-drone

# Required by vendored Beyla to build eBPF artifacts prior to building the
# Alloy binary
# go mod vendor is require for GH workflows, as we cannot mount directories
# outside of the source dir inside the beyla ebpf builder image
.PHONY: generate-beyla
generate-beyla:
@go mod vendor
@GOOS=$(GOHOSTOS) GOARCH=$(GOHOSTARCH) go generate vendor/github.com/grafana/beyla/v2/bpf/build_ebpf.go > /dev/null
if [ -n "$$GITHUB_WORKSPACE" ]; then go mod vendor; fi; \
MODULE_ROOT=$$(go list -tags beyla_bpf -f '{{.Dir}}' github.com/grafana/beyla/v2/bpf); \
GOOS=$(GOHOSTOS) GOARCH=$(GOHOSTARCH) go generate $$MODULE_ROOT/build_ebpf.go

.PHONY: clean
clean: clean-dist clean-build-container-cache
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ require (
golang.org/x/sys v0.30.0
golang.org/x/text v0.22.0
golang.org/x/time v0.9.0
golang.org/x/tools v0.29.0
golang.org/x/tools v0.30.0
google.golang.org/api v0.217.0
google.golang.org/grpc v1.70.0
google.golang.org/protobuf v1.36.4
Expand Down Expand Up @@ -870,7 +870,7 @@ require (
go4.org/netipx v0.0.0-20230125063823-8449b0a6169f // indirect
golang.design/x/chann v0.1.2 // indirect
golang.org/x/arch v0.7.0 // indirect
golang.org/x/mod v0.22.0 // indirect
golang.org/x/mod v0.23.0 // indirect
golang.org/x/term v0.29.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
Expand All @@ -892,7 +892,7 @@ require (
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
)

require github.com/grafana/beyla/v2 v2.0.1-0.20250220141223-3107a3218705
require github.com/grafana/beyla/v2 v2.0.1-0.20250226224816-4aa2d9529c02

// NOTE: replace directives below must always be *temporary*.
//
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1246,8 +1246,8 @@ github.com/gosnmp/gosnmp v1.38.0/go.mod h1:FE+PEZvKrFz9afP9ii1W3cprXuVZ17ypCcyyf
github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY=
github.com/grafana/alloy-remote-config v0.0.10 h1:1Ge7lz2mjXI1rd6SmiZpFHyXeLehBuCi43+XTkdqgV4=
github.com/grafana/alloy-remote-config v0.0.10/go.mod h1:kHE1usYo2WAVCikQkIXuoG1Clz8BSdiz3kF+DZSCQ4k=
github.com/grafana/beyla/v2 v2.0.1-0.20250220141223-3107a3218705 h1:hRKODZCnUXYG2/m9pdzKWtEZgzDhAXNaJ6Nhr8MwwJg=
github.com/grafana/beyla/v2 v2.0.1-0.20250220141223-3107a3218705/go.mod h1:MKNkPychrqv6FKK6yI3i3Eqn4QNBGJY9hZGeO7Su+ck=
github.com/grafana/beyla/v2 v2.0.1-0.20250226224816-4aa2d9529c02 h1:XEzD03HJkN2HE1iKeHx91EQj0+H6pexxWd73Crxn8Vw=
github.com/grafana/beyla/v2 v2.0.1-0.20250226224816-4aa2d9529c02/go.mod h1:MK9DL2NL9JoFKqs31CCoNToryajkUxSr7W0krbaIZhU=
github.com/grafana/cadvisor v0.0.0-20240729082359-1f04a91701e2 h1:ju6EcY2aEobeBg185ETtFCKj5WzaQ48qfkbsSRRQrF4=
github.com/grafana/cadvisor v0.0.0-20240729082359-1f04a91701e2/go.mod h1:8sLW/G7rcFe1CKMaA4pYT4mX3P1xQVGqM6luzEzx/2g=
github.com/grafana/catchpoint-prometheus-exporter v0.0.0-20250218151502-6e97feaee761 h1:dPJOIEwtQ8uR3Qa79pb/lsSFJQ6j4P9vpCUQ4fKimG4=
Expand Down Expand Up @@ -3024,8 +3024,8 @@ golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4=
golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
golang.org/x/mod v0.23.0 h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM=
golang.org/x/mod v0.23.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
Expand Down Expand Up @@ -3390,8 +3390,8 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
golang.org/x/tools v0.29.0 h1:Xx0h3TtM9rzQpQuR4dKLrdglAmCEN5Oi+P74JdhdzXE=
golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588=
golang.org/x/tools v0.30.0 h1:BgcpHewrV5AUp2G9MebG4XPFI1E2W41zU1SaqVA9vJY=
golang.org/x/tools v0.30.0/go.mod h1:c347cR/OJfw5TI+GfX7RUPNMdDRRbjvYTS0jPyvsVtY=
golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
Expand Down
2 changes: 1 addition & 1 deletion internal/component/beyla/ebpf/beyla_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"sync"
"time"

_ "github.com/grafana/beyla/v2/bpf"
_ "github.com/grafana/beyla/v2/bpf" // nolint:all

Check failure on line 16 in internal/component/beyla/ebpf/beyla_linux.go

View workflow job for this annotation

GitHub Actions / Lint

could not import github.com/grafana/beyla/v2/bpf (invalid package name: "")

Check failure on line 16 in internal/component/beyla/ebpf/beyla_linux.go

View workflow job for this annotation

GitHub Actions / Lint

could not import github.com/grafana/beyla/v2/bpf (invalid package name: "")
"github.com/grafana/beyla/v2/pkg/beyla"
"github.com/grafana/beyla/v2/pkg/components"
beylaCfg "github.com/grafana/beyla/v2/pkg/config"
Expand Down

0 comments on commit f905c0a

Please sign in to comment.