diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 95432c8b..63f2b7b9 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -13,10 +13,12 @@ jobs: with: fetch-depth: 0 - - name: Create k3s Cluster - uses: debianmaster/actions-k3s@v1.0.5 + - name: Setup microk8s + uses: fenio/setup-microk8s@v5.0.1 with: - version: 'latest' + version: 'latest/stable' + addons: 'dns,ingress' + wait-for-ready: true - name: Create namespace run: kubectl create ns tesk @@ -44,7 +46,7 @@ jobs: run: helm list -n tesk && kubectl get all -n tesk - name: curl URL - run: curl localhost -vL + run: curl localhost/ga4gh/tes/v1/service-info - name: Configure Git run: | @@ -57,4 +59,4 @@ jobs: skip_existing: true env: CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - \ No newline at end of file + diff --git a/source/tesk-core/containers/filer.Dockerfile b/source/tesk-core/containers/filer.Dockerfile index c9685121..be239904 100644 --- a/source/tesk-core/containers/filer.Dockerfile +++ b/source/tesk-core/containers/filer.Dockerfile @@ -1,10 +1,10 @@ # Builder: produce wheels -FROM alpine:3.10 as builder +FROM alpine:3.19 as builder -RUN apk add --no-cache python3 +RUN apk add --no-cache python3 py3-pip RUN apk add --no-cache git -RUN python3 -m pip install --upgrade setuptools pip wheel +RUN python3 -m pip install --upgrade setuptools pip wheel --break-system-packages WORKDIR /app/ COPY . . @@ -13,12 +13,12 @@ RUN python3 setup.py bdist_wheel # Install: copy tesk-core*.whl and install it with dependencies -FROM alpine:3.10 +FROM alpine:3.19 -RUN apk add --no-cache python3 +RUN apk add --no-cache python3 py3-pip COPY --from=builder /app/dist/tesk*.whl /root/ -RUN python3 -m pip install --disable-pip-version-check --no-cache-dir /root/tesk*.whl +RUN python3 -m pip install --disable-pip-version-check --no-cache-dir /root/tesk*.whl --break-system-packages USER 100 diff --git a/source/tesk-core/containers/taskmaster.Dockerfile b/source/tesk-core/containers/taskmaster.Dockerfile index 5e5418d3..a3145aa5 100644 --- a/source/tesk-core/containers/taskmaster.Dockerfile +++ b/source/tesk-core/containers/taskmaster.Dockerfile @@ -1,10 +1,10 @@ # Builder: produce wheels -FROM alpine:3.10 as builder +FROM alpine:3.19 as builder -RUN apk add --no-cache python3 +RUN apk add --no-cache python3 py3-pip RUN apk add --no-cache git -RUN python3 -m pip install --upgrade setuptools pip wheel +RUN python3 -m pip install --upgrade setuptools pip wheel --break-system-packages WORKDIR /app/ COPY . . @@ -13,12 +13,12 @@ RUN python3 setup.py bdist_wheel # Install: copy tesk-core*.whl and install it with dependencies -FROM alpine:3.10 +FROM alpine:3.19 -RUN apk add --no-cache python3 +RUN apk add --no-cache python3 py3-pip COPY --from=builder /app/dist/tesk*.whl /root/ -RUN python3 -m pip install --disable-pip-version-check --no-cache-dir /root/tesk*.whl +RUN python3 -m pip install --disable-pip-version-check --no-cache-dir /root/tesk*.whl --break-system-packages RUN adduser --uid 100 -S taskmaster USER 100 diff --git a/source/tesk-core/setup.py b/source/tesk-core/setup.py index 1215bed8..9b3d9a0d 100644 --- a/source/tesk-core/setup.py +++ b/source/tesk-core/setup.py @@ -10,14 +10,20 @@ INSTALL_DEPS = ['kubernetes==9.0.0', 'requests>=2.20.0', - 'urllib3==1.26.19', - 'boto3==1.16.18', + + # urllib3 constraint + 'urllib3>=1.26,<2.0 ; python_version < "3.10"', + 'urllib3>=2.0,<3.0 ; python_version >= "3.10"', + + # boto3 constraint + 'boto3<=1.28 ; python_version == "3.8"', + 'boto3>=1.28,<2.0 ; python_version >= "3.9"', ] TEST_DEPS = [ 'pytest', 'pyfakefs', 'pytest-mock' , 'fs', - 'moto', + 'moto<5', 'pytest-localftpserver' ] diff --git a/source/tesk-core/src/tesk_core/filer_class.py b/source/tesk-core/src/tesk_core/filer_class.py index 980adbbf..6af7679e 100644 --- a/source/tesk-core/src/tesk_core/filer_class.py +++ b/source/tesk-core/src/tesk_core/filer_class.py @@ -81,6 +81,8 @@ def add_s3_mount(self): env = self.getEnv() env.append({"name": "AWS_CONFIG_FILE", "value": "/aws/config"}) + env.append({"name": "AWS_REQUEST_CHECKSUM_CALCULATION", "value": "WHEN_REQUIRED"}) + env.append({"name": "AWS_RESPONSE_CHECKSUM_VALIDATION", "value": "WHEN_REQUIRED"}) env.append( { "name": "AWS_SHARED_CREDENTIALS_FILE",