Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docker ci test
Signed-off-by: aaronzuo <anarionzuo@outlook.com>
  • Loading branch information
Anarion-zuo authored and ntkathole committed Mar 6, 2026
commit e3cd924ebcf1e176367a4588aff5f8dc7817b5cb
64 changes: 64 additions & 0 deletions .github/workflows/docker_smoke_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: docker-smoke-tests

on:
pull_request:
paths:
- "sdk/python/feast/infra/feature_servers/multicloud/**"
- "sdk/python/feast/feature_server.py"
- "infra/scripts/feature_server_docker_smoke.py"
- "Makefile"
- ".github/workflows/publish_images.yml"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also .github/workflows/docker_smoke_tests.yml

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
feature-server-docker-smoke:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arch: [amd64, arm64]
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
install: true
- name: Build feature-server image
env:
ARCH: ${{ matrix.arch }}
run: |
make build-feature-server-docker REGISTRY=feastdev VERSION=smoke-${ARCH} DOCKER_PLATFORMS=linux/${ARCH}
- name: Run container
env:
ARCH: ${{ matrix.arch }}
run: |
docker run -d --rm \
--name feature-server-smoke-${ARCH} \
--platform linux/${ARCH} \
-p 6566:6566 \
-v "${GITHUB_WORKSPACE}/infra/scripts/feature_server_docker_smoke.py:/smoke.py:ro" \
feastdev/feature-server:smoke-${ARCH} \
python /smoke.py
- name: Wait for /health
run: |
for i in $(seq 1 60); do
if curl -fsS http://localhost:6566/health >/dev/null; then
exit 0
fi
sleep 2
done
echo "feature-server /health did not become ready"
docker logs feature-server-smoke-${{ matrix.arch }} || true
exit 1
- name: Cleanup
if: always()
env:
ARCH: ${{ matrix.arch }}
run: |
docker stop feature-server-smoke-${ARCH} || true
38 changes: 38 additions & 0 deletions infra/scripts/feature_server_docker_smoke.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
from types import SimpleNamespace

import uvicorn

from feast.feature_server import get_app


class _FakeRegistry:
def proto(self):
return object()


class _FakeStore:
def __init__(self):
self.config = SimpleNamespace()
self.registry = _FakeRegistry()
self._provider = SimpleNamespace(
async_supported=SimpleNamespace(
online=SimpleNamespace(read=False, write=False)
)
)

def _get_provider(self):
return self._provider

async def initialize(self):
return None

def refresh_registry(self):
return None

async def close(self):
return None


if __name__ == "__main__":
app = get_app(_FakeStore())
uvicorn.run(app, host="0.0.0.0", port=6566, log_level="error")