Skip to content

Fix potential NPE for KnnVectorQuery (#15334) #1564

Fix potential NPE for KnnVectorQuery (#15334)

Fix potential NPE for KnnVectorQuery (#15334) #1564

name: "Run special checks: module lucene/sandbox"
on:
workflow_dispatch:
pull_request:
branches:
- '*'
push:
branches:
- 'main'
- 'branch_10x'
permissions: {}
jobs:
faiss-tests:
name: tests for the Faiss codec (v${{ matrix.faiss-version }} with JDK ${{ matrix.java }} on ${{ matrix.os }})
timeout-minutes: 15
strategy:
matrix:
os: [ ubuntu-latest ]
java: [ '25' ]
faiss-version: [ '1.11.0' ]
runs-on: ${{ matrix.os }}
steps:
- name: Install Mamba
uses: conda-incubator/setup-miniconda@835234971496cad1653abb28a638a281cf32541f #v3.2.0
with:
miniforge-version: 'latest'
auto-activate-base: 'false'
activate-environment: 'faiss-env'
# TODO: Use only conda-forge if possible, see https://github.com/conda-forge/faiss-split-feedstock/pull/88
channels: 'pytorch,conda-forge'
conda-remove-defaults: 'true'
- name: Install Faiss
run: mamba install faiss-cpu="${FAISS_VERSION}"
env:
FAISS_VERSION: ${{ matrix.faiss-version }}
- name: Checkout Lucene
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Prepare Lucene workspace
uses: ./.github/actions/prepare-for-build
- name: Run tests for Faiss codec
run: >
LD_LIBRARY_PATH=$CONDA_PREFIX/lib
./gradlew -p lucene/sandbox
-Dtests.faiss.run=true
test
--tests "org.apache.lucene.sandbox.codecs.faiss.*"
defaults:
run:
shell: bash -leo pipefail {0}