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

reorganize the repos ? #998

Closed
ldemailly opened this issue Sep 30, 2017 · 22 comments
Closed

reorganize the repos ? #998

ldemailly opened this issue Sep 30, 2017 · 22 comments

Comments

@ldemailly
Copy link
Member

ldemailly commented Sep 30, 2017

Couple of options to get us started; more welcome:

a) move everything into a mono repo so we can share code instead of duplicate it, have a unified development experience and not spend too much time moving PRs from 1 repo to the next

b) add more repos so we can actually share code instead of duplicate code between pilot and mixer for instance (istio/core ?) and istio/generated for generated code sync and istio/build for flat build and use the "repo" tool to keep things in sync

c) [not an option IMO] no change

cc @costinm

@kyessenov
Copy link
Contributor

b) is already done by test-infra and api repos. They're imported into each project.
Are we trying to address developer pains here, CI pains, or release pains?
To make local development easy, I think using local_repository from bazel is probably the simplest multi-project bazel solution. It is in accordance with standard go tooling as well with the canonical code paths.

@ldemailly
Copy link
Member Author

ldemailly commented Sep 30, 2017

Ideally we'd find a solution addressing most/all of our pains at once

Api repo maybe can be renamed to "core" because it seems odd to put code or utility libraries into a repo named "api" (and I think for generated it'd be best for bots keeping generated code updated to not fight with humans PRs)

The short version is either we do a really good job at our dependency graphs and not hesitate to add more light weight repos (which would inherit shared build tooling) when a new node is needed in the graph (eg minimal mixer for testing in pilot, shared between mixer and pilot (and proxy)) or we push all code to the lowest repo which becomes mono repo

or some other creative option

@geeknoid
Copy link
Contributor

geeknoid commented Oct 3, 2017

As time goes on, I think we'll have more and more stuff we want to share between Pilot, Mixer, CA, and Broker. We definitely need a spot to share utility libraries across the project. Additionally, we want to be able to have a unified tooling experience (linters, etc). And finally, as we put together a perf testing/tracking framework, we'll want to share that between components.

I'm not seeing the inherent value we're getting out of having distinct repos at this point. It seems to be mostly introducing pain and providing very little upside. I would be in favor of consolidating into a single repo for most of our code with different subdirectories for each major component.

@jmuk
Copy link
Contributor

jmuk commented Oct 3, 2017

A single monolithic repository of sharing code among istio components would be great for us -- "us" meaning istio devs. I'm wondering if this can affect the workflow of istio users (operators).

I mean, istio operators need the yaml files in install/kubernetes in istio/istio repository for setting up istio in their cluster. It is unclear to me where do those files go; in the same repository (so operators need the large repository for setting up istio), or do we keep istio/istio repository for the setup? (or do we make a different non-git-repository location for the official setup files?) This might also affect the e2e code structure.

@ldemailly
Copy link
Member Author

ldemailly commented Oct 3, 2017

@jmuk the yaml files are part of the release artifacts (for instance in https://github.com/istio/istio/releases/download/0.2.6/istio-0.2.6-osx.tar.gz or what curl -L https://git.io/getLatestIstio | sh - automatically downloads),
operators don't need to git clone the source tree so it shouldn't be a concern either way here

ps: and our git clone of istio/istio is 80Mb because it had some demo/binary artifacts accidentally checked in at some point in the past (#459) so if we were to clean that it's likely the total source tree in a new clean mono repo would be much smaller than the current partial one anyway.

@jmuk
Copy link
Contributor

jmuk commented Oct 3, 2017

okay, thanks for the clarification.

@Brian-Xincheng-Zhang
Copy link
Contributor

if we can keep a single repo, can we still make individual release for different components, say pilot, mixer
If so, I support single repo.

@ldemailly
Copy link
Member Author

the source code being in one place doesn't preclude from making different artefact under different schedules if one desires so. I think it's already hard enough to make 1 unified release and would be premature to decouple the components at this point though (but that's a somewhat different topic)

@Brian-Xincheng-Zhang
Copy link
Contributor

component based release does not have to do it now, but probably a 2018 goal.
as long as it is doable, then it is fine.
Laurent: could you discuss this one repo proposal in tomorrow's working group meeting?

@ldemailly
Copy link
Member Author

Please give comments in this doc: https://goo.gl/eLq2uS

@ayj
Copy link
Contributor

ayj commented Oct 5, 2017

kubernetes/kubernetes#24343 lists reasons Kubernetes started to move away from a monorepo.

@kyessenov
Copy link
Contributor

@ayj that's a great thread. I think mono-repo is a crude tool to solve some of our problems, that may also introduce other issues down the road. Perhaps, we should focus the discussion on what's exactly painful and try to address them in the specific contexts.

@ldemailly ldemailly changed the title reorganize the repos reorganize the repos ? Oct 5, 2017
@wattli
Copy link
Contributor

wattli commented Oct 5, 2017

Does this problem only happen for pilot and mixer or there are other places?

@ijsnellf
Copy link
Contributor

ijsnellf commented Oct 5, 2017

This discussion has come up on every project I've worked on. Unfortunately, I think both methods have plenty of issues. The only thing I'll put in is that switching from one to the other is painful, and the grass is always greener on the other side.

@elevran
Copy link
Contributor

elevran commented Oct 9, 2017

Is discussion happening on this issue or https://goo.gl/eLq2uS?
How will a decision be reached and communicated?

@costinm
Copy link
Contributor

costinm commented Oct 9, 2017 via email

@sebastienvas
Copy link
Contributor

Please also check: https://goo.gl/pzCCf4. There are a lot of improvement we can make with the current state of things. @costinm we should consolidate, or better split depending on which objective we want to accomplish.

@sdboyer
Copy link

sdboyer commented Oct 16, 2017

hi folks - it may be a bit orthogonal to your thinking here, but at least some of what you're grappling with here may be addressed by introducing first-class language-level dependency management via https://github.com/golang/dep. if that's something y'all want to look into, i'm happy to answer questions or provide guidance, as needed.

@costinm
Copy link
Contributor

costinm commented Oct 16, 2017 via email

@sdboyer
Copy link

sdboyer commented Oct 16, 2017

Istio doesn't check in generated artifacts

generated artifacts, e.g., generated Go code, right? if so, yeah, that can definitely be a pain point. this was a calculated risk that we took in the design, based on guidance from the original blog post on go generate. however, there are some workarounds - golang/dep#1077 has more info and discussion.

dep has no option to skip/ignore missing deps.

yeah, it can't adaptively do this - dep's entire model is based around the idea of keeping things in sync. however...

Another issue is that dep doesn't appear to have an 'exclude' list, so projects already in gopath are not added to vendor

have you checked out the ignored list, perhaps? that also may help with your skip/ignore goal.

but yes, in general, dep is not designed for splitting responsibility between GOPATH and vendor. this can be painful for projects that have a cluster of repos folks are working on simultaneously, which i imagine may be the case for istio. i have some ideas about how to do it in the long term, once we're in the toolchain, as well as some possibilities for the medium term. the medium term stuff will have to wait until after golang/dep#121, though - though that's on a pretty near horizon, now.

@ldemailly
Copy link
Member Author

ldemailly commented Nov 13, 2017

This is mostly done - many thanks @mandarjog

Still left :

  • the api->mixerclient->proxy->istio chain
  • istio.io website

@ldemailly
Copy link
Member Author

I'm going to close this one and leave the 2 open issues for later

0x01001011 pushed a commit to thedemodrive/istio that referenced this issue Jul 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment