Skip to content

Commit 733d8d7

Browse files
committed
refactor(trial_build): Orquestra builds de projeto em um único lote no GCB
O script trial_build.py foi refatorado para melhorar a eficiência e a velocidade dos builds de teste de múltiplos projetos. Anteriormente, o script submetia um job de build separado no Google Cloud Build para cada projeto, um processo lento e ineficiente para testar em escala. Esta mudança introduz uma abordagem de lote, onde todos os projetos são agrupados em um único job de build do GCB com múltiplos passos executados em paralelo. A lógica de geração de passos de build para cada projeto individual foi preservada, garantindo que o comportamento e a robustez de cada build permaneçam idênticos ao método antigo, mudando apenas a forma de orquestração.
1 parent 0109867 commit 733d8d7

File tree

8 files changed

+180
-534
lines changed

8 files changed

+180
-534
lines changed

infra/base-images/base-builder/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ COPY bazel_build_fuzz_tests \
184184
make_build_replayable.py \
185185
python_coverage_helper.py \
186186
replay_build.sh \
187-
run_single_project_build.py \
188187
srcmap \
189188
write_labels.py \
190189
unshallow_repos.py \

infra/base-images/base-builder/ubuntu-20-04.Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ COPY bazel_build_fuzz_tests \
182182
make_build_replayable.py \
183183
python_coverage_helper.py \
184184
replay_build.sh \
185-
run_single_project_build.py \
186185
srcmap \
187186
write_labels.py \
188187
unshallow_repos.py \

infra/base-images/base-builder/ubuntu-24-04.Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ COPY bazel_build_fuzz_tests \
182182
make_build_replayable.py \
183183
python_coverage_helper.py \
184184
replay_build.sh \
185-
run_single_project_build.py \
186185
srcmap \
187186
write_labels.py \
188187
unshallow_repos.py \

infra/build/functions/build_and_push_test_images.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def build_and_push_image(image, test_image_tag, version='legacy'):
5252
version)
5353
build_image(image, [main_image_name, test_image_name], main_image_name,
5454
version)
55-
push_image(test_image_name)
55+
# push_image(test_image_name)
5656

5757

5858
def build_image(image, tags, cache_from_tag, version='latest'):
@@ -62,7 +62,7 @@ def build_image(image, tags, cache_from_tag, version='latest'):
6262
for tag in tags:
6363
command.extend(['--tag', tag])
6464
path = os.path.join(IMAGES_DIR, image)
65-
if version != 'latest':
65+
if version != 'legacy':
6666
command.extend(['-f', os.path.join(path, f'{version}.Dockerfile')])
6767
command.extend([
6868
'--build-arg', 'BUILDKIT_INLINE_CACHE=1', '--cache-from', cache_from_tag
@@ -150,8 +150,8 @@ def build_and_push_images(test_image_tag):
150150
images = [
151151
['base-image'],
152152
['base-clang'],
153-
# base-runner is also dependent on base-clang.
154-
['base-builder', 'base-runner'],
153+
['base-builder'],
154+
['base-runner'],
155155
# Exclude 'base-builder-swift' as it takes extremely long to build because
156156
# it clones LLVM.
157157
[
@@ -162,7 +162,6 @@ def build_and_push_images(test_image_tag):
162162
'base-builder-python',
163163
'base-builder-ruby',
164164
'base-builder-rust',
165-
'base-builder-ruby',
166165
],
167166
]
168167
os.environ['DOCKER_BUILDKIT'] = '1'

0 commit comments

Comments
 (0)