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

Add mechanism to have a script folder automatically sync to all languages repos #327

Closed
weshaggard opened this issue Jan 15, 2020 · 5 comments
Assignees
Labels
EngSys This issue is impacting the engineering system.

Comments

@weshaggard
Copy link
Member

There are more and more cases where we need to have some common scripts across our language repos (changelogs, file lengths, readme parsing, etc). To help with this problem we should create a common directory that we automatically sync across languages. Here is a proposal:

  1. We create an eng\common directory in this repo. That directory will contain common text based scripts that we need to use locally or in our pipelines across the different language repos. It should remain relatively small in size and only contain scripts we need in most, if not all, our language repos. In can also contain common yml templates we need to share.
  2. We create a mechanism that automatically detects changes in the eng/common directory in this repo and blindly put those in all the eng/common directories of the repositories that are subscribed to sync these changes.

cc @azure/azure-sdk-eng

@weshaggard weshaggard added the EngSys This issue is impacting the engineering system. label Jan 15, 2020
@weshaggard weshaggard self-assigned this Jan 15, 2020
@mitchdenny
Copy link
Contributor

mitchdenny commented Jan 16, 2020

What is the reasoning behind a sync model vs. just cloning the repo? I agree that this is a problem that we need to solve, just wanted to talk through the options.

@weshaggard
Copy link
Member Author

The primary reason is that we will want not only our pipelines but local devs to be able to use a lot of these scripts and it is much easier if there isn't yet another step and cloning to try and bootstrap these scripts. It also makes servicing and other aspects much simpler.

A smaller consideration is that if you clone you need to pull the entire repo including the history (assuming we don't try to complicate things with a shallow clone) of everything in the repo which isn't going to be interesting for most of these language repos.

@bsiegel
Copy link
Member

bsiegel commented Jan 16, 2020

Another option is to use a submodule or subtree (for developer ergonomics, I'd probably prefer subtree). Just another though to chew on.

@weshaggard
Copy link
Member Author

git subtree is a reasonable merging tool but as best I can find it doesn't allow you to merge a single directory. You can only merge an entire repo into a single directory in another repo but not a directory from a repo into directory in another repo. So I will like just do a directory delete, then copy and pend.

@weshaggard
Copy link
Member Author

This automation has been implemented with PR #353.

sima-zhu pushed a commit to sima-zhu/azure-sdk-tools that referenced this issue Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EngSys This issue is impacting the engineering system.
Projects
None yet
Development

No branches or pull requests

3 participants