Files
H. Joe LeeandClaude Opus 5 4ee8adc29c Fix REST VOL CI: HSDS now requires Python >= 3.11 (#6662)
The hdf5_vol_rest_fetchcontent job fails at "Install HSDS dependencies"
because HSDS pins numpy==2.4.6, which publishes no distributions for
Python 3.10:

  ERROR: Could not find a version that satisfies the requirement
         numpy==2.4.6 (from versions: ... 2.2.5, 2.2.6)

numpy 2.4.6 declares requires_python >= 3.11, and HSDS's pyproject.toml
now says requires-python = ">=3.11". Move the matrix to Python 3.12,
which is what HSDS uses for its own unix-socket test job - the same
configuration this job exercises.

Also drop the "Fix requests version" step that force-downgraded to
requests==2.31.0. HSDS now pins requests-unixsocket==0.4.1, which fixed
the requests 2.32 breakage that step worked around, so the downgrade only
fights HSDS's own pins. Upstream HSDS has already commented the same step
out of its socket-test job.

Fixes #6657


Claude-Session: https://claude.ai/code/session_011qUw9C11arB1WftiT56EA4

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 15:44:38 -05:00

194 lines
7.5 KiB
YAML

name: Test HDF5 REST VOL
on:
workflow_call:
inputs:
build_mode:
description: "Build type"
required: true
type: string
permissions:
contents: read
env:
CTEST_OUTPUT_ON_FAILURE: 1
ADMIN_PASSWORD: admin
ADMIN_USERNAME: admin
USER_NAME: test_user1
USER_PASSWORD: test
USER2_NAME: test_user2
USER2_PASSWORD: test
HSDS_USERNAME: test_user1
HSDS_PASSWORD: test
HSDS_PATH: /home/test_user1/
HDF5_API_TEST_PATH_PREFIX: /home/test_user1/
HSDS_ENDPOINT: http+unix://%2Ftmp%2Fhs%2Fsn_1.sock
HDF5_VOL_CONNECTOR: REST
ROOT_DIR: ${{github.workspace}}/hsdsdata
BUCKET_NAME: hsdstest
jobs:
build_and_test:
name: Test HDF5 REST VOL connector
runs-on: ubuntu-latest
strategy:
matrix:
# HSDS requires Python >= 3.11 (its pinned numpy has no 3.10 wheels).
# 3.12 matches the Python version HSDS uses for its own unix-socket
# test job, which is the configuration exercised here.
python-version: ["3.12"]
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install libcurl4-openssl-dev libyajl-dev
- name: Checkout HDF5
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
path: hdf5
- name: Configure HDF5 with REST VOL connector
shell: bash
run: |
mkdir ${{ github.workspace }}/hdf5/build
cd ${{ github.workspace }}/hdf5/build
cmake -DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \
-DCMAKE_INSTALL_PREFIX=${{ runner.workspace }}/hdf5_build \
-DBUILD_STATIC_LIBS=OFF \
-DHDF5_BUILD_HL_LIB:BOOL=ON \
-DHDF5_TEST_API:BOOL=ON \
-DHDF5_ALLOW_UNSUPPORTED:BOOL=ON \
-DHDF5_ENABLE_ZLIB_SUPPORT:BOOL=OFF \
-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF \
-DHDF5_VOL_ALLOW_EXTERNAL:STRING="GIT" \
-DHDF5_VOL_URL01:STRING="https://github.com/HDFGroup/vol-rest.git" \
-DHDF5_VOL_VOL-REST_BRANCH:STRING="master" \
-DHDF5_VOL_VOL-REST_NAME:STRING="REST" \
-DHDF5_VOL_VOL-REST_TEST_PARALLEL:BOOL=OFF \
-DHDF5_VOL_REST_ENABLE_EXAMPLES=ON \
${{ github.workspace }}/hdf5
cat src/libhdf5.settings
- name: Build and install HDF5 and REST VOL connector
shell: bash
working-directory: ${{ github.workspace }}/hdf5/build
run: |
cmake --build . --parallel 3 --config ${{ inputs.build_mode }}
cmake --install .
echo "LD_LIBRARY_PATH=${{ github.workspace }}/hdf5/build/bin" >> $GITHUB_ENV
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Checkout HSDS
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: HDFGroup/hsds
path: ${{github.workspace}}/hsds
- name: Get HSDS HEAD commit SHA
shell: bash
working-directory: ${{github.workspace}}/hsds
run: |
export HSDS_COMMIT=`git rev-parse HEAD`
export HSDS_COMMIT_SHORT=`git rev-parse --short HEAD`
echo "HSDS_COMMIT=${HSDS_COMMIT}" >> $GITHUB_ENV
echo "HSDS_COMMIT_SHORT=${HSDS_COMMIT_SHORT}" >> $GITHUB_ENV
# Note that we don't currently cache HSDS, as we would need
# to pick a fixed commit/tag in order to generate a reasonable
# key to use for caching/restoring from the cache
#- name: Restore HSDS (${{ env.HSDS_COMMIT_SHORT }}) installation cache
# id: restore-hsds
# uses: actions/cache@v3
# with:
# path: ${{ runner.workspace }}/hsds-${{ env.HSDS_COMMIT_SHORT }}-install
# key: ${{ runner.os }}-${{ runner.arch }}-hsds-${{ env.HSDS_COMMIT }}-${{ inputs.build_mode }}-cache
- name: Install HSDS (${{ env.HSDS_COMMIT_SHORT }}) dependencies
shell: bash
working-directory: ${{github.workspace}}/hsds
run: |
python -m pip install --upgrade pip
python -m pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Install HSDS (${{ env.HSDS_COMMIT_SHORT }}) package
#if: ${{ ! steps.restore-hsds.outputs.cache-hit }}
shell: bash
run: |
cd ${{github.workspace}}/hsds
pip install -e .
#- name: Cache HSDS (${{ env.HSDS_COMMIT_SHORT }}) installation
# uses: actions/cache/save@v3
# if: ${{ ! steps.restore-hsds.outputs.cache-hit }}
# with:
# path: ${{ runner.workspace }}/hsds-${{ env.HSDS_COMMIT_SHORT }}-install
# key: ${{ runner.os }}-${{ runner.arch }}-hsds-${{ env.HSDS_COMMIT }}-${{ inputs.build_mode }}-cache
- name: Run HSDS unit tests
shell: bash
working-directory: ${{github.workspace}}/hsds
run: |
pytest
- name: Start HSDS
working-directory: ${{github.workspace}}/hsds
run: |
mkdir ${{github.workspace}}/hsdsdata &&
mkdir ${{github.workspace}}/hsdsdata/hsdstest &&
cp admin/config/groups.default admin/config/groups.txt &&
cp admin/config/passwd.default admin/config/passwd.txt &&
cp admin/config/groups.default admin/config/groups.txt &&
cp admin/config/passwd.default admin/config/passwd.txt
ROOT_DIR=${{github.workspace}}/hsdsdata ./runall.sh --no-docker 1 &
sleep 10
- name: Test HSDS
working-directory: ${{github.workspace}}/hsds
run: |
python tests/integ/setup_test.py
- name: Test HDF5 REST VOL connector with external tests
working-directory: ${{github.workspace}}/hdf5/build/
run: |
sudo \
HDF5_PLUGIN_PATH="${{ runner.workspace }}/hdf5_build/lib" \
HDF5_VOL_CONNECTOR=REST \
ADMIN_USERNAME=admin ADMIN_PASSWORD=admin \
USER_NAME=test_user1 USER_PASSWORD=test \
USER2_NAME=test_user2 USER2_PASSWORD=test \
HSDS_USERNAME=test_user1 HSDS_PASSWORD=test \
HSDS_PATH=/home/test_user1/ HDF5_API_TEST_PATH_PREFIX=/home/test_user1/ \
HSDS_ENDPOINT=http+unix://%2Ftmp%2Fhs%2Fsn_1.sock \
ROOT_DIR=${{github.workspace}}/hsdsdata \
BUCKET_NAME=hsdstest \
ctest --build-config ${{ inputs.build_mode }} -R "test_rest_vol" .
- name: Test HDF5 REST VOL connector with HDF5 API tests
working-directory: ${{github.workspace}}/hdf5/build/
# Don't test the REST VOL connector with the HDF5 API tests yet,
# as it doesn't currently pass all the tests. Leave the step in,
# but skip it to leave an indication that this should be re-enabled
# in the future.
if: false
run: |
sudo \
HDF5_PLUGIN_PATH="${{ runner.workspace }}/hdf5_build/lib" \
HDF5_VOL_CONNECTOR=REST \
ADMIN_USERNAME=admin ADMIN_PASSWORD=admin \
USER_NAME=test_user1 USER_PASSWORD=test \
USER2_NAME=test_user2 USER2_PASSWORD=test \
HSDS_USERNAME=test_user1 HSDS_PASSWORD=test \
HSDS_PATH=/home/test_user1/ HDF5_API_TEST_PATH_PREFIX=/home/test_user1/ \
HSDS_ENDPOINT=http+unix://%2Ftmp%2Fhs%2Fsn_1.sock \
ROOT_DIR=${{github.workspace}}/hsdsdata \
BUCKET_NAME=hsdstest \
ctest --build-config ${{ inputs.build_mode }} -R "h5_api" -E "H5COPY|H5DIFF|H5LS|H5DUMP|H5REPACK" .