-
Notifications
You must be signed in to change notification settings - Fork 47
[checkapi] support diffs #738
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #738 +/- ##
==========================================
+ Coverage 54.01% 54.82% +0.80%
==========================================
Files 62 64 +2
Lines 3806 3987 +181
==========================================
+ Hits 2056 2186 +130
- Misses 1555 1591 +36
- Partials 195 210 +15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we do an example PR where we see this output?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about type parameters (generics)?
I can add a test using generics, that's not come up yet but should be fun to support. |
cac6b6e
to
008b141
Compare
Peeling off returning by value in #741 |
c44ac93
to
bcd04f0
Compare
fd9c669
to
f831a76
Compare
@atoulme, there are some lint failures. Besides, I guess this should be reviewed by OTel Collector approvers. Have you considered using https://pkg.go.dev/golang.org/x/exp/cmd/gorelease? |
I think we looked at it and it didn't really meet the requirements. |
@open-telemetry/collector-approvers and @open-telemetry/collector-contrib-approvers please review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this functionality is welcome but I would like to understand why we want to have a custom solution instead of relying in https://pkg.go.dev/golang.org/x/exp/apidiff as Kubernetes does
I didn't look at that tool. I don't have an opinion on it. Should we prefer it? |
This is something which the Go team uses as well. https://pkg.go.dev/golang.org/x/exp/cmd/gorelease uses this package as well. There are still some issues, but I think we should prefer it. |
I thought it was unmaintained, but talking at KubeCon with someone from Kubernetes they mentioned they use this (see https://github.com/kubernetes/kubernetes/blob/master/hack/apidiff.sh and https://prow.k8s.io/view/gs/kubernetes-ci-logs/pr-logs/pull/129125/pull-kubernetes-apidiff-client-go/1887847435644964864 as a concrete example), and that the Go team has been responsive in adding features like support for generics. So I think it's less maintenance work if we leverage it (possibly wrapping it within checkapi) |
I would also consider contributing to https://pkg.go.dev/golang.org/x/exp/cmd/gorelease. AFAIK the main issue is lack of support for multiple Go modules. |
OK, I will close this PR and maybe we can discuss this from the need perspective a bit more in the collector repository, and try any of the two tools you mention. The branch is still there if anyone wants to revisit. |
Add ability to check if the Golang API of a module has changed