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

Unpin dependencies in Gopkg.toml #1252

Merged
merged 1 commit into from
Dec 14, 2018
Merged

Unpin dependencies in Gopkg.toml #1252

merged 1 commit into from
Dec 14, 2018

Conversation

vprithvi
Copy link
Contributor

Signed-off-by: Prithvi Raj p.r@uber.com

Which problem is this PR solving?

  • Pinning dependencies prevents causes the dep solver from trying other versions when solving. This is problematic when jaeger is imported alongside other projects.
  • Because only specific dependencies in Gopkg.toml are updated when dep ensure -update <dependency> is executed, these pins are unnecessary. Unrelated version bumps cannot happen (as they used to with glide)

Short description of the changes

  • Unpin dependencies

@codecov
Copy link

codecov bot commented Dec 13, 2018

Codecov Report

Merging #1252 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #1252   +/-   ##
======================================
  Coverage     100%    100%           
======================================
  Files         159     159           
  Lines        7163    7163           
======================================
  Hits         7163    7163

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 2df4cd0...d3d5b9c. Read the comment docs.

Gopkg.toml Outdated
[[constraint]]
name = "github.com/apache/thrift"
version = "=0.9.3"
version = "0.9.3"
Copy link
Member

Choose a reason for hiding this comment

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

personally, I don't like this syntax. In dep this means ^0.9.3, and I would rather have the ^ explicitly included.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not opposed to this

@yurishkuro
Copy link
Member

what happens to gopkg.lock when you do this?

@isaachier
Copy link
Contributor

Tested it out and see this for diff:

diff --git a/Gopkg.lock b/Gopkg.lock
index 78ba22f..bf5e418 100644
--- a/Gopkg.lock
+++ b/Gopkg.lock
@@ -1,6 +1,14 @@
 # This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
 
 
+[[projects]]
+  digest = "1:c99bd4548f502371b98c77534239a514c9a1e715d468af3c108db06186aa692a"
+  name = "github.com/DataDog/zstd"
+  packages = ["."]
+  pruneopts = "UT"
+  revision = "aebefd9fcb99f22cd691ef778a12ed68f0e6a1ab"
+  version = "v1.3.4"
+
 [[projects]]
   digest = "1:d1665c44bd5db19aaee18d1b6233c99b0b9a986e8bccb24ef54747547a48027f"
   name = "github.com/PuerkitoBio/purell"
@@ -18,15 +26,15 @@
   revision = "de5bf2ad457846296e2031421a34e2568e304e35"
 
 [[projects]]
-  digest = "1:64982d65e04905ce370e2e59dcf38c68c2c26fe6b7e550a6e4f7e05196d42803"
+  digest = "1:49eb5d6ac71a788f1f15331e7cd87286b92951fdf758f418e12f22ac8dd27af1"
   name = "github.com/Shopify/sarama"
   packages = [
     ".",
     "mocks",
   ]
   pruneopts = "UT"
-  revision = "f7be6aa2bc7b2e38edf816b08b582782194a1c02"
-  version = "v1.16.0"
+  revision = "879f631812a30a580659e8035e7cda9994bb99ac"
+  version = "v1.20.0"
 
 [[projects]]
   digest = "1:8515c0ca4381246cf332cee05fc84070bbbb07bd679b639161506ba532f47128"
@@ -61,12 +69,12 @@
   revision = "3a771d992973f24aa725d07868b467d1ddfceafb"
 
 [[projects]]
-  digest = "1:4fdffd1724c105db8c394019cfc2444fd23466be04812850506437361ee5de55"
+  digest = "1:526d64d0a3ac6c24875724a9355895be56a21f89a5d3ab5ba88d91244269a7d8"
   name = "github.com/bsm/sarama-cluster"
   packages = ["."]
   pruneopts = "UT"
-  revision = "cf455bc755fe41ac9bb2861e7a961833d9c2ecc3"
-  version = "v2.1.13"
+  revision = "c618e605e15c0d7535f6c96ff8efbb0dba4fd66c"
+  version = "v2.1.15"
 
 [[projects]]
   branch = "master"
@@ -188,12 +196,12 @@
   version = "v0.17.2"
 
 [[projects]]
-  digest = "1:ff04019588fc028ac28c3c565ce5316461a4641df197555041ee66cf45d213e3"
+  digest = "1:a20e8bf0e58e2010677432ffbe5533c1e83bdf368ba5b057f3e00e2071ca8b09"
   name = "github.com/go-openapi/loads"
   packages = ["."]
   pruneopts = "UT"
-  revision = "2a2b323bab96e6b1fdee110e57d959322446e9c9"
-  version = "0.16.0"
+  revision = "150d36912387ec2f607be674c5be309ddccc0eed"
+  version = "v0.17.2"
 
 [[projects]]
   digest = "1:47260ededff90d53b84a66578963639d7fd3e5a9cdc672dbcc7847af794339d2"
@@ -265,7 +273,7 @@
   version = "v1.1.0"
 
 [[projects]]
-  digest = "1:35621fe20f140f05a0c4ef662c26c0ab4ee50bca78aa30fe87d33120bd28165e"
+  digest = "1:63dfa0378013bdefa3afabd8d4170af1d3b741204d4798563023b2f1b13e871b"
   name = "github.com/gogo/protobuf"
   packages = [
     "gogoproto",
@@ -276,25 +284,28 @@
     "types",
   ]
   pruneopts = "UT"
-  revision = "636bf0302bc95575d69441b25a2603156ffdddf1"
-  version = "v1.1.1"
+  revision = "4cbf7e384e768b4e01799441fdf2a706a5635ae7"
+  version = "v1.2.0"
 
 [[projects]]
-  digest = "1:fa5e9e1af8a8645086811ec5ab003806026babc57c8bb3a6f7e1ab34b80e2ff1"
+  digest = "1:5eae7496bdb74a6c7592bc74ea3da8a6a61a361fd52682820900d755bb144194"
   name = "github.com/golang/protobuf"
   packages = [
     "jsonpb",
     "proto",
     "protoc-gen-go/descriptor",
+    "protoc-gen-go/generator",
+    "protoc-gen-go/generator/internal/remap",
+    "protoc-gen-go/plugin",
     "ptypes",
     "ptypes/any",
     "ptypes/duration",
     "ptypes/struct",
     "ptypes/timestamp",
+    "ptypes/wrappers",
   ]
   pruneopts = "UT"
   revision = "aa810b61a9c79d51363740d207bb46cf8e620ed5"
-  version = "v1.2.0"
 
 [[projects]]
   branch = "master"
@@ -313,23 +324,23 @@
   version = "v1.1.1"
 
 [[projects]]
-  digest = "1:bdde4c5680027035091a29ceef113a5fef59295682c97c29e5f673276e9a55d8"
+  digest = "1:664d37ea261f0fc73dd17f4a1f5f46d01fbb0b0d75f6375af064824424109b7d"
   name = "github.com/gorilla/handlers"
   packages = ["."]
   pruneopts = "UT"
-  revision = "3a5767ca75ece5f7f1440b1d16975247f8d8b221"
-  version = "v1.2"
+  revision = "7e0847f9db758cdebd26c149d0ae9d5d0b9c98ce"
+  version = "v1.4.0"
 
 [[projects]]
-  digest = "1:099bdd0a1b3a8f20c016e5e4c7c0eb717ec21fab7537633ce7088d7dece2dde6"
+  digest = "1:e73f5b0152105f18bc131fba127d9949305c8693f8a762588a82a48f61756f5f"
   name = "github.com/gorilla/mux"
   packages = ["."]
   pruneopts = "UT"
-  revision = "392c28fe23e1c45ddba891b0320b3b5df220beea"
-  version = "v1.3.0"
+  revision = "e3702bed27f0d39777b0b37b664b6280e8ef8fbf"
+  version = "v1.6.2"
 
 [[projects]]
-  digest = "1:d0f4b7935eec1d68994aaa55773fca3e5c1fdaa7898a45d966efde76f471156e"
+  digest = "1:89828e30bb0fbe13017622717d58721d4accbb4285566c7c88f66f75c670f388"
   name = "github.com/grpc-ecosystem/grpc-gateway"
   packages = [
     "protoc-gen-swagger/options",
@@ -338,8 +349,8 @@
     "utilities",
   ]
   pruneopts = "UT"
-  revision = "aeab1d96e0f1368d243e2e5f526aa29d495517bb"
-  version = "v1.5.1"
+  revision = "01c07cdabb480b6d67b5c5586ae3b66e806de513"
+  version = "v1.6.2"
 
 [[projects]]
   branch = "master"
@@ -402,9 +413,10 @@
 
 [[projects]]
   branch = "master"
-  digest = "1:84a5a2b67486d5d67060ac393aa255d05d24ed5ee41daecd5635ec22657b6492"
+  digest = "1:aa3d8d42865c42626b5c1add193692d045b3188b1479f0a0a88690d21fe20083"
   name = "github.com/mailru/easyjson"
   packages = [
+    ".",
     "buffer",
     "jlexer",
     "jwriter",
@@ -430,11 +442,11 @@
 
 [[projects]]
   branch = "master"
-  digest = "1:51fb21c0dd1b64d5ae74c34f544e312ee73edd2a258db6347369014b5949f44a"
+  digest = "1:5d7236b6cedaadd901d2f1533113f11c955bb676df646b676c94d13c43dfedbe"
   name = "github.com/opentracing-contrib/go-stdlib"
   packages = ["nethttp"]
   pruneopts = "UT"
-  revision = "c9628a4f0148d7e441a4af66dc0b1653cd941c20"
+  revision = "09659152d0aa5b83bb7683a9c33c79f8ee57038c"
 
 [[projects]]
   digest = "1:450b7623b185031f3a456801155c8320209f75d0d4c4e633c6b1e59d44d6e392"
@@ -587,12 +599,12 @@
   version = "v1.0.3"
 
 [[projects]]
-  digest = "1:34c2a71c3317bd76711f66330d7846597bea8cd26c9df5bfd4603d156503e1bf"
+  digest = "1:de37e343c64582d7026bf8ab6ac5b22a72eac54f3a57020db31524affed9f423"
   name = "github.com/spf13/viper"
   packages = ["."]
   pruneopts = "UT"
-  revision = "41cd1c3aa32b2685fae6c296e6f044bc68922c0e"
-  version = "v1.3.0"
+  revision = "6d33b5a963d922d182c91e8a1c88d81fd150cfd4"
+  version = "v1.3.1"
 
 [[projects]]
   digest = "1:ac83cf90d08b63ad5f7e020ef480d319ae890c208f8524622a2f3136e2686b02"
@@ -603,7 +615,7 @@
   version = "v0.1.1"
 
 [[projects]]
-  digest = "1:131cbf301e1846f83658887188efbf97a6331095f53588b60525667e40f28f4c"
+  digest = "1:16338873219d015b617657cd87f6ce2dc0e4a5068868d2170c0ae44641d44ec5"
   name = "github.com/stretchr/testify"
   packages = [
     "assert",
@@ -612,8 +624,8 @@
     "require",
   ]
   pruneopts = "UT"
-  revision = "12b6f73e6084dad08a7c6e575284b177ecafbc71"
-  version = "v1.2.1"
+  revision = "f35b8ab0b5a2cef36673838d662e249dd9c94686"
+  version = "v1.2.2"
 
 [[projects]]
   digest = "1:3c1a69cdae3501bf75e76d0d86dc6f2b0a7421bc205c0cb7b96b19eed464a34d"
@@ -668,10 +680,11 @@
   version = "v1.5.0"
 
 [[projects]]
-  digest = "1:9c231161ce5a181c5782f73f443933b928b631d988f705dafc070f83aa79f4e9"
+  digest = "1:37bca5e5ac0765002e2f5fa2770fec98e4b5a2f345751b480c5b3aeefa090ccd"
   name = "github.com/uber/tchannel-go"
   packages = [
     ".",
+    "internal/argreader",
     "raw",
     "relay",
     "relay/relaytest",
@@ -680,12 +693,13 @@
     "thrift",
     "thrift/gen-go/meta",
     "tnet",
+    "tos",
     "trand",
     "typed",
   ]
   pruneopts = "UT"
-  revision = "1a0e35378f6f721bc07f6c4466bc9701ed70b506"
-  version = "v1.1.0"
+  revision = "162ecb0dc97845a0c42aae3899651dba111085e5"
+  version = "v1.12.0"
 
 [[projects]]
   digest = "1:3c1a69cdae3501bf75e76d0d86dc6f2b0a7421bc205c0cb7b96b19eed464a34d"
@@ -723,28 +737,33 @@
 
 [[projects]]
   branch = "master"
-  digest = "1:29fe5460430a338b64f4a0259a6c59a1e2350bbcff54fa66f906fa8d10515c4d"
+  digest = "1:cbaa20d79b67238cacdab1502211f3d2cc7259d765f77cffe676ff5dd35fa206"
   name = "golang.org/x/net"
   packages = [
+    "bpf",
     "context",
     "context/ctxhttp",
     "http/httpguts",
     "http2",
     "http2/hpack",
     "idna",
+    "internal/iana",
+    "internal/socket",
     "internal/timeseries",
+    "ipv4",
+    "ipv6",
     "trace",
   ]
   pruneopts = "UT"
-  revision = "351d144fa1fc0bd934e2408202be0c29f25e35a0"
+  revision = "891ebc4b82d6e74f468c533b06f983c7be918a96"
 
 [[projects]]
   branch = "master"
-  digest = "1:9399de11945e643d7131cf070736122b76800d92d57a80494bd9a4e73e6979f3"
+  digest = "1:48a949ee15f5f03524b792547822221b07f828dd26522b5e08688f25a10d14c1"
   name = "golang.org/x/sys"
   packages = ["unix"]
   pruneopts = "UT"
-  revision = "70b957f3b65e069b4930ea94e2721eefa0f8f695"
+  revision = "4d1cda033e0619309c606fc686de3adcf599539e"
 
 [[projects]]
   digest = "1:0c56024909189aee3364b7f21a95a27459f718aa7c199a5c111c36cfffd9eaef"
@@ -771,29 +790,40 @@
   version = "v0.3.0"
 
 [[projects]]
-  branch = "master"
-  digest = "1:077c1c599507b3b3e9156d17d36e1e61928ee9b53a5b420f10f28ebd4a0b275c"
+  digest = "1:1b3b20088f8ae64f4c20787c0f3602c2fd154d0b3386766cfa2c92992621ddf8"
   name = "google.golang.org/genproto"
-  packages = ["googleapis/rpc/status"]
+  packages = [
+    "googleapis/rpc/status",
+    "protobuf/field_mask",
+  ]
   pruneopts = "UT"
-  revision = "bd91e49a0898e27abb88c339b432fa53d7497ac0"
+  revision = "383e8b2c3b9e36c4076b235b32537292176bae20"
 
 [[projects]]
-  digest = "1:977794f3a0427850b6f4cb87cb88869a1833cb9e3f8867938c87434e422b7aa0"
+  digest = "1:71706c563b0e2727ea2a86514ab810cec1732eb30ccc4e67a987f36533510e4f"
   name = "google.golang.org/grpc"
   packages = [
     ".",
     "balancer",
     "balancer/base",
     "balancer/roundrobin",
+    "binarylog/grpc_binarylog_v1",
     "codes",
     "connectivity",
     "credentials",
+    "credentials/internal",
     "encoding",
     "encoding/proto",
-    "grpclb/grpc_lb_v1/messages",
     "grpclog",
     "internal",
+    "internal/backoff",
+    "internal/binarylog",
+    "internal/channelz",
+    "internal/envconfig",
+    "internal/grpcrand",
+    "internal/grpcsync",
+    "internal/syscall",
+    "internal/transport",
     "keepalive",
     "metadata",
     "naming",
@@ -806,11 +836,10 @@
     "status",
     "tap",
     "test/bufconn",
-    "transport",
   ]
   pruneopts = "UT"
-  revision = "afc05b9e1d36f289ea16ba294894486a3e458246"
-  version = "v1.11.0"
+  revision = "df014850f6dee74ba2fc94874043a9f3f75fbfd8"
+  version = "v1.17.0"
 
 [[projects]]
   digest = "1:2d1fbdc6777e5408cabeb02bf336305e724b925ff4546ded0fa8715a7267922a"
@@ -821,7 +850,7 @@
   version = "v0.9.1"
 
 [[projects]]
-  digest = "1:6847cc3dadcf84c757776d3aee7d635eefb97830dcae5aa4ec9f912073e062ab"
+  digest = "1:5a553e94a30f1b33a38d4f42ab8bbb8607e5e5e206bacc8d208db80482daab82"
   name = "gopkg.in/olivere/elastic.v5"
   packages = [
     ".",
@@ -829,16 +858,16 @@
     "uritemplates",
   ]
   pruneopts = "UT"
-  revision = "171ce647da4acfb30ffc99981d66d80bdea6bcee"
-  version = "v5.0.53"
+  revision = "c4c896ffad4e4c05757ff1da16b7cf2e944778c4"
+  version = "v5.0.77"
 
 [[projects]]
-  digest = "1:73e6fda93622790d2371344759df06ff5ff2fac64a6b6e8832b792e7402956e7"
+  digest = "1:4d2e5a73dc1500038e504a8d78b986630e3626dc027bc030ba5c75da257cdb96"
   name = "gopkg.in/yaml.v2"
   packages = ["."]
   pruneopts = "UT"
-  revision = "d670f9405373e636a5a2765eea47fac0c9bc91a4"
-  version = "v2.0.0"
+  revision = "51d6538a90f86fe93ac480b35f37b2be17fef232"
+  version = "v2.2.2"
 
 [solve-meta]
   analyzer-name = "dep"

@vprithvi
Copy link
Contributor Author

vprithvi commented Dec 14, 2018

@yurishkuro dep didn't perform any updates on Gopkg.lock after unpinning and running dep ensure

@isaachier I'm assuming that you deleted the Gopkg.lock before running dep ensure, which will force dep to re-solve the constraints. I expect this to produce different results because solutions aren't unique. (Especially with loose constraints like the ones we have in this diff)

@isaachier
Copy link
Contributor

No I ran dep ensure -update. I might be wrong, but believe that is equivalent to the glide up command.

@vprithvi
Copy link
Contributor Author

@isaachier What was the goal of the test of updating all dependencies using dep ensure -update?

@yurishkuro
Copy link
Member

merge 1 commit into master from unpin-deps

@vprithvi please start using branches in your own fork as we agreed in the last meeting.

@vprithvi
Copy link
Contributor Author

@yurishkuro Thanks for the reminder - I had misconfigured git. I'll do that from the next PR.

@isaachier
Copy link
Contributor

@isaachier What was the goal of the test of updating all dependencies using dep ensure -update?

I mistakenly believed that dep ensure only read the Gopkg.lock file. I found here that dep ensure alone will make the appropriate updates to the lock file when Gopkg.toml changes.

Signed-off-by: Prithvi Raj <p.r@uber.com>
version = "=2.0.0"
[[constraint]]
name = "github.com/gocql/gocql"
branch = "master"
Copy link
Contributor

Choose a reason for hiding this comment

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

there's always one

@vprithvi vprithvi merged commit 8f809ed into master Dec 14, 2018
@ghost ghost removed the review label Dec 14, 2018
@vprithvi vprithvi deleted the unpin-deps branch December 14, 2018 21:20
@yurishkuro
Copy link
Member

@vprithvi this should not have been merged. Every time I do dep ensure the lock file changes from the checked-in version. These changes must go together.

@vprithvi
Copy link
Contributor Author

Every time I do dep ensure the lock file changes from the checked-in version. These changes must go together.

@yurishkuro I don't see this behavior - I get no changes on the lock file when I run dep ensure. Are you on the latest dep (v0.5.0)? Are you able to reproduce this behavior on a fresh checkout without a vendor directory?

@yurishkuro
Copy link
Member

I probably had an older version. With 0.5 dep ensure is noop.

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.

4 participants