Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
43 changes: 39 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,15 @@ jobs:
packages: write
strategy:
matrix:
lancedb: ["0.3.1", "0.3.4", "0.5", "0.16.0", "0.24.3", "0.29.2", "0.33.0", "0.36.0"]
include:
- { lancedb: "0.3.1", dockerfile: ./docker/Dockerfile.legacy }
- { lancedb: "0.3.4", dockerfile: ./docker/Dockerfile.legacy }
- { lancedb: "0.5", dockerfile: ./docker/Dockerfile.legacy }
- { lancedb: "0.16.0", dockerfile: ./docker/Dockerfile }
- { lancedb: "0.24.3", dockerfile: ./docker/Dockerfile }
- { lancedb: "0.29.2", dockerfile: ./docker/Dockerfile }
- { lancedb: "0.33.0", dockerfile: ./docker/Dockerfile }
- { lancedb: "0.36.0", dockerfile: ./docker/Dockerfile }

steps:
- name: Checkout repository
Expand Down Expand Up @@ -64,7 +72,7 @@ jobs:
uses: docker/build-push-action@v7
with:
context: .
file: ./docker/Dockerfile
file: ${{ matrix.dockerfile }}
load: true
platforms: linux/amd64
tags: smoke:${{ matrix.lancedb }}
Expand Down Expand Up @@ -126,7 +134,7 @@ jobs:
uses: docker/build-push-action@v7
with:
context: .
file: ./docker/Dockerfile
file: ${{ matrix.dockerfile }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand All @@ -141,17 +149,27 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
lancedb: ["0.3.1", "0.3.4", "0.5", "0.16.0", "0.24.3", "0.29.2", "0.33.0", "0.36.0"]
include:
- { lancedb: "0.3.1", legacy: true }
- { lancedb: "0.3.4", legacy: true }
- { lancedb: "0.5", legacy: true }
- { lancedb: "0.16.0", legacy: false }
- { lancedb: "0.24.3", legacy: false }
- { lancedb: "0.29.2", legacy: false }
- { lancedb: "0.33.0", legacy: false }
- { lancedb: "0.36.0", legacy: false }
steps:
- name: Checkout repository
uses: actions/checkout@v5

- name: Set up Python
if: matrix.legacy == false
uses: actions/setup-python@v6
with:
python-version: '3.11'

- name: Install dependencies
if: matrix.legacy == false
run: |
python -m pip install --upgrade pip
pip install -c backend/constraints-${{ matrix.lancedb }}.txt \
Expand All @@ -160,6 +178,23 @@ jobs:
pip install pytest httpx2

- name: Run API endpoint tests
if: matrix.legacy == false
run: |
cd backend
python -m pytest tests/ -v

- name: Build legacy test environment
if: matrix.legacy == true
run: |
docker build \
-f docker/Dockerfile.legacy-test \
--build-arg LANCEDB_VERSION=${{ matrix.lancedb }} \
-t legacy-tests:${{ matrix.lancedb }} \
.

- name: Run API endpoint tests in legacy environment
if: matrix.legacy == true
run: |
docker run --rm \
-v "${GITHUB_WORKSPACE}:/src:ro" \
legacy-tests:${{ matrix.lancedb }}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- `docker build` no longer fails with "the destination must be a directory and end with a /". `COPY backend/*.py .` needs a trailing slash when it copies more than one file. The classic builder rejected it, the BuildKit builder did not (#62).
- CI publishes no image until the test job passes. The build job now depends on the test job, so a failing test stops the release (#66).
- CI and release builds preserve the legacy LanceDB 0.3.1, 0.3.4, and 0.5 variants by reusing their last published dependency layers. Their packages are no longer available from PyPI (#92).

## [0.3.1] - 2026-06-11

Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ docker build -f docker/Dockerfile \
# Build multiple versions for testing
docker build -f docker/Dockerfile --build-arg LANCEDB_VERSION=0.24.3 -t lance-data-viewer:lancedb-0.24.3 .
docker build -f docker/Dockerfile --build-arg LANCEDB_VERSION=0.16.0 -t lance-data-viewer:lancedb-0.16.0 .
docker build -f docker/Dockerfile --build-arg LANCEDB_VERSION=0.3.4 -t lance-data-viewer:lancedb-0.3.4 .

# Legacy packages are no longer on PyPI, so reuse their published dependency layer
docker build -f docker/Dockerfile.legacy --build-arg LANCEDB_VERSION=0.3.4 -t lance-data-viewer:lancedb-0.3.4 .

# Make your Lance data readable (one-time setup)
chmod -R o+rx data
Expand Down Expand Up @@ -177,7 +179,9 @@ cd backend && python -m pytest tests/ -v
```

Swap the constraints file to test against a different Lance version. CI runs
the suite against every supported version.
the suite against every supported version. LanceDB 0.3.1, 0.3.4, and 0.5 can
only be tested through their published images because their packages are no
longer available from PyPI.

### Development workflow

Expand Down Expand Up @@ -237,4 +241,4 @@ The viewer provides advanced visualization for vector embeddings:
### Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for the design constraints and how to
propose changes. Release history lives in [CHANGELOG.md](CHANGELOG.md).
propose changes. Release history lives in [CHANGELOG.md](CHANGELOG.md).
51 changes: 51 additions & 0 deletions docker/Dockerfile.legacy
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
ARG LEGACY_IMAGE=ghcr.io/lance-format/lance-data-viewer
ARG LANCEDB_VERSION=0.3.4

# LanceDB 0.3.1, 0.3.4, and 0.5 are no longer available from PyPI. Preserve
# their installed dependency trees from the last published multi-arch images,
# then build a clean runtime image with the current application source.
FROM ${LEGACY_IMAGE}:lancedb-${LANCEDB_VERSION} AS legacy-dependencies

FROM python:3.11-slim-bookworm

RUN groupadd -r appuser && useradd -r -g appuser -u 1001 appuser

RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
&& rm -rf /var/lib/apt/lists/*

COPY --from=legacy-dependencies /home/appuser/.local /home/appuser/.local

WORKDIR /app

COPY backend/*.py ./
COPY VERSION .
COPY docker/entrypoint.sh /app/entrypoint.sh
COPY web/vanilla/ /web/

RUN chmod +x /app/entrypoint.sh
RUN chown -R appuser:appuser /app /web
RUN chmod -R 755 /web

USER appuser

ENV PATH=/home/appuser/.local/bin:$PATH
ENV DATA_PATH=/data
ENV PORT=8080

EXPOSE 8080

HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -fsS http://localhost:${PORT}/healthz || exit 1

ARG LANCEDB_VERSION=0.3.4
ARG APP_VERSION=0.0.0-dev

LABEL org.opencontainers.image.title="Lance Data Viewer"
LABEL org.opencontainers.image.description="Read-only web viewer for Lance datasets"
LABEL org.opencontainers.image.source="https://github.com/lance-format/lance-data-viewer"
LABEL org.opencontainers.image.version="${APP_VERSION}"
LABEL org.opencontainers.image.licenses="MIT"
LABEL com.github.lancedb.version="${LANCEDB_VERSION}"

ENTRYPOINT ["/app/entrypoint.sh"]
14 changes: 14 additions & 0 deletions docker/Dockerfile.legacy-test
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
ARG LEGACY_IMAGE=ghcr.io/lance-format/lance-data-viewer
ARG LANCEDB_VERSION=0.3.4

# Reuse only the unavailable legacy dependency set. The repository is mounted
# at /src when this image runs, so pytest always exercises the checked-out code.
FROM ${LEGACY_IMAGE}:lancedb-${LANCEDB_VERSION}

USER root
RUN python -m pip install --no-cache-dir pytest httpx2

ENV PYTHONPATH=/home/appuser/.local/lib/python3.11/site-packages
WORKDIR /src/backend
ENTRYPOINT ["python", "-m", "pytest", "-o", "cache_dir=/tmp/pytest_cache", "tests/"]
CMD ["-v"]