Skip to content

Commit d7e6add

Browse files
committed
ci: fetch legacy repo history so pre-migration sync SHAs resolve
Packages synced to OBS before the migration from rjd15372/percona-obs-packaging to percona/obs-packaging carry sync comments like 'sync: main@6f95b5a (rjd15372/...)' whose SHAs come from the legacy repo's rebased history and do not exist in a percona-only clone. The branch-decision/skip fast path runs git log <sha>..HEAD per package, so an unresolvable SHA conservatively falls through to the full content check: every PR run re-ran services for essentially the whole tree (~10 min), and it also exposed the vendor.tar.gz drift promotions on PR #5. The two histories share ancestry up to the migration point, so simply fetching the legacy refs makes the old SHAs resolvable and the range queries correct: verified in a percona-only clone that after the fetch 6f95b5a..HEAD is empty for untouched packages (fast aggregate) and still lists the PR commits for packages the PR really changed. The fetch is fail-open (warning only) and should be dropped once all packages have been re-synced with percona/obs-packaging SHAs in their comments. Signed-off-by: Ricardo Dias <ricardo.dias@percona.com>
1 parent 864cd6a commit d7e6add

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

.github/workflows/obs-pr-check.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,18 @@ jobs:
120120
# per package to detect which packages changed since main's last sync.
121121
fetch-depth: 0
122122

123+
# Packages synced before the migration to percona/obs-packaging carry
124+
# OBS sync comments whose SHAs come from the legacy repo's history and
125+
# do not resolve in this clone, which forces the branch decision off
126+
# the cheap git gate into a full content check for every such package.
127+
# Fetch the legacy history so those SHAs resolve; drop this step once
128+
# all packages have been re-synced with percona/obs-packaging SHAs.
129+
- name: Fetch legacy repo history (pre-migration sync SHAs)
130+
run: |
131+
git fetch https://github.com/rjd15372/percona-obs-packaging.git \
132+
'refs/heads/*:refs/remotes/legacy/*' \
133+
|| echo "::warning::legacy repo unreachable; sync falls back to content checks"
134+
123135
# Persists the content-addressed .cache/ tree across runs, split in
124136
# two entries (same layout as sync-main.yml so PR runs can restore the
125137
# main branch's caches via restore-keys):

.github/workflows/sync-main.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,18 @@ jobs:
4242
fetch-depth: 0
4343
token: ${{ secrets.GH_PAT }}
4444

45+
# Packages synced before the migration to percona/obs-packaging carry
46+
# OBS sync comments whose SHAs come from the legacy repo's history and
47+
# do not resolve in this clone, which forces --skip-unchanged off the
48+
# cheap git gate into services + upload comparison for every such
49+
# package. Fetch the legacy history so those SHAs resolve; drop this
50+
# step once all packages have been re-synced with percona SHAs.
51+
- name: Fetch legacy repo history (pre-migration sync SHAs)
52+
run: |
53+
git fetch https://github.com/rjd15372/percona-obs-packaging.git \
54+
'refs/heads/*:refs/remotes/legacy/*' \
55+
|| echo "::warning::legacy repo unreachable; sync falls back to content checks"
56+
4557
# Persists the content-addressed .cache/ tree across runs, split in
4658
# two entries:
4759
#

0 commit comments

Comments
 (0)