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

Bump support for Go 1.21 #264

Merged
merged 9 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from 7 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
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.20"
go-version: "~1.21.1"
pellared marked this conversation as resolved.
Show resolved Hide resolved
- name: Install build dependencies
run: |
sudo apt-get update && sudo apt-get install -y clang llvm libbpf-dev
Expand Down
31 changes: 28 additions & 3 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
workflow_dispatch:

env:
GO_VERSION: "1.20"
GO_VERSION: "~1.21.1"
pellared marked this conversation as resolved.
Show resolved Hide resolved

jobs:
check-links:
Expand All @@ -28,7 +28,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v4.0.0
with:
go-version: ${{ env.DEFAULT_GO_VERSION }}
go-version: ${{ env.GO_VERSION }}
pellared marked this conversation as resolved.
Show resolved Hide resolved
- name: Checkout Repo
uses: actions/checkout@v3.5.0
- name: Module cache
Expand All @@ -52,6 +52,31 @@ jobs:
run: make license-header-check go-mod-tidy golangci-lint
- name: Check clean repository
run: make check-clean-work-tree
compatibility-test:
strategy:
matrix:
go-version: ["~1.21.1", "~1.20.8"]
pellared marked this conversation as resolved.
Show resolved Hide resolved
os: [ubuntu-latest]
# GitHub Actions does not support arm* architectures on default
# runners. It is possible to accomplish this with a self-hosted runner
# if we want to add this in the future:
# https://docs.github.com/en/actions/hosting-your-own-runners/using-self-hosted-runners-in-a-workflow
arch: [amd64]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
pellared marked this conversation as resolved.
Show resolved Hide resolved
cache-dependency-path: "**/go.sum"
- name: Install build dependencies
run: sudo apt-get update && sudo apt-get install -y clang llvm
- name: Run tests
env:
GOARCH: ${{ matrix.arch }}
run: make test
verify-licenses:
runs-on: ubuntu-22.04
steps:
Expand All @@ -60,7 +85,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4.0.0
with:
go-version: ${{ env.DEFAULT_GO_VERSION }}
go-version: ${{ env.GO_VERSION }}
pellared marked this conversation as resolved.
Show resolved Hide resolved
- name: Install build dependencies
run: sudo apt-get update && sudo apt-get install -y clang llvm libbpf-dev
- run: make verify-licenses
2 changes: 1 addition & 1 deletion .github/workflows/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.20"
go-version: "~1.21.1"
pellared marked this conversation as resolved.
Show resolved Hide resolved
- name: Setup BATS
uses: mig4/setup-bats@v1
- name: Build auto-instrumentation
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ OpenTelemetry Go Automatic Instrumentation adheres to [Semantic Versioning](http
## [Unreleased]

### Added

- Add database/sql instrumentation ([#240](https://github.com/open-telemetry/opentelemetry-go-instrumentation/pull/240))
- Support Go 1.21. ([#264](https://github.com/open-telemetry/opentelemetry-go-instrumentation/pull/264))

### Changed

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ ALL_GO_MODS := $(shell find . -type f -name 'go.mod' ! -path '$(TOOLS_MOD_DIR)/*
GO_MODS_TO_TEST := $(ALL_GO_MODS:%=test/%)

.PHONY: test
test: $(GO_MODS_TO_TEST)
test: generate $(GO_MODS_TO_TEST)
test/%: GO_MOD=$*
test/%:
cd $(shell dirname $(GO_MOD)) && go test -v ./...
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Currently, OpenTelemetry Go Automatic Instrumentation is tested for the followin

| OS | Go Version | Architecture |
| ------- | ---------- | ------------ |
| Ubuntu | 1.21 | amd64 |
| Ubuntu | 1.20 | amd64 |

Automatic instrumentation should work on any Linux kernel above 4.4.
Expand Down
Loading