From f7dd4ceebe0c8ad77edaee7ac2f8c1f82e325940 Mon Sep 17 00:00:00 2001 From: Etienne Perot Date: Sat, 2 Mar 2024 18:21:40 -0800 Subject: [PATCH] Ignore `gpu/ollama/bench` image in BuildKite pipeline. It is too big to pull and build in the test pipeline, and makes the test pipeline time out. It is only used in benchmarks, so not critical for testing. PiperOrigin-RevId: 612072435 --- .buildkite/hooks/pre-command | 4 ++-- .buildkite/pipeline.yaml | 4 ++-- .buildkite/release.yaml | 2 +- images/README.md | 2 +- tools/images.mk | 22 ++++++++++++++++++---- 5 files changed, 24 insertions(+), 10 deletions(-) diff --git a/.buildkite/hooks/pre-command b/.buildkite/hooks/pre-command index 95483e7ae..681ac0db7 100644 --- a/.buildkite/hooks/pre-command +++ b/.buildkite/hooks/pre-command @@ -143,9 +143,9 @@ pipeline_add_env() { # Try to skip unaffected tests on pre-submits. # BUILDKITE_PIPELINE_ID is set only on the pipeline upload step. if [[ -n "${BUILDKITE_PIPELINE_ID}" && "${BUILDKITE_BRANCH}" =~ ^test/ ]]; then - # Skip load-all-images tests if the change doesn't affect images. + # Skip load-all-test-images tests if the change doesn't affect images. if ./tools/builkite-check-paths.sh images/ tools/images.mk Makefile; then - echo "Skip load-all-images tests" + echo "Skip load-all-test-images tests" pipeline_add_env SKIP_LOADING_IMAGES 1 fi fi diff --git a/.buildkite/pipeline.yaml b/.buildkite/pipeline.yaml index 7fc2ab296..8af8953df 100644 --- a/.buildkite/pipeline.yaml +++ b/.buildkite/pipeline.yaml @@ -215,13 +215,13 @@ steps: - <<: *common label: ":docker: Images (x86_64)" if: build.env("SKIP_LOADING_IMAGES") == null && build.env("STAGED_BINARIES") == null - command: make ARCH=x86_64 load-all-images + command: make ARCH=x86_64 load-all-test-images agents: arch: "amd64" - <<: *common label: ":docker: Images (aarch64)" if: build.env("SKIP_LOADING_IMAGES") == null && build.env("STAGED_BINARIES") == null - command: make ARCH=aarch64 load-all-images + command: make ARCH=aarch64 load-all-test-images agents: arch: "arm64" diff --git a/.buildkite/release.yaml b/.buildkite/release.yaml index fe674873d..f8c0217ca 100644 --- a/.buildkite/release.yaml +++ b/.buildkite/release.yaml @@ -2,7 +2,7 @@ agents: queue: release _templates: common: &common - timeout_in_minutes: 120 + timeout_in_minutes: 180 retry: automatic: - exit_status: -1 diff --git a/images/README.md b/images/README.md index 0b064446e..5784341e9 100644 --- a/images/README.md +++ b/images/README.md @@ -29,7 +29,7 @@ image infrastructure. The continuous integration system can either take fine-grained dependencies on single images via individual `load` targets, or pull all images via a single -`load-all-images` invocation. +`load-all-test-images` invocation. ## Adding new images diff --git a/tools/images.mk b/tools/images.mk index f15e31680..bcd4474b9 100644 --- a/tools/images.mk +++ b/tools/images.mk @@ -41,10 +41,12 @@ endif # runsc/testutil.MangleImage. Names are mangled in this way to ensure that all # tests are using locally-defined images (that are consistent and idempotent). REMOTE_IMAGE_PREFIX ?= gcr.io/gvisor-presubmit -LOCAL_IMAGE_PREFIX ?= gvisor.dev/images -ALL_IMAGES := $(subst /,_,$(subst images/,,$(shell find images/ -name Dockerfile -o -name Dockerfile.$(ARCH) | xargs -n 1 dirname | uniq))) -SUB_IMAGES := $(foreach image,$(ALL_IMAGES),$(if $(findstring _,$(image)),$(image),)) -IMAGE_GROUPS := $(sort $(foreach image,$(SUB_IMAGES),$(firstword $(subst _, ,$(image))))) +LOCAL_IMAGE_PREFIX ?= gvisor.dev/images +ALL_IMAGES := $(subst /,_,$(subst images/,,$(shell find images/ -name Dockerfile -o -name Dockerfile.$(ARCH) | xargs -n 1 dirname | uniq))) +NON_TEST_IMAGES := gpu/ollama/bench +TEST_IMAGES := $(subst /,_,$(subst images/,,$(shell find images/ -name Dockerfile -o -name Dockerfile.$(ARCH) | xargs -n 1 dirname | uniq | grep -v $(NON_TEST_IMAGES)))) +SUB_IMAGES := $(foreach image,$(ALL_IMAGES),$(if $(findstring _,$(image)),$(image),)) +IMAGE_GROUPS := $(sort $(foreach image,$(SUB_IMAGES),$(firstword $(subst _, ,$(image))))) define expand_group = load-$(1): $$(patsubst $(1)_%, load-$(1)_%, $$(filter $(1)_%,$$(ALL_IMAGES))) @@ -60,14 +62,26 @@ list-all-images: ## List all images. @for image in $(ALL_IMAGES); do echo $${image}; done .PHONY: list-all-images +list-all-test-images: ## List all test images. + @for image in $(TEST_IMAGES); do echo $${image}; done +.PHONY: list-all-test-images + load-all-images: ## Load all images. load-all-images: $(patsubst %,load-%,$(ALL_IMAGES)) .PHONY: load-all-images +load-all-test-images: ## Load all test images. +load-all-test-images: $(patsubst %,load-%,$(TEST_IMAGES)) +.PHONY: load-all-test-images + push-all-images: ## Push all images. push-all-images: $(patsubst %,push-%,$(ALL_IMAGES)) .PHONY: push-all-images +push-all-test-images: ## Push all images. +push-all-test-images: $(patsubst %,push-%,$(TEST_IMAGES)) +.PHONY: push-all-test-images + # path and dockerfile are used to extract the relevant path and dockerfile # (depending on what's available for the given architecture). path = images/$(subst _,/,$(1))