Skip to content

Commit

Permalink
build: fix offline image build race condition
Browse files Browse the repository at this point in the history
When generating the offline image list, the threaded crossbuild can
try to generate the image list from muliple jobs at once, resulting in
undefined behavior (usually an empty file) for the output file. To fix
this, we can generate this file in the `build.common` step which is not
run in parallel.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
  • Loading branch information
BlaineEXE authored and parth-gr committed Feb 22, 2022
1 parent 0b442ed commit 9aefd12
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ build.version:
build.common: build.version helm.build mod.check
@$(MAKE) go.init
@$(MAKE) go.validate
@$(MAKE) -C images/ceph list-image

do.build.platform.%:
@$(MAKE) PLATFORM=$* go.build
Expand Down
1 change: 0 additions & 1 deletion images/ceph/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ do.build:
@mkdir -p $(TEMP)/rook-external/test-data
@cp $(MANIFESTS_DIR)/create-external-cluster-resources.* $(TEMP)/rook-external/
@cp $(MANIFESTS_DIR)/test-data/ceph-status-out $(TEMP)/rook-external/test-data/
@$(MAKE) list-image

ifeq ($(INCLUDE_CSV_TEMPLATES),true)
@$(MAKE) CSV_TEMPLATE_DIR=$(TEMP) generate-csv-templates
Expand Down

0 comments on commit 9aefd12

Please sign in to comment.