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

[internal/patch/grpc-go-insecure] Add patch to grpc-go dependency #10638

Merged
merged 4 commits into from Jan 27, 2022

Conversation

mx-psi
Copy link
Member

@mx-psi mx-psi commented Jan 24, 2022

What does this PR do?

Patches grpc-go dependency to add insecure package.

Motivation

Since open-telemetry/opentelemetry-collector#4586, the go.opentelemetry.io/collector dependency requires the insecure grpc-go package. Since we can't bump grpc-go due to etcd-io/etcd#12124, and alternative solutions like bumping Kubernetes are not doable either (see kubernetes/kubernetes#106536), we patch grpc-go through a replace directive to be able to bump go.opentelemetry.io/collector to the latest version.

Additional Notes

See more detailed explanation on the README.md file.

Possible Drawbacks / Trade-offs

We are patching an important dependency, which is risky. However, we are only adding new code, and this code is copied verbatim from a future version of the dependency.

Describe how to test/QA your changes

It should be a no-op. Since this new package will only be imported by the OpenTelemetry Collector dependency, we can QA by checking the OTLP gRPC endpoint. Other gRPC features need no testing.

Reviewer's Checklist

  • If known, an appropriate milestone has been selected; otherwise the Triage milestone is set.
  • The appropriate team/.. label has been applied, if known.
  • Use the major_change label if your change either has a major impact on the code base, is impacting multiple teams or is changing important well-established internals of the Agent. This label will be use during QA to make sure each team pay extra attention to the changed behavior. For any customer facing change use a releasenote.
  • A release note has been added or the changelog/no-changelog label has been applied.
  • Changed code has automated tests for its functionality.
  • Adequate QA/testing plan information is provided if the qa/skip-qa label is not applied.
  • If applicable, docs team has been notified or an issue has been opened on the documentation repo.
  • If applicable, the need-change/operator and need-change/helm labels have been applied.
  • If applicable, the config template has been updated.

@mx-psi mx-psi changed the title [internal/patch/grpc-go] Add patch to grpc-go dependency [internal/patch/grpc-go-insecure] Add patch to grpc-go dependency Jan 24, 2022
@mx-psi mx-psi added changelog/no-changelog [deprecated] team/agent-core Deprecated. Use metrics-logs / shared-components labels instead.. [deprecated] team/agent-platform labels Jan 24, 2022
@mx-psi mx-psi added this to the 7.35.0 milestone Jan 24, 2022
@mx-psi mx-psi marked this pull request as ready for review January 24, 2022 16:11
@mx-psi mx-psi requested review from a team January 24, 2022 16:11
internal/patch/grpc-go-insecure/README.md Outdated Show resolved Hide resolved
go.mod Show resolved Hide resolved
mx-psi and others added 2 commits January 25, 2022 10:35
Copy link
Member

@olivielpeau olivielpeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks for adding detailed docs on the change. Just a suggestion on an additional comment.

I think we can mention explicitly in the description that this change doesn't require any specific QA on other parts of the agent that use grpc (other than the otel pipeline), given the nature of the change.


go 1.16

// Should match the version we replace on the main go.mod
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this comment also be mentioned in the top-level go.mod of the repo (next to the line that pins google.golang.org/grpc?)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, I added a comment

@mx-psi
Copy link
Member Author

mx-psi commented Jan 25, 2022

Updated the QA instructions to mention only OTLP

Copy link
Member

@truthbk truthbk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing, thank you.

@@ -0,0 +1,27 @@
# `google.golang.org/grpc/credentials/insecure` patch

## What is this?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍰

@mx-psi mx-psi merged commit 88778c8 into main Jan 27, 2022
@mx-psi mx-psi deleted the mx-psi/patch-grpc branch January 27, 2022 12:45
@mx-psi mx-psi added the component/otlp PRs and issues related to OTLP ingest label Feb 17, 2022
@djmitche djmitche removed the [deprecated] team/agent-core Deprecated. Use metrics-logs / shared-components labels instead.. label Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants