Adds vanity import check#4180
Conversation
Codecov Report
@@ Coverage Diff @@
## main #4180 +/- ##
=======================================
Coverage 87.73% 87.73%
=======================================
Files 174 174
Lines 10335 10335
=======================================
Hits 9067 9067
Misses 1016 1016
Partials 252 252
Continue to review full report at Codecov.
|
mx-psi
left a comment
There was a problem hiding this comment.
After this PR the Collector will have the same issue (open-telemetry/opentelemetry-go#2279) that the Go instrumentation library has today: internal packages are not checked so they can end up having an incorrect vanity import comment (which breaks some builds).
That can be okay in the short term but we should think if we want to either (i) disallow vanity import comments on internal packages or (ii) add them too and check them with porto.
|
Ping @bogdandrutu
…On Thu, Oct 7, 2021, 12:15 Pablo Baeyens ***@***.***> wrote:
***@***.**** commented on this pull request.
After this PR the Collector will have the same issue (
open-telemetry/opentelemetry-go#2279
<open-telemetry/opentelemetry-go#2279>) that
the Go instrumentation library has today: internal packages are not checked
so they can end up having an incorrect vanity import comment (which breaks
some builds).
That can be okay in the short term but we should think if we want to
either (i) disallow vanity import comments on internal packages or (ii) add
them too and check them with porto.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4180 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXOYAVZKQJZKJNJ5H3AVPTUFVXK3ANCNFSM5FPT5CUQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
|
@jcchavezs what is the solution/proposal for @mx-psi issue? |
|
@bogdandrutu I think the codebase is big enough to be able to use vanity import for internal packages. @mx-psi already introduced a great addition to include internal packages in this PR so I guess it is only a matter to agree to include internal packages here and opentelemetry-go (following open-telemetry/opentelemetry-go#2277). Does that make sense @bogdandrutu @mx-psi? |
|
|
||
| .PHONY: porto | ||
| porto: | ||
| porto -w ./ |
There was a problem hiding this comment.
Should we use "--include-internal" ?
|
I think the same solution as in opentelemetry-go makes sense, it looks like for this repo we probably just need a new |
|
I will update this PR accordingly. |
|
@jcchavezs the lint job fails. |
codeboten
left a comment
There was a problem hiding this comment.
Can't find porto for the lint job
porto -w ./
/bin/bash: porto: command not found
4b5571c to
a8af3a4
Compare
a8af3a4 to
1f87a62
Compare
|
@bogdandrutu failure seems unrelated. Could you please retrigger? |
Important
This PR fixes the vanity imports and add a check to verify them on CI.
Follows from open-telemetry/opentelemetry-go#2255