Skip to content

Commit 097bdd7

Browse files
authored
ci(devbox): force-pull latest flyteconsole image when building bundled devbox (#7594)
Signed-off-by: Kevin Su <pingsutw@apache.org>
1 parent 1a850b5 commit 097bdd7

6 files changed

Lines changed: 37 additions & 6 deletions

File tree

.github/workflows/flyte-binary-v2.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,11 @@ jobs:
204204
project: ${{ env.DEPOT_PROJECT_ID }}
205205
context: docker/devbox-bundled
206206
platforms: linux/arm64,linux/amd64
207-
build-args: "FLYTE_DEVBOX_VERSION=${{ env.FLYTE_DEVBOX_VERSION }}"
207+
# CACHEBUST forces the Dockerfile preload layer to re-pull moving tags
208+
# (flyteconsole-v2:latest) instead of reusing a stale cached layer.
209+
build-args: |
210+
FLYTE_DEVBOX_VERSION=${{ env.FLYTE_DEVBOX_VERSION }}
211+
CACHEBUST=${{ github.run_id }}-${{ github.run_attempt }}
208212
save: true
209213
save-tags: cpu-build-${{ github.run_id }}-${{ github.run_attempt }}
210214
- name: Authenticate Docker to Depot Registry
@@ -223,7 +227,9 @@ jobs:
223227
context: docker/devbox-bundled
224228
platforms: linux/arm64,linux/amd64
225229
tags: ${{ steps.image-names.outputs.tags }}
226-
build-args: "FLYTE_DEVBOX_VERSION=${{ env.FLYTE_DEVBOX_VERSION }}"
230+
build-args: |
231+
FLYTE_DEVBOX_VERSION=${{ env.FLYTE_DEVBOX_VERSION }}
232+
CACHEBUST=${{ github.run_id }}-${{ github.run_attempt }}
227233
push: true
228234
- name: Prepare GPU Image Names
229235
id: gpu-image-names

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ build: verify ## Build all Go service binaries
3636
# =============================================================================
3737

3838
.PHONY: devbox-build
39-
devbox-build: ## Build the flyte devbox image (docker/devbox-bundled)
40-
$(MAKE) -C docker/devbox-bundled build
39+
devbox-build: ## Build the flyte devbox image (docker/devbox-bundled), always re-pulling the latest UI image
40+
$(MAKE) -C docker/devbox-bundled build CACHEBUST=$(shell date +%s)
4141

4242
# Run in dev mode with extra arg FLYTE_DEV=True
4343
.PHONY: devbox-run

docker/devbox-bundled/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ ENV TARGETARCH "${TARGETARCH}"
77
WORKDIR /build
88

99
COPY images/manifest.txt images/preload ./
10-
RUN ./preload manifest.txt
10+
11+
ARG CACHEBUST=0
12+
RUN echo "cachebust=${CACHEBUST}" && ./preload manifest.txt
1113

1214

1315
FROM --platform=${BUILDPLATFORM} golang:1.26.3-bookworm AS bootstrap

docker/devbox-bundled/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ sync-crds:
129129
build: sync-crds flyte dep_update manifests
130130
docker buildx build --builder flyte-devbox --load \
131131
$(BUILDX_CACHE_FLAGS) \
132+
$(if $(CACHEBUST),--build-arg CACHEBUST=$(CACHEBUST)) \
132133
--tag flyte-devbox:latest .
133134

134135
.PHONY: build-gpu

docker/devbox-bundled/manifests/complete.yaml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7759,6 +7759,20 @@ data:
77597759
k8s:
77607760
co-pilot:
77617761
image: "flyte-binary-v2:sandbox"
7762+
# Env vars injected into every task pod, so it can reach the control plane
7763+
# to enqueue child actions and watch their state.
7764+
#
7765+
# - _U_EP_OVERRIDE: where the task reaches the control plane. Defaults to
7766+
# this release's in-cluster HTTP service, <fullname>-http.<namespace>:8090.
7767+
# - _U_INSECURE: talk plain HTTP — the in-cluster service has no TLS
7768+
# (TLS terminates at the ingress).
7769+
# - _U_USE_ACTIONS: use the actions/queue execution path.
7770+
#
7771+
# Override or extend via configuration.inline.plugins.k8s.default-env-vars.
7772+
default-env-vars:
7773+
- _U_EP_OVERRIDE: "flyte-binary-http.flyte:8090"
7774+
- _U_INSECURE: "true"
7775+
- _U_USE_ACTIONS: "1"
77627776
k8s-array:
77637777
logs:
77647778
config:
@@ -8614,7 +8628,7 @@ spec:
86148628
template:
86158629
metadata:
86168630
annotations:
8617-
checksum/configuration: 9ed3014b64700d5fd7df7d19eb0c2cd88291e3c775e0f34e13e3231d82e49234
8631+
checksum/configuration: b3c98afcd1c1a1aca5040d049159f6a8683facf7875920987bab9a9df6dc8f97
86188632
checksum/configuration-secret: 800f306f43701bd39e3b42e0d756f4627643cf3cee6dbd050a5a57a08052c280
86198633
labels:
86208634
app.kubernetes.io/component: flyte-binary
@@ -9390,6 +9404,10 @@ spec:
93909404
ports:
93919405
web:
93929406
nodePort: 30080
9407+
# ALB terminates TLS and forwards plaintext to this entrypoint. Trust its
9408+
# X-Forwarded-Proto: https instead of letting Traefik rewrite it to http.
9409+
forwardedHeaders:
9410+
insecure: true
93939411
transport:
93949412
respondingTimeouts:
93959413
readTimeout: 0

docker/devbox-bundled/manifests/dev.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8894,6 +8894,10 @@ spec:
88948894
ports:
88958895
web:
88968896
nodePort: 30080
8897+
# ALB terminates TLS and forwards plaintext to this entrypoint. Trust its
8898+
# X-Forwarded-Proto: https instead of letting Traefik rewrite it to http.
8899+
forwardedHeaders:
8900+
insecure: true
88978901
transport:
88988902
respondingTimeouts:
88998903
readTimeout: 0

0 commit comments

Comments
 (0)