Skip to content

Commit 2637e83

Browse files
committed
Save cdb for reindexing.
1 parent 316c292 commit 2637e83

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

infra/base-images/base-builder/replay_build.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,10 @@ if [ ! -f /usr/bin/bash.real ]; then
1919
# Only run this once.
2020
python /usr/local/bin/make_build_replayable.py
2121
fi
22-
. $SRC/build.sh "$@"
22+
23+
# If there are cdb fragments saved, restore them to $OUT
24+
if [ -d /cdb ]; then
25+
cp -rT /cdb $OUT/cdb
26+
fi
27+
28+
. $SRC/build.sh "$@"

infra/build/functions/build_project.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,10 @@ def get_indexer_build_steps(project_name,
553553
'bash', '-c',
554554
f'cd /src && cd {project.workdir} && mkdir -p {build.out} && '
555555
'/opt/indexer/index_build.py && '
556-
'cp -n /usr/local/bin/replay_build.sh $$SRC/'
556+
# Enable re-building both the project and the indexes.
557+
'cp -n /usr/local/bin/replay_build.sh $$SRC/ && '
558+
# Save the CDB fragments so we can put them together later.
559+
'cp -r $$OUT/cdb /cdb'
557560
],
558561
'env': env,
559562
}

0 commit comments

Comments
 (0)