Skip to content

Commit f905392

Browse files
balasankarcRobert Marshall
authored andcommitted
Change git-filter-repo position in build order
When git-filter-repo is a dependency of gitaly, Omnibus will place it early in the build order and, by necessity, git. This behavior causes cache to bust frequently. This change re-arranges the dependency order and keeps git builds in the later stages. Signed-off-by: Balasankar 'Balu' C <[email protected]>
1 parent dc4a42f commit f905392

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

config/projects/gitlab.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,13 @@
163163
dependency 'gitlab-pages'
164164
dependency 'git'
165165

166+
# `git-filter-repo` is a dependency of Gitaly. But placing it there will cause
167+
# it to be built early in the build list, which will in-turn cause `git` to be
168+
# built early. `git`, being built from `gitaly` source will bust cache often,
169+
# and cause unnecessary rebuilds. Hence, we are placing `git-filter-repo` as a
170+
# project dependency after `git`
171+
dependency 'git-filter-repo'
172+
166173
# gitaly needs grpc to work correctly. These native extensions are built as part
167174
# of gitlab-rails build. So, gitlab-rails has to be built before gitaly. But
168175
# making gitaly depend on gitlab-rails will cause it to be built earlier,

config/software/git-filter-repo.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@
2727

2828
skip_transitive_dependency_licensing true
2929

30-
dependency 'git'
30+
# Git is marked as a project dependency to be built before `git-filter-repo`.
31+
# Adding it as a software dependency to `git-filter-repo` will cause it to be
32+
# rebuilt early in the build list, bust cache, and cause everything after it to
33+
# be rebuilt.
34+
# dependency 'git'
3135
dependency 'python3'
3236

3337
build do

config/software/gitaly.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
dependency 'ruby'
3131
dependency 'libicu'
3232
dependency 'tomlib'
33-
dependency 'git-filter-repo'
3433

3534
# Technically, gitaly depends on git also. But because of how omnibus arranges
3635
# components to be built, this causes git to be built early in the process. But

0 commit comments

Comments
 (0)