m-lab / etl

M-Lab ingestion pipeline
Apache License 2.0
22 stars 7 forks source link

Update and clean up dependencies #1023

Closed cristinaleonr closed 2 years ago

cristinaleonr commented 3 years ago

When PR #1020 was merged, the following dependabot alert was raised: Screenshot 2021-10-01 4 49 46 PM

Following the module dependency graph, it's possible to trace the websocket module to go-kit/kit: go mod graph | grep websocket go.etcd.io/etcd@v0.0.0-20191023171146-3cf2f69b5738 github.com/gorilla/websocket@v0.0.0-20170926233335-4201258b820c go mod graph | grep go.etcd.io/etcd@v0.0.0-20191023171146-3cf2f69b5738 github.com/go-kit/kit@v0.10.0 go.etcd.io/etcd@v0.0.0-20191023171146-3cf2f69b5738 go mod graph | grep go-kit/kit@v0.10.0 github.com/m-lab/etl github.com/go-kit/kit@v0.10.0

go-kit/kit was added to the go.mod file when traceroute-caller was imported into ETL. This can be verified by checking out an earlier version of ETL (before #1020 was merged) and running the command go get github.com/m-lab/traceroute-caller

1st attempt to fix On further inspection, it doesn't appear that go-kit/kit is directly required by ETL, so it can be removed from go.mod (even VS Code suggests to remove it, and it already appears in go.sum). cristinaleon@cristinaleon:~/go/src/github.com/m-lab/etl$ go mod why github.com/go-kit/kit go: downloading github.com/go-kit/kit v0.10.0 # github.com/go-kit/kit (main module does not need package github.com/go-kit/kit)

The result is that websocket can no longer be traced back to go-kit/kit. cristinaleon@cristinaleon:~/go/src/github.com/m-lab/etl$ go mod graph | grep websocket cristinaleon@cristinaleon:~/go/src/github.com/m-lab/etl$

2nd attempt First, run go get -u ./cmd/etl_worker to update the dependencies to their latest available versions. Then, run go mod tidy to remove unnecessary entries.


This change is Reviewable

coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 6682


Files with Coverage Reduction New Missed Lines %
active/active.go 2 90.63%
<!-- Total: 2 -->
Totals Coverage Status
Change from base Build 6670: 0.03%
Covered Lines: 3655
Relevant Lines: 5774

💛 - Coveralls