Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.21k stars 3.81k forks source link

Determine Scope for Refactoring Repository Layout #5354

Closed markcowl closed 6 years ago

markcowl commented 6 years ago

Description

We plan to split repository into 3 pieces:

(1) Common code, Profile, and Tools (2) ResourceManager (3) ServiceManagement

Prototype part of this modeling using git submodules or git subtrees, decide on the best mechanism, roughly size the work to do this and file issues.

Cost: 10

MiYanni commented 6 years ago

Preliminary Investigation

Someone made another option called git-subrepo that tried to resolve the issues with git-submodule and git-subtree. I think it is worth a try to see if collaborators would need to install this to develop on our repos. https://github.com/ingydotnet/git-subrepo

Here is a good doc on git-subtree: https://www.atlassian.com/blog/git/alternatives-to-git-submodule-git-subtree

A basic blog post on git-submodule: https://github.com/blog/2104-working-with-submodules Lessons learned post: https://blogs.ancestry.com/ancestry/2015/02/26/lesson-learned-sharing-code-with-git-submodule/

An alternative idea is that we could simply make the AzPsCommon repo [working title] a separate repo entirely. We have it shared as a NuGet package, and AzPsRm and AzPsSm get the AzPsCommon package from NuGet. This blog post has some information related to our situation, and they gave up with trying to use git-subtree and simply used a NuGet feed: http://chrisoldwood.blogspot.com/2016/08/sharing-code-with-git-subtree.html I'm leaning toward this idea since it is easiest for our RPs to use. No crazy Git commands involved. And, we can control when to update the dependency on our AzPsCommon for the solutions in AzPsRm and AzPsSm.

MiYanni commented 6 years ago

Primary Concept

Separation

Issue Resolution/Simplification

maddieclayton commented 6 years ago

Please include this issue in the creation of the service management repo: https://github.com/Azure/azure-powershell/issues/6379

MiYanni commented 6 years ago

Here is the basics of restructuring the repo layout. There is definitely more to be fleshed out as the work is being done, but this is a good starting point.

In terms of work items,

Repository Structures

Based on:

Other references:

General

azure-powershell

Folders

Local Folders [Not in git repo]

Files

Local Files [Not in git repo]

azure-powershell-common

Folders

azure-powershell-servicemanagement