transitioning apple s downstream repositories to the
play

Transitioning Apples Downstream Repositories To The Monorepo Alex - PowerPoint PPT Presentation

Transitioning Apples Downstream Repositories To The Monorepo Alex Lorenz Apple Lets recreate our downstream repos Lets improve our workflows Monorepo Tooling Downstream monorepo generation tools $ git


  1. Transitioning Apple’s Downstream Repositories To The Monorepo Alex Lorenz Apple

  2. 🤩

  3. 😲

  4. 💢 🤡 Let’s recreate our downstream repos Let’s improve our workflows

  5. Monorepo Tooling Downstream monorepo generation tools $ git apple-llvm … Auto merger infrastructure and tools $ git apple-llvm am … GitHub PR & CI tools $ git apple-llvm pr … 👊 github.com/apple/apple-llvm-infrastructure-tools 👊 LLVM Project License

  6. Generating Downstream Monorepos

  7. Downstreams @ Apple https://git.llvm.org/git/{llvm,clang,lldb,...}.git 3+ levels of forks / branches github.com/apple/swift-{llvm,clang,lldb,...} Each level had llvm, clang, lldb, etc. Git merges used between levels Internal master branch for llvm, clang, lldb, … Additional branches/forks of llvm, clang, …

  8. Monorepo Concerns Can we preserve downstream history? github.com/apple/swift-{llvm,clang,lldb,...} Can historic checkouts build clang and lldb? Are all downstream branches preserved? Internal master branch for llvm, clang, lldb, … 🤕 Additional branches/forks of llvm, clang, …

  9. Monorepo Concerns Can we preserve downstream history? Yes… Can historic checkouts build clang and lldb? Let’s generate the Git history ourselves Are all downstream branches preserved?

  10. Creating New History llvm clang downstream downstream llvm.org To generate a branch: llvm.org Yes… Interleave first-parent generated commits Order the disjoint commits by date Let’s generate the Git history ourselves Prioritize merges based on directory To generate a non-llvm.org commit: Move Git tree to a subdirectory Rewrite parents to new commit hashes

  11. Generated monorepo llvm clang downstream downstream llvm.org llvm.org

  12. Generated monorepo Generated Monorepo Upstream monorepo hashes are used Downstream commit history preserved Downstream tags preserved A checkout of any downstream commit contains full downstream monorepo 😏

  13. Workflow Improvements

  14. Auto Merger 🤗 Merges upstream branches downstream llvm.org/master Configuration in target branch apple/master apple/stable/20190619 Builds and tests before merging Merge conflicts create PRs swift/master-next swift/master

  15. PR & CI Tools Create, merge and list monorepo PRs $ git apple-llvm pr test #42 Triggering pull request testing for pr #42 by hyp: Support git-cat-file as read_file function ✅ you commented "@swift-ci please test" on the pull request. Test PRs using custom Jenkins test plans Test PRs using swift-ci

  16. Thank you! The End

Recommend


More recommend