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

Drop support for ancient and unused grpc.v12 #2820

Merged
merged 2 commits into from
Aug 19, 2024
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
3 changes: 1 addition & 2 deletions .github/workflows/govulncheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ jobs:
run: govulncheck ./ddtrace/... ./appsec/... ./profiler/... ./internal/...
- name: Run govulncheck-contribs
run: |
# Excluding legacy contrib grpc.v12
go list -f '{{.Dir}}' ./contrib/... | grep -v -e grpc.v12 | while read dir ; do
go list -f '{{.Dir}}' ./contrib/... | while read dir ; do
govulncheck -C $dir .
done
2 changes: 1 addition & 1 deletion .github/workflows/multios-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: "Runner ${{ matrix.runner-index }}: Test Core and Contrib (No Integration Tests)"
shell: bash
run: |
go list ./... | grep -v -e grpc.v12 -e google.golang.org/api -e sarama -e confluent-kafka-go -e cmemprof | sort >packages.txt
go list ./... | grep -v -e google.golang.org/api -e sarama -e confluent-kafka-go -e cmemprof | sort >packages.txt
gotestsum --junitfile ${REPORT} -- $(cat packages.txt) -v -coverprofile=coverage.txt -covermode=atomic -timeout 15m
- name: Upload the results to Datadog CI App
if: always()
Expand Down
28 changes: 1 addition & 27 deletions .github/workflows/unit-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ jobs:
- name: Test Contrib
run: |
mkdir -p $TEST_RESULTS
PACKAGE_NAMES=$(go list ./contrib/... | grep -v -e grpc.v12 -e google.golang.org/api)
PACKAGE_NAMES=$(go list ./contrib/... | grep -v -e google.golang.org/api)
gotestsum --junitfile ${TEST_RESULTS}/gotestsum-report.xml -- $PACKAGE_NAMES -v -race -coverprofile=coverage.txt -covermode=atomic

- name: Upload the results to Datadog CI App
Expand Down Expand Up @@ -249,32 +249,6 @@ jobs:
go mod tidy # Go1.16 doesn't update the sum file correctly after the go get, this tidy fixes it
go test -v ./contrib/google.golang.org/api/...

- name: Testing outlier gRPC v1.2
run: |
# This hacky approach is necessary because running the tests regularly
# do not allow using [email protected] alongside [email protected].
# [email protected] is no longer possible to test because internal/datastreams/propagator.go
# expects sketches-go to have the package `github.com/DataDog/sketches-go/ddsketch/encoding` which
# is only present from v1.1.0 onwards.
go mod vendor

# Checkout [email protected]
cd vendor/google.golang.org && rm -rf grpc
git clone https://github.com/grpc/grpc-go grpc && cd grpc
git fetch origin && git checkout v1.2.0 && cd ../../..

# Checkout [email protected]
cd vendor/github.com/DataDog && rm -rf sketches-go
git clone https://github.com/DataDog/sketches-go && cd sketches-go
git fetch origin && git checkout v1.1.0 && cd ../../../..

# Revert to old metadata functions as FromIncomingContext and NewOutgoingContext are not present in v1.2.0.
# These functions were updated to current versions to avoid compilation errors in the development environments.
sed -i 's/metadata\.FromIncomingContext/metadata.FromContext/g' ./contrib/google.golang.org/grpc.v12/*
sed -i 's/metadata\.NewOutgoingContext/metadata.NewContext/g' ./contrib/google.golang.org/grpc.v12/*

go test -mod=vendor -v ./contrib/google.golang.org/grpc.v12/...

test-core:
runs-on:
group: "APM Larger Runners"
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ go.work*
dd-trace-go.iml
vendor

/contrib/google.golang.org/grpc.v12/vendor/
/contrib_coverage.txt
/core_coverage.txt
/gotestsum-report.xml
4 changes: 1 addition & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
run:
deadline: 10m
skip-dirs:
# This package is an exception and has its own test job (Testing outlier gRPC v1.2).
- contrib/google.golang.org/grpc.v12

linters:
disable-all: true
enable:
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ Before considering contributions to the project, please take a moment to read ou

### Testing

Tests can be run locally using the Go toolset. The grpc.v12 integration will fail (and this is normal), because it covers for deprecated methods. In the CI environment
we vendor this version of the library inside the integration. Under normal circumstances this is not something that we want to do, because users using this integration
might be running versions different from the vendored one, creating hard to debug conflicts.
Tests can be run locally using the Go toolset.

To run integration tests locally, you should set the `INTEGRATION` environment variable. The dependencies of the integration tests are best run via Docker. To get an
idea about the versions and the set-up take a look at our [docker-compose config](./docker-compose.yaml).
Expand Down
50 changes: 0 additions & 50 deletions contrib/google.golang.org/grpc.v12/example_test.go

This file was deleted.

173 changes: 0 additions & 173 deletions contrib/google.golang.org/grpc.v12/fixtures_test.pb.go

This file was deleted.

21 changes: 0 additions & 21 deletions contrib/google.golang.org/grpc.v12/fixtures_test.proto

This file was deleted.

Loading
Loading