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

Move remaining t-channel code from core to tchannel package #2306

Merged
merged 3 commits into from
Jun 25, 2020

Conversation

pavolloffay
Copy link
Member

Related to #2129

This PR removes tchannel-go references from the code components. The only remaining references are in the hotrod app which will be removed in a follow-up PR.

git grep tchannel-go/
cmd/opentelemetry/go.sum:1233:github.com/uber/tchannel-go v1.10.0 h1:YOihLHuvkwT3nzvpgqFtexFW+pb5vD1Tz7h/bIWApgE=
cmd/opentelemetry/go.sum:1234:github.com/uber/tchannel-go v1.10.0/go.mod h1:Rrgz1eL8kMjW/nEzZos0t+Heq0O4LhnUJVA32OvWKHo=
cmd/opentelemetry/go.sum:1235:github.com/uber/tchannel-go v1.16.0 h1:B7dirDs15/vJJYDeoHpv3xaEUjuRZ38Rvt1qq9g7pSo=
cmd/opentelemetry/go.sum:1236:github.com/uber/tchannel-go v1.16.0/go.mod h1:Rrgz1eL8kMjW/nEzZos0t+Heq0O4LhnUJVA32OvWKHo=
examples/hotrod/services/driver/client.go:23:   "github.com/uber/tchannel-go"
examples/hotrod/services/driver/client.go:24:   "github.com/uber/tchannel-go/thrift"
examples/hotrod/services/driver/server.go:21:   "github.com/uber/tchannel-go"
examples/hotrod/services/driver/server.go:22:   "github.com/uber/tchannel-go/thrift"
examples/hotrod/services/driver/thrift-gen/driver/tchan-driver.go:10:   "github.com/uber/tchannel-go/thrift"
go.mod:75:      github.com/uber/tchannel-go v1.16.0
go.sum:436:github.com/uber/tchannel-go v1.16.0 h1:B7dirDs15/vJJYDeoHpv3xaEUjuRZ38Rvt1qq9g7pSo=
go.sum:437:github.com/uber/tchannel-go v1.16.0/go.mod h1:Rrgz1eL8kMjW/nEzZos0t+Heq0O4LhnUJVA32OvWKHo=
tchannel/agent/app/configmanager/tchannel/manager.go:21:        "github.com/uber/tchannel-go"
tchannel/agent/app/configmanager/tchannel/manager.go:22:        "github.com/uber/tchannel-go/thrift"
tchannel/agent/app/configmanager/tchannel/manager_test.go:24:   "github.com/uber/tchannel-go/thrift"
tchannel/agent/app/reporter/tchannel/builder.go:23:     tchannel "github.com/uber/tchannel-go"
tchannel/agent/app/reporter/tchannel/builder_test.go:24:        "github.com/uber/tchannel-go"
tchannel/agent/app/reporter/tchannel/reporter.go:21:    "github.com/uber/tchannel-go"
tchannel/agent/app/reporter/tchannel/reporter.go:22:    "github.com/uber/tchannel-go/thrift"
tchannel/agent/app/testutils/mock_collector.go:22:      "github.com/uber/tchannel-go"
tchannel/agent/app/testutils/mock_collector.go:23:      "github.com/uber/tchannel-go/thrift"
tchannel/agent/app/testutils/mock_collector_test.go:24: "github.com/uber/tchannel-go/thrift"
tchannel/collector/app/collector.go:18: "github.com/uber/tchannel-go"
tchannel/collector/app/handler/tchannel_handler.go:18:  "github.com/uber/tchannel-go/thrift"
tchannel/collector/app/sampling/handler.go:18:  "github.com/uber/tchannel-go/thrift"
tchannel/collector/app/server/thrift.go:21:     "github.com/uber/tchannel-go"
tchannel/collector/app/server/thrift.go:22:     "github.com/uber/tchannel-go/thrift"
tchannel/pkg/discovery/peerlistmgr/peer_list_mgr.go:25: "github.com/uber/tchannel-go"
tchannel/pkg/discovery/peerlistmgr/peer_list_mgr_test.go:27:    tchannel "github.com/uber/tchannel-go"
tchannel/pkg/discovery/peerlistmgr/peer_list_mgr_test.go:28:    "github.com/uber/tchannel-go/raw"
tchannel/pkg/discovery/peerlistmgr/peer_list_mgr_test.go:29:    "github.com/uber/tchannel-go/testutils"
thrift-gen/baggage/tchan-baggage.go:10: "github.com/uber/tchannel-go/thrift"
thrift-gen/jaeger/tchan-jaeger.go:10:   "github.com/uber/tchannel-go/thrift"
thrift-gen/sampling/tchan-sampling.go:10:       "github.com/uber/tchannel-go/thrift"
thrift-gen/zipkincore/tchan-zipkincore.go:10:   "github.com/uber/tchannel-go/thrift"
git grep tchannel/
tchannel/agent/app/configmanager/tchannel/manager_test.go:26:   "github.com/jaegertracing/jaeger/tchannel/agent/app/testutils"
tchannel/agent/app/reporter/tchannel/builder.go:27:     "github.com/jaegertracing/jaeger/tchannel/pkg/discovery/peerlistmgr"
tchannel/agent/app/reporter/tchannel/collector_proxy.go:23:     "github.com/jaegertracing/jaeger/tchannel/agent/app/configmanager/tchannel"
tchannel/agent/app/reporter/tchannel/collector_proxy_test.go:28:        "github.com/jaegertracing/jaeger/tchannel/agent/app/configmanager/tchannel"
tchannel/agent/app/reporter/tchannel/reporter.go:25:    "github.com/jaegertracing/jaeger/tchannel/pkg/discovery/peerlistmgr"
tchannel/agent/app/reporter/tchannel/reporter_test.go:27:       "github.com/jaegertracing/jaeger/tchannel/agent/app/testutils"
tchannel/collector/app/collector.go:23: "github.com/jaegertracing/jaeger/tchannel/collector/app/server"
tchannel/collector/app/server/thrift.go:27:     tHandler "github.com/jaegertracing/jaeger/tchannel/collector/app/handler"
tchannel/collector/app/server/thrift.go:28:     "github.com/jaegertracing/jaeger/tchannel/collector/app/sampling"

@pavolloffay pavolloffay requested a review from objectiser June 25, 2020 10:12
@pavolloffay pavolloffay requested a review from a team as a code owner June 25, 2020 10:12
grpc.AddFlags(flags)
reporter.AddFlags(flags)
app.AddFlags(flags)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are these flags being removed?

Copy link
Member Author

Choose a reason for hiding this comment

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

leftovers, not needed anymore

sizeF := func() int {
return len(collector.GetZipkinSpans())
return len(collector.GetJaegerBatches())
Copy link
Contributor

Choose a reason for hiding this comment

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

Why have these changed to Jaeger batches when in a zipkin processor test? Is zipkin format collection via the agent relevant now? If not, then we should probably change the name of the test.

Copy link
Member Author

@pavolloffay pavolloffay Jun 25, 2020

Choose a reason for hiding this comment

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

Jaeger agent can ingest zipkin thrift spans https://www.jaegertracing.io/docs/1.18/deployment/#agent. However the reporter in the agent convert these spans to jaeger batches.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok

@codecov
Copy link

codecov bot commented Jun 25, 2020

Codecov Report

Merging #2306 into master will decrease coverage by 0.30%.
The diff coverage is 34.69%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2306      +/-   ##
==========================================
- Coverage   96.23%   95.92%   -0.31%     
==========================================
  Files         218      219       +1     
  Lines       10692    10734      +42     
==========================================
+ Hits        10289    10297       +8     
- Misses        347      381      +34     
  Partials       56       56              
Impacted Files Coverage Δ
cmd/agent/app/testutils/mock_grpc_collector.go 0.00% <0.00%> (ø)
tchannel/agent/app/reporter/tchannel/builder.go 100.00% <ø> (ø)
tchannel/agent/app/reporter/tchannel/reporter.go 100.00% <ø> (ø)
tchannel/agent/app/testutils/fixture.go 100.00% <ø> (ø)
.../app/testutils/mock_baggage_restriction_manager.go 100.00% <ø> (ø)
tchannel/agent/app/testutils/mock_collector.go 100.00% <ø> (ø)
...annel/agent/app/testutils/mock_sampling_manager.go 100.00% <ø> (ø)
tchannel/collector/app/sampling/handler.go 100.00% <ø> (ø)
tchannel/collector/app/server/thrift.go 0.00% <ø> (ø)
tchannel/pkg/discovery/peerlistmgr/options.go 100.00% <ø> (ø)
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1f70cab...164a5a4. Read the comment docs.

@pavolloffay pavolloffay merged commit ed17b1d into jaegertracing:master Jun 25, 2020
@@ -164,7 +164,7 @@ func (sp *spanProcessor) ProcessSpans(mSpans []*model.Span, options processor.Sp
for i, mSpan := range mSpans {
ok := sp.enqueueSpan(mSpan, options.SpanFormat, options.InboundTransport)
if !ok && sp.reportBusy {
return nil, tchannel.ErrServerBusy
return nil, fmt.Errorf("server busy")
Copy link
Member

Choose a reason for hiding this comment

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

nit: this should be a dedicated error (similar to TraceNotFound in the query service) and the gRPC handler should translate it it to gRPC-specific status code. But it's not critical as there's no special processing in the agent for this.

Copy link
Member

Choose a reason for hiding this comment

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

Actually, might be still critical for us because "busy" is understood by the service mesh

Copy link
Member Author

Choose a reason for hiding this comment

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

PR #2314

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants