-
Notifications
You must be signed in to change notification settings - Fork 1k
Proof-of-Concept/WIP: support Kubernetes style staging repositories #638
Conversation
A first (failed) run on Kubernetes: https://gist.github.com/sttts/5625a17825ea338cff4cc6becdef16d3 |
/cc @mfojtik |
Interesting! Thanks for putting up a PoC.
It's not immediately apparent to me how that run is affected by the changes in this PR (
We likely either need to turn down the parallelism on network requests (right now we just fire them all off simultaneously and hope for the best) and/or introduce smarter dynamic retries
This suggests a stale repo at
It's concerning that we see so many of these; I wish we logged the error there so we could see the actual error.
It'd be good to know more about the use case that entails the use of this And alternatives are important, because...while we really, really want to make sure we're covering big projects like Kubernetes' needs, it's very unlikely we'd be able to incorporate the changes in this PR as-is. The changes in The symlinking is at least within our realm of choice, but still something that runs against the grain - dep is already very conservative in its treatment of symlinks, as it's a major way of keeping the dragons out. So, yeah - if you could explain a bit about the broader workflow goals of this staging area, it might help a lot with figuring out some lower-impact alternatives. |
oh...wait. rereading that README, it seems like at least part of the goal is essentially being able to hack on multiple repositories that have mutual imports at the same time, while still retaining an encapsulated project and build reproducibility, etc. If that's the case, then that falls under the header of the "multi-project workflow," which is definitely a known, painful problem. I have a draft writeup of how we might be able to address such things after moving into the official toolchain. Before is harder, but we can see what we can figure out. |
@sdboyer sorry for the late feedback. was on vacation... The goal of the staging repos is mainly to prepare the split of a monolithic repo into sub-repos, but before the infrastructure is available to effectively maintain such a multi-repo project. As a middle ground Kubernetes introduces the The repos in In other words: if golang/dep would preserve certain "authorative" repositories in One technical note: we put repos under |
eek, i didn't realize i hadn't responded to this :/ i'm gonna close this out, as it just changes the model we operate under too much. however, we (@thockin, @kris-nova, @carolynvs and i) did have a productive conversation a couple weeks ago about moving forward with k8s & dep, and we now have a project in which we're hammering some things out. |
@sdboyer I don't see much in that repo. Are there any notes about what you discuessed? Would love to contribute if this is done in the open. |
@sttts fantastic! there are some notes, though they're kinda sparse - https://docs.google.com/document/d/1uBnrlJIks8UWHI50u0mERxEQLYkeUrIYXeKH4Z-DZMg/edit some important high-level points from the mtg weren't captured in those notes. for example, we understand that, k8s being as large and multiheaded as it is, a lot of what's important is to set some more fixed goals that both k8s and dep can converge towards, rather than dep just trying to chase k8s' needs of the moment. to that end, we understand that the conversation about moving k8s to dep will necessarily also be a bit interwoven with some more k8s-internal conversations about how, for example, i realize that might sound a bit ominous, but it shouldn't - just some expectation-setting that this is will need to be a deliberate process. also, after talking brass tacks about how the import graphs and distinct subprojects within k8s.io/kubernetes are or are not supposed to intersect, i got to a point of cautious enthusiasm that the choices y'all have already made about
i'm almost certainly forgetting a few things, but that's as much of a braindump as i can muster right now. |
I am still working through 1-4. For #3 we hope to avoid adding ignores by naming it |
ahh right, i forgot about the underscore |
@sdboyer can you comment how you plan to create the link to the Compare #1000 and fabulous-gopher/k8s-dep-e2e#7 for a quick prototype to allow sources pointing to non-root packages. With that you can use a |
@sttts the idea for a note, though - i'm exceedingly uncomfortable with the idea of systematically supporting something like this, as it would effectively destroy the semantics of |
Well, they are not imported "externally". They are imported from within k8s.io/kubernetes under their external name, e.g. k8s.io/apimachinery. At the same time they are used by 3rdparties only from their nightly exports. Hence, the second use-case is completely standard. We need at least a workaround for the first. |
hmm right. i wish i had taken clearer notes during our discussion - it ended up being fairly rushed 😞 are there imports from within
remind of the reason for not simply importing them directly at their path within |
no. but, there are imports between staging repos, e.g. staging/k8s.io/apiserver imports k8s.io/apimachinery. We cannot import via a full staging path there as we want to publish them to their real repos on github. |
This confuses go as it will have two different type universes: with and without full path. |
@sdboyer @carolynvs is #1000 + fabulous-gopher/k8s-dep-e2e#7 something you could imagine to support as a solution to the staging problem? Clearly #1000 is not perfect yet, but I am very willing to work on it if the answer is yes. Also how would such an extension be discussed? Does it need a proposal or anything formal like that? About the consistency of the approach some questions (cc @carolynvs):
As an example: I want to vendor
In other words, as soon as a staging repo is involved via Does this match the semantics of the |
ahh, ok. yeah, this is not a great situation 😢 trying to pretend like there are two canonical locations for one body of code is going to be an ugly hack, pretty much no matter what. even if we did teach dep to allow us to dupe itself into believing that an external path is actually an internal one, none of the version information underneath it would make any sense. the system for swapping in alternate sources still takes version information from the alternate, not the original - meaning that it'll be
yes.
this answer gets a little complicated:
this last case is the one you want, and is a thing in the solver i'm quite unhappy with - #428. obviously, the idea of visit order potentially determining SAT or UNSAT is repugnant, so i'm quite unhappy with this. but i figured i'd leave it until it actually came up as an issue. and, here we are 😢 |
Actually this case is not that critical. It would be fine if the user can override what he actually wants in that case. In practice this case would happen only if a user wants to vendor The only case that really matter for us is the one where we have local |
hmmm...that's heading back towards territory that's more acceptable - we could probably do it entirely within the solver without needing to define new concepts in |
This is a quick'n'dirty proof of concept to implement staging/ repositories as they are used by the Kubernetes project: https://github.com/kubernetes/kubernetes/tree/master/staging