From 5965baa815936dee036d6ee6580e85cc00cf1e9f Mon Sep 17 00:00:00 2001 From: Stavros Date: Wed, 24 Jul 2024 14:07:35 +0200 Subject: [PATCH] build(docker): upgraded docker image to ubuntu 24.04 (#280) --- .github/workflows/ci.yml | 68 ++++++++++++------------ .readthedocs.yaml | 4 +- AUTHORS.md | 1 + Dockerfile | 18 +++---- reana_workflow_engine_cwl/cwl_reana.py | 2 +- requirements.txt | 71 ++++++++++++++------------ setup.py | 3 +- 7 files changed, 85 insertions(+), 82 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e80da64..1b5a57c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,10 +10,10 @@ on: [push, pull_request] jobs: lint-commitlint: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -36,10 +36,10 @@ jobs: ./run-tests.sh --check-commitlint ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} ${{ github.event.pull_request.head.sha }} ${{ github.event.pull_request.number }} lint-shellcheck: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Runs shell script static analysis run: | @@ -47,15 +47,15 @@ jobs: ./run-tests.sh --check-shellcheck lint-black: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: "3.12" - name: Check Python code formatting run: | @@ -64,15 +64,15 @@ jobs: ./run-tests.sh --check-black lint-flake8: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: "3.12" - name: Check compliance with pep8, pyflakes and circular complexity run: | @@ -81,15 +81,15 @@ jobs: ./run-tests.sh --check-flake8 lint-pydocstyle: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: "3.12" - name: Check compliance with Python docstring conventions run: | @@ -98,15 +98,15 @@ jobs: ./run-tests.sh --check-pydocstyle lint-check-manifest: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: "3.12" - name: Check Python manifest completeness run: | @@ -115,15 +115,15 @@ jobs: ./run-tests.sh --check-manifest docs-sphinx: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: "3.12" - name: Install system dependencies run: | @@ -140,15 +140,15 @@ jobs: run: ./run-tests.sh --check-sphinx python-tests: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: "3.12" - name: Install Python dependencies run: | @@ -160,31 +160,31 @@ jobs: run: ./run-tests.sh --check-pytest - name: Codecov Coverage - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} files: coverage.xml lint-dockerfile: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Check Dockerfile compliance run: ./run-tests.sh --check-dockerfile docker-build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build Docker image run: ./run-tests.sh --check-docker-build release-docker: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 if: > vars.RELEASE_DOCKER == 'true' && github.event_name == 'push' && diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 1240941..32f7a2d 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -7,9 +7,9 @@ version: 2 build: - os: ubuntu-22.04 + os: ubuntu-24.04 tools: - python: "3.8" + python: "3.12" sphinx: configuration: docs/conf.py diff --git a/AUTHORS.md b/AUTHORS.md index a38cfae..b5b252a 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -19,5 +19,6 @@ The list of contributors in alphabetical order: - [Parth Shandilya](https://github.com/ParthS007) - [Rokas Maciulaitis](https://orcid.org/0000-0003-1064-6967) - [Sinclert PĂ©rez](https://www.linkedin.com/in/sinclert) +- [Stavros Moiras](https://orcid.org/0009-0005-4331-096X) - [Tibor Simko](https://orcid.org/0000-0001-7202-5803) - [Vladyslav Moisieienkov](https://orcid.org/0000-0001-9717-0775) diff --git a/Dockerfile b/Dockerfile index 0931bfd..ae45ada 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,17 @@ # This file is part of REANA. -# Copyright (C) 2018, 2019, 2020, 2021, 2022, 2023 CERN. +# Copyright (C) 2018, 2019, 2020, 2021, 2022, 2023, 2024 CERN. # # REANA is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. # Use Ubuntu LTS base image -FROM docker.io/library/ubuntu:20.04 +FROM docker.io/library/ubuntu:24.04 # Use default answers in installation commands ENV DEBIAN_FRONTEND=noninteractive -# Use distutils provided by the standard Python library instead of the vendored one in -# setuptools, so that editable installations are stored in the right directory. -# See https://github.com/pypa/setuptools/issues/3301 -ENV SETUPTOOLS_USE_DISTUTILS=stdlib +# Allow pip to install packages in the system site-packages dir +ENV PIP_BREAK_SYSTEM_PACKAGES=true # Prepare list of Python dependencies COPY requirements.txt /code/ @@ -24,15 +22,15 @@ RUN apt-get update -y && \ apt-get install --no-install-recommends -y \ gcc \ nodejs \ - python3.8 \ - python3-dev \ + python3.12 \ + python3.12-dev \ python3-pip \ vim-tiny && \ - pip install --no-cache-dir --upgrade pip setuptools && \ + pip install --no-cache-dir --upgrade setuptools && \ pip install --no-cache-dir -r /code/requirements.txt && \ apt-get remove -y \ gcc \ - python3-dev && \ + python3.12-dev && \ apt-get autoremove -y && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* diff --git a/reana_workflow_engine_cwl/cwl_reana.py b/reana_workflow_engine_cwl/cwl_reana.py index 97d4c77..4cb121e 100644 --- a/reana_workflow_engine_cwl/cwl_reana.py +++ b/reana_workflow_engine_cwl/cwl_reana.py @@ -488,7 +488,7 @@ def is_done(self, operation): if operation["status"] in terminal_states: log.info( f"[job {self.name}] FINAL JOB STATE: " - f"{ operation['status']} ------------------" + f"{operation['status']} ------------------" ) if operation["status"] == "finished": self.rcode = 0 diff --git a/requirements.txt b/requirements.txt index 6814962..8e3bdc6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,72 +1,75 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # pip-compile --annotation-style=line --output-file=requirements.txt setup.py # amqp==5.2.0 # via kombu appdirs==1.4.4 # via fs -argcomplete==3.2.2 # via cwltool -attrs==23.2.0 # via jsonschema -backports-zoneinfo[tzdata]==0.2.1 # via backports-zoneinfo, kombu +argcomplete==3.4.0 # via cwltool +arrow==1.3.0 # via isoduration +attrs==23.2.0 # via jsonschema, referencing bagit==1.8.1 # via cwltool bracex==2.4 # via wcmatch bravado==10.3.2 # via reana-commons bravado-core==6.1.0 # via bravado, reana-commons -cachecontrol[filecache]==0.13.1 # via cachecontrol, schema-salad -certifi==2024.2.2 # via requests +cachecontrol[filecache]==0.14.0 # via cachecontrol, schema-salad +certifi==2024.7.4 # via requests charset-normalizer==3.3.2 # via requests checksumdir==1.1.9 # via reana-commons click==8.1.7 # via reana-commons coloredlogs==15.0.1 # via cwltool cwltool==3.1.20210628163208 # via reana-commons -filelock==3.13.1 # via cachecontrol +filelock==3.15.4 # via cachecontrol +fqdn==1.5.1 # via jsonschema fs==2.4.16 # via reana-commons humanfriendly==10.0 # via coloredlogs -idna==3.6 # via jsonschema, requests -importlib-resources==6.1.2 # via schema-salad +idna==3.7 # via jsonschema, requests +importlib-resources==6.4.0 # via swagger-spec-validator isodate==0.6.1 # via rdflib -jsonpointer==2.4 # via jsonschema +isoduration==20.11.0 # via jsonschema +jsonpointer==3.0.0 # via jsonschema jsonref==1.1.0 # via bravado-core -jsonschema[format]==3.2.0 # via bravado-core, reana-commons, swagger-spec-validator -kombu==5.3.5 # via reana-commons -lxml==5.1.0 # via prov +jsonschema[format]==4.23.0 # via bravado-core, reana-commons, swagger-spec-validator +jsonschema-specifications==2023.12.1 # via jsonschema +kombu==5.3.7 # via reana-commons +lxml==5.2.2 # via prov markupsafe==2.1.5 # via werkzeug -mistune==2.0.5 # via schema-salad +mistune==3.0.2 # via schema-salad mock==3.0.5 # via reana-commons monotonic==1.6 # via bravado -msgpack==1.0.7 # via bravado-core, cachecontrol +msgpack==1.0.8 # via bravado-core, cachecontrol msgpack-python==0.5.6 # via bravado mypy-extensions==1.0.0 # via cwltool, schema-salad -networkx==3.1 # via prov +networkx==3.3 # via prov prov==1.5.1 # via cwltool -psutil==5.9.8 # via cwltool -pydot==2.0.0 # via cwltool -pyparsing==3.1.1 # via pydot, rdflib -pyrsistent==0.20.0 # via jsonschema -python-dateutil==2.9.0 # via bravado, bravado-core, prov +psutil==6.0.0 # via cwltool +pydot==3.0.1 # via cwltool +pyparsing==3.1.2 # via pydot, rdflib +python-dateutil==2.9.0.post0 # via arrow, bravado, bravado-core, prov pytz==2024.1 # via bravado-core pyyaml==6.0.1 # via bravado, bravado-core, reana-commons, swagger-spec-validator rdflib==5.0.0 # via cwltool, prov, schema-salad -reana-commons[cwl]==0.95.0a2 # via reana-workflow-engine-cwl (setup.py) -requests==2.31.0 # via bravado, bravado-core, cachecontrol, cwltool, schema-salad +reana-commons[cwl]==0.95.0a3 # via reana-workflow-engine-cwl (setup.py) +referencing==0.35.1 # via jsonschema, jsonschema-specifications +requests==2.32.3 # via bravado, bravado-core, cachecontrol, cwltool, schema-salad +rfc3339-validator==0.1.4 # via jsonschema rfc3987==1.3.8 # via jsonschema +rpds-py==0.19.0 # via jsonschema, referencing ruamel-yaml==0.17.10 # via cwltool, schema-salad -ruamel-yaml-clib==0.2.8 # via ruamel-yaml -schema-salad==8.5.20240102191335 # via cwltool +schema-salad==8.7.20240718183047 # via cwltool shellescape==3.8.1 # via cwltool simplejson==3.19.2 # via bravado, bravado-core -six==1.16.0 # via bravado, bravado-core, fs, isodate, jsonschema, mock, prov, python-dateutil, rdflib -strict-rfc3339==0.7 # via jsonschema -swagger-spec-validator==3.0.3 # via bravado-core -typing-extensions==4.10.0 # via bravado, cwltool, kombu, swagger-spec-validator -tzdata==2024.1 # via backports-zoneinfo -urllib3==2.2.1 # via requests +six==1.16.0 # via bravado, bravado-core, fs, isodate, mock, prov, python-dateutil, rdflib, rfc3339-validator +swagger-spec-validator==3.0.4 # via bravado-core +types-python-dateutil==2.9.0.20240316 # via arrow +typing-extensions==4.12.2 # via bravado, cwltool, swagger-spec-validator +uri-template==1.3.0 # via jsonschema +urllib3==2.2.2 # via requests vine==5.1.0 # via amqp, kombu wcmatch==8.4.1 # via reana-commons -webcolors==1.13 # via jsonschema -werkzeug==3.0.1 # via reana-commons -zipp==3.17.0 # via importlib-resources +webcolors==24.6.0 # via jsonschema +werkzeug==3.0.3 # via reana-commons # The following packages are considered to be unsafe in a requirements file: # setuptools diff --git a/setup.py b/setup.py index b37366a..e8b8a25 100644 --- a/setup.py +++ b/setup.py @@ -71,6 +71,7 @@ "run-cwl-workflow=" "reana_workflow_engine_cwl.tasks:run_cwl_workflow", ] }, + python_requires=">=3.8", extras_require=extras_require, install_requires=install_requires, setup_requires=setup_requires, @@ -82,7 +83,7 @@ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content",