Skip to content

Commit

Permalink
Fix out of space error in running integration test github workflow (#628
Browse files Browse the repository at this point in the history
)

* Fix out of space error in running integration test github workflow

* remove build-workload-image job

* add manual workflow trigger

* remove blanks

* parallelize make docker-build-all

* use nproc
  • Loading branch information
varungup90 authored Feb 6, 2025
1 parent 8e2e9f3 commit 31d8d2a
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 21 deletions.
39 changes: 29 additions & 10 deletions .github/workflows/installation-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,33 @@ jobs:
retention-days: 1

installation-test:
needs: build-images
needs: [build-images]
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Download all image artifacts
uses: actions/download-artifact@v4

- name: Free disk space
run: |-
# https://github.com/actions/runner-images/issues/2840#issuecomment-2272410832
# Remove software and language runtimes we're not using
sudo rm -rf \
/opt/google/chrome \
/opt/microsoft/msedge \
/opt/microsoft/powershell \
/opt/pipx \
/usr/lib/mono \
/usr/local/julia* \
/usr/local/lib/android \
/usr/local/lib/node_modules \
/usr/local/share/chromium \
/usr/local/share/powershell \
/usr/share/dotnet \
/usr/share/swift
df -h /
- name: Install kind
run: |
Expand All @@ -86,17 +105,17 @@ jobs:
- name: Load image into Kind
run: |
for image in controller-manager gateway-plugins runtime metadata-service; do
docker load < ${image}-image/${image}.tar
# Retag the image
# This is for application integration, since it is not that easy to override all commits in manifest
# It is better to use nightly to represent the latest image
docker tag aibrix/${image}:${{ github.sha }} aibrix/${image}:nightly
docker load < ${image}-image/${image}.tar
kind load docker-image aibrix/${image}:${{ github.sha }} --name installation-test
kind load docker-image aibrix/${image}:nightly --name installation-test
# Retag the image
# This is for application integration, since it is not that easy to override all commits in manifest
# It is better to use nightly to represent the latest image
docker tag aibrix/${image}:${{ github.sha }} aibrix/${image}:nightly
done
kind load docker-image aibrix/controller-manager:${{ github.sha }} aibrix/gateway-plugins:${{ github.sha }} aibrix/metadata-service:${{ github.sha }} aibrix/runtime:${{ github.sha }} --name installation-test
kind load docker-image aibrix/controller-manager:nightly aibrix/gateway-plugins:nightly aibrix/metadata-service:nightly aibrix/runtime:nightly --name installation-test
- name: Deploy controller with the built image
run: |
kubectl create -k config/dependency
Expand All @@ -116,7 +135,7 @@ jobs:
- name: Check pod status
run: |
sleep 60s
sleep 30s
kubectl get pods --all-namespaces
kubectl wait pod --all --for=condition=ready --all-namespaces --timeout=300s
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lint-and-tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Linter and Unit Tests

on:
workflow_dispatch: # Allows manual trigger
push:
branches: [ "main" ]
paths:
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ define push_image
endef

.PHONY: docker-build-all
docker-build-all: docker-build-controller-manager docker-build-gateway-plugins docker-build-runtime docker-build-metadata-service ## Build all docker images
docker-build-all:
make -j $(nproc) docker-build-controller-manager docker-build-gateway-plugins docker-build-runtime docker-build-metadata-service ## Build all docker images

.PHONY: docker-build-controller-manager
docker-build-controller-manager: ## Build docker image with the manager.
Expand All @@ -156,7 +157,8 @@ docker-build-metadata-service: ## Build docker image with the metadata-service.
$(call build_and_tag,metadata-service,Dockerfile.metadata)

.PHONY: docker-push-all
docker-push-all: docker-push-controller-manager docker-push-gateway-plugins docker-push-runtime docker-push-metadata-service ## Push all docker images
docker-push-all:
make -j $(nproc) docker-push-controller-manager docker-push-gateway-plugins docker-push-runtime docker-push-metadata-service ## Push all docker images

.PHONY: docker-push-controller-manager
docker-push-controller-manager: ## Push docker image with the manager.
Expand Down
2 changes: 1 addition & 1 deletion development/app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ WORKDIR /app
COPY requirements.txt /app/

# Install dependencies
RUN apt update && apt install -y curl jq git git-lfs
RUN apt update && apt install -y curl jq git git-lfs && apt-get clean

RUN pip install --no-cache-dir -r requirements.txt

Expand Down
4 changes: 0 additions & 4 deletions development/app/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
flask
Flask-HTTPAuth
kubernetes
numpy
pandas
scikit-learn
wandb
kaleido
ddsketch
plotly_express
matplotlib
seaborn
fasteners
transformers
git+https://github.com/zhangjyr/vidur.git
2 changes: 2 additions & 0 deletions hack/kind_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker
- role: worker
- role: worker
5 changes: 1 addition & 4 deletions test/run-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,7 @@ fi
# build images
if [ -n "$INSTALL_AIBRIX" ]; then
make docker-build-all
kind load docker-image aibrix/controller-manager:nightly
kind load docker-image aibrix/gateway-plugins:nightly
kind load docker-image aibrix/metadata-service:nightly
kind load docker-image aibrix/runtime:nightly
kind load docker-image aibrix/controller-manager:nightly aibrix/gateway-plugins:nightly aibrix/metadata-service:nightly aibrix/runtime:nightly

kubectl create -k config/dependency
kubectl create -k config/default
Expand Down

0 comments on commit 31d8d2a

Please sign in to comment.