Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix socket connections #374

Merged
merged 5 commits into from
Jun 13, 2024
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
6 changes: 3 additions & 3 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3

- name: 'Dependency Review'
uses: actions/dependency-review-action@v1
uses: actions/dependency-review-action@v4
with:
# verify=False is never used in HSDS
allow-ghsas: ["GHSA-9wx4-h78v-vm56"]
allow-ghsas: GHSA-9wx4-h78v-vm56
72 changes: 71 additions & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,74 @@ jobs:
- name: Shut down Docker
if: ${{matrix.build-method == 'docker' && matrix.os != 'windows-latest'}}
run: |
./stopall.sh
./stopall.sh

build-and-test-socket:
env:
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

name: Test HSDS with socket
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.12"]

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install HSDS dependencies
shell: bash
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 package
shell: bash
run: |
pip install -e .

# Requests 2.32.0 breaks requests-unixsocket, used by HSDS for socket connections
# - name: Fix requests version
# run: |
# pip install requests==2.31.0

- name: Run HSDS unit tests
shell: bash
run: |
pytest

- name: Start 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
ROOT_DIR=${{github.workspace}}/hsdsdata ./runall.sh --no-docker 1 &
sleep 10

- name: Test HSDS setup
run: |
python tests/integ/setup_test.py

- name: Test HSDS
run : |
python testall.py
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ dependencies = [
"pyjwt",
"pytz",
"pyyaml",
"requests <= 2.32.2",
"requests <= 2.31.0",
"requests-unixsocket",
"simplejson",
"s3fs",
"urllib3 < 2.0.0"
]

[project.optional-dependencies]
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ psutil
pyjwt
pytz
pyyaml
requests<=2.32.2
requests<=2.31.0
requests-unixsocket
simplejson
s3fs
urllib3<2.0.0
Loading