Skip to content

Commit

Permalink
cleanup: remove old opentracing (#4177)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicks committed Feb 8, 2021
1 parent 203f5fb commit fb4bbee
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 84 deletions.
2 changes: 0 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ require (
github.com/gorilla/websocket v1.4.2
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.14.6
github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect
github.com/jinzhu/gorm v1.9.12 // indirect
github.com/jonboulle/clockwork v0.2.2
Expand All @@ -55,7 +54,6 @@ require (
github.com/moby/buildkit v0.7.1-0.20200925001807-2b6cccb9b3e9
github.com/modern-go/reflect2 v1.0.1
github.com/opencontainers/go-digest v1.0.0
github.com/opentracing/opentracing-go v1.2.0
github.com/pkg/browser v0.0.0-20170505125900-c90ca0c84f15
github.com/pkg/errors v0.9.1
github.com/rivo/tview v0.0.0-20180926100353-bc39bf8d245d
Expand Down
4 changes: 0 additions & 4 deletions internal/containerupdate/docker_container_updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"fmt"
"io"

"github.com/opentracing/opentracing-go"
"github.com/pkg/errors"

"github.com/tilt-dev/tilt/internal/build"
Expand All @@ -29,9 +28,6 @@ func NewDockerUpdater(dCli docker.Client) *DockerUpdater {

func (cu *DockerUpdater) UpdateContainer(ctx context.Context, cInfo store.ContainerInfo,
archiveToCopy io.Reader, filesToDelete []string, cmds []model.Cmd, hotReload bool) error {
span, ctx := opentracing.StartSpanFromContext(ctx, "DockerUpdater-UpdateContainer")
defer span.Finish()

l := logger.Get(ctx)

err := cu.rmPathsFromContainer(ctx, cInfo.ContainerID, filesToDelete)
Expand Down
5 changes: 0 additions & 5 deletions internal/containerupdate/exec_updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import (
"io"
"strings"

"github.com/opentracing/opentracing-go"

"github.com/tilt-dev/tilt/internal/build"
"github.com/tilt-dev/tilt/internal/k8s"
"github.com/tilt-dev/tilt/internal/store"
Expand All @@ -27,9 +25,6 @@ func NewExecUpdater(kCli k8s.Client) *ExecUpdater {

func (cu *ExecUpdater) UpdateContainer(ctx context.Context, cInfo store.ContainerInfo,
archiveToCopy io.Reader, filesToDelete []string, cmds []model.Cmd, hotReload bool) error {
span, ctx := opentracing.StartSpanFromContext(ctx, "ExecUpdater-UpdateContainer")
defer span.Finish()

if !hotReload {
return fmt.Errorf("ExecUpdater does not support `restart_container()` step. If you ran Tilt " +
"with `--updateMode=exec`, omit this flag. If you are using a non-Docker container runtime, " +
Expand Down
13 changes: 0 additions & 13 deletions internal/docker/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"os"
"path/filepath"
"strconv"
"strings"
"time"

"github.com/blang/semver"
Expand All @@ -26,7 +25,6 @@ import (
"github.com/moby/buildkit/identity"
"github.com/moby/buildkit/session"
"github.com/moby/buildkit/session/auth/authprovider"
"github.com/opentracing/opentracing-go"
"github.com/pkg/errors"

"github.com/tilt-dev/tilt/internal/container"
Expand Down Expand Up @@ -512,14 +510,10 @@ func (c *Cli) ImageBuild(ctx context.Context, buildContext io.Reader, options Bu
}

func (c *Cli) CopyToContainerRoot(ctx context.Context, container string, content io.Reader) error {
span, ctx := opentracing.StartSpanFromContext(ctx, "daemon-CopyToContainerRoot")
defer span.Finish()
return c.CopyToContainer(ctx, container, "/", content, types.CopyToContainerOptions{})
}

func (c *Cli) ContainerRestartNoWait(ctx context.Context, containerID string) error {
span, ctx := opentracing.StartSpanFromContext(ctx, "daemon-ContainerRestartNoWait")
defer span.Finish()

// Don't wait on the container to fully start.
dur := time.Duration(0)
Expand All @@ -528,9 +522,6 @@ func (c *Cli) ContainerRestartNoWait(ctx context.Context, containerID string) er
}

func (c *Cli) ExecInContainer(ctx context.Context, cID container.ID, cmd model.Cmd, out io.Writer) error {
span, ctx := opentracing.StartSpanFromContext(ctx, "dockerCli-ExecInContainer")
span.SetTag("cmd", strings.Join(cmd.Argv, " "))
defer span.Finish()

cfg := types.ExecConfig{
Cmd: cmd.Argv,
Expand All @@ -557,9 +548,7 @@ func (c *Cli) ExecInContainer(ctx context.Context, cID container.ID, cmd model.C
}
defer connection.Close()

esSpan, ctx := opentracing.StartSpanFromContext(ctx, "dockerCli-ExecInContainer-ExecStart")
err = c.ContainerExecStart(ctx, execId.ID, types.ExecStartCheck{})
esSpan.Finish()
if err != nil {
return errors.Wrap(err, "ExecInContainer#start")
}
Expand All @@ -569,9 +558,7 @@ func (c *Cli) ExecInContainer(ctx context.Context, cID container.ID, cmd model.C
return errors.Wrap(err, "ExecInContainer#print")
}

bufSpan, ctx := opentracing.StartSpanFromContext(ctx, "dockerCli-ExecInContainer-readOutput")
_, err = io.Copy(out, connection.Reader)
bufSpan.Finish()
if err != nil {
return errors.Wrap(err, "ExecInContainer#copy")
}
Expand Down
5 changes: 0 additions & 5 deletions internal/engine/docker_compose_build_and_deployer.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (

"github.com/docker/distribution/reference"
"github.com/docker/docker/api/types"
"github.com/opentracing/opentracing-go"

"github.com/tilt-dev/tilt/internal/analytics"

Expand Down Expand Up @@ -67,10 +66,6 @@ func (bd *DockerComposeBuildAndDeployer) BuildAndDeploy(ctx context.Context, st
}
dcTarget := dcTargets[0]

span, ctx := opentracing.StartSpanFromContext(ctx, "DockerComposeBuildAndDeployer-BuildAndDeploy")
span.SetTag("target", dcTargets[0].Name)
defer span.Finish()

startTime := time.Now()
defer func() {
analytics.Get(ctx).Timer("build.docker-compose", time.Since(startTime), map[string]string{
Expand Down
4 changes: 0 additions & 4 deletions internal/engine/image_build_and_deployer.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"time"

"github.com/docker/distribution/reference"
"github.com/opentracing/opentracing-go"
"github.com/pkg/errors"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/types"
Expand Down Expand Up @@ -99,9 +98,6 @@ func (ibd *ImageBuildAndDeployer) BuildAndDeploy(ctx context.Context, st store.R
}

kTarget := kTargets[0]
span, ctx := opentracing.StartSpanFromContext(ctx, "daemon-ImageBuildAndDeployer-BuildAndDeploy")
span.SetTag("target", kTarget.Name)
defer span.Finish()

startTime := time.Now()
defer func() {
Expand Down
5 changes: 0 additions & 5 deletions internal/engine/live_update_build_and_deployer.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"time"

"github.com/docker/distribution/reference"
"github.com/opentracing/opentracing-go"
"github.com/pkg/errors"

"github.com/tilt-dev/tilt/internal/ospath"
Expand Down Expand Up @@ -115,10 +114,6 @@ func (lubad *LiveUpdateBuildAndDeployer) BuildAndDeploy(ctx context.Context, st
}

func (lubad *LiveUpdateBuildAndDeployer) buildAndDeploy(ctx context.Context, ps *build.PipelineState, cu containerupdate.ContainerUpdater, iTarget model.ImageTarget, state store.BuildState, changedFiles []build.PathMapping, runs []model.Run, hotReload bool) (err error) {
span, ctx := opentracing.StartSpanFromContext(ctx, "LiveUpdateBuildAndDeployer-buildAndDeploy")
span.SetTag("target", iTarget.Refs.ConfigurationRef.String())
defer span.Finish()

startTime := time.Now()
defer func() {
analytics.Get(ctx).Timer("build.container", time.Since(startTime), map[string]string{
Expand Down
4 changes: 0 additions & 4 deletions internal/engine/upper.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"time"

"github.com/davecgh/go-spew/spew"
"github.com/opentracing/opentracing-go"
"github.com/tilt-dev/wmclient/pkg/analytics"

tiltanalytics "github.com/tilt-dev/tilt/internal/analytics"
Expand Down Expand Up @@ -72,9 +71,6 @@ func (u Upper) Start(
cloudAddress string,
) error {

span, ctx := opentracing.StartSpanFromContext(ctx, "Start")
defer span.Finish()

startTime := time.Now()

absTfPath, err := filepath.Abs(fileName)
Expand Down
40 changes: 0 additions & 40 deletions internal/options/grpc.go

This file was deleted.

2 changes: 0 additions & 2 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ github.com/grpc-ecosystem/grpc-gateway/internal
github.com/grpc-ecosystem/grpc-gateway/runtime
github.com/grpc-ecosystem/grpc-gateway/utilities
# github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645
## explicit
github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc
# github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed
## explicit
Expand Down Expand Up @@ -408,7 +407,6 @@ github.com/opencontainers/go-digest
github.com/opencontainers/image-spec/specs-go
github.com/opencontainers/image-spec/specs-go/v1
# github.com/opentracing/opentracing-go v1.2.0
## explicit
github.com/opentracing/opentracing-go
github.com/opentracing/opentracing-go/ext
github.com/opentracing/opentracing-go/log
Expand Down

0 comments on commit fb4bbee

Please sign in to comment.