diff --git a/.github/workflows/hdc-pipeline-consumer.yml b/.github/workflows/hdc-pipeline-consumer.yml new file mode 100644 index 0000000..ebee634 --- /dev/null +++ b/.github/workflows/hdc-pipeline-consumer.yml @@ -0,0 +1,47 @@ +name: HDC ci/cd pipeline consumer + +permissions: + contents: write + issues: write + pull-requests: write + +on: + push: + branches: + - main + paths: + - 'consumer/**' + pull_request: + branches: + - main + paths: + - 'consumer/**' + +jobs: + run_tests_hdc: + uses: PilotDataPlatform/pilot-hdc-ci-tools/.github/workflows/run_tests.yml@main + with: + min_coverage_percent: 0 + coverage_target: 'consumer' + poetry_directory: 'consumer' + pytest_directory: 'consumer' + secrets: inherit + + build_and_publish_hdc: + needs: [run_tests_hdc] + uses: PilotDataPlatform/pilot-hdc-ci-tools/.github/workflows/build_and_publish.yml@main + with: + matrix_config: '["consumer"]' + service_name: 'consumer' + path_to_dockerfile: './consumer/Dockerfile' + path_to_pyproject: './consumer/pyproject.toml' + registry_subpath: 'queue' + secrets: inherit + + deploy_hdc: + needs: [build_and_publish_hdc] + uses: PilotDataPlatform/pilot-hdc-ci-tools/.github/workflows/trigger_deployment.yml@main + with: + hdc_service_name: 'queue-consumer' + pyproject_folder: 'consumer' + secrets: inherit diff --git a/.github/workflows/hdc-pipeline-producer.yml b/.github/workflows/hdc-pipeline-producer.yml new file mode 100644 index 0000000..ef31434 --- /dev/null +++ b/.github/workflows/hdc-pipeline-producer.yml @@ -0,0 +1,47 @@ +name: HDC ci/cd pipeline producer + +permissions: + contents: write + issues: write + pull-requests: write + +on: + push: + branches: + - main + paths: + - 'producer/**' + pull_request: + branches: + - main + paths: + - 'producer/**' + +jobs: + run_tests_hdc: + uses: PilotDataPlatform/pilot-hdc-ci-tools/.github/workflows/run_tests.yml@main + with: + min_coverage_percent: 0 + coverage_target: 'producer' + poetry_directory: 'producer' + pytest_directory: 'producer' + secrets: inherit + + build_and_publish_hdc: + needs: [run_tests_hdc] + uses: PilotDataPlatform/pilot-hdc-ci-tools/.github/workflows/build_and_publish.yml@main + with: + matrix_config: '["producer"]' + service_name: 'producer' + path_to_dockerfile: './producer/Dockerfile' + path_to_pyproject: './producer/pyproject.toml' + registry_subpath: 'queue' + secrets: inherit + + deploy_hdc: + needs: [build_and_publish_hdc] + uses: PilotDataPlatform/pilot-hdc-ci-tools/.github/workflows/trigger_deployment.yml@main + with: + hdc_service_name: 'queue-producer' + pyproject_folder: 'producer' + secrets: inherit diff --git a/.github/workflows/hdc-pipeline-socketio.yml b/.github/workflows/hdc-pipeline-socketio.yml new file mode 100644 index 0000000..2142b01 --- /dev/null +++ b/.github/workflows/hdc-pipeline-socketio.yml @@ -0,0 +1,47 @@ +name: HDC ci/cd pipeline socketio + +permissions: + contents: write + issues: write + pull-requests: write + +on: + push: + branches: + - main + paths: + - 'socketio/**' + pull_request: + branches: + - main + paths: + - 'socketio/**' + +jobs: + run_tests_hdc: + uses: PilotDataPlatform/pilot-hdc-ci-tools/.github/workflows/run_tests.yml@main + with: + min_coverage_percent: 0 + coverage_target: 'socketio' + poetry_directory: 'socketio' + pytest_directory: 'socketio' + secrets: inherit + + build_and_publish_hdc: + needs: [run_tests_hdc] + uses: PilotDataPlatform/pilot-hdc-ci-tools/.github/workflows/build_and_publish.yml@main + with: + matrix_config: '["socketio"]' + service_name: 'socketio' + path_to_dockerfile: './socketio/Dockerfile' + path_to_pyproject: './socketio/pyproject.toml' + registry_subpath: 'queue' + secrets: inherit + + deploy_hdc: + needs: [build_and_publish_hdc] + uses: PilotDataPlatform/pilot-hdc-ci-tools/.github/workflows/trigger_deployment.yml@main + with: + hdc_service_name: 'queue-socketio' + pyproject_folder: 'socketio' + secrets: inherit diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9ffd5fa..96be327 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -67,15 +67,15 @@ repos: '--max-line-length=120', ] -# - repo: https://github.com/PyCQA/docformatter -# rev: v1.7.5 -# hooks: -# - id: docformatter -# args: [ -# '--wrap-summaries=120', -# '--wrap-descriptions=120', -# '--in-place', -# ] + - repo: https://github.com/PyCQA/docformatter + rev: v1.7.7 + hooks: + - id: docformatter + args: [ + '--wrap-summaries=120', + '--wrap-descriptions=120', + '--in-place', + ] - repo: https://github.com/Lucas-C/pre-commit-hooks rev: v1.5.5 diff --git a/consumer/.env.schema b/consumer/.env.schema index 3067381..b91e1ef 100644 --- a/consumer/.env.schema +++ b/consumer/.env.schema @@ -1,10 +1,3 @@ -CONFIG_CENTER_ENABLED=false - -# If config center has been enabled -VAULT_URL= -VAULT_CRT= -VAULT_TOKEN= -CONFIG_CENTER_BASE_URL= data_lake= data_transfer_image = bids_validate_image = @@ -36,3 +29,6 @@ PROJECT_SERVICE= KAFKA_URL= REDIS_HOST= REDIS_PORT= +REDIS_PASSWORD= +S3_ACCESS_KEY= +S3_SECRET_KEY= diff --git a/consumer/Dockerfile b/consumer/Dockerfile index 302a4be..f0a202b 100644 --- a/consumer/Dockerfile +++ b/consumer/Dockerfile @@ -1,4 +1,4 @@ -FROM docker-registry.ebrains.eu/hdc-services-image/base-image:python-3.10.12-v2 AS consumer-image +FROM docker-registry.ebrains.eu/hdc-services-image/base-image:python-3.10.14-v1 AS consumer-image ENV PYTHONDONTWRITEBYTECODE=true \ PYTHONIOENCODING=UTF-8 \ diff --git a/consumer/config.py b/consumer/config.py index a487281..84dd14f 100644 --- a/consumer/config.py +++ b/consumer/config.py @@ -6,40 +6,11 @@ import logging from functools import lru_cache -from typing import Any -from typing import Dict -from typing import Optional -from common import VaultClient from pydantic import BaseSettings from pydantic import Extra -class VaultConfig(BaseSettings): - """Store vault related configuration.""" - - APP_NAME: str = 'service_queue' - CONFIG_CENTER_ENABLED: bool = False - - VAULT_URL: Optional[str] - VAULT_CRT: Optional[str] - VAULT_TOKEN: Optional[str] - - class Config: - env_file = '.env' - env_file_encoding = 'utf-8' - - -def load_vault_settings(settings: BaseSettings) -> Dict[str, Any]: - config = VaultConfig() - - if not config.CONFIG_CENTER_ENABLED: - return {} - - client = VaultClient(config.VAULT_URL, config.VAULT_CRT, config.VAULT_TOKEN) - return client.get_from_vault(config.APP_NAME) - - class Settings(BaseSettings): """Store service configuration settings.""" @@ -52,11 +23,6 @@ class Settings(BaseSettings): LOGGING_LEVEL: int = logging.INFO LOGGING_FORMAT: str = 'json' - CONFIG_CENTER_ENABLED: bool = False - VAULT_URL: str - VAULT_CRT: str - VAULT_TOKEN: str - # greenroom queue gm_queue_endpoint: str gm_username: str @@ -94,6 +60,8 @@ class Settings(BaseSettings): S3_HOST: str S3_PORT: str = '' S3_INTERNAL_HTTPS: str + S3_ACCESS_KEY: str + S3_SECRET_KEY: str DATAOPS_SERVICE: str DATASET_SERVICE: str QUEUE_SERVICE: str @@ -104,6 +72,7 @@ class Settings(BaseSettings): KAFKA_URL: str REDIS_HOST: str REDIS_PORT: str + REDIS_PASSWORD: str ATLAS_HOST: str ATLAS_PORT: str @@ -112,10 +81,6 @@ class Config: env_file_encoding = 'utf-8' extra = Extra.allow - @classmethod - def customise_sources(cls, init_settings, env_settings, file_secret_settings): - return env_settings, load_vault_settings, init_settings, file_secret_settings - @lru_cache(1) def get_settings(): diff --git a/consumer/exceptions.py b/consumer/exceptions.py index d032c5e..ed767a8 100644 --- a/consumer/exceptions.py +++ b/consumer/exceptions.py @@ -6,12 +6,12 @@ from abc import ABCMeta from abc import abstractmethod +from collections.abc import Sequence from http.client import CONFLICT from http.client import INTERNAL_SERVER_ERROR from http.client import NOT_FOUND from http.client import SERVICE_UNAVAILABLE from http.client import UNPROCESSABLE_ENTITY -from typing import Sequence from pydantic.error_wrappers import ErrorList diff --git a/consumer/job.py b/consumer/job.py index e383415..ec6b3b9 100644 --- a/consumer/job.py +++ b/consumer/job.py @@ -31,10 +31,6 @@ def create_job(self, job_name, container_image, volume_path, command, args, pipe volume_mount = client.V1VolumeMount(mount_path=volume_path, name=ConfigClass.NFS_MOUNT) env = [ - client.V1EnvVar(name='CONFIG_CENTER_ENABLED', value=str(ConfigClass.CONFIG_CENTER_ENABLED)), - client.V1EnvVar(name='VAULT_URL', value=ConfigClass.VAULT_URL), - client.V1EnvVar(name='VAULT_CRT', value=ConfigClass.VAULT_CRT), - client.V1EnvVar(name='VAULT_TOKEN', value=ConfigClass.VAULT_TOKEN), client.V1EnvVar(name='GREEN_ZONE_LABEL', value=ConfigClass.GREEN_ZONE_LABEL), client.V1EnvVar(name='CORE_ZONE_LABEL', value=ConfigClass.CORE_ZONE_LABEL), client.V1EnvVar(name='RDS_DBNAME', value=ConfigClass.RDS_DBNAME), @@ -43,16 +39,20 @@ def create_job(self, job_name, container_image, volume_path, command, args, pipe client.V1EnvVar(name='S3_HOST', value=ConfigClass.S3_HOST), client.V1EnvVar(name='S3_PORT', value=ConfigClass.S3_PORT), client.V1EnvVar(name='S3_INTERNAL_HTTPS', value=ConfigClass.S3_INTERNAL_HTTPS), + client.V1EnvVar(name='S3_ACCESS_KEY', value=ConfigClass.S3_ACCESS_KEY), + client.V1EnvVar(name='S3_SECRET_KEY', value=ConfigClass.S3_SECRET_KEY), client.V1EnvVar(name='DATAOPS_SERVICE', value=ConfigClass.DATAOPS_SERVICE), client.V1EnvVar(name='PROJECT_SERVICE', value=ConfigClass.PROJECT_SERVICE), client.V1EnvVar(name='KAFKA_URL', value=ConfigClass.KAFKA_URL), client.V1EnvVar(name='REDIS_HOST', value=ConfigClass.REDIS_HOST), client.V1EnvVar(name='REDIS_PORT', value=ConfigClass.REDIS_PORT), + client.V1EnvVar(name='REDIS_PASSWORD', value=ConfigClass.REDIS_PASSWORD), client.V1EnvVar(name='ATLAS_HOST', value=ConfigClass.ATLAS_HOST), client.V1EnvVar(name='ATLAS_PORT', value=ConfigClass.ATLAS_PORT), client.V1EnvVar(name='APPROVAL_SERVICE', value=ConfigClass.APPROVAL_SERVICE), client.V1EnvVar(name='NOTIFICATION_SERVICE', value=ConfigClass.NOTIFICATION_SERVICE), client.V1EnvVar(name='DATASET_SERVICE', value=ConfigClass.DATASET_SERVICE), + client.V1EnvVar(name='METADATA_SERVICE', value=ConfigClass.METADATA_SERVICE), ] container = client.V1Container( @@ -88,6 +88,18 @@ def bids_validate_job_obj(self, job_name, container_image, volume_path, command, return job + def share_dataset_version_job_obj( + self, job_name, container_image, volume_path, command, args, version_id, destination_project_code + ): + anno = { + 'version_id': version_id, + 'destination_project_code': destination_project_code, + } + + job = self.create_job(job_name, container_image, volume_path, command, args, ConfigClass.copy_pipeline, anno) + + return job + def copy_folder_job_obj(self, job_name, container_image, volume_path, command, args, project_code, event_payload): anno = { 'source_geid': args[1], diff --git a/consumer/main.py b/consumer/main.py index 8889177..230b410 100644 --- a/consumer/main.py +++ b/consumer/main.py @@ -22,6 +22,7 @@ from pipelines.bids_validate import bids_validate_pipeline from pipelines.data_copy import folder_copy_pipeline from pipelines.data_delete import folder_delete_pipeline +from pipelines.share_dataset_version import share_dataset_version_pipeline from consumer import QueueConsumer @@ -50,6 +51,30 @@ def bids_validator(ch, method, message): ch.basic_nack(delivery_tag=method.delivery_tag, requeue=False) +def share_dataset_version(ch, method, message): + try: + logger.info(f'share_dataset_version message has been received: {message}') + version_id = message['version_id'] + destination_project_code = message['destination_project_code'] + job_id = message['job_id'] + session_id = message['session_id'] + operator = message['operator'] + access_token = message['access_token'] + try: + share_dataset_version_pipeline( + logger, version_id, destination_project_code, job_id, session_id, operator, access_token + ) + logger.info('share_dataset_version pipeline is processing') + ch.basic_ack(delivery_tag=method.delivery_tag) + except Exception as e: + logger.exception(f'Error occurred during share_dataset_version pipeline. {e}') + ch.basic_nack(delivery_tag=method.delivery_tag, requeue=False) + + except Exception as e: + logger.exception(f'Error occurred during share_dataset_version pipeline. {e}') + ch.basic_nack(delivery_tag=method.delivery_tag, requeue=False) + + def folder_copy(ch, method, message): try: logger.info(f'folder_copy message has been received: {message}') @@ -94,16 +119,21 @@ def folder_delete(ch, method, message): def callback(ch, method, properties, body): """Received message and start to consume message.""" - logger.info(f'[x] Received {body!r}') + logger.info(f'[x] Received {method} {body!r}') message = json.loads(body) - if method.routing_key.split('.')[-1] == 'bids_validate': + name = method.routing_key.split('.')[-1] + + if name == 'bids_validate': bids_validator(ch, method, message) - elif method.routing_key.split('.')[-1] == 'folder_copy': + elif name == 'share_dataset_version': + share_dataset_version(ch, method, message) + + elif name == 'folder_copy': folder_copy(ch, method, message) - elif method.routing_key.split('.')[-1] == 'folder_delete': + elif name == 'folder_delete': folder_delete(ch, method, message) else: diff --git a/consumer/pipelines/bids_validate.py b/consumer/pipelines/bids_validate.py index 765b75a..eb84df1 100644 --- a/consumer/pipelines/bids_validate.py +++ b/consumer/pipelines/bids_validate.py @@ -12,9 +12,8 @@ def bids_validate_pipeline(logger, dataset_code, access_token): - logger.info(f'The vault url is: {ConfigClass.VAULT_URL}') volume_path = ConfigClass.data_lake - command = ['poetry', 'run', 'python', 'scripts/validate_dataset.py'] + command = ['python3', '-m', 'operations', 'validate-dataset'] args = [ '-d', dataset_code, diff --git a/consumer/pipelines/data_copy.py b/consumer/pipelines/data_copy.py index a912c34..8ca3d20 100644 --- a/consumer/pipelines/data_copy.py +++ b/consumer/pipelines/data_copy.py @@ -7,9 +7,6 @@ import json import time from typing import Any -from typing import Dict -from typing import List -from typing import Optional from config import ConfigClass from job import KubernetesApiClient @@ -21,9 +18,9 @@ def folder_copy_pipeline( source_id: str, destination_id: str, project_code: str, - request_info: Optional[dict], - include_ids: List[str], - event_payload: Dict[str, Any], + request_info: dict | None, + include_ids: list[str], + event_payload: dict[str, Any], access_token: str, ): volume_path = ConfigClass.data_lake diff --git a/consumer/pipelines/data_delete.py b/consumer/pipelines/data_delete.py index 79a6892..cb10048 100644 --- a/consumer/pipelines/data_delete.py +++ b/consumer/pipelines/data_delete.py @@ -6,8 +6,6 @@ import time from typing import Any -from typing import Dict -from typing import List from config import ConfigClass from job import KubernetesApiClient @@ -15,7 +13,7 @@ def folder_delete_pipeline( - logger, source_id: str, project_code: str, include_ids: List[str], event_payload: Dict[str, Any], access_token: str + logger, source_id: str, project_code: str, include_ids: list[str], event_payload: dict[str, Any], access_token: str ): volume_path = ConfigClass.data_lake command = ['python3', '-m', 'operations', 'delete'] diff --git a/consumer/pipelines/share_dataset_version.py b/consumer/pipelines/share_dataset_version.py new file mode 100644 index 0000000..014293e --- /dev/null +++ b/consumer/pipelines/share_dataset_version.py @@ -0,0 +1,57 @@ +# Copyright (C) 2022-Present Indoc Systems +# +# Licensed under the GNU AFFERO GENERAL PUBLIC LICENSE, +# Version 3.0 (the "License") available at https://www.gnu.org/licenses/agpl-3.0.en.html. +# You may not use this file except in compliance with the License. + +import time + +from config import ConfigClass +from job import KubernetesApiClient +from kubernetes.client.rest import ApiException + + +def share_dataset_version_pipeline( + logger, + version_id: str, + destination_project_code: str, + job_id: str, + session_id: str, + operator: str, + access_token: str, +): + volume_path = ConfigClass.data_lake + command = ['python3', '-m', 'operations', 'share-dataset-version'] + args = [ + '--version-id', + version_id, + '--destination-project-code', + destination_project_code, + '--job-id', + job_id, + '--session-id', + session_id, + '--operator', + operator, + '--access-token', + access_token, + ] + try: + api_client = KubernetesApiClient() + job_api_client = api_client.create_batch_api_client() + job = api_client.share_dataset_version_job_obj( + 'share-dataset-version-' + str(round(time.time() * 10000)), + ConfigClass.data_transfer_image, + volume_path, + command, + args, + version_id, + destination_project_code, + ) + + api_response = job_api_client.create_namespaced_job(namespace=ConfigClass.namespace, body=job) + logger.info(api_response.status) + return api_response + except ApiException as e: + logger.exception(f'Share dataset version failed {e}') + return diff --git a/consumer/poetry.lock b/consumer/poetry.lock index a458734..2783014 100644 --- a/consumer/poetry.lock +++ b/consumer/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.5 and should not be changed by hand. [[package]] name = "aioboto3" @@ -1651,37 +1651,58 @@ files = [ [[package]] name = "pydantic" -version = "1.8.2" -description = "Data validation and settings management using python 3.6 type hinting" -optional = false -python-versions = ">=3.6.1" -files = [ - {file = "pydantic-1.8.2-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:05ddfd37c1720c392f4e0d43c484217b7521558302e7069ce8d318438d297739"}, - {file = "pydantic-1.8.2-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:a7c6002203fe2c5a1b5cbb141bb85060cbff88c2d78eccbc72d97eb7022c43e4"}, - {file = "pydantic-1.8.2-cp36-cp36m-manylinux2014_i686.whl", hash = "sha256:589eb6cd6361e8ac341db97602eb7f354551482368a37f4fd086c0733548308e"}, - {file = "pydantic-1.8.2-cp36-cp36m-manylinux2014_x86_64.whl", hash = "sha256:10e5622224245941efc193ad1d159887872776df7a8fd592ed746aa25d071840"}, - {file = "pydantic-1.8.2-cp36-cp36m-win_amd64.whl", hash = "sha256:99a9fc39470010c45c161a1dc584997f1feb13f689ecf645f59bb4ba623e586b"}, - {file = "pydantic-1.8.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a83db7205f60c6a86f2c44a61791d993dff4b73135df1973ecd9eed5ea0bda20"}, - {file = "pydantic-1.8.2-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:41b542c0b3c42dc17da70554bc6f38cbc30d7066d2c2815a94499b5684582ecb"}, - {file = "pydantic-1.8.2-cp37-cp37m-manylinux2014_i686.whl", hash = "sha256:ea5cb40a3b23b3265f6325727ddfc45141b08ed665458be8c6285e7b85bd73a1"}, - {file = "pydantic-1.8.2-cp37-cp37m-manylinux2014_x86_64.whl", hash = "sha256:18b5ea242dd3e62dbf89b2b0ec9ba6c7b5abaf6af85b95a97b00279f65845a23"}, - {file = "pydantic-1.8.2-cp37-cp37m-win_amd64.whl", hash = "sha256:234a6c19f1c14e25e362cb05c68afb7f183eb931dd3cd4605eafff055ebbf287"}, - {file = "pydantic-1.8.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:021ea0e4133e8c824775a0cfe098677acf6fa5a3cbf9206a376eed3fc09302cd"}, - {file = "pydantic-1.8.2-cp38-cp38-manylinux1_i686.whl", hash = "sha256:e710876437bc07bd414ff453ac8ec63d219e7690128d925c6e82889d674bb505"}, - {file = "pydantic-1.8.2-cp38-cp38-manylinux2014_i686.whl", hash = "sha256:ac8eed4ca3bd3aadc58a13c2aa93cd8a884bcf21cb019f8cfecaae3b6ce3746e"}, - {file = "pydantic-1.8.2-cp38-cp38-manylinux2014_x86_64.whl", hash = "sha256:4a03cbbe743e9c7247ceae6f0d8898f7a64bb65800a45cbdc52d65e370570820"}, - {file = "pydantic-1.8.2-cp38-cp38-win_amd64.whl", hash = "sha256:8621559dcf5afacf0069ed194278f35c255dc1a1385c28b32dd6c110fd6531b3"}, - {file = "pydantic-1.8.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8b223557f9510cf0bfd8b01316bf6dd281cf41826607eada99662f5e4963f316"}, - {file = "pydantic-1.8.2-cp39-cp39-manylinux1_i686.whl", hash = "sha256:244ad78eeb388a43b0c927e74d3af78008e944074b7d0f4f696ddd5b2af43c62"}, - {file = "pydantic-1.8.2-cp39-cp39-manylinux2014_i686.whl", hash = "sha256:05ef5246a7ffd2ce12a619cbb29f3307b7c4509307b1b49f456657b43529dc6f"}, - {file = "pydantic-1.8.2-cp39-cp39-manylinux2014_x86_64.whl", hash = "sha256:54cd5121383f4a461ff7644c7ca20c0419d58052db70d8791eacbbe31528916b"}, - {file = "pydantic-1.8.2-cp39-cp39-win_amd64.whl", hash = "sha256:4be75bebf676a5f0f87937c6ddb061fa39cbea067240d98e298508c1bda6f3f3"}, - {file = "pydantic-1.8.2-py3-none-any.whl", hash = "sha256:fec866a0b59f372b7e776f2d7308511784dace622e0992a0b59ea3ccee0ae833"}, - {file = "pydantic-1.8.2.tar.gz", hash = "sha256:26464e57ccaafe72b7ad156fdaa4e9b9ef051f69e175dbbb463283000c05ab7b"}, +version = "1.10.19" +description = "Data validation and settings management using python type hints" +optional = false +python-versions = ">=3.7" +files = [ + {file = "pydantic-1.10.19-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:a415b9e95fa602b10808113967f72b2da8722061265d6af69268c111c254832d"}, + {file = "pydantic-1.10.19-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:11965f421f7eb026439d4eb7464e9182fe6d69c3d4d416e464a4485d1ba61ab6"}, + {file = "pydantic-1.10.19-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5bb81fcfc6d5bff62cd786cbd87480a11d23f16d5376ad2e057c02b3b44df96"}, + {file = "pydantic-1.10.19-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:83ee8c9916689f8e6e7d90161e6663ac876be2efd32f61fdcfa3a15e87d4e413"}, + {file = "pydantic-1.10.19-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:0399094464ae7f28482de22383e667625e38e1516d6b213176df1acdd0c477ea"}, + {file = "pydantic-1.10.19-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8b2cf5e26da84f2d2dee3f60a3f1782adedcee785567a19b68d0af7e1534bd1f"}, + {file = "pydantic-1.10.19-cp310-cp310-win_amd64.whl", hash = "sha256:1fc8cc264afaf47ae6a9bcbd36c018d0c6b89293835d7fb0e5e1a95898062d59"}, + {file = "pydantic-1.10.19-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d7a8a1dd68bac29f08f0a3147de1885f4dccec35d4ea926e6e637fac03cdb4b3"}, + {file = "pydantic-1.10.19-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:07d00ca5ef0de65dd274005433ce2bb623730271d495a7d190a91c19c5679d34"}, + {file = "pydantic-1.10.19-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ad57004e5d73aee36f1e25e4e73a4bc853b473a1c30f652dc8d86b0a987ffce3"}, + {file = "pydantic-1.10.19-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dce355fe7ae53e3090f7f5fa242423c3a7b53260747aa398b4b3aaf8b25f41c3"}, + {file = "pydantic-1.10.19-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:0d32227ea9a3bf537a2273fd2fdb6d64ab4d9b83acd9e4e09310a777baaabb98"}, + {file = "pydantic-1.10.19-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e351df83d1c9cffa53d4e779009a093be70f1d5c6bb7068584086f6a19042526"}, + {file = "pydantic-1.10.19-cp311-cp311-win_amd64.whl", hash = "sha256:d8d72553d2f3f57ce547de4fa7dc8e3859927784ab2c88343f1fc1360ff17a08"}, + {file = "pydantic-1.10.19-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:d5b5b7c6bafaef90cbb7dafcb225b763edd71d9e22489647ee7df49d6d341890"}, + {file = "pydantic-1.10.19-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:570ad0aeaf98b5e33ff41af75aba2ef6604ee25ce0431ecd734a28e74a208555"}, + {file = "pydantic-1.10.19-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0890fbd7fec9e151c7512941243d830b2d6076d5df159a2030952d480ab80a4e"}, + {file = "pydantic-1.10.19-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ec5c44e6e9eac5128a9bfd21610df3b8c6b17343285cc185105686888dc81206"}, + {file = "pydantic-1.10.19-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:6eb56074b11a696e0b66c7181da682e88c00e5cebe6570af8013fcae5e63e186"}, + {file = "pydantic-1.10.19-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:9d7d48fbc5289efd23982a0d68e973a1f37d49064ccd36d86de4543aff21e086"}, + {file = "pydantic-1.10.19-cp312-cp312-win_amd64.whl", hash = "sha256:fd34012691fbd4e67bdf4accb1f0682342101015b78327eaae3543583fcd451e"}, + {file = "pydantic-1.10.19-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:4a5d5b877c7d3d9e17399571a8ab042081d22fe6904416a8b20f8af5909e6c8f"}, + {file = "pydantic-1.10.19-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c46f58ef2df958ed2ea7437a8be0897d5efe9ee480818405338c7da88186fb3"}, + {file = "pydantic-1.10.19-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6d8a38a44bb6a15810084316ed69c854a7c06e0c99c5429f1d664ad52cec353c"}, + {file = "pydantic-1.10.19-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:a82746c6d6e91ca17e75f7f333ed41d70fce93af520a8437821dec3ee52dfb10"}, + {file = "pydantic-1.10.19-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:566bebdbe6bc0ac593fa0f67d62febbad9f8be5433f686dc56401ba4aab034e3"}, + {file = "pydantic-1.10.19-cp37-cp37m-win_amd64.whl", hash = "sha256:22a1794e01591884741be56c6fba157c4e99dcc9244beb5a87bd4aa54b84ea8b"}, + {file = "pydantic-1.10.19-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:076c49e24b73d346c45f9282d00dbfc16eef7ae27c970583d499f11110d9e5b0"}, + {file = "pydantic-1.10.19-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:5d4320510682d5a6c88766b2a286d03b87bd3562bf8d78c73d63bab04b21e7b4"}, + {file = "pydantic-1.10.19-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e66aa0fa7f8aa9d0a620361834f6eb60d01d3e9cea23ca1a92cda99e6f61dac"}, + {file = "pydantic-1.10.19-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d216f8d0484d88ab72ab45d699ac669fe031275e3fa6553e3804e69485449fa0"}, + {file = "pydantic-1.10.19-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:9f28a81978e936136c44e6a70c65bde7548d87f3807260f73aeffbf76fb94c2f"}, + {file = "pydantic-1.10.19-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:d3449633c207ec3d2d672eedb3edbe753e29bd4e22d2e42a37a2c1406564c20f"}, + {file = "pydantic-1.10.19-cp38-cp38-win_amd64.whl", hash = "sha256:7ea24e8614f541d69ea72759ff635df0e612b7dc9d264d43f51364df310081a3"}, + {file = "pydantic-1.10.19-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:573254d844f3e64093f72fcd922561d9c5696821ff0900a0db989d8c06ab0c25"}, + {file = "pydantic-1.10.19-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ff09600cebe957ecbb4a27496fe34c1d449e7957ed20a202d5029a71a8af2e35"}, + {file = "pydantic-1.10.19-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4739c206bfb6bb2bdc78dcd40bfcebb2361add4ceac6d170e741bb914e9eff0f"}, + {file = "pydantic-1.10.19-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0bfb5b378b78229119d66ced6adac2e933c67a0aa1d0a7adffbe432f3ec14ce4"}, + {file = "pydantic-1.10.19-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:7f31742c95e3f9443b8c6fa07c119623e61d76603be9c0d390bcf7e888acabcb"}, + {file = "pydantic-1.10.19-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:c6444368b651a14c2ce2fb22145e1496f7ab23cbdb978590d47c8d34a7bc0289"}, + {file = "pydantic-1.10.19-cp39-cp39-win_amd64.whl", hash = "sha256:945407f4d08cd12485757a281fca0e5b41408606228612f421aa4ea1b63a095d"}, + {file = "pydantic-1.10.19-py3-none-any.whl", hash = "sha256:2206a1752d9fac011e95ca83926a269fb0ef5536f7e053966d058316e24d929f"}, + {file = "pydantic-1.10.19.tar.gz", hash = "sha256:fea36c2065b7a1d28c6819cc2e93387b43dd5d3cf5a1e82d8132ee23f36d1f10"}, ] [package.dependencies] -typing-extensions = ">=3.7.4.3" +typing-extensions = ">=4.2.0" [package.extras] dotenv = ["python-dotenv (>=0.10.4)"] @@ -2384,5 +2405,5 @@ testing = ["func-timeout", "jaraco.itertools"] [metadata] lock-version = "2.0" -python-versions = "^3.10" -content-hash = "c7c5950c8c0371282d7b9092794543b92a45468b3e6c7a763c08b532aaea47d1" +python-versions = ">=3.10,<3.11" +content-hash = "b4ba1dafb84f2abd7382c2696e750c652fca0b8dcef2ad51b6fc69c92aa73fbd" diff --git a/consumer/pyproject.toml b/consumer/pyproject.toml index 2b76d6f..5dae2f4 100644 --- a/consumer/pyproject.toml +++ b/consumer/pyproject.toml @@ -1,11 +1,11 @@ [tool.poetry] name = "service_queue_consumer" -version = "2.2.7" +version = "2.2.13" description = "" authors = ["Indoc Research"] [tool.poetry.dependencies] -python = "^3.10" +python = ">=3.10,<3.11" aniso8601 = "8.0.0" astroid = "2.4.2" attrs = "19.3.0" @@ -45,7 +45,7 @@ Werkzeug = "1.0.1" zipp = "3.1.0" dnspython = "2.0.0" python-dotenv = "0.19.1" -pydantic = "1.8.2" +pydantic = "1.10.19" opentelemetry-exporter-jaeger = "1.6.2" opentelemetry-instrumentation = "0.26b1" opentelemetry-instrumentation-pika = "0.26b1" diff --git a/producer/.env.schema b/producer/.env.schema index e99d7e6..b81a2a9 100644 --- a/producer/.env.schema +++ b/producer/.env.schema @@ -1,10 +1,4 @@ -CONFIG_CENTER_ENABLED=false - -# If config center has been enabled data_storage= -VAULT_URL= -VAULT_CRT= -VAULT_TOKEN= copy_pipeline= move_pipeline= gr_queue= diff --git a/producer/Dockerfile b/producer/Dockerfile index 320febf..8bc29af 100644 --- a/producer/Dockerfile +++ b/producer/Dockerfile @@ -1,4 +1,4 @@ -FROM docker-registry.ebrains.eu/hdc-services-image/base-image:python-3.10.12-v2 AS production-environment +FROM docker-registry.ebrains.eu/hdc-services-image/base-image:python-3.10.14-v1 AS production-environment ENV PYTHONDONTWRITEBYTECODE=true \ PYTHONIOENCODING=UTF-8 \ diff --git a/producer/poetry.lock b/producer/poetry.lock index 8520678..f105098 100644 --- a/producer/poetry.lock +++ b/producer/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.5 and should not be changed by hand. [[package]] name = "aioboto3" @@ -270,10 +270,7 @@ files = [ [package.dependencies] lazy-object-proxy = ">=1.4.0" -wrapt = [ - {version = ">=1.11,<2", markers = "python_version < \"3.11\""}, - {version = ">=1.14,<2", markers = "python_version >= \"3.11\""}, -] +wrapt = {version = ">=1.11,<2", markers = "python_version < \"3.11\""} [[package]] name = "async-timeout" @@ -1659,51 +1656,58 @@ files = [ [[package]] name = "pydantic" -version = "1.10.2" +version = "1.10.19" description = "Data validation and settings management using python type hints" optional = false python-versions = ">=3.7" files = [ - {file = "pydantic-1.10.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bb6ad4489af1bac6955d38ebcb95079a836af31e4c4f74aba1ca05bb9f6027bd"}, - {file = "pydantic-1.10.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a1f5a63a6dfe19d719b1b6e6106561869d2efaca6167f84f5ab9347887d78b98"}, - {file = "pydantic-1.10.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:352aedb1d71b8b0736c6d56ad2bd34c6982720644b0624462059ab29bd6e5912"}, - {file = "pydantic-1.10.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:19b3b9ccf97af2b7519c42032441a891a5e05c68368f40865a90eb88833c2559"}, - {file = "pydantic-1.10.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e9069e1b01525a96e6ff49e25876d90d5a563bc31c658289a8772ae186552236"}, - {file = "pydantic-1.10.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:355639d9afc76bcb9b0c3000ddcd08472ae75318a6eb67a15866b87e2efa168c"}, - {file = "pydantic-1.10.2-cp310-cp310-win_amd64.whl", hash = "sha256:ae544c47bec47a86bc7d350f965d8b15540e27e5aa4f55170ac6a75e5f73b644"}, - {file = "pydantic-1.10.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a4c805731c33a8db4b6ace45ce440c4ef5336e712508b4d9e1aafa617dc9907f"}, - {file = "pydantic-1.10.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d49f3db871575e0426b12e2f32fdb25e579dea16486a26e5a0474af87cb1ab0a"}, - {file = "pydantic-1.10.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:37c90345ec7dd2f1bcef82ce49b6235b40f282b94d3eec47e801baf864d15525"}, - {file = "pydantic-1.10.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7b5ba54d026c2bd2cb769d3468885f23f43710f651688e91f5fb1edcf0ee9283"}, - {file = "pydantic-1.10.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:05e00dbebbe810b33c7a7362f231893183bcc4251f3f2ff991c31d5c08240c42"}, - {file = "pydantic-1.10.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:2d0567e60eb01bccda3a4df01df677adf6b437958d35c12a3ac3e0f078b0ee52"}, - {file = "pydantic-1.10.2-cp311-cp311-win_amd64.whl", hash = "sha256:c6f981882aea41e021f72779ce2a4e87267458cc4d39ea990729e21ef18f0f8c"}, - {file = "pydantic-1.10.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c4aac8e7103bf598373208f6299fa9a5cfd1fc571f2d40bf1dd1955a63d6eeb5"}, - {file = "pydantic-1.10.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:81a7b66c3f499108b448f3f004801fcd7d7165fb4200acb03f1c2402da73ce4c"}, - {file = "pydantic-1.10.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bedf309630209e78582ffacda64a21f96f3ed2e51fbf3962d4d488e503420254"}, - {file = "pydantic-1.10.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:9300fcbebf85f6339a02c6994b2eb3ff1b9c8c14f502058b5bf349d42447dcf5"}, - {file = "pydantic-1.10.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:216f3bcbf19c726b1cc22b099dd409aa371f55c08800bcea4c44c8f74b73478d"}, - {file = "pydantic-1.10.2-cp37-cp37m-win_amd64.whl", hash = "sha256:dd3f9a40c16daf323cf913593083698caee97df2804aa36c4b3175d5ac1b92a2"}, - {file = "pydantic-1.10.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b97890e56a694486f772d36efd2ba31612739bc6f3caeee50e9e7e3ebd2fdd13"}, - {file = "pydantic-1.10.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:9cabf4a7f05a776e7793e72793cd92cc865ea0e83a819f9ae4ecccb1b8aa6116"}, - {file = "pydantic-1.10.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:06094d18dd5e6f2bbf93efa54991c3240964bb663b87729ac340eb5014310624"}, - {file = "pydantic-1.10.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cc78cc83110d2f275ec1970e7a831f4e371ee92405332ebfe9860a715f8336e1"}, - {file = "pydantic-1.10.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:1ee433e274268a4b0c8fde7ad9d58ecba12b069a033ecc4645bb6303c062d2e9"}, - {file = "pydantic-1.10.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:7c2abc4393dea97a4ccbb4ec7d8658d4e22c4765b7b9b9445588f16c71ad9965"}, - {file = "pydantic-1.10.2-cp38-cp38-win_amd64.whl", hash = "sha256:0b959f4d8211fc964772b595ebb25f7652da3f22322c007b6fed26846a40685e"}, - {file = "pydantic-1.10.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c33602f93bfb67779f9c507e4d69451664524389546bacfe1bee13cae6dc7488"}, - {file = "pydantic-1.10.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:5760e164b807a48a8f25f8aa1a6d857e6ce62e7ec83ea5d5c5a802eac81bad41"}, - {file = "pydantic-1.10.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6eb843dcc411b6a2237a694f5e1d649fc66c6064d02b204a7e9d194dff81eb4b"}, - {file = "pydantic-1.10.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4b8795290deaae348c4eba0cebb196e1c6b98bdbe7f50b2d0d9a4a99716342fe"}, - {file = "pydantic-1.10.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:e0bedafe4bc165ad0a56ac0bd7695df25c50f76961da29c050712596cf092d6d"}, - {file = "pydantic-1.10.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:2e05aed07fa02231dbf03d0adb1be1d79cabb09025dd45aa094aa8b4e7b9dcda"}, - {file = "pydantic-1.10.2-cp39-cp39-win_amd64.whl", hash = "sha256:c1ba1afb396148bbc70e9eaa8c06c1716fdddabaf86e7027c5988bae2a829ab6"}, - {file = "pydantic-1.10.2-py3-none-any.whl", hash = "sha256:1b6ee725bd6e83ec78b1aa32c5b1fa67a3a65badddde3976bca5fe4568f27709"}, - {file = "pydantic-1.10.2.tar.gz", hash = "sha256:91b8e218852ef6007c2b98cd861601c6a09f1aa32bbbb74fab5b1c33d4a1e410"}, + {file = "pydantic-1.10.19-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:a415b9e95fa602b10808113967f72b2da8722061265d6af69268c111c254832d"}, + {file = "pydantic-1.10.19-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:11965f421f7eb026439d4eb7464e9182fe6d69c3d4d416e464a4485d1ba61ab6"}, + {file = "pydantic-1.10.19-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5bb81fcfc6d5bff62cd786cbd87480a11d23f16d5376ad2e057c02b3b44df96"}, + {file = "pydantic-1.10.19-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:83ee8c9916689f8e6e7d90161e6663ac876be2efd32f61fdcfa3a15e87d4e413"}, + {file = "pydantic-1.10.19-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:0399094464ae7f28482de22383e667625e38e1516d6b213176df1acdd0c477ea"}, + {file = "pydantic-1.10.19-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8b2cf5e26da84f2d2dee3f60a3f1782adedcee785567a19b68d0af7e1534bd1f"}, + {file = "pydantic-1.10.19-cp310-cp310-win_amd64.whl", hash = "sha256:1fc8cc264afaf47ae6a9bcbd36c018d0c6b89293835d7fb0e5e1a95898062d59"}, + {file = "pydantic-1.10.19-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d7a8a1dd68bac29f08f0a3147de1885f4dccec35d4ea926e6e637fac03cdb4b3"}, + {file = "pydantic-1.10.19-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:07d00ca5ef0de65dd274005433ce2bb623730271d495a7d190a91c19c5679d34"}, + {file = "pydantic-1.10.19-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ad57004e5d73aee36f1e25e4e73a4bc853b473a1c30f652dc8d86b0a987ffce3"}, + {file = "pydantic-1.10.19-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dce355fe7ae53e3090f7f5fa242423c3a7b53260747aa398b4b3aaf8b25f41c3"}, + {file = "pydantic-1.10.19-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:0d32227ea9a3bf537a2273fd2fdb6d64ab4d9b83acd9e4e09310a777baaabb98"}, + {file = "pydantic-1.10.19-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e351df83d1c9cffa53d4e779009a093be70f1d5c6bb7068584086f6a19042526"}, + {file = "pydantic-1.10.19-cp311-cp311-win_amd64.whl", hash = "sha256:d8d72553d2f3f57ce547de4fa7dc8e3859927784ab2c88343f1fc1360ff17a08"}, + {file = "pydantic-1.10.19-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:d5b5b7c6bafaef90cbb7dafcb225b763edd71d9e22489647ee7df49d6d341890"}, + {file = "pydantic-1.10.19-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:570ad0aeaf98b5e33ff41af75aba2ef6604ee25ce0431ecd734a28e74a208555"}, + {file = "pydantic-1.10.19-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0890fbd7fec9e151c7512941243d830b2d6076d5df159a2030952d480ab80a4e"}, + {file = "pydantic-1.10.19-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ec5c44e6e9eac5128a9bfd21610df3b8c6b17343285cc185105686888dc81206"}, + {file = "pydantic-1.10.19-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:6eb56074b11a696e0b66c7181da682e88c00e5cebe6570af8013fcae5e63e186"}, + {file = "pydantic-1.10.19-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:9d7d48fbc5289efd23982a0d68e973a1f37d49064ccd36d86de4543aff21e086"}, + {file = "pydantic-1.10.19-cp312-cp312-win_amd64.whl", hash = "sha256:fd34012691fbd4e67bdf4accb1f0682342101015b78327eaae3543583fcd451e"}, + {file = "pydantic-1.10.19-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:4a5d5b877c7d3d9e17399571a8ab042081d22fe6904416a8b20f8af5909e6c8f"}, + {file = "pydantic-1.10.19-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c46f58ef2df958ed2ea7437a8be0897d5efe9ee480818405338c7da88186fb3"}, + {file = "pydantic-1.10.19-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6d8a38a44bb6a15810084316ed69c854a7c06e0c99c5429f1d664ad52cec353c"}, + {file = "pydantic-1.10.19-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:a82746c6d6e91ca17e75f7f333ed41d70fce93af520a8437821dec3ee52dfb10"}, + {file = "pydantic-1.10.19-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:566bebdbe6bc0ac593fa0f67d62febbad9f8be5433f686dc56401ba4aab034e3"}, + {file = "pydantic-1.10.19-cp37-cp37m-win_amd64.whl", hash = "sha256:22a1794e01591884741be56c6fba157c4e99dcc9244beb5a87bd4aa54b84ea8b"}, + {file = "pydantic-1.10.19-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:076c49e24b73d346c45f9282d00dbfc16eef7ae27c970583d499f11110d9e5b0"}, + {file = "pydantic-1.10.19-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:5d4320510682d5a6c88766b2a286d03b87bd3562bf8d78c73d63bab04b21e7b4"}, + {file = "pydantic-1.10.19-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e66aa0fa7f8aa9d0a620361834f6eb60d01d3e9cea23ca1a92cda99e6f61dac"}, + {file = "pydantic-1.10.19-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d216f8d0484d88ab72ab45d699ac669fe031275e3fa6553e3804e69485449fa0"}, + {file = "pydantic-1.10.19-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:9f28a81978e936136c44e6a70c65bde7548d87f3807260f73aeffbf76fb94c2f"}, + {file = "pydantic-1.10.19-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:d3449633c207ec3d2d672eedb3edbe753e29bd4e22d2e42a37a2c1406564c20f"}, + {file = "pydantic-1.10.19-cp38-cp38-win_amd64.whl", hash = "sha256:7ea24e8614f541d69ea72759ff635df0e612b7dc9d264d43f51364df310081a3"}, + {file = "pydantic-1.10.19-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:573254d844f3e64093f72fcd922561d9c5696821ff0900a0db989d8c06ab0c25"}, + {file = "pydantic-1.10.19-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ff09600cebe957ecbb4a27496fe34c1d449e7957ed20a202d5029a71a8af2e35"}, + {file = "pydantic-1.10.19-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4739c206bfb6bb2bdc78dcd40bfcebb2361add4ceac6d170e741bb914e9eff0f"}, + {file = "pydantic-1.10.19-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0bfb5b378b78229119d66ced6adac2e933c67a0aa1d0a7adffbe432f3ec14ce4"}, + {file = "pydantic-1.10.19-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:7f31742c95e3f9443b8c6fa07c119623e61d76603be9c0d390bcf7e888acabcb"}, + {file = "pydantic-1.10.19-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:c6444368b651a14c2ce2fb22145e1496f7ab23cbdb978590d47c8d34a7bc0289"}, + {file = "pydantic-1.10.19-cp39-cp39-win_amd64.whl", hash = "sha256:945407f4d08cd12485757a281fca0e5b41408606228612f421aa4ea1b63a095d"}, + {file = "pydantic-1.10.19-py3-none-any.whl", hash = "sha256:2206a1752d9fac011e95ca83926a269fb0ef5536f7e053966d058316e24d929f"}, + {file = "pydantic-1.10.19.tar.gz", hash = "sha256:fea36c2065b7a1d28c6819cc2e93387b43dd5d3cf5a1e82d8132ee23f36d1f10"}, ] [package.dependencies] -typing-extensions = ">=4.1.0" +typing-extensions = ">=4.2.0" [package.extras] dotenv = ["python-dotenv (>=0.10.4)"] @@ -2302,5 +2306,5 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" -python-versions = "^3.10" -content-hash = "6894a2905fb6ed7a61043e4878702b23bb090dd5bc0a3897ff66415abe534903" +python-versions = ">=3.10,<3.11" +content-hash = "ab211375da2caee0ca79d28a30072c08e6fe61147a557c0da8b0b9f2f0a2a0f3" diff --git a/producer/producer/components/broker/schemas.py b/producer/producer/components/broker/schemas.py index 89da004..e717eef 100644 --- a/producer/producer/components/broker/schemas.py +++ b/producer/producer/components/broker/schemas.py @@ -4,8 +4,6 @@ # Version 3.0 (the "License") available at https://www.gnu.org/licenses/agpl-3.0.en.html. # You may not use this file except in compliance with the License. -from typing import Optional - from pydantic import Field from producer.components.schemas import APIResponse @@ -19,9 +17,9 @@ class PublishBrokerRequestSchema(BaseSchema): routing_key: str event_type: str payload: dict = {} - exchange: Optional[dict] = None - create_timestamp: Optional[float] = None - binary: Optional[bool] = False + exchange: dict | None = None + create_timestamp: float | None = None + binary: bool | None = False class PublishBrokerResponseSchema(APIResponse): diff --git a/producer/producer/components/broker/views.py b/producer/producer/components/broker/views.py index bdeefff..8fe4977 100644 --- a/producer/producer/components/broker/views.py +++ b/producer/producer/components/broker/views.py @@ -33,7 +33,7 @@ def publish_broker(data: PublishBrokerRequestSchema): for field in required: if field not in exchange: res.code = EAPIResponseCode.bad_request - res.error_msg = "param '{}' is required in exchange object.".format(field) + res.error_msg = f"param '{field}' is required in exchange object." return res.json_response() create_timestamp = event.get('create_timestamp', time.time()) diff --git a/producer/producer/components/exceptions.py b/producer/producer/components/exceptions.py index 3bdf86e..9b512a4 100644 --- a/producer/producer/components/exceptions.py +++ b/producer/producer/components/exceptions.py @@ -6,12 +6,12 @@ from abc import ABCMeta from abc import abstractmethod +from collections.abc import Sequence from http.client import CONFLICT from http.client import INTERNAL_SERVER_ERROR from http.client import NOT_FOUND from http.client import SERVICE_UNAVAILABLE from http.client import UNPROCESSABLE_ENTITY -from typing import Sequence from pydantic.error_wrappers import ErrorList diff --git a/producer/producer/components/queue/publisher.py b/producer/producer/components/queue/publisher.py index 7f04a40..81287cf 100644 --- a/producer/producer/components/queue/publisher.py +++ b/producer/producer/components/queue/publisher.py @@ -4,8 +4,6 @@ # Version 3.0 (the "License") available at https://www.gnu.org/licenses/agpl-3.0.en.html. # You may not use this file except in compliance with the License. -from typing import Optional - from producer.components.exceptions import ServiceNotAvailable from producer.components.schemas import BasePayload from producer.config import ConfigClass @@ -14,7 +12,7 @@ class BasedProducer: - def __init__(self, event_type: str, project: Optional[str], create_time: float, payload: BasePayload): + def __init__(self, event_type: str, project: str | None, create_time: float, payload: BasePayload): self.event_type = event_type self.project = project self.create_time = create_time diff --git a/producer/producer/components/queue/schemas.py b/producer/producer/components/queue/schemas.py index 3ecbbd6..c486572 100644 --- a/producer/producer/components/queue/schemas.py +++ b/producer/producer/components/queue/schemas.py @@ -5,8 +5,6 @@ # You may not use this file except in compliance with the License. from enum import Enum -from typing import Dict -from typing import Optional from pydantic import BaseModel from pydantic import root_validator @@ -20,6 +18,7 @@ class Event(Enum): bids_validate = 'bids_validate' folder_copy = 'folder_copy' folder_delete = 'folder_delete' + share_dataset_version = 'share_dataset_version' class SendMessageRequestSchema(BaseSchema): @@ -35,6 +34,7 @@ def validate(cls, value): 'bids_validate': BidsPayload, 'folder_copy': CopyPayload, 'folder_delete': DeletePayload, + 'share_dataset_version': ShareDatasetVersion, }.get(value['event_type']) try: event_map(**value['payload']) @@ -61,9 +61,9 @@ class CopyPayload(BasePayload): source_geid: str include_geids: list project: str - generic: Optional[str] + generic: str | None operator: str - request_info: Optional[Dict] + request_info: dict | None destination_geid: str access_token: str @@ -74,6 +74,15 @@ class DeletePayload(BasePayload): source_geid: str include_geids: list project: str - generic: Optional[str] + generic: str | None + operator: str + access_token: str + + +class ShareDatasetVersion(BasePayload): + version_id: str + destination_project_code: str + job_id: str + session_id: str operator: str access_token: str diff --git a/producer/producer/config.py b/producer/producer/config.py index c9959e2..4452f1b 100644 --- a/producer/producer/config.py +++ b/producer/producer/config.py @@ -5,35 +5,17 @@ # You may not use this file except in compliance with the License. import logging -import os from functools import lru_cache -from typing import Any -from typing import Dict -from common import VaultClient -from dotenv import load_dotenv from pydantic import BaseSettings from pydantic import Extra -# load env var from local env file -load_dotenv() -SRV_NAMESPACE = os.environ.get('APP_NAME', 'service_queue') -CONFIG_CENTER_ENABLED = os.environ.get('CONFIG_CENTER_ENABLED', 'false') - - -def load_vault_settings(settings: BaseSettings) -> Dict[str, Any]: - if CONFIG_CENTER_ENABLED == 'false': - return {} - else: - vc = VaultClient(os.getenv('VAULT_URL'), os.getenv('VAULT_CRT'), os.getenv('VAULT_TOKEN')) - return vc.get_from_vault(SRV_NAMESPACE) - class Settings(BaseSettings): """Store service configuration settings.""" APP_NAME: str = 'service_queue' - version: str = '2.2.0' + version: str = '2.2.13' port: int = 6060 host: str = '0.0.0.0' env: str = 'test' @@ -60,10 +42,6 @@ class Config: env_file_encoding = 'utf-8' extra = Extra.allow - @classmethod - def customise_sources(cls, init_settings, env_settings, file_secret_settings): - return env_settings, load_vault_settings, init_settings, file_secret_settings - @lru_cache(1) def get_settings(): diff --git a/producer/pyproject.toml b/producer/pyproject.toml index e4ae42f..d9826e7 100644 --- a/producer/pyproject.toml +++ b/producer/pyproject.toml @@ -1,11 +1,11 @@ [tool.poetry] name = "service_queue_producer" -version = "2.2.6" +version = "2.2.13" description = "" authors = ["Indoc Research"] [tool.poetry.dependencies] -python = "^3.10" +python = ">=3.10,<3.11" filetype = "^1.0.13" gunicorn = "^20.1.0" flask-restx = "^0.5.1" @@ -23,7 +23,7 @@ pylint = "^2.13.8" pytz = "^2022.1" requests = "^2.27.1" urllib3 = "^1.26.9" -pydantic = "^1.9.0" +pydantic = "1.10.19" itsdangerous = "^2.1.2" MarkupSafe = "^2.1.1" python-dotenv = "0.19.1" diff --git a/socketio/.env.schema b/socketio/.env.schema index ca99f72..cf478c8 100644 --- a/socketio/.env.schema +++ b/socketio/.env.schema @@ -1,6 +1,3 @@ -CONFIG_CENTER_ENABLED=false - -# If config center has been enabled -VAULT_URL= -VAULT_CRT= -VAULT_TOKEN= +gm_queue_endpoint= +gm_username= +gm_password= diff --git a/socketio/Dockerfile b/socketio/Dockerfile index 485bb02..6cd0e9b 100644 --- a/socketio/Dockerfile +++ b/socketio/Dockerfile @@ -1,4 +1,4 @@ -FROM docker-registry.ebrains.eu/hdc-services-image/base-image:python-3.10.12-v2 AS socketio-image +FROM docker-registry.ebrains.eu/hdc-services-image/base-image:python-3.10.14-v1 AS socketio-image ENV PYTHONDONTWRITEBYTECODE=true \ PYTHONIOENCODING=UTF-8 \ diff --git a/socketio/config.py b/socketio/config.py index b45218b..25851c8 100644 --- a/socketio/config.py +++ b/socketio/config.py @@ -5,35 +5,17 @@ # You may not use this file except in compliance with the License. import logging -import os from functools import lru_cache -from typing import Any -from typing import Dict -from common import VaultClient -from dotenv import load_dotenv from pydantic import BaseSettings from pydantic import Extra -load_dotenv() - -SRV_NAMESPACE = os.environ.get('APP_NAME', 'service_queue') -CONFIG_CENTER_ENABLED = os.environ.get('CONFIG_CENTER_ENABLED', 'false') - - -def load_vault_settings(settings: BaseSettings) -> Dict[str, Any]: - if CONFIG_CENTER_ENABLED == 'false': - return {} - else: - vc = VaultClient(os.getenv('VAULT_URL'), os.getenv('VAULT_CRT'), os.getenv('VAULT_TOKEN')) - return vc.get_from_vault(SRV_NAMESPACE) - class Settings(BaseSettings): port: int = 6060 host: str = '127.0.0.1' env: str = 'test' - version: str = '2.2.0' + version: str = '2.2.13' LOGGING_LEVEL: int = logging.INFO LOGGING_FORMAT: str = 'json' @@ -47,20 +29,6 @@ class Config: env_file_encoding = 'utf-8' extra = Extra.allow - @classmethod - def customise_sources( - cls, - init_settings, - env_settings, - file_secret_settings, - ): - return ( - load_vault_settings, - env_settings, - init_settings, - file_secret_settings, - ) - @lru_cache(1) def get_settings(): diff --git a/socketio/message_queue.py b/socketio/message_queue.py index 8d226f1..ffa65c5 100644 --- a/socketio/message_queue.py +++ b/socketio/message_queue.py @@ -58,7 +58,7 @@ async def connect(self) -> None: """ self.connection = await aio_pika.connect_robust( - '%s%s:%s@%s/' % (self.queue_prefix, self.username, self.password, self.url), loop=self.event_loop + f'{self.queue_prefix}{self.username}:{self.password}@{self.url}/', loop=self.event_loop ) self.channel = await self.connection.channel() diff --git a/socketio/poetry.lock b/socketio/poetry.lock index 751672f..3505418 100644 --- a/socketio/poetry.lock +++ b/socketio/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.5 and should not be changed by hand. [[package]] name = "aio-pika" @@ -1118,51 +1118,58 @@ files = [ [[package]] name = "pydantic" -version = "1.10.2" +version = "1.10.19" description = "Data validation and settings management using python type hints" optional = false python-versions = ">=3.7" files = [ - {file = "pydantic-1.10.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bb6ad4489af1bac6955d38ebcb95079a836af31e4c4f74aba1ca05bb9f6027bd"}, - {file = "pydantic-1.10.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a1f5a63a6dfe19d719b1b6e6106561869d2efaca6167f84f5ab9347887d78b98"}, - {file = "pydantic-1.10.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:352aedb1d71b8b0736c6d56ad2bd34c6982720644b0624462059ab29bd6e5912"}, - {file = "pydantic-1.10.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:19b3b9ccf97af2b7519c42032441a891a5e05c68368f40865a90eb88833c2559"}, - {file = "pydantic-1.10.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e9069e1b01525a96e6ff49e25876d90d5a563bc31c658289a8772ae186552236"}, - {file = "pydantic-1.10.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:355639d9afc76bcb9b0c3000ddcd08472ae75318a6eb67a15866b87e2efa168c"}, - {file = "pydantic-1.10.2-cp310-cp310-win_amd64.whl", hash = "sha256:ae544c47bec47a86bc7d350f965d8b15540e27e5aa4f55170ac6a75e5f73b644"}, - {file = "pydantic-1.10.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a4c805731c33a8db4b6ace45ce440c4ef5336e712508b4d9e1aafa617dc9907f"}, - {file = "pydantic-1.10.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d49f3db871575e0426b12e2f32fdb25e579dea16486a26e5a0474af87cb1ab0a"}, - {file = "pydantic-1.10.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:37c90345ec7dd2f1bcef82ce49b6235b40f282b94d3eec47e801baf864d15525"}, - {file = "pydantic-1.10.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7b5ba54d026c2bd2cb769d3468885f23f43710f651688e91f5fb1edcf0ee9283"}, - {file = "pydantic-1.10.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:05e00dbebbe810b33c7a7362f231893183bcc4251f3f2ff991c31d5c08240c42"}, - {file = "pydantic-1.10.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:2d0567e60eb01bccda3a4df01df677adf6b437958d35c12a3ac3e0f078b0ee52"}, - {file = "pydantic-1.10.2-cp311-cp311-win_amd64.whl", hash = "sha256:c6f981882aea41e021f72779ce2a4e87267458cc4d39ea990729e21ef18f0f8c"}, - {file = "pydantic-1.10.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c4aac8e7103bf598373208f6299fa9a5cfd1fc571f2d40bf1dd1955a63d6eeb5"}, - {file = "pydantic-1.10.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:81a7b66c3f499108b448f3f004801fcd7d7165fb4200acb03f1c2402da73ce4c"}, - {file = "pydantic-1.10.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bedf309630209e78582ffacda64a21f96f3ed2e51fbf3962d4d488e503420254"}, - {file = "pydantic-1.10.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:9300fcbebf85f6339a02c6994b2eb3ff1b9c8c14f502058b5bf349d42447dcf5"}, - {file = "pydantic-1.10.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:216f3bcbf19c726b1cc22b099dd409aa371f55c08800bcea4c44c8f74b73478d"}, - {file = "pydantic-1.10.2-cp37-cp37m-win_amd64.whl", hash = "sha256:dd3f9a40c16daf323cf913593083698caee97df2804aa36c4b3175d5ac1b92a2"}, - {file = "pydantic-1.10.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b97890e56a694486f772d36efd2ba31612739bc6f3caeee50e9e7e3ebd2fdd13"}, - {file = "pydantic-1.10.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:9cabf4a7f05a776e7793e72793cd92cc865ea0e83a819f9ae4ecccb1b8aa6116"}, - {file = "pydantic-1.10.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:06094d18dd5e6f2bbf93efa54991c3240964bb663b87729ac340eb5014310624"}, - {file = "pydantic-1.10.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cc78cc83110d2f275ec1970e7a831f4e371ee92405332ebfe9860a715f8336e1"}, - {file = "pydantic-1.10.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:1ee433e274268a4b0c8fde7ad9d58ecba12b069a033ecc4645bb6303c062d2e9"}, - {file = "pydantic-1.10.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:7c2abc4393dea97a4ccbb4ec7d8658d4e22c4765b7b9b9445588f16c71ad9965"}, - {file = "pydantic-1.10.2-cp38-cp38-win_amd64.whl", hash = "sha256:0b959f4d8211fc964772b595ebb25f7652da3f22322c007b6fed26846a40685e"}, - {file = "pydantic-1.10.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c33602f93bfb67779f9c507e4d69451664524389546bacfe1bee13cae6dc7488"}, - {file = "pydantic-1.10.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:5760e164b807a48a8f25f8aa1a6d857e6ce62e7ec83ea5d5c5a802eac81bad41"}, - {file = "pydantic-1.10.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6eb843dcc411b6a2237a694f5e1d649fc66c6064d02b204a7e9d194dff81eb4b"}, - {file = "pydantic-1.10.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4b8795290deaae348c4eba0cebb196e1c6b98bdbe7f50b2d0d9a4a99716342fe"}, - {file = "pydantic-1.10.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:e0bedafe4bc165ad0a56ac0bd7695df25c50f76961da29c050712596cf092d6d"}, - {file = "pydantic-1.10.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:2e05aed07fa02231dbf03d0adb1be1d79cabb09025dd45aa094aa8b4e7b9dcda"}, - {file = "pydantic-1.10.2-cp39-cp39-win_amd64.whl", hash = "sha256:c1ba1afb396148bbc70e9eaa8c06c1716fdddabaf86e7027c5988bae2a829ab6"}, - {file = "pydantic-1.10.2-py3-none-any.whl", hash = "sha256:1b6ee725bd6e83ec78b1aa32c5b1fa67a3a65badddde3976bca5fe4568f27709"}, - {file = "pydantic-1.10.2.tar.gz", hash = "sha256:91b8e218852ef6007c2b98cd861601c6a09f1aa32bbbb74fab5b1c33d4a1e410"}, + {file = "pydantic-1.10.19-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:a415b9e95fa602b10808113967f72b2da8722061265d6af69268c111c254832d"}, + {file = "pydantic-1.10.19-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:11965f421f7eb026439d4eb7464e9182fe6d69c3d4d416e464a4485d1ba61ab6"}, + {file = "pydantic-1.10.19-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5bb81fcfc6d5bff62cd786cbd87480a11d23f16d5376ad2e057c02b3b44df96"}, + {file = "pydantic-1.10.19-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:83ee8c9916689f8e6e7d90161e6663ac876be2efd32f61fdcfa3a15e87d4e413"}, + {file = "pydantic-1.10.19-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:0399094464ae7f28482de22383e667625e38e1516d6b213176df1acdd0c477ea"}, + {file = "pydantic-1.10.19-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8b2cf5e26da84f2d2dee3f60a3f1782adedcee785567a19b68d0af7e1534bd1f"}, + {file = "pydantic-1.10.19-cp310-cp310-win_amd64.whl", hash = "sha256:1fc8cc264afaf47ae6a9bcbd36c018d0c6b89293835d7fb0e5e1a95898062d59"}, + {file = "pydantic-1.10.19-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d7a8a1dd68bac29f08f0a3147de1885f4dccec35d4ea926e6e637fac03cdb4b3"}, + {file = "pydantic-1.10.19-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:07d00ca5ef0de65dd274005433ce2bb623730271d495a7d190a91c19c5679d34"}, + {file = "pydantic-1.10.19-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ad57004e5d73aee36f1e25e4e73a4bc853b473a1c30f652dc8d86b0a987ffce3"}, + {file = "pydantic-1.10.19-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dce355fe7ae53e3090f7f5fa242423c3a7b53260747aa398b4b3aaf8b25f41c3"}, + {file = "pydantic-1.10.19-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:0d32227ea9a3bf537a2273fd2fdb6d64ab4d9b83acd9e4e09310a777baaabb98"}, + {file = "pydantic-1.10.19-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e351df83d1c9cffa53d4e779009a093be70f1d5c6bb7068584086f6a19042526"}, + {file = "pydantic-1.10.19-cp311-cp311-win_amd64.whl", hash = "sha256:d8d72553d2f3f57ce547de4fa7dc8e3859927784ab2c88343f1fc1360ff17a08"}, + {file = "pydantic-1.10.19-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:d5b5b7c6bafaef90cbb7dafcb225b763edd71d9e22489647ee7df49d6d341890"}, + {file = "pydantic-1.10.19-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:570ad0aeaf98b5e33ff41af75aba2ef6604ee25ce0431ecd734a28e74a208555"}, + {file = "pydantic-1.10.19-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0890fbd7fec9e151c7512941243d830b2d6076d5df159a2030952d480ab80a4e"}, + {file = "pydantic-1.10.19-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ec5c44e6e9eac5128a9bfd21610df3b8c6b17343285cc185105686888dc81206"}, + {file = "pydantic-1.10.19-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:6eb56074b11a696e0b66c7181da682e88c00e5cebe6570af8013fcae5e63e186"}, + {file = "pydantic-1.10.19-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:9d7d48fbc5289efd23982a0d68e973a1f37d49064ccd36d86de4543aff21e086"}, + {file = "pydantic-1.10.19-cp312-cp312-win_amd64.whl", hash = "sha256:fd34012691fbd4e67bdf4accb1f0682342101015b78327eaae3543583fcd451e"}, + {file = "pydantic-1.10.19-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:4a5d5b877c7d3d9e17399571a8ab042081d22fe6904416a8b20f8af5909e6c8f"}, + {file = "pydantic-1.10.19-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c46f58ef2df958ed2ea7437a8be0897d5efe9ee480818405338c7da88186fb3"}, + {file = "pydantic-1.10.19-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6d8a38a44bb6a15810084316ed69c854a7c06e0c99c5429f1d664ad52cec353c"}, + {file = "pydantic-1.10.19-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:a82746c6d6e91ca17e75f7f333ed41d70fce93af520a8437821dec3ee52dfb10"}, + {file = "pydantic-1.10.19-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:566bebdbe6bc0ac593fa0f67d62febbad9f8be5433f686dc56401ba4aab034e3"}, + {file = "pydantic-1.10.19-cp37-cp37m-win_amd64.whl", hash = "sha256:22a1794e01591884741be56c6fba157c4e99dcc9244beb5a87bd4aa54b84ea8b"}, + {file = "pydantic-1.10.19-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:076c49e24b73d346c45f9282d00dbfc16eef7ae27c970583d499f11110d9e5b0"}, + {file = "pydantic-1.10.19-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:5d4320510682d5a6c88766b2a286d03b87bd3562bf8d78c73d63bab04b21e7b4"}, + {file = "pydantic-1.10.19-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e66aa0fa7f8aa9d0a620361834f6eb60d01d3e9cea23ca1a92cda99e6f61dac"}, + {file = "pydantic-1.10.19-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d216f8d0484d88ab72ab45d699ac669fe031275e3fa6553e3804e69485449fa0"}, + {file = "pydantic-1.10.19-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:9f28a81978e936136c44e6a70c65bde7548d87f3807260f73aeffbf76fb94c2f"}, + {file = "pydantic-1.10.19-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:d3449633c207ec3d2d672eedb3edbe753e29bd4e22d2e42a37a2c1406564c20f"}, + {file = "pydantic-1.10.19-cp38-cp38-win_amd64.whl", hash = "sha256:7ea24e8614f541d69ea72759ff635df0e612b7dc9d264d43f51364df310081a3"}, + {file = "pydantic-1.10.19-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:573254d844f3e64093f72fcd922561d9c5696821ff0900a0db989d8c06ab0c25"}, + {file = "pydantic-1.10.19-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ff09600cebe957ecbb4a27496fe34c1d449e7957ed20a202d5029a71a8af2e35"}, + {file = "pydantic-1.10.19-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4739c206bfb6bb2bdc78dcd40bfcebb2361add4ceac6d170e741bb914e9eff0f"}, + {file = "pydantic-1.10.19-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0bfb5b378b78229119d66ced6adac2e933c67a0aa1d0a7adffbe432f3ec14ce4"}, + {file = "pydantic-1.10.19-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:7f31742c95e3f9443b8c6fa07c119623e61d76603be9c0d390bcf7e888acabcb"}, + {file = "pydantic-1.10.19-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:c6444368b651a14c2ce2fb22145e1496f7ab23cbdb978590d47c8d34a7bc0289"}, + {file = "pydantic-1.10.19-cp39-cp39-win_amd64.whl", hash = "sha256:945407f4d08cd12485757a281fca0e5b41408606228612f421aa4ea1b63a095d"}, + {file = "pydantic-1.10.19-py3-none-any.whl", hash = "sha256:2206a1752d9fac011e95ca83926a269fb0ef5536f7e053966d058316e24d929f"}, + {file = "pydantic-1.10.19.tar.gz", hash = "sha256:fea36c2065b7a1d28c6819cc2e93387b43dd5d3cf5a1e82d8132ee23f36d1f10"}, ] [package.dependencies] -typing-extensions = ">=4.1.0" +typing-extensions = ">=4.2.0" [package.extras] dotenv = ["python-dotenv (>=0.10.4)"] @@ -1696,5 +1703,5 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" -python-versions = "^3.10" -content-hash = "afc2100e737cb6233beebe68f013e0cbe32b04ef643cbddd9d5879dad61edf46" +python-versions = ">=3.10,<3.11" +content-hash = "f7eb6e4bc5c706ecc09426b6e77c1f0ec9c4e493fc00bb61cbfb1f39e75f8296" diff --git a/socketio/pyproject.toml b/socketio/pyproject.toml index d4e22c3..76be902 100644 --- a/socketio/pyproject.toml +++ b/socketio/pyproject.toml @@ -1,11 +1,11 @@ [tool.poetry] name = "service_queue_socketio" -version = "2.2.6" +version = "2.2.13" description = "" authors = ["Indoc Research"] [tool.poetry.dependencies] -python = "^3.10" +python = ">=3.10,<3.11" aio-pika = "^7.2.0" aiohttp = "^3.8.1" aiormq = "^6.2.3" @@ -26,7 +26,7 @@ requests = "^2.27.1" six = "^1.16.0" typing-extensions = "^4.2.0" yarl = "^1.7.2" -pydantic = "^1.9.0" +pydantic = "1.10.19" python-dotenv = "0.19.1" pilot-platform-common = "0.3.0" pre-commit = "^2.19.0" diff --git a/socketio/run.py b/socketio/run.py index c3c105d..721f252 100644 --- a/socketio/run.py +++ b/socketio/run.py @@ -10,8 +10,9 @@ from aiohttp import web from common import configure_logging from config import ConfigClass -from message_queue import MessageQueue from logger import logger +from message_queue import MessageQueue + import socketio configure_logging(ConfigClass.LOGGING_LEVEL, ConfigClass.LOGGING_FORMAT)