-
Notifications
You must be signed in to change notification settings - Fork 1k
dep can't upgrade from client-go release-4.0 to release-5.0 #1265
Comments
man, you just keep on bumping into these fundamental questions 😜 gotta love k8s, drawing out all the warts. the simple answer for what you can do right now would be that you add this is a tip of a bigger iceberg, though. these sort of additional checks that dep does give it the characteristics of a strongly mean-reverting system - one where wild fluctuations tend to be dampened out, back towards some (working) midpoint. this tends to be good the overwhelming majority of the time, but can put the user in an awkward position when they need to make large transitions, as you do here. the biggest original problem in this class this was the "how do i add a new dependency?" problem chicken-or-egg problem, now addressed by my plan has been that, if we ever get to doing type analysis, it would absolutely 💯 need to come with some sort of |
Does this imply that the versions determined by |
yes.
…On October 14, 2017 4:04:16 PM EDT, Justin Santa Barbara ***@***.***> wrote:
Does this imply that the versions determined by deps depend not just on
Gopkg.toml, but on application code as well?
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#1265 (comment)
|
Can you explain what we're trying to do here? I guess that for dependencies that don't define their dependencies we have to do this to infer their dependencies somehow. But for a user application using dep, we should make them declare their direct dependencies. I'd suggest we should also warn about dependencies that are not good go-citizens, and do not include a Taking that to extremes (if we're trying to "fill in the gaps" until all libraries include a |
As an aside I had similar issues recently with apimachinery and it turns out that having a copy of it in your GOPATH could also cause issues. Albeit in my case, it might have been a poorly or partially installed version. Once I cleared it out it worked. I think yours is a separate problem but it just might change things with a clean GOPATH. |
@justinsb even if we were to make the changes you're proposing, it would have little practical bearing on this issue - but making such changes is not on the table:
they do define their dependencies - that's what import statements in the source code are. asking the user to duplicate that information into consider just how much information we would have to record in e.g. k8s'
we literally can't make anyone do anything. there is no central point of control, of publishing, that could be used to enforce such a rule - and intentionally excluding segments of the ecosystem is a non-starter.
we're a long way off from this, if we ever do it. and we're unlikely to, as if your library relies solely on stdlib, there's no reason at all to use dep. @ianlewis if accurate, this is very concerning - the only time that GOPATH should matter in any way to dep is if you |
@sdboyer Yah, I though so too. Drove me bonkers trying to figure it out. I got errors like this:
I'll see if I can find some time soon to repo it in a more meaningful way. |
@ianlewis oooh ooh cache corruption cache corruption. could you try compiling dep from #1279 and seeing if that magically fixes it? could you tar up this is getting off-topic, though - let's please carry that discussion on in slack, or another issue. @davecheney, did the |
@sdboyer I've been trying the
I don't have any references in the Ark repo to k8s.io/client-go/pkg/api* anywhere. Help? |
@ncdc yeah, this story still needs improving 😢 it's not a common case, but it's definitely exacerbated by the complexity of k8s. to be clear, though:
these are packages from
confuses me...oh, wait! that'd just be because you don't actually import those yet. right. OK, here's my suggestion for a virtuous loop that probably still won't be pleasant, but should at least get you through this with less hair-pulling:
so, i'm imagining your WIP ignored = [
"something/we/actually/ignore/all/the/time",
# START REFACTORING LIST, ALL THESE ARE GONE WHEN WE'RE DONE
"importpath/to/old/pkg1",
"importpath/to/old/pkg2",
]
required = [
"importpath/to/new/pkg1", # from "importpath/to/old/pkg1"
"importpath/to/new/pkg2a", # from "importpath/to/old/pkg2"
"importpath/to/new/pkg2b", # from "importpath/to/old/pkg2"
] |
Actually, no. Some of the packages listed are no longer in 5.0, but others are. Weird... I'll give your suggestion a try and see how it goes. Will report back later. Thanks! |
@sdboyer something was messed up with my cache. Once I removed |
@ncdc uuuugh. hopefully #1279 will make the incidence of these cache issues much, much less frequent. but that's still us fighting blind in the dark, after the fact - i would love to figure out a way to better manage/report/something when these problems occur, rather than waiting for them to blow up. which is tricky, given that they almost entirely occur as a result of handling signals. i want to merge that PR soon so that we can have people test it in the wild for a while before release. it's an adaptive failure mechanism, so the most we can really test it for is that it doesn't have unintended consequences on the happy path, or misbehaviors on certain known failure paths. |
@sdboyer in my case, I'm pretty sure the cached copy of client-go wasn't dirty. I'm not 100% positive, but I know I didn't |
@ncdc any chance that upstream folks had force-pushed that tag at some point? |
@sdboyer can't say for sure, but we don't think so. |
@sdboyer Sounds good. Will follow up. |
i'm gonna close this one out, as we at least have an adequate workaround (even if not ideal) |
What version of
dep
are you using (dep version
)?v0.3.1-122-g98f625e
What
dep
command did you run?The scenario is this.
dep ensure && go build
Gopkg.toml
and apply this patch to upgrade from therelease-4.0
branch torelease-5.0
. (The revision forapimachinery
is taken from https://github.com/kubernetes/client-go/blob/release-5.0/Godeps/Godeps.json)dep ensure
to fetch the new dependencies.What did you expect to see?
I expected
dep ensure
to complete successfully.What did you see instead?
dep
cannot update to therelease-5.0
branch because it would fail to compile. Superficially that is helpful, but unlessdep
upgrades theclient-go
dependency, I cannot fix the build breakage from the major api bump.How can I use
dep
to fetchrelease-5.0
so I can fix the build breakage?The text was updated successfully, but these errors were encountered: