Skip to content

Commit ac9b257

Browse files
authored
fix(CI): Use the correct image registry for replacements in integration tests (kubeflow#11564)
* Use the correct image registry for replacements in integration tests The image registry was changed to GitHub Container Registry in the 2.4 release. Signed-off-by: mprahl <[email protected]> * Print the pod logs when the pods fail to start in integration tests Signed-off-by: mprahl <[email protected]> * Fix the sample compilation in the API server container build Signed-off-by: mprahl <[email protected]> * Show the output when building the container images in CI Signed-off-by: mprahl <[email protected]> --------- Signed-off-by: mprahl <[email protected]>
1 parent ce3850a commit ac9b257

File tree

5 files changed

+26
-13
lines changed

5 files changed

+26
-13
lines changed

.github/resources/manifests/argo/kustomization.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ resources:
55
- ../../../../manifests/kustomize/env/platform-agnostic
66

77
images:
8-
- name: gcr.io/ml-pipeline/api-server
8+
- name: ghcr.io/kubeflow/kfp-api-server
99
newName: kind-registry:5000/apiserver
1010
newTag: latest
11-
- name: gcr.io/ml-pipeline/persistenceagent
11+
- name: ghcr.io/kubeflow/kfp-persistence-agent
1212
newName: kind-registry:5000/persistenceagent
1313
newTag: latest
14-
- name: gcr.io/ml-pipeline/scheduledworkflow
14+
- name: ghcr.io/kubeflow/kfp-scheduled-workflow-controller
1515
newName: kind-registry:5000/scheduledworkflow
1616
newTag: latest
1717

.github/resources/manifests/tekton/kustomization.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ resources:
1414
# when application is deleted.
1515

1616
images:
17-
- name: gcr.io/ml-pipeline/api-server
17+
- name: ghcr.io/kubeflow/kfp-api-server
1818
newName: kind-registry:5000/apiserver
1919
newTag: latest
20-
- name: gcr.io/ml-pipeline/persistenceagent
20+
- name: ghcr.io/kubeflow/kfp-persistence-agent
2121
newName: kind-registry:5000/persistenceagent
2222
newTag: latest
23-
- name: gcr.io/ml-pipeline/scheduledworkflow
23+
- name: ghcr.io/kubeflow/kfp-scheduled-workflow-controller
2424
newName: kind-registry:5000/scheduledworkflow
2525
newTag: latest
2626
- name: '*/aipipeline/tekton-exithandler-controller'

.github/resources/scripts/build-images.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,35 +25,35 @@ EXIT_CODE=0
2525

2626
docker system prune -a -f
2727

28-
docker build -q -t "${REGISTRY}/apiserver:${TAG}" -f backend/Dockerfile . && docker push "${REGISTRY}/apiserver:${TAG}" || EXIT_CODE=$?
28+
docker build --progress=plain -t "${REGISTRY}/apiserver:${TAG}" -f backend/Dockerfile . && docker push "${REGISTRY}/apiserver:${TAG}" || EXIT_CODE=$?
2929
if [[ $EXIT_CODE -ne 0 ]]
3030
then
3131
echo "Failed to build apiserver image."
3232
exit $EXIT_CODE
3333
fi
3434

35-
docker build -q -t "${REGISTRY}/persistenceagent:${TAG}" -f backend/Dockerfile.persistenceagent . && docker push "${REGISTRY}/persistenceagent:${TAG}" || EXIT_CODE=$?
35+
docker build --progress=plain -t "${REGISTRY}/persistenceagent:${TAG}" -f backend/Dockerfile.persistenceagent . && docker push "${REGISTRY}/persistenceagent:${TAG}" || EXIT_CODE=$?
3636
if [[ $EXIT_CODE -ne 0 ]]
3737
then
3838
echo "Failed to build persistenceagent image."
3939
exit $EXIT_CODE
4040
fi
4141

42-
docker build -q -t "${REGISTRY}/scheduledworkflow:${TAG}" -f backend/Dockerfile.scheduledworkflow . && docker push "${REGISTRY}/scheduledworkflow:${TAG}" || EXIT_CODE=$?
42+
docker build --progress=plain -t "${REGISTRY}/scheduledworkflow:${TAG}" -f backend/Dockerfile.scheduledworkflow . && docker push "${REGISTRY}/scheduledworkflow:${TAG}" || EXIT_CODE=$?
4343
if [[ $EXIT_CODE -ne 0 ]]
4444
then
4545
echo "Failed to build scheduledworkflow image."
4646
exit $EXIT_CODE
4747
fi
4848

49-
docker build -q -t "${REGISTRY}/driver:${TAG}" -f backend/Dockerfile.driver . && docker push "${REGISTRY}/driver:${TAG}" || EXIT_CODE=$?
49+
docker build --progress=plain -t "${REGISTRY}/driver:${TAG}" -f backend/Dockerfile.driver . && docker push "${REGISTRY}/driver:${TAG}" || EXIT_CODE=$?
5050
if [[ $EXIT_CODE -ne 0 ]]
5151
then
5252
echo "Failed to build driver image."
5353
exit $EXIT_CODE
5454
fi
5555

56-
docker build -q -t "${REGISTRY}/launcher:${TAG}" -f backend/Dockerfile.launcher . && docker push "${REGISTRY}/launcher:${TAG}" || EXIT_CODE=$?
56+
docker build --progress=plain -t "${REGISTRY}/launcher:${TAG}" -f backend/Dockerfile.launcher . && docker push "${REGISTRY}/launcher:${TAG}" || EXIT_CODE=$?
5757
if [[ $EXIT_CODE -ne 0 ]]
5858
then
5959
echo "Failed to build launcher image."

.github/resources/scripts/kfp-readiness/wait_for_pods.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@
1313
config.load_kube_config()
1414
v1 = client.CoreV1Api()
1515

16+
def log_pods():
17+
pods = v1.list_namespaced_pod(namespace=namespace)
18+
19+
for pod in pods.items:
20+
try:
21+
logging.info(
22+
f"---- Pod {namespace}/{pod.metadata.name} logs ----\n"
23+
+ v1.read_namespaced_pod_log(pod.metadata.name, namespace)
24+
)
25+
except client.exceptions.ApiException:
26+
continue
1627

1728
def get_pod_statuses():
1829
pods = v1.list_namespaced_pod(namespace=namespace)
@@ -74,6 +85,8 @@ def check_pods(calm_time=10, timeout=600, retries_after_ready=5):
7485
logging.info(f"Pods are still stabilizing. Retrying in {calm_time} seconds...")
7586
time.sleep(calm_time)
7687
else:
88+
log_pods()
89+
7790
raise Exception("Pods did not stabilize within the timeout period.")
7891

7992
logging.info("Final pod statuses:")

backend/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ COPY backend/src/apiserver/config/sample_config.json /samples/
5454
# Compiling the preloaded samples.
5555
# The default image is replaced with the GCR-hosted python image.
5656
RUN set -e; \
57-
< /samples/sample_config.json jq .[].file --raw-output | while read pipeline_yaml; do \
57+
< /samples/sample_config.json jq ".pipelines[].file" --raw-output | while read pipeline_yaml; do \
5858
pipeline_py="${pipeline_yaml%.yaml}"; \
59-
python3 "$pipeline_py"; \
59+
echo "Compiling: \"$pipeline_py\"" && python3 "$pipeline_py" && echo -n "Output: " && ls "$pipeline_py.yaml"; \
6060
done
6161

6262
# 3. Start api web server

0 commit comments

Comments
 (0)