diff --git a/services/voting-node/Earthfile b/services/voting-node/Earthfile index 0b1d8c9fb5..79b3d5d432 100644 --- a/services/voting-node/Earthfile +++ b/services/voting-node/Earthfile @@ -43,12 +43,24 @@ deps: # Install package dependencies without the voting_node package RUN poetry install --only main --no-root RUN poetry self add poetry-plugin-export - + # Copy the voting_node source code COPY --dir voting_node README.md ./ SAVE ARTIFACT .venv .venv - SAVE IMAGE --cache-hint + +lock: + FROM +builder + + WORKDIR /src/services/voting-node + + COPY pyproject.toml . + COPY poetry.lock . + COPY ../../utilities/ideascale-importer+build/src /src/utilities/ideascale-importer + + RUN poetry lock + + SAVE ARTIFACT ./poetry.lock AS LOCAL poetry.lock # Build for distribution build: diff --git a/services/voting-node/blueprint.cue b/services/voting-node/blueprint.cue index 148c9baa27..2b368d1450 100644 --- a/services/voting-node/blueprint.cue +++ b/services/voting-node/blueprint.cue @@ -94,7 +94,7 @@ project: { GVC_API_URL: value: string | *"unused" IS_NODE_RELOADABLE: value: string | *"true" VOTING_HOST: value: string | *"0.0.0.0" - VOTING_PORT: value: string | *"8000" + VOTING_PORT: value: string | *"8080" VOTING_LOG_LEVEL: value: string | *"debug" JORM_PATH: value: string | *"jormungandr" JCLI_PATH: value: string | *"jcli" @@ -123,7 +123,7 @@ project: { } } ports: { - http: port: 8080 + metrics: port: 8080 } securityContext: {} } @@ -215,7 +215,9 @@ project: { } } - service: {} + service: { + scrape: true + } volumes: snapshot: { size: "1Gi" diff --git a/services/voting-node/entry.sh b/services/voting-node/entry.sh index 082fa986b6..04a735613e 100644 --- a/services/voting-node/entry.sh +++ b/services/voting-node/entry.sh @@ -139,28 +139,7 @@ export SSH_SNAPSHOT_TOOL_KEYFILE=/root/.ssh/id_snapshot # Sleep if DEBUG_SLEEP is set debug_sleep -# Define the command to be executed -CMD_TO_RUN="voting-node start" - -# Add $* to the command so that additional flags can be passed -ARGS=$* -CMD="$CMD_TO_RUN $ARGS" - -# Wait for DEBUG_SLEEP seconds if the DEBUG_SLEEP environment variable is set -if [ -n "${DEBUG_SLEEP:-}" ]; then - echo "DEBUG_SLEEP is set to ${DEBUG_SLEEP}. Sleeping..." - sleep "$DEBUG_SLEEP" -fi - echo ">>> Executing command..." # Expand the command with arguments and capture the exit code set +e -eval "$CMD" -EXIT_CODE=$? -set -e - -# If the exit code is 0, the Python executable returned successfully -if [ $EXIT_CODE -ne 0 ]; then - echo "Error: Python executable returned with exit code $EXIT_CODE" - exit 1 -fi +exec voting-node start "$@" diff --git a/services/voting-node/ideascale.json b/services/voting-node/ideascale.json new file mode 100644 index 0000000000..786562aeec --- /dev/null +++ b/services/voting-node/ideascale.json @@ -0,0 +1,43 @@ +{ + "proposals": { + "extra_field_mappings": { + "auto_translated": "auto_translated", + "brief": "challenge_brief", + "budget_breakdown": "please_provide_a_detailed_budget_breakdown", + "challenges_or_risks": "what_main_challenges_or_risks_do_you_foresee_to_deliver_this_project_successfully_", + "full_solution": "please_describe_your_proposed_solution", + "goal": "how_does_success_look_like_", + "how_solution_address_challenge": "please_describe_how_your_proposed_solution_will_address_the_challenge_", + "importance": "importance", + "metrics": "key_metrics_to_measure", + "new_proposal": "is_this_proposal_is_a_continuation_of_a_previously_funded_project_in_catalyst__or_an_entirely_new_o", + "progress_metrics": "what_will_you_measure_to_track_your_project_s_progress__and_how_will_you_measure_it_", + "relevant_link_1": "relevant_link_1", + "relevant_link_2": "website__github_repository__or_any_other_relevant_link__", + "relevant_link_3": "relevant_link_3", + "return_in_a_later_round": "if_you_are_funded__will_you_return_to_catalyst_in_a_later_round_for_further_funding__please_explain", + "sdg_rating": "sdg_rating", + "solution": "problem_solution", + "team_details": "please_provide_details_of_the_people_who_will_work_on_the_project_", + "timeline_and_key_milestones": "please_provide_a_detailed_plan__a_timeline__and_key_milestones_for_delivering_your_proposal_" + }, + "field_mappings": { + "funds": [ + "requested_funds", + "requested_funds_in_ada", + "requested_funds_coti" + ], + "proposer_relevant_experience": "relevant_experience", + "proposer_url": [ + "relevant_link_1", + "website__github_repository__or_any_other_relevant_link__", + "relevant_link_3" + ], + "public_key": "ada_payment_address__" + } + }, + "proposals_scores_csv": { + "id_field": "proposal_id", + "score_field": "Rating" + } +} \ No newline at end of file diff --git a/services/voting-node/poetry.lock b/services/voting-node/poetry.lock index 847fb7b322..4a5da3511f 100644 --- a/services/voting-node/poetry.lock +++ b/services/voting-node/poetry.lock @@ -1,12 +1,12 @@ -# This file is automatically @generated by Poetry 1.4.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.0.1 and should not be changed by hand. [[package]] name = "aiofile" version = "3.8.5" description = "Asynchronous file operations." -category = "main" optional = false python-versions = ">=3.7, <4" +groups = ["main"] files = [ {file = "aiofile-3.8.5-py3-none-any.whl", hash = "sha256:6644b61ab143a8e516920cdb02d5b46f89c0a37ef036417720f653b5ed31a8c9"}, {file = "aiofile-3.8.5.tar.gz", hash = "sha256:bb1ca0b2c4ef3b78f5012a2a3919a4151f873b6aabdc73a7b9b8e94edb2e01ae"}, @@ -22,9 +22,9 @@ develop = ["aiomisc-pytest", "coveralls", "pytest", "pytest-cov", "pytest-rst"] name = "aiohttp" version = "3.8.3" description = "Async http client/server framework (asyncio)" -category = "main" optional = false python-versions = ">=3.6" +groups = ["main"] files = [ {file = "aiohttp-3.8.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:ba71c9b4dcbb16212f334126cc3d8beb6af377f6703d9dc2d9fb3874fd667ee9"}, {file = "aiohttp-3.8.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d24b8bb40d5c61ef2d9b6a8f4528c2f17f1c5d2d31fed62ec860f6006142e83e"}, @@ -131,9 +131,9 @@ speedups = ["Brotli", "aiodns", "cchardet"] name = "aiosignal" version = "1.3.1" description = "aiosignal: a list of registered asynchronous callbacks" -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "aiosignal-1.3.1-py3-none-any.whl", hash = "sha256:f8376fb07dd1e86a584e4fcdec80b36b7f81aac666ebc724e2c090300dd83b17"}, {file = "aiosignal-1.3.1.tar.gz", hash = "sha256:54cd96e15e1649b75d6c87526a6ff0b6c1b0dd3459f43d9ca11d48c339b68cfc"}, @@ -146,9 +146,9 @@ frozenlist = ">=1.1.0" name = "annotated-types" version = "0.5.0" description = "Reusable constraint types to use with typing.Annotated" -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "annotated_types-0.5.0-py3-none-any.whl", hash = "sha256:58da39888f92c276ad970249761ebea80ba544b77acddaa1a4d6cf78287d45fd"}, {file = "annotated_types-0.5.0.tar.gz", hash = "sha256:47cdc3490d9ac1506ce92c7aaa76c579dc3509ff11e098fc867e5130ab7be802"}, @@ -158,9 +158,9 @@ files = [ name = "anyio" version = "3.6.2" description = "High level compatibility layer for multiple asynchronous event loop implementations" -category = "main" optional = false python-versions = ">=3.6.2" +groups = ["main"] files = [ {file = "anyio-3.6.2-py3-none-any.whl", hash = "sha256:fbbe32bd270d2a2ef3ed1c5d45041250284e31fc0a4df4a5a6071842051a51e3"}, {file = "anyio-3.6.2.tar.gz", hash = "sha256:25ea0d673ae30af41a0c442f81cf3b38c7e79fdc7b60335a4c14e05eb0947421"}, @@ -179,9 +179,9 @@ trio = ["trio (>=0.16,<0.22)"] name = "asgiref" version = "3.7.0" description = "ASGI specs, helper code, and adapters" -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "asgiref-3.7.0-py3-none-any.whl", hash = "sha256:14087924af5be5d8103d6f2edffe45a0bf7ab1b2a771b6f00a6db8c302f21f34"}, {file = "asgiref-3.7.0.tar.gz", hash = "sha256:5d6c4a8a1c99f58eaa3bc392ee04e3587b693f09e3af1f3f16a09094f334eb52"}, @@ -194,9 +194,9 @@ tests = ["mypy (>=0.800)", "pytest", "pytest-asyncio"] name = "async-timeout" version = "4.0.2" description = "Timeout context manager for asyncio programs" -category = "main" optional = false python-versions = ">=3.6" +groups = ["main"] files = [ {file = "async-timeout-4.0.2.tar.gz", hash = "sha256:2163e1640ddb52b7a8c80d0a67a08587e5d245cc9c553a74a847056bc2976b15"}, {file = "async_timeout-4.0.2-py3-none-any.whl", hash = "sha256:8ca1e4fcf50d07413d66d1a5e416e42cfdf5851c981d679a09851a6853383b3c"}, @@ -206,9 +206,9 @@ files = [ name = "asyncio" version = "3.4.3" description = "reference implementation of PEP 3156" -category = "main" optional = false python-versions = "*" +groups = ["main"] files = [ {file = "asyncio-3.4.3-cp33-none-win32.whl", hash = "sha256:b62c9157d36187eca799c378e572c969f0da87cd5fc42ca372d92cdb06e7e1de"}, {file = "asyncio-3.4.3-cp33-none-win_amd64.whl", hash = "sha256:c46a87b48213d7464f22d9a497b9eef8c1928b68320a2fa94240f969f6fec08c"}, @@ -220,9 +220,9 @@ files = [ name = "asyncpg" version = "0.27.0" description = "An asyncio PostgreSQL driver" -category = "main" optional = false python-versions = ">=3.7.0" +groups = ["main"] files = [ {file = "asyncpg-0.27.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:fca608d199ffed4903dce1bcd97ad0fe8260f405c1c225bdf0002709132171c2"}, {file = "asyncpg-0.27.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:20b596d8d074f6f695c13ffb8646d0b6bb1ab570ba7b0cfd349b921ff03cfc1e"}, @@ -271,9 +271,9 @@ test = ["flake8 (>=5.0.4,<5.1.0)", "uvloop (>=0.15.3)"] name = "asyncpg-stubs" version = "0.27.0" description = "asyncpg stubs" -category = "main" optional = false python-versions = ">=3.7,<4.0" +groups = ["main"] files = [ {file = "asyncpg_stubs-0.27.0-py3-none-any.whl", hash = "sha256:271ea4787dd0e61ff3bffdeb542204af0584c13488a50c318f511c98722ca9e6"}, {file = "asyncpg_stubs-0.27.0.tar.gz", hash = "sha256:2e805aeb2ed7b5577b70f7a6e95d5bf897a806a65726197bc15396378bb881d5"}, @@ -287,9 +287,9 @@ typing-extensions = ">=4.2.0,<5.0.0" name = "attrs" version = "22.1.0" description = "Classes Without Boilerplate" -category = "main" optional = false python-versions = ">=3.5" +groups = ["main"] files = [ {file = "attrs-22.1.0-py2.py3-none-any.whl", hash = "sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c"}, {file = "attrs-22.1.0.tar.gz", hash = "sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6"}, @@ -305,9 +305,9 @@ tests-no-zope = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy name = "backoff" version = "2.2.1" description = "Function decoration for backoff and retry" -category = "main" optional = false python-versions = ">=3.7,<4.0" +groups = ["main"] files = [ {file = "backoff-2.2.1-py3-none-any.whl", hash = "sha256:63579f9a0628e06278f7e47b7d7d5b6ce20dc65c5e96a6f3ca99a6adca0396e8"}, {file = "backoff-2.2.1.tar.gz", hash = "sha256:03f829f5bb1923180821643f8753b0502c3b682293992485b0eef2807afa5cba"}, @@ -317,9 +317,9 @@ files = [ name = "beautifulsoup4" version = "4.11.1" description = "Screen-scraping library" -category = "main" optional = false python-versions = ">=3.6.0" +groups = ["main"] files = [ {file = "beautifulsoup4-4.11.1-py3-none-any.whl", hash = "sha256:58d5c3d29f5a36ffeb94f02f0d786cd53014cf9b3b3951d42e0080d8a9498d30"}, {file = "beautifulsoup4-4.11.1.tar.gz", hash = "sha256:ad9aa55b65ef2808eb405f46cf74df7fcb7044d5cbc26487f96eb2ef2e436693"}, @@ -336,9 +336,9 @@ lxml = ["lxml"] name = "black" version = "23.3.0" description = "The uncompromising code formatter." -category = "dev" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "black-23.3.0-cp310-cp310-macosx_10_16_arm64.whl", hash = "sha256:0945e13506be58bf7db93ee5853243eb368ace1c08a24c65ce108986eac65915"}, {file = "black-23.3.0-cp310-cp310-macosx_10_16_universal2.whl", hash = "sha256:67de8d0c209eb5b330cce2469503de11bca4085880d62f1628bd9972cc3366b9"}, @@ -384,9 +384,9 @@ uvloop = ["uvloop (>=0.15.2)"] name = "brotlipy" version = "0.7.0" description = "Python binding to the Brotli library" -category = "main" optional = false python-versions = "*" +groups = ["main"] files = [ {file = "brotlipy-0.7.0-cp27-cp27m-macosx_10_6_intel.whl", hash = "sha256:af65d2699cb9f13b26ec3ba09e75e80d31ff422c03675fcb36ee4dabe588fdc2"}, {file = "brotlipy-0.7.0-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:50ca336374131cfad20612f26cc43c637ac0bfd2be3361495e99270883b52962"}, @@ -443,9 +443,9 @@ cffi = ">=1.0.0" name = "caio" version = "0.9.12" description = "Asynchronous file IO for Linux MacOS or Windows." -category = "main" optional = false python-versions = ">=3.7, <4" +groups = ["main"] files = [ {file = "caio-0.9.12-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:df395e7e1c2025b3f32dbeff20a8b6491959fac8fbd5a9c2d452bf1f5c0ca2bf"}, {file = "caio-0.9.12-cp310-cp310-macosx_11_0_x86_64.whl", hash = "sha256:acd31b7828c6683bc46e467a32359f08c686d4c25a7e645c029a07c36685fea7"}, @@ -477,9 +477,9 @@ develop = ["aiomisc-pytest", "pytest", "pytest-cov"] name = "certifi" version = "2023.5.7" description = "Python package for providing Mozilla's CA Bundle." -category = "main" optional = false python-versions = ">=3.6" +groups = ["main"] files = [ {file = "certifi-2023.5.7-py3-none-any.whl", hash = "sha256:c6c2e98f5c7869efca1f8916fed228dd91539f9f1b444c314c06eef02980c716"}, {file = "certifi-2023.5.7.tar.gz", hash = "sha256:0f0d56dc5a6ad56fd4ba36484d6cc34451e1c6548c61daad8c320169f91eddc7"}, @@ -489,9 +489,9 @@ files = [ name = "cffi" version = "1.15.1" description = "Foreign Function Interface for Python calling C code." -category = "main" optional = false python-versions = "*" +groups = ["main"] files = [ {file = "cffi-1.15.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2"}, {file = "cffi-1.15.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:470c103ae716238bbe698d67ad020e1db9d9dba34fa5a899b5e21577e6d52ed2"}, @@ -566,9 +566,9 @@ pycparser = "*" name = "charset-normalizer" version = "2.1.1" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." -category = "main" optional = false python-versions = ">=3.6.0" +groups = ["main"] files = [ {file = "charset-normalizer-2.1.1.tar.gz", hash = "sha256:5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845"}, {file = "charset_normalizer-2.1.1-py3-none-any.whl", hash = "sha256:83e9a75d1911279afd89352c68b45348559d1fc0506b054b346651b5e7fee29f"}, @@ -581,9 +581,9 @@ unicode-backport = ["unicodedata2"] name = "click" version = "8.1.3" description = "Composable command line interface toolkit" -category = "main" optional = false python-versions = ">=3.7" +groups = ["main", "dev"] files = [ {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"}, {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"}, @@ -596,9 +596,10 @@ colorama = {version = "*", markers = "platform_system == \"Windows\""} name = "colorama" version = "0.4.6" description = "Cross-platform colored terminal text." -category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +groups = ["main", "dev"] +markers = "platform_system == \"Windows\" or sys_platform == \"win32\"" files = [ {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, @@ -608,9 +609,9 @@ files = [ name = "commonmark" version = "0.9.1" description = "Python parser for the CommonMark Markdown spec" -category = "main" optional = false python-versions = "*" +groups = ["main"] files = [ {file = "commonmark-0.9.1-py2.py3-none-any.whl", hash = "sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9"}, {file = "commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60"}, @@ -623,9 +624,9 @@ test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] name = "cryptography" version = "40.0.2" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." -category = "main" optional = false python-versions = ">=3.6" +groups = ["main"] files = [ {file = "cryptography-40.0.2-cp36-abi3-macosx_10_12_universal2.whl", hash = "sha256:8f79b5ff5ad9d3218afb1e7e20ea74da5f76943ee5edb7f76e56ec5161ec782b"}, {file = "cryptography-40.0.2-cp36-abi3-macosx_10_12_x86_64.whl", hash = "sha256:05dc219433b14046c476f6f09d7636b92a1c3e5808b9a6536adf4932b3b2c440"}, @@ -665,9 +666,9 @@ tox = ["tox"] name = "deprecated" version = "1.2.13" description = "Python @deprecated decorator to deprecate old python classes, functions or methods." -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +groups = ["main"] files = [ {file = "Deprecated-1.2.13-py2.py3-none-any.whl", hash = "sha256:64756e3e14c8c5eea9795d93c524551432a0be75629f8f29e67ab8caf076c76d"}, {file = "Deprecated-1.2.13.tar.gz", hash = "sha256:43ac5335da90c31c24ba028af536a91d41d53f9e6901ddb021bcc572ce44e38d"}, @@ -683,9 +684,9 @@ dev = ["PyTest", "PyTest (<5)", "PyTest-Cov", "PyTest-Cov (<2.6)", "bump2version name = "et-xmlfile" version = "1.1.0" description = "An implementation of lxml.xmlfile for the standard library" -category = "main" optional = false python-versions = ">=3.6" +groups = ["main"] files = [ {file = "et_xmlfile-1.1.0-py3-none-any.whl", hash = "sha256:a2ba85d1d6a74ef63837eed693bcb89c3f752169b0e3e7ae5b16ca5e1b3deada"}, {file = "et_xmlfile-1.1.0.tar.gz", hash = "sha256:8eb9e2bc2f8c97e37a2dc85a09ecdcdec9d8a396530a6d5a33b30b9a92da0c5c"}, @@ -695,9 +696,9 @@ files = [ name = "fastapi" version = "0.101.0" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "fastapi-0.101.0-py3-none-any.whl", hash = "sha256:494eb3494d89e8079c20859d7ca695f66eaccc40f46fe8c75ab6186d15f05ffd"}, {file = "fastapi-0.101.0.tar.gz", hash = "sha256:ca2ae65fe42f6a34b5cf6c994337149154b1b400c39809d7b2dccdceb5ae77af"}, @@ -715,9 +716,9 @@ all = ["email-validator (>=2.0.0)", "httpx (>=0.23.0)", "itsdangerous (>=1.1.0)" name = "frozenlist" version = "1.3.3" description = "A list-like structure which implements collections.abc.MutableSequence" -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "frozenlist-1.3.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:ff8bf625fe85e119553b5383ba0fb6aa3d0ec2ae980295aaefa552374926b3f4"}, {file = "frozenlist-1.3.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:dfbac4c2dfcc082fcf8d942d1e49b6aa0766c19d3358bd86e2000bf0fa4a9cf0"}, @@ -799,9 +800,9 @@ files = [ name = "googleapis-common-protos" version = "1.59.0" description = "Common protobufs used in Google APIs" -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "googleapis-common-protos-1.59.0.tar.gz", hash = "sha256:4168fcb568a826a52f23510412da405abd93f4d23ba544bb68d943b14ba3cb44"}, {file = "googleapis_common_protos-1.59.0-py2.py3-none-any.whl", hash = "sha256:b287dc48449d1d41af0c69f4ea26242b5ae4c3d7249a38b0984c86a4caffff1f"}, @@ -817,9 +818,9 @@ grpc = ["grpcio (>=1.44.0,<2.0.0dev)"] name = "grpcio" version = "1.54.2" description = "HTTP/2-based RPC framework" -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "grpcio-1.54.2-cp310-cp310-linux_armv7l.whl", hash = "sha256:40e1cbf69d6741b40f750f3cccc64326f927ac6145a9914d33879e586002350c"}, {file = "grpcio-1.54.2-cp310-cp310-macosx_12_0_universal2.whl", hash = "sha256:2288d76e4d4aa7ef3fe7a73c1c470b66ea68e7969930e746a8cd8eca6ef2a2ea"}, @@ -875,9 +876,9 @@ protobuf = ["grpcio-tools (>=1.54.2)"] name = "h11" version = "0.14.0" description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, @@ -887,9 +888,9 @@ files = [ name = "httptools" version = "0.5.0" description = "A collection of framework independent HTTP protocol utils." -category = "main" optional = false python-versions = ">=3.5.0" +groups = ["main"] files = [ {file = "httptools-0.5.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:8f470c79061599a126d74385623ff4744c4e0f4a0997a353a44923c0b561ee51"}, {file = "httptools-0.5.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e90491a4d77d0cb82e0e7a9cb35d86284c677402e4ce7ba6b448ccc7325c5421"}, @@ -941,9 +942,9 @@ test = ["Cython (>=0.29.24,<0.30.0)"] name = "ideascale-importer" version = "0.4.1" description = "" -category = "main" optional = false python-versions = "^3.11" +groups = ["main"] files = [] develop = false @@ -975,6 +976,7 @@ pygments = "2.13.0" rich = "^13.3.4" six = "1.16.0" soupsieve = "2.3.2.post1" +strict-rfc3339 = "^0.7" tomli = "2.0.1" typeguard = "2.13.3" typer = "0.7.0" @@ -990,9 +992,9 @@ url = "../../utilities/ideascale-importer" name = "idna" version = "3.4" description = "Internationalized Domain Names in Applications (IDNA)" -category = "main" optional = false python-versions = ">=3.5" +groups = ["main"] files = [ {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, @@ -1002,9 +1004,9 @@ files = [ name = "iniconfig" version = "2.0.0" description = "brain-dead simple config-ini parsing" -category = "dev" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, @@ -1014,9 +1016,9 @@ files = [ name = "jinja2" version = "3.1.2" description = "A very fast and expressive template engine." -category = "dev" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, @@ -1032,9 +1034,9 @@ i18n = ["Babel (>=2.7)"] name = "loguru" version = "0.6.0" description = "Python logging made (stupidly) simple" -category = "main" optional = false python-versions = ">=3.5" +groups = ["main"] files = [ {file = "loguru-0.6.0-py3-none-any.whl", hash = "sha256:4e2414d534a2ab57573365b3e6d0234dfb1d84b68b7f3b948e6fb743860a77c3"}, {file = "loguru-0.6.0.tar.gz", hash = "sha256:066bd06758d0a513e9836fd9c6b5a75bfb3fd36841f4b996bc60b547a309d41c"}, @@ -1051,9 +1053,9 @@ dev = ["Sphinx (>=4.1.1)", "black (>=19.10b0)", "colorama (>=0.3.4)", "docutils name = "lxml" version = "4.9.3" description = "Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API." -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, != 3.4.*" +groups = ["main"] files = [ {file = "lxml-4.9.3-cp27-cp27m-macosx_11_0_x86_64.whl", hash = "sha256:b0a545b46b526d418eb91754565ba5b63b1c0b12f9bd2f808c852d9b4b2f9b5c"}, {file = "lxml-4.9.3-cp27-cp27m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:075b731ddd9e7f68ad24c635374211376aa05a281673ede86cbe1d1b3455279d"}, @@ -1159,9 +1161,9 @@ source = ["Cython (>=0.29.35)"] name = "markdown-it-py" version = "3.0.0" description = "Python port of markdown-it. Markdown parsing, done right!" -category = "main" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "markdown-it-py-3.0.0.tar.gz", hash = "sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb"}, {file = "markdown_it_py-3.0.0-py3-none-any.whl", hash = "sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1"}, @@ -1184,9 +1186,9 @@ testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"] name = "markdownify" version = "0.11.6" description = "Convert HTML to markdown." -category = "main" optional = false python-versions = "*" +groups = ["main"] files = [ {file = "markdownify-0.11.6-py3-none-any.whl", hash = "sha256:ba35fe289d5e9073bcd7d2cad629278fe25f1a93741fcdc0bfb4f009076d8324"}, {file = "markdownify-0.11.6.tar.gz", hash = "sha256:009b240e0c9f4c8eaf1d085625dcd4011e12f0f8cec55dedf9ea6f7655e49bfe"}, @@ -1200,9 +1202,9 @@ six = ">=1.15,<2" name = "markupsafe" version = "2.1.2" description = "Safely add untrusted strings to HTML/XML markup." -category = "dev" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "MarkupSafe-2.1.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:665a36ae6f8f20a4676b53224e33d456a6f5a72657d9c83c2aa00765072f31f7"}, {file = "MarkupSafe-2.1.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:340bea174e9761308703ae988e982005aedf427de816d1afe98147668cc03036"}, @@ -1260,9 +1262,9 @@ files = [ name = "mccabe" version = "0.7.0" description = "McCabe checker, plugin for flake8" -category = "main" optional = false python-versions = ">=3.6" +groups = ["main"] files = [ {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, @@ -1272,9 +1274,9 @@ files = [ name = "mdurl" version = "0.1.2" description = "Markdown URL utilities" -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8"}, {file = "mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba"}, @@ -1284,9 +1286,9 @@ files = [ name = "multidict" version = "6.0.3" description = "multidict implementation" -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "multidict-6.0.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:73009ea04205966d47e16d98686ac5c438af23a1bb30b48a2c5da3423ec9ce37"}, {file = "multidict-6.0.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:8b92a9f3ab904397a33b193000dc4de7318ea175c4c460a1e154c415f9008e3d"}, @@ -1368,9 +1370,9 @@ files = [ name = "mypy-extensions" version = "1.0.0" description = "Type system extensions for programs checked with the mypy type checker." -category = "main" optional = false python-versions = ">=3.5" +groups = ["main", "dev"] files = [ {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, @@ -1380,9 +1382,9 @@ files = [ name = "openpyxl" version = "3.1.2" description = "A Python library to read/write Excel 2010 xlsx/xlsm files" -category = "main" optional = false python-versions = ">=3.6" +groups = ["main"] files = [ {file = "openpyxl-3.1.2-py2.py3-none-any.whl", hash = "sha256:f91456ead12ab3c6c2e9491cf33ba6d08357d802192379bb482f1033ade496f5"}, {file = "openpyxl-3.1.2.tar.gz", hash = "sha256:a6f5977418eff3b2d5500d54d9db50c8277a368436f4e4f8ddb1be3422870184"}, @@ -1395,9 +1397,9 @@ et-xmlfile = "*" name = "opentelemetry-api" version = "1.16.0" description = "OpenTelemetry Python API" -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "opentelemetry_api-1.16.0-py3-none-any.whl", hash = "sha256:79e8f0cf88dbdd36b6abf175d2092af1efcaa2e71552d0d2b3b181a9707bf4bc"}, {file = "opentelemetry_api-1.16.0.tar.gz", hash = "sha256:4b0e895a3b1f5e1908043ebe492d33e33f9ccdbe6d02d3994c2f8721a63ddddb"}, @@ -1411,9 +1413,9 @@ setuptools = ">=16.0" name = "opentelemetry-distro" version = "0.37b0" description = "OpenTelemetry Python Distro" -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "opentelemetry_distro-0.37b0-py3-none-any.whl", hash = "sha256:79bf622c7996d09e7f79918f4e65c8122a0ffdf208aaa08d8a5a784fd771cfd5"}, {file = "opentelemetry_distro-0.37b0.tar.gz", hash = "sha256:9eecc4eceea0220ba880539a06d50bac49ac3c4dc65ed8896d2dc695513cbdea"}, @@ -1432,9 +1434,9 @@ otlp = ["opentelemetry-exporter-otlp (==1.16.0)"] name = "opentelemetry-exporter-otlp" version = "1.16.0" description = "OpenTelemetry Collector Exporters" -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "opentelemetry_exporter_otlp-1.16.0-py3-none-any.whl", hash = "sha256:e1a91a267afb7ae0196cb25ed0bc0a991ff5d9f3d6b3a7ff7c0bce57be2d72d5"}, {file = "opentelemetry_exporter_otlp-1.16.0.tar.gz", hash = "sha256:5d76b4a44aa5c11e93b9280eaf93ae497557cf01046485ec1c7bfb2c492dabc4"}, @@ -1448,9 +1450,9 @@ opentelemetry-exporter-otlp-proto-http = "1.16.0" name = "opentelemetry-exporter-otlp-proto-grpc" version = "1.16.0" description = "OpenTelemetry Collector Protobuf over gRPC Exporter" -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "opentelemetry_exporter_otlp_proto_grpc-1.16.0-py3-none-any.whl", hash = "sha256:ace2cedc43bc30e1b2475b14f72acf1a1528716965209d31fb0a72c59f0f4fe4"}, {file = "opentelemetry_exporter_otlp_proto_grpc-1.16.0.tar.gz", hash = "sha256:0853ea1e566c1fab5633e7f7bca2a650ba445b04ba02f93173920b0f5c561f63"}, @@ -1471,9 +1473,9 @@ test = ["pytest-grpc"] name = "opentelemetry-exporter-otlp-proto-http" version = "1.16.0" description = "OpenTelemetry Collector Protobuf over HTTP Exporter" -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "opentelemetry_exporter_otlp_proto_http-1.16.0-py3-none-any.whl", hash = "sha256:f27cabd0e071fb8cc258bcaaad51b0c228fef1156bf6e6b1f9ae738881d9bf51"}, {file = "opentelemetry_exporter_otlp_proto_http-1.16.0.tar.gz", hash = "sha256:d7f14ae8b41b3606ee3e4ab12d42cb48610d8419f1d8b92c7d3ff5813c7a10d7"}, @@ -1494,9 +1496,9 @@ test = ["responses (==0.22.0)"] name = "opentelemetry-instrumentation" version = "0.37b0" description = "Instrumentation Tools & Auto Instrumentation for OpenTelemetry Python" -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "opentelemetry_instrumentation-0.37b0-py3-none-any.whl", hash = "sha256:0dbd4d869608667b9dfaf39914312c5979370d5fc5faa36678f5e25fa54f045b"}, {file = "opentelemetry_instrumentation-0.37b0.tar.gz", hash = "sha256:2a172a7ef8d35332f24a97caf6b7b62fe418a48cf841ae2bcdaed338fea37b41"}, @@ -1511,9 +1513,9 @@ wrapt = ">=1.0.0,<2.0.0" name = "opentelemetry-instrumentation-asgi" version = "0.37b0" description = "ASGI instrumentation for OpenTelemetry" -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "opentelemetry_instrumentation_asgi-0.37b0-py3-none-any.whl", hash = "sha256:71ded26c8425b2f44573a2a1ef0b41941436e0b4d1e91067d84ef6ebc1bba49f"}, {file = "opentelemetry_instrumentation_asgi-0.37b0.tar.gz", hash = "sha256:b8557d8823a04e083aae18f285a4c2ed75746acf9f2e63e44778f2aa8942af02"}, @@ -1534,9 +1536,9 @@ test = ["opentelemetry-instrumentation-asgi[instruments]", "opentelemetry-test-u name = "opentelemetry-instrumentation-asyncpg" version = "0.37b0" description = "OpenTelemetry instrumentation for AsyncPG" -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "opentelemetry_instrumentation_asyncpg-0.37b0-py3-none-any.whl", hash = "sha256:2dafda981c406b360fe9e646495670fe51c051fbd37c7ffb83831de02beeafab"}, {file = "opentelemetry_instrumentation_asyncpg-0.37b0.tar.gz", hash = "sha256:da509a97047eb3058ff20091e2d1089242da99cd3cc7090a9d7b6a34fb5a49ff"}, @@ -1555,9 +1557,9 @@ test = ["opentelemetry-instrumentation-asyncpg[instruments]", "opentelemetry-tes name = "opentelemetry-instrumentation-fastapi" version = "0.37b0" description = "OpenTelemetry FastAPI Instrumentation" -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "opentelemetry_instrumentation_fastapi-0.37b0-py3-none-any.whl", hash = "sha256:dc983910d9c582addb934f051848158cf0155f4ccca83b5cc10904991c4d429c"}, {file = "opentelemetry_instrumentation_fastapi-0.37b0.tar.gz", hash = "sha256:84e50dc92b3ae65f4e18d0cad6538db267690361a55644553a5f3b32f64e2de9"}, @@ -1578,9 +1580,9 @@ test = ["httpx (>=0.22,<1.0)", "opentelemetry-instrumentation-fastapi[instrument name = "opentelemetry-proto" version = "1.16.0" description = "OpenTelemetry Python Proto" -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "opentelemetry_proto-1.16.0-py3-none-any.whl", hash = "sha256:160326d300faf43c3f72c4a916516ee5b63289ceb9828294b698ef943697cbd5"}, {file = "opentelemetry_proto-1.16.0.tar.gz", hash = "sha256:e58832dfec64621972a9836f8ae163fb3063946eb02bdf43fae0f76f8cf46d0a"}, @@ -1593,9 +1595,9 @@ protobuf = ">=3.19,<5.0" name = "opentelemetry-sdk" version = "1.16.0" description = "OpenTelemetry Python SDK" -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "opentelemetry_sdk-1.16.0-py3-none-any.whl", hash = "sha256:15f03915eec4839f885a5e6ed959cde59b8690c8c012d07c95b4b138c98dc43f"}, {file = "opentelemetry_sdk-1.16.0.tar.gz", hash = "sha256:4d3bb91e9e209dbeea773b5565d901da4f76a29bf9dbc1c9500be3cabb239a4e"}, @@ -1611,9 +1613,9 @@ typing-extensions = ">=3.7.4" name = "opentelemetry-semantic-conventions" version = "0.37b0" description = "OpenTelemetry Semantic Conventions" -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "opentelemetry_semantic_conventions-0.37b0-py3-none-any.whl", hash = "sha256:462982278a42dab01f68641cd89f8460fe1f93e87c68a012a76fb426dcdba5ee"}, {file = "opentelemetry_semantic_conventions-0.37b0.tar.gz", hash = "sha256:087ce2e248e42f3ffe4d9fa2303111de72bb93baa06a0f4655980bc1557c4228"}, @@ -1623,9 +1625,9 @@ files = [ name = "opentelemetry-util-http" version = "0.37b0" description = "Web util for OpenTelemetry" -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "opentelemetry_util_http-0.37b0-py3-none-any.whl", hash = "sha256:6d3ddba5429918dc3a3e250858a819dad617a4a415f16b6ca6531065501f342a"}, {file = "opentelemetry_util_http-0.37b0.tar.gz", hash = "sha256:591a5332db31bb6056ef2741c435e38ad4979d3c595b20b4c4dd62cbf1693524"}, @@ -1635,9 +1637,9 @@ files = [ name = "packaging" version = "22.0" description = "Core utilities for Python packages" -category = "main" optional = false python-versions = ">=3.7" +groups = ["main", "dev"] files = [ {file = "packaging-22.0-py3-none-any.whl", hash = "sha256:957e2148ba0e1a3b282772e791ef1d8083648bc131c8ab0c1feba110ce1146c3"}, {file = "packaging-22.0.tar.gz", hash = "sha256:2198ec20bd4c017b8f9717e00f0c8714076fc2fd93816750ab48e2c41de2cfd3"}, @@ -1647,9 +1649,9 @@ files = [ name = "pathspec" version = "0.11.1" description = "Utility library for gitignore style pattern matching of file paths." -category = "dev" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "pathspec-0.11.1-py3-none-any.whl", hash = "sha256:d8af70af76652554bd134c22b3e8a1cc46ed7d91edcdd721ef1a0c51a84a5293"}, {file = "pathspec-0.11.1.tar.gz", hash = "sha256:2798de800fa92780e33acca925945e9a19a133b715067cf165b8866c15a31687"}, @@ -1659,9 +1661,9 @@ files = [ name = "pdoc" version = "13.1.1" description = "API Documentation for Python Projects" -category = "dev" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "pdoc-13.1.1-py3-none-any.whl", hash = "sha256:9025c6cd2448b18662e88eacf84c6eb050dcbdc8ee5259aee5e40a1c2b417840"}, {file = "pdoc-13.1.1.tar.gz", hash = "sha256:2b8e341b1882ed8217e95c1f3f1f11d34f9ef93a5796287590162e2035296815"}, @@ -1679,9 +1681,9 @@ dev = ["black", "hypothesis", "mypy", "pygments (>=2.14.0)", "pytest", "pytest-c name = "platformdirs" version = "3.5.1" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -category = "dev" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "platformdirs-3.5.1-py3-none-any.whl", hash = "sha256:e2378146f1964972c03c085bb5662ae80b2b8c06226c54b2ff4aa9483e8a13a5"}, {file = "platformdirs-3.5.1.tar.gz", hash = "sha256:412dae91f52a6f84830f39a8078cecd0e866cb72294a5c66808e74d5e88d251f"}, @@ -1695,9 +1697,9 @@ test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.3.1)", "pytest- name = "pluggy" version = "1.2.0" description = "plugin and hook calling mechanisms for python" -category = "dev" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "pluggy-1.2.0-py3-none-any.whl", hash = "sha256:c2fd55a7d7a3863cba1a013e4e2414658b1d07b6bc57b3919e0c63c9abb99849"}, {file = "pluggy-1.2.0.tar.gz", hash = "sha256:d12f0c4b579b15f5e054301bb226ee85eeeba08ffec228092f8defbaa3a4c4b3"}, @@ -1709,14 +1711,14 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "prometheus-client" -version = "0.16.0" +version = "0.17.1" description = "Python client for the Prometheus monitoring system." -category = "main" optional = false python-versions = ">=3.6" +groups = ["main"] files = [ - {file = "prometheus_client-0.16.0-py3-none-any.whl", hash = "sha256:0836af6eb2c8f4fed712b2f279f6c0a8bbab29f9f4aa15276b91c7cb0d1616ab"}, - {file = "prometheus_client-0.16.0.tar.gz", hash = "sha256:a03e35b359f14dd1630898543e2120addfdeacd1a6069c1367ae90fd93ad3f48"}, + {file = "prometheus_client-0.17.1-py3-none-any.whl", hash = "sha256:e537f37160f6807b8202a6fc4764cdd19bac5480ddd3e0d463c3002b34462101"}, + {file = "prometheus_client-0.17.1.tar.gz", hash = "sha256:21e674f39831ae3f8acde238afd9a27a37d0d2fb5a28ea094f0ce25d2cbf2091"}, ] [package.extras] @@ -1726,9 +1728,9 @@ twisted = ["twisted"] name = "prometheus-fastapi-instrumentator" version = "5.11.2" description = "Instrument your FastAPI with Prometheus metrics." -category = "main" optional = false python-versions = ">=3.7.0,<4.0.0" +groups = ["main"] files = [ {file = "prometheus_fastapi_instrumentator-5.11.2-py3-none-any.whl", hash = "sha256:c84ae3dc98bebb44f29d0af0c17c9f0782c2fb964ef83353664d9858a632cf81"}, {file = "prometheus_fastapi_instrumentator-5.11.2.tar.gz", hash = "sha256:9d8d0df8de7d6a73ae387121629dbf32fe022cdfc63e8bacd51f4b8ff21059ea"}, @@ -1742,9 +1744,9 @@ prometheus-client = ">=0.8.0,<1.0.0" name = "protobuf" version = "4.23.1" description = "" -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "protobuf-4.23.1-cp310-abi3-win32.whl", hash = "sha256:410bcc0a5b279f634d3e16082ce221dfef7c3392fac723500e2e64d1806dd2be"}, {file = "protobuf-4.23.1-cp310-abi3-win_amd64.whl", hash = "sha256:32e78beda26d7a101fecf15d7a4a792278a0d26a31bc327ff05564a9d68ab8ee"}, @@ -1765,9 +1767,9 @@ files = [ name = "pycodestyle" version = "2.10.0" description = "Python style guide checker" -category = "main" optional = false python-versions = ">=3.6" +groups = ["main"] files = [ {file = "pycodestyle-2.10.0-py2.py3-none-any.whl", hash = "sha256:8a4eaf0d0495c7395bdab3589ac2db602797d76207242c17d470186815706610"}, {file = "pycodestyle-2.10.0.tar.gz", hash = "sha256:347187bdb476329d98f695c213d7295a846d1152ff4fe9bacb8a9590b8ee7053"}, @@ -1777,9 +1779,9 @@ files = [ name = "pycparser" version = "2.21" description = "C parser in Python" -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +groups = ["main"] files = [ {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, @@ -1789,9 +1791,9 @@ files = [ name = "pydantic" version = "2.1.1" description = "Data validation using Python type hints" -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "pydantic-2.1.1-py3-none-any.whl", hash = "sha256:43bdbf359d6304c57afda15c2b95797295b702948082d4c23851ce752f21da70"}, {file = "pydantic-2.1.1.tar.gz", hash = "sha256:22d63db5ce4831afd16e7c58b3192d3faf8f79154980d9397d9867254310ba4b"}, @@ -1809,9 +1811,9 @@ email = ["email-validator (>=2.0.0)"] name = "pydantic-core" version = "2.4.0" description = "" -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "pydantic_core-2.4.0-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:2ca4687dd996bde7f3c420def450797feeb20dcee2b9687023e3323c73fc14a2"}, {file = "pydantic_core-2.4.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:782fced7d61469fd1231b184a80e4f2fa7ad54cd7173834651a453f96f29d673"}, @@ -1923,9 +1925,9 @@ typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" name = "pyflakes" version = "3.0.1" description = "passive checker of Python programs" -category = "main" optional = false python-versions = ">=3.6" +groups = ["main"] files = [ {file = "pyflakes-3.0.1-py2.py3-none-any.whl", hash = "sha256:ec55bf7fe21fff7f1ad2f7da62363d749e2a470500eab1b555334b67aa1ef8cf"}, {file = "pyflakes-3.0.1.tar.gz", hash = "sha256:ec8b276a6b60bd80defed25add7e439881c19e64850afd9b346283d4165fd0fd"}, @@ -1935,9 +1937,9 @@ files = [ name = "pygments" version = "2.13.0" description = "Pygments is a syntax highlighting package written in Python." -category = "main" optional = false python-versions = ">=3.6" +groups = ["main", "dev"] files = [ {file = "Pygments-2.13.0-py3-none-any.whl", hash = "sha256:f643f331ab57ba3c9d89212ee4a2dabc6e94f117cf4eefde99a0574720d14c42"}, {file = "Pygments-2.13.0.tar.gz", hash = "sha256:56a8508ae95f98e2b9bdf93a6be5ae3f7d8af858b43e02c5a2ff083726be40c1"}, @@ -1950,9 +1952,9 @@ plugins = ["importlib-metadata"] name = "pytest" version = "7.4.0" description = "pytest: simple powerful testing with Python" -category = "dev" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "pytest-7.4.0-py3-none-any.whl", hash = "sha256:78bf16451a2eb8c7a2ea98e32dc119fd2aa758f1d5d66dbf0a59d69a3969df32"}, {file = "pytest-7.4.0.tar.gz", hash = "sha256:b4bf8c45bd59934ed84001ad51e11b4ee40d40a1229d2c79f9c592b0a3f6bd8a"}, @@ -1971,9 +1973,9 @@ testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "no name = "pytest-asyncio" version = "0.21.1" description = "Pytest support for asyncio" -category = "dev" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "pytest-asyncio-0.21.1.tar.gz", hash = "sha256:40a7eae6dded22c7b604986855ea48400ab15b069ae38116e8c01238e9eeb64d"}, {file = "pytest_asyncio-0.21.1-py3-none-any.whl", hash = "sha256:8666c1c8ac02631d7c51ba282e0c69a8a452b211ffedf2599099845da5c5c37b"}, @@ -1990,9 +1992,9 @@ testing = ["coverage (>=6.2)", "flaky (>=3.5.0)", "hypothesis (>=5.7.1)", "mypy name = "python-dotenv" version = "1.0.0" description = "Read key-value pairs from a .env file and set them as environment variables" -category = "main" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "python-dotenv-1.0.0.tar.gz", hash = "sha256:a8df96034aae6d2d50a4ebe8216326c61c3eb64836776504fcca410e5937a3ba"}, {file = "python_dotenv-1.0.0-py3-none-any.whl", hash = "sha256:f5971a9226b701070a4bf2c38c89e5a3f0d64de8debda981d1db98583009122a"}, @@ -2005,9 +2007,9 @@ cli = ["click (>=5.0)"] name = "pyyaml" version = "6.0" description = "YAML parser and emitter for Python" -category = "main" optional = false python-versions = ">=3.6" +groups = ["main"] files = [ {file = "PyYAML-6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d4db7c7aef085872ef65a8fd7d6d09a14ae91f691dec3e87ee5ee0539d516f53"}, {file = "PyYAML-6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9df7ed3b3d2e0ecfe09e14741b857df43adb5a3ddadc919a2d94fbdf78fea53c"}, @@ -2055,9 +2057,9 @@ files = [ name = "requests" version = "2.31.0" description = "Python HTTP for Humans." -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"}, {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"}, @@ -2077,9 +2079,9 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] name = "rich" version = "13.5.2" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" -category = "main" optional = false python-versions = ">=3.7.0" +groups = ["main"] files = [ {file = "rich-13.5.2-py3-none-any.whl", hash = "sha256:146a90b3b6b47cac4a73c12866a499e9817426423f57c5a66949c086191a8808"}, {file = "rich-13.5.2.tar.gz", hash = "sha256:fb9d6c0a0f643c99eed3875b5377a184132ba9be4d61516a55273d3554d75a39"}, @@ -2096,9 +2098,9 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"] name = "ruff" version = "0.0.254" description = "An extremely fast Python linter, written in Rust." -category = "dev" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "ruff-0.0.254-py3-none-macosx_10_7_x86_64.whl", hash = "sha256:dd58c500d039fb381af8d861ef456c3e94fd6855c3d267d6c6718c9a9fe07be0"}, {file = "ruff-0.0.254-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:688379050ae05394a6f9f9c8471587fd5dcf22149bd4304a4ede233cc4ef89a1"}, @@ -2123,9 +2125,9 @@ files = [ name = "setuptools" version = "67.8.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "setuptools-67.8.0-py3-none-any.whl", hash = "sha256:5df61bf30bb10c6f756eb19e7c9f3b473051f48db77fddbe06ff2ca307df9a6f"}, {file = "setuptools-67.8.0.tar.gz", hash = "sha256:62642358adc77ffa87233bc4d2354c4b2682d214048f500964dbe760ccedf102"}, @@ -2140,9 +2142,9 @@ testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs ( name = "six" version = "1.16.0" description = "Python 2 and 3 compatibility utilities" -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +groups = ["main"] files = [ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, @@ -2152,9 +2154,9 @@ files = [ name = "sniffio" version = "1.3.0" description = "Sniff out which async library your code is running under" -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "sniffio-1.3.0-py3-none-any.whl", hash = "sha256:eecefdce1e5bbfb7ad2eeaabf7c1eeb404d7757c379bd1f7e5cce9d8bf425384"}, {file = "sniffio-1.3.0.tar.gz", hash = "sha256:e60305c5e5d314f5389259b7f22aaa33d8f7dee49763119234af3755c55b9101"}, @@ -2164,9 +2166,9 @@ files = [ name = "soupsieve" version = "2.3.2.post1" description = "A modern CSS selector implementation for Beautiful Soup." -category = "main" optional = false python-versions = ">=3.6" +groups = ["main"] files = [ {file = "soupsieve-2.3.2.post1-py3-none-any.whl", hash = "sha256:3b2503d3c7084a42b1ebd08116e5f81aadfaea95863628c80a3b774a11b7c759"}, {file = "soupsieve-2.3.2.post1.tar.gz", hash = "sha256:fc53893b3da2c33de295667a0e19f078c14bf86544af307354de5fcf12a3f30d"}, @@ -2176,9 +2178,9 @@ files = [ name = "starlette" version = "0.27.0" description = "The little ASGI library that shines." -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "starlette-0.27.0-py3-none-any.whl", hash = "sha256:918416370e846586541235ccd38a474c08b80443ed31c578a418e2209b3eef91"}, {file = "starlette-0.27.0.tar.gz", hash = "sha256:6a6b0d042acb8d469a01eba54e9cda6cbd24ac602c4cd016723117d6a7e73b75"}, @@ -2190,13 +2192,24 @@ anyio = ">=3.4.0,<5" [package.extras] full = ["httpx (>=0.22.0)", "itsdangerous", "jinja2", "python-multipart", "pyyaml"] +[[package]] +name = "strict-rfc3339" +version = "0.7" +description = "Strict, simple, lightweight RFC3339 functions" +optional = false +python-versions = "*" +groups = ["main"] +files = [ + {file = "strict-rfc3339-0.7.tar.gz", hash = "sha256:5cad17bedfc3af57b399db0fed32771f18fc54bbd917e85546088607ac5e1277"}, +] + [[package]] name = "tomli" version = "2.0.1" description = "A lil' TOML parser" -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, @@ -2206,9 +2219,9 @@ files = [ name = "typeguard" version = "2.13.3" description = "Run-time type checker for Python" -category = "main" optional = false python-versions = ">=3.5.3" +groups = ["main"] files = [ {file = "typeguard-2.13.3-py3-none-any.whl", hash = "sha256:5e3e3be01e887e7eafae5af63d1f36c849aaa94e3a0112097312aabfa16284f1"}, {file = "typeguard-2.13.3.tar.gz", hash = "sha256:00edaa8da3a133674796cf5ea87d9f4b4c367d77476e185e80251cc13dfbb8c4"}, @@ -2222,9 +2235,9 @@ test = ["mypy", "pytest", "typing-extensions"] name = "typer" version = "0.7.0" description = "Typer, build great CLIs. Easy to code. Based on Python type hints." -category = "main" optional = false python-versions = ">=3.6" +groups = ["main"] files = [ {file = "typer-0.7.0-py3-none-any.whl", hash = "sha256:b5e704f4e48ec263de1c0b3a2387cd405a13767d2f907f44c1a08cbad96f606d"}, {file = "typer-0.7.0.tar.gz", hash = "sha256:ff797846578a9f2a201b53442aedeb543319466870fbe1c701eab66dd7681165"}, @@ -2243,9 +2256,9 @@ test = ["black (>=22.3.0,<23.0.0)", "coverage (>=6.2,<7.0)", "isort (>=5.0.6,<6. name = "typing-extensions" version = "4.7.1" description = "Backported and Experimental Type Hints for Python 3.7+" -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "typing_extensions-4.7.1-py3-none-any.whl", hash = "sha256:440d5dd3af93b060174bf433bccd69b0babc3b15b1a8dca43789fd7f61514b36"}, {file = "typing_extensions-4.7.1.tar.gz", hash = "sha256:b75ddc264f0ba5615db7ba217daeb99701ad295353c45f9e95963337ceeeffb2"}, @@ -2255,9 +2268,9 @@ files = [ name = "typing-inspect" version = "0.8.0" description = "Runtime inspection utilities for typing module." -category = "main" optional = false python-versions = "*" +groups = ["main"] files = [ {file = "typing_inspect-0.8.0-py3-none-any.whl", hash = "sha256:5fbf9c1e65d4fa01e701fe12a5bca6c6e08a4ffd5bc60bfac028253a447c5188"}, {file = "typing_inspect-0.8.0.tar.gz", hash = "sha256:8b1ff0c400943b6145df8119c41c244ca8207f1f10c9c057aeed1560e4806e3d"}, @@ -2271,9 +2284,9 @@ typing-extensions = ">=3.7.4" name = "urllib3" version = "2.0.2" description = "HTTP library with thread-safe connection pooling, file post, and more." -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "urllib3-2.0.2-py3-none-any.whl", hash = "sha256:d055c2f9d38dc53c808f6fdc8eab7360b6fdbbde02340ed25cfbcd817c62469e"}, {file = "urllib3-2.0.2.tar.gz", hash = "sha256:61717a1095d7e155cdb737ac7bb2f4324a858a1e2e6466f6d03ff630ca68d3cc"}, @@ -2289,9 +2302,9 @@ zstd = ["zstandard (>=0.18.0)"] name = "uvicorn" version = "0.23.2" description = "The lightning-fast ASGI server." -category = "main" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "uvicorn-0.23.2-py3-none-any.whl", hash = "sha256:1f9be6558f01239d4fdf22ef8126c39cb1ad0addf76c40e760549d2c2f43ab53"}, {file = "uvicorn-0.23.2.tar.gz", hash = "sha256:4d3cc12d7727ba72b64d12d3cc7743124074c0a69f7b201512fc50c3e3f1569a"}, @@ -2304,7 +2317,7 @@ h11 = ">=0.8" httptools = {version = ">=0.5.0", optional = true, markers = "extra == \"standard\""} python-dotenv = {version = ">=0.13", optional = true, markers = "extra == \"standard\""} pyyaml = {version = ">=5.1", optional = true, markers = "extra == \"standard\""} -uvloop = {version = ">=0.14.0,<0.15.0 || >0.15.0,<0.15.1 || >0.15.1", optional = true, markers = "sys_platform != \"win32\" and sys_platform != \"cygwin\" and platform_python_implementation != \"PyPy\" and extra == \"standard\""} +uvloop = {version = ">=0.14.0,<0.15.0 || >0.15.0,<0.15.1 || >0.15.1", optional = true, markers = "(sys_platform != \"win32\" and sys_platform != \"cygwin\") and platform_python_implementation != \"PyPy\" and extra == \"standard\""} watchfiles = {version = ">=0.13", optional = true, markers = "extra == \"standard\""} websockets = {version = ">=10.4", optional = true, markers = "extra == \"standard\""} @@ -2315,9 +2328,10 @@ standard = ["colorama (>=0.4)", "httptools (>=0.5.0)", "python-dotenv (>=0.13)", name = "uvloop" version = "0.17.0" description = "Fast implementation of asyncio event loop on top of libuv" -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] +markers = "(sys_platform != \"win32\" and sys_platform != \"cygwin\") and platform_python_implementation != \"PyPy\"" files = [ {file = "uvloop-0.17.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:ce9f61938d7155f79d3cb2ffa663147d4a76d16e08f65e2c66b77bd41b356718"}, {file = "uvloop-0.17.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:68532f4349fd3900b839f588972b3392ee56042e440dd5873dfbbcd2cc67617c"}, @@ -2360,9 +2374,9 @@ test = ["Cython (>=0.29.32,<0.30.0)", "aiohttp", "flake8 (>=3.9.2,<3.10.0)", "my name = "watchfiles" version = "0.19.0" description = "Simple, modern and high performance file watching and code reload in python." -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "watchfiles-0.19.0-cp37-abi3-macosx_10_7_x86_64.whl", hash = "sha256:91633e64712df3051ca454ca7d1b976baf842d7a3640b87622b323c55f3345e7"}, {file = "watchfiles-0.19.0-cp37-abi3-macosx_11_0_arm64.whl", hash = "sha256:b6577b8c6c8701ba8642ea9335a129836347894b666dd1ec2226830e263909d3"}, @@ -2395,9 +2409,9 @@ anyio = ">=3.0.0" name = "websockets" version = "11.0.3" description = "An implementation of the WebSocket Protocol (RFC 6455 & 7692)" -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "websockets-11.0.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:3ccc8a0c387629aec40f2fc9fdcb4b9d5431954f934da3eaf16cdc94f67dbfac"}, {file = "websockets-11.0.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d67ac60a307f760c6e65dad586f556dde58e683fab03323221a4e530ead6f74d"}, @@ -2475,9 +2489,10 @@ files = [ name = "win32-setctime" version = "1.1.0" description = "A small Python utility to set file creation time on Windows" -category = "main" optional = false python-versions = ">=3.5" +groups = ["main"] +markers = "sys_platform == \"win32\"" files = [ {file = "win32_setctime-1.1.0-py3-none-any.whl", hash = "sha256:231db239e959c2fe7eb1d7dc129f11172354f98361c4fa2d6d2d7e278baa8aad"}, {file = "win32_setctime-1.1.0.tar.gz", hash = "sha256:15cf5750465118d6929ae4de4eb46e8edae9a5634350c01ba582df868e932cb2"}, @@ -2490,9 +2505,9 @@ dev = ["black (>=19.3b0)", "pytest (>=4.6.2)"] name = "wrapt" version = "1.15.0" description = "Module for decorators, wrappers and monkey patching." -category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" +groups = ["main"] files = [ {file = "wrapt-1.15.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:ca1cccf838cd28d5a0883b342474c630ac48cac5df0ee6eacc9c7290f76b11c1"}, {file = "wrapt-1.15.0-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:e826aadda3cae59295b95343db8f3d965fb31059da7de01ee8d1c40a60398b29"}, @@ -2575,9 +2590,9 @@ files = [ name = "yarl" version = "1.8.2" description = "Yet another URL library" -category = "main" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "yarl-1.8.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:bb81f753c815f6b8e2ddd2eef3c855cf7da193b82396ac013c661aaa6cc6b0a5"}, {file = "yarl-1.8.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:47d49ac96156f0928f002e2424299b2c91d9db73e08c4cd6742923a086f1c863"}, @@ -2660,6 +2675,6 @@ idna = ">=2.0" multidict = ">=4.0" [metadata] -lock-version = "2.0" +lock-version = "2.1" python-versions = "^3.11" -content-hash = "61614784852ff4f933668ff5ecfe8905b813a4c709105e653bd16ec610f63600" +content-hash = "df4b50472f32f341841f42bd7c82eb7100be33b1aa0ddbb615b17d4442f8fe6d" diff --git a/services/voting-node/pyproject.toml b/services/voting-node/pyproject.toml index f6428f43bc..405a6a09f2 100644 --- a/services/voting-node/pyproject.toml +++ b/services/voting-node/pyproject.toml @@ -23,6 +23,7 @@ opentelemetry-instrumentation = "^0.37b0" opentelemetry-instrumentation-fastapi = "^0.37b0" opentelemetry-instrumentation-asyncpg = "^0.37b0" prometheus-fastapi-instrumentator = "^5.10.0" +prometheus-client = "^0.17.1" PyYAML = "^6.0" uvicorn = {extras = ["standard"], version = "~0.23.2"} aiofile = "^3.8.5" diff --git a/services/voting-node/run.sh b/services/voting-node/run.sh new file mode 100755 index 0000000000..d808e4b9b8 --- /dev/null +++ b/services/voting-node/run.sh @@ -0,0 +1,85 @@ +#!/usr/bin/env bash + +set -e + +echo ">>> Fetching secrets" + +DB_SECRET=$(aws secretsmanager get-secret-value --secret-id dev/db/eventdb | jq -r .SecretString) +EXTERNAL_SECRET=$(aws secretsmanager get-secret-value --secret-id dev/voting-node/external | jq -r .SecretString) +GEN_SECRET=$(aws secretsmanager get-secret-value --secret-id dev/voting-node/generated | jq -r .SecretString) +MAINNET_SECRET=$(aws secretsmanager get-secret-value --secret-id global/db/dbsync-mainnet | jq -r .SecretString) +PREPROD_SECRET=$(aws secretsmanager get-secret-value --secret-id global/db/dbsync-preprod | jq -r .SecretString) +SSH_SECRET=$(aws secretsmanager get-secret-value --secret-id global/db/dbsync-ssh | jq -r .SecretString) + +echo ">>> Setting up env variables" + +DB_USERNAME=$(echo "${DB_SECRET}" | jq -r '.username') +DB_PASSWORD=$(echo "${DB_SECRET}" | jq -r '.password') +DB_HOST=$(echo "${DB_SECRET}" | jq -r '.host') +DB_PORT=$(echo "${DB_SECRET}" | jq -r '.port') +DB_URL="postgres://$DB_USERNAME:$DB_PASSWORD@$DB_HOST:$DB_PORT/eventdb" + +EXTERNAL_URL=$(echo "${EXTERNAL_SECRET}" | jq -r '.ideascale_url') +EXTERNAL_TOKEN=$(echo "${EXTERNAL_SECRET}" | jq -r '.ideascale_token') + +GEN_CRS=$(echo "${GEN_SECRET}" | jq -r '.crs') +GEN_SECRET_SECRET=$(echo "${GEN_SECRET}" | jq -r '.secret') + +MAINNET_USERNAME=$(echo "${MAINNET_SECRET}" | jq -r '.username') +MAINNET_PASSWORD=$(echo "${MAINNET_SECRET}" | jq -r '.password') +MAINNET_HOST=$(echo "${MAINNET_SECRET}" | jq -r '.host') +MAINNET_PORT=$(echo "${MAINNET_SECRET}" | jq -r '.port') +MAINNET_URL="postgres://${MAINNET_USERNAME}:${MAINNET_PASSWORD}@${MAINNET_HOST}:${MAINNET_PORT}/dbsync-mainnet" + +PREPROD_USERNAME=$(echo "${PREPROD_SECRET}" | jq -r '.username') +PREPROD_PASSWORD=$(echo "${PREPROD_SECRET}" | jq -r '.password') +PREPROD_HOST=$(echo "${PREPROD_SECRET}" | jq -r '.host') +PREPROD_PORT=$(echo "${PREPROD_SECRET}" | jq -r '.port') +PREPROD_URL="postgres://${PREPROD_USERNAME}:${PREPROD_PASSWORD}@${PREPROD_HOST}:${PREPROD_PORT}/dbsync-preprod" + +SSH_PRIVATE_KEY=$(echo "${SSH_SECRET}" | jq -r '.private') +SSH_PUBLIC_KEY=$(echo "${SSH_SECRET}" | jq -r '.public') +SSH_HOST_KEY=$(echo "${SSH_SECRET}" | jq -r '."host-key"') +SSH_USER=$(echo "${SSH_SECRET}" | jq -r '.user') +SSH_HOST=$(echo "${SSH_SECRET}" | jq -r '.host') +SSH_ADDRESS="${SSH_USER}@${SSH_HOST}" + +echo ">>> Running the voting node" + +docker run -d \ + --hostname leader0 \ + -p 8080:8080 \ + -v "$(pwd)/ideascale.json:/configs/ideascale.json" \ + -e TESTNET_DBSYNC_URL="${PREPROD_URL}" \ + -e MAINNET_DBSYNC_URL="${MAINNET_URL}" \ + -e EVENTDB_URL="${DB_URL}" \ + -e COMMITTEE_CRS="${GEN_CRS}" \ + -e SECRET_SECRET="${GEN_SECRET_SECRET}" \ + -e DBSYNC_SSH_PRIVKEY="${SSH_PRIVATE_KEY}" \ + -e DBSYNC_SSH_PUBKEY="${SSH_PUBLIC_KEY}" \ + -e DBSYNC_SSH_HOST_KEY="${SSH_HOST_KEY}" \ + -e SSH_SNAPSHOT_TOOL_DESTINATION="${SSH_ADDRESS}" \ + -e IDEASCALE_API_URL="${EXTERNAL_URL}" \ + -e IDEASCALE_API_TOKEN="${EXTERNAL_TOKEN}" \ + -e SNAPSHOT_TOOL_SSH="true" \ + -e SSH_SNAPSHOT_TOOL_PATH="/home/snapshot/.local/bin/snapshot_tool" \ + -e SSH_SNAPSHOT_TOOL_OUTPUT_DIR="/home/snapshot/dev_snapshot_tool_out" \ + -e GVC_API_URL="unused" \ + -e IS_NODE_RELOADABLE="true" \ + -e VOTING_HOST="0.0.0.0" \ + -e VOTING_PORT="8080" \ + -e VOTING_LOG_LEVEL="debug" \ + -e JORM_PATH="jormungandr" \ + -e JCLI_PATH="jcli" \ + -e IDEASCALE_CONFIG_PATH="/configs/ideascale.json" \ + -e IDEASCALE_CAMPAIGN_GROUP="66" \ + -e IDEASCALE_STAGE_ID="4385" \ + -e IDEASCALE_LOG_LEVEL="debug" \ + -e IDEASCALE_LOG_FORMAT="text" \ + -e SNAPSHOT_INTERVAL_SECONDS="3600" \ + -e SNAPSHOT_CONFIG_PATH="/app/snapshot-importer-example-config.json" \ + -e SNAPSHOT_OUTPUT_DIR="/tmp/snapshot-output" \ + -e SNAPSHOT_NETWORK_IDS="testnet" \ + -e SNAPSHOT_LOG_LEVEL="debug" \ + -e SNAPSHOT_LOG_FORMAT="text" \ + voting-node:latest diff --git a/services/voting-node/voting_node/importer.py b/services/voting-node/voting_node/importer.py index ec347c8be4..92c6778dc9 100644 --- a/services/voting-node/voting_node/importer.py +++ b/services/voting-node/voting_node/importer.py @@ -24,6 +24,7 @@ * `CATALYST_TOOLBOX_PATH` - Path to the catalyst-toolbox executable (optional). """ + import asyncio import os from datetime import datetime @@ -32,6 +33,28 @@ from ideascale_importer.snapshot_importer import Importer as DBSyncImporter, SSHConfig as SnapshotToolSSHConfig from loguru import logger from pydantic import BaseModel +from prometheus_client import Gauge, Counter, Histogram + +# Prometheus gauge metric to track remaining snapshot intervals +snapshot_intervals_remaining = Gauge( + "snapshot_intervals_remaining", "Number of remaining snapshot intervals before snapshot start time", ["event_id"] +) + +# Prometheus gauge metric to track the Unix timestamp of the next snapshot time +next_snapshot_timestamp = Gauge("next_snapshot_timestamp", "Unix timestamp of the next scheduled snapshot time", ["event_id"]) + +# Prometheus counter metrics to track snapshot operations +snapshots_taken_total = Counter("snapshots_taken_total", "Total number of snapshots attempted", ["event_id"]) +snapshots_completed_total = Counter("snapshots_completed_total", "Total number of snapshots completed successfully", ["event_id"]) +snapshots_failed_total = Counter("snapshots_failed_total", "Total number of snapshots that failed", ["event_id"]) + +# Prometheus histogram metric to track snapshot duration +snapshot_duration_seconds = Histogram( + "snapshot_duration_seconds", + "Time taken to complete snapshots", + ["event_id"], + buckets=[60, 120, 300, 600, 900, 1200, 1800, 2400, 3000, 3600, 4500, 5400, 6300, 7200], # 1min to 2hr +) class ExternalDataImporter: @@ -184,6 +207,9 @@ async def take_snapshots(self, event_id: int) -> None: # Check if snapshot start time has passed if self.snapshot_start_has_passed(): logger.info("Snapshot has become stable. Skipping...") + # Set metrics to 0 when snapshots are skipped + snapshot_intervals_remaining.labels(event_id=event_id).set(0) + next_snapshot_timestamp.labels(event_id=event_id).set(0) return # Take snapshots at regular intervals @@ -192,14 +218,36 @@ async def take_snapshots(self, event_id: int) -> None: current_time = datetime.utcnow() num_intervals, secs_to_sleep = self._remaining_intervals_n_seconds_to_next_snapshot(current_time, interval) + # Calculate the next snapshot timestamp + next_snapshot_time = current_time.timestamp() + secs_to_sleep + + # Update Prometheus gauge metrics + snapshot_intervals_remaining.labels(event_id=event_id).set(num_intervals) + next_snapshot_timestamp.labels(event_id=event_id).set(next_snapshot_time) + logger.info(f"{num_intervals + 1} snapshots remaining. Next snapshot is in {secs_to_sleep} seconds...") # Wait for the next snapshot interval await asyncio.sleep(secs_to_sleep) # Take snapshot logger.info("Taking snapshot now") - logger.debug("|---> Starting DBSync snapshot now") - await self._dbsync_snapshot(event_id) + + # Track DBSync snapshot + snapshots_taken_total.labels(event_id=event_id).inc() + try: + logger.debug("|---> Starting DBSync snapshot now") + start_time = datetime.utcnow() + + await self._dbsync_snapshot(event_id) + + end_time = datetime.utcnow() + duration = (end_time - start_time).total_seconds() + snapshot_duration_seconds.labels(event_id=event_id).observe(duration) + snapshots_completed_total.labels(event_id=event_id).inc() + except Exception: + snapshots_failed_total.labels(event_id=event_id).inc() + raise # Re-raise the exception for parent code to handle + logger.debug("|---> Starting IdeasScale snapshot now") await self._ideascale_snapshot(event_id) @@ -207,4 +255,7 @@ async def take_snapshots(self, event_id: int) -> None: await asyncio.sleep(0) continue else: + # Set metrics to 0 when snapshots are complete + snapshot_intervals_remaining.labels(event_id=event_id).set(0) + next_snapshot_timestamp.labels(event_id=event_id).set(0) break