Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
8f34d4c
update test.yml
Xiangs18 Jun 16, 2025
b6ace74
print debug messages
Xiangs18 Jun 24, 2025
703781a
sleep 3s
Xiangs18 Jun 24, 2025
c3d0ea7
test on the latest sample_service code
Xiangs18 Jun 24, 2025
722d2bb
add more debug messages
Xiangs18 Jun 24, 2025
8f275a9
add getlogFile and display logfile
Xiangs18 Jun 30, 2025
a68338c
update python deps
Xiangs18 Jun 30, 2025
f9414f9
pin setuptools version
Xiangs18 Jun 30, 2025
62a4120
ensure correct version of setuptools is used
Xiangs18 Jun 30, 2025
579a20b
update gunicorn
Xiangs18 Jun 30, 2025
54809d9
update Pipfile and lock
Xiangs18 Jul 1, 2025
badce21
add pytz
Xiangs18 Jul 1, 2025
98d3a7a
update apscheduler
Xiangs18 Jul 1, 2025
b26b1b3
delete debug code && clean up
Xiangs18 Jul 1, 2025
839c289
pin ubuntu-version
Xiangs18 Jul 7, 2025
b5db473
sync with sample service & handle service commit in prod
Xiangs18 Jul 8, 2025
5efd897
delete redundant setup work in the HS
Xiangs18 Jul 9, 2025
5f8f972
display logfile
Xiangs18 Jul 9, 2025
385435d
fix name 'AF_INET' is not defined error
Xiangs18 Jul 9, 2025
04ec633
fix pint missing package error
Xiangs18 Jul 9, 2025
53fbd96
fix 'Only timezones from the pytz library are supported' issue
Xiangs18 Jul 9, 2025
9413357
sync up missing dep from sample service 0.2.1
Xiangs18 Jul 9, 2025
6c4a3e0
remove logfile display
Xiangs18 Jul 9, 2025
f7cf1b3
remove confiparser from the HS
Xiangs18 Jul 9, 2025
5c699dd
document dependency deviations in Pipfile for future reference
Xiangs18 Jul 10, 2025
b2c1dc0
add the justifications for the deviations directly
Xiangs18 Jul 10, 2025
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
34 changes: 15 additions & 19 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,139 +19,135 @@
jobs:

workspace_container_tests:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install dependencies and set up test config
shell: bash
run: |
# set up python dependencies
pip install pytest requests

- name: Run tests
shell: bash
run: |
sh test/run_tests.sh

workspace_deluxe_tests:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium test

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
- java: '8' # needs to be compatible so jars can be used w/ java 8
mongo: 'mongodb-linux-x86_64-ubuntu2204-7.0.4'
minio: '2019-05-23T00-29-34Z'
wired_tiger: 'true'
gradle_test: 'testQuick'
# the current production setup
- java: '11'
mongo: 'mongodb-linux-x86_64-3.6.13'
minio: '2019-05-23T00-29-34Z'
wired_tiger: 'false'
gradle_test: 'testQuick'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{matrix.java}}

- name: Set up Python 3.7 # sample service is on 3.7, handle service is on sdkbase2.latest
uses: actions/setup-python@v3
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.7"
python-version: "3.9.19"

- name: Install dependencies and set up test config
shell: bash
run: |
export HOMEDIR=`pwd`

# set up python dependencies
cd python_dependencies
pip install pipenv
pipenv sync --system
cd ..

# move to parent dir of homedir to install binaries etc
cd ..

# set up arango
export ARANGODB_VER=3.9.1
export ARANGODB_V=39
curl -O https://download.arangodb.com/arangodb$ARANGODB_V/Community/Linux/arangodb3-linux-$ARANGODB_VER.tar.gz
tar -xf arangodb3-linux-$ARANGODB_VER.tar.gz
export ARANGO_EXE=$(pwd)/arangodb3-linux-$ARANGODB_VER/bin/arangod
export ARANGO_JS=$(pwd)/arangodb3-linux-$ARANGODB_VER/usr/share/arangodb3/js/

# set up handle service
export HS_COMMIT=08e18379817e16db920501b66ba62b66598f506c
export LOG_COMMIT=b549c557e3c519e0a55eadf7863a93db25cd6806
# set up handle service
# HS_COMMIT corresponds to Handle Service2 tag v1.0.7
export HS_COMMIT=335020d26f3663da456be5afee3cb4b8ed8622f4
git clone https://github.com/kbase/handle_service2.git
cd handle_service2/
git checkout $HS_COMMIT
sudo chmod -R 777 .
cd lib/
mkdir biokbase
cd biokbase/
wget https://raw.githubusercontent.com/kbase/sdkbase2/$LOG_COMMIT/log.py
cd ..
export HSDIR=`pwd`
cd ../..

# set up sample service
export SAMPLE_COMMIT=6813fb148e95db2b11db6eea04f4d1d45cbb7119
# SAMPLE_COMMIT corresponds to Sample Service tag v0.2.1
export SAMPLE_COMMIT=aa0303c4d5d4aa1e3cf0c9ecb36366fb1127f93e
git clone https://github.com/kbase/sample_service.git
cd sample_service
git checkout $SAMPLE_COMMIT
cd lib
export SAMPLE_DIR=`pwd`
cd ../..

# set up blobstore
wget -q -O blobstore https://github.com/kbase/blobstore/releases/download/v0.1.2/blobstore_linux_amd64
chmod a+x blobstore
export BLOBEXE=$(pwd)/blobstore

# set up mongo
wget -q http://fastdl.mongodb.org/linux/${{matrix.mongo}}.tgz
tar xfz ${{matrix.mongo}}.tgz
export MONGOD=`pwd`/${{matrix.mongo}}/bin/mongod

# set up minio
export MINIO=$HOMEDIR/test_dependencies/minio/${{matrix.minio}}/minio
gunzip $MINIO.gz
chmod a+x $MINIO

# set up test config
cd $HOMEDIR
cp -n test.cfg.example test.cfg
sed -i "s#^test.temp.dir =.*#test.temp.dir=temp_test_dir#" test.cfg
sed -i "s#^test.mongo.exe.*#test.mongo.exe=$MONGOD#" test.cfg
sed -i "s#^test.minio.exe.*#test.minio.exe=$MINIO#" test.cfg
sed -i "s#^test.mongo.useWiredTiger.*#test.mongo.useWiredTiger=${{matrix.wired_tiger}}#" test.cfg
sed -i "s#^test.blobstore.exe.*#test.blobstore.exe=$BLOBEXE#" test.cfg
sed -i "s#^test.handleservice.dir.*#test.handleservice.dir=$HSDIR#" test.cfg
sed -i "s#^test.sampleservice.dir.*#test.sampleservice.dir=$SAMPLE_DIR#" test.cfg
sed -i "s#^test.arango.exe.*#test.arango.exe=$ARANGO_EXE#" test.cfg
sed -i "s#^test.arango.js.*#test.arango.js=$ARANGO_JS#" test.cfg
cat test.cfg

- name: Run tests
shell: bash
run: |
./gradlew ${{matrix.gradle_test}}

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium test

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
28 changes: 18 additions & 10 deletions python_dependencies/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,35 @@ jsonrpcbase = "==0.2.0"
requests = "==2.22.0"

# handle service dependencies
cachetools = "*"
configparser = "*"
pymongo = "==3.11.0"
uwsgi = "==2.0.18"
cachetools = "==4.2.2"
pymongo = "==4.7.2"
uwsgi = "==2.0.22"

# sample service dependencies
python-arango = "==5.0.0"
apscheduler = "==3.6.3"
# Upgraded to fix timezone TypeError; supports zoneinfo in Python 3.9+
apscheduler = "==3.9.1"
maps = "==5.1.1"
cacheout = "==0.11.2"
# Downgraded from 5.4 to resolve Pipfile.lock generation issues
pyyaml = "==5.3"
jsonschema = "==3.2.0"
pint = "==0.10.1"
# Fixed import error with pkg_resources.extern on Python 3.9
pint = "==0.17"
python-ranges = "==0.1.3"
pygtrie = "==2.3.2"
jinja2 = "==2.11.2"
gevent = "==20.5.0"
jinja2 = "==2.11.3"
# Updated to support Python 3.9.19
gevent = "==24.11.1"
gunicorn = "==20.0.4"
kafka-python = "==2.0.1"
greenlet = "==0.4.16"
# Compatible with gevent and Python 3.9
greenlet = "==3.1.1"
typing-extensions = "*"
types-pyyaml = "*"
types-requests = "*"
pipenv = "*"
shell = "*"

[requires]
python_version = "3.7"
python_version = "3.9.19"
Loading
Loading