From 075929f457fafd761a3002be3f752d68efc57c70 Mon Sep 17 00:00:00 2001 From: saltiyazan Date: Wed, 11 Sep 2024 14:12:51 +0200 Subject: [PATCH] fix: Manages all requirements files in one dependabot PR (#487) --- .github/dependabot.yml | 16 +--- .github/workflows/build.yaml | 10 +- requirements.in | 2 + requirements.txt | 49 +++++----- src/charm.py | 4 +- test-requirements.in | 2 +- test-requirements.txt | 96 +++++++++++++------ .../requirements.in | 1 + .../requirements.txt | 18 ++-- 9 files changed, 115 insertions(+), 83 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 13934e81..00d37666 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -12,19 +12,9 @@ updates: - "*" - package-ecosystem: "pip" - directory: "/" - schedule: - interval: "weekly" - commit-message: - prefix: "chore: " - groups: - pip_dependencies: - patterns: - - "*" - - - - package-ecosystem: "pip" - directory: "/tests/integration/vault_kv_requirer_operator/" + directories: + - "/" + - "tests/integration/vault_kv_requirer_operator" schedule: interval: "weekly" commit-message: diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index cbcc727b..ed132644 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -8,12 +8,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - + - name: Setup LXD uses: canonical/setup-lxd@main with: - channel: 5.20/stable - + channel: 5.20/stable + - name: Install charmcraft run: sudo snap install charmcraft --classic @@ -31,12 +31,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - + - name: Setup LXD uses: canonical/setup-lxd@main with: channel: 5.20/stable - + - name: Install charmcraft run: sudo snap install charmcraft --classic diff --git a/requirements.in b/requirements.in index 27218ede..f129e17d 100644 --- a/requirements.in +++ b/requirements.in @@ -13,3 +13,5 @@ jsonschema cryptography boto3 boto3-stubs[s3] # required by vault_s3 +ops-scenario==6.1.6 +rpds-py==0.18.0 diff --git a/requirements.txt b/requirements.txt index 8ba0d6ae..074163a7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,36 +4,36 @@ # # pip-compile requirements.in # -annotated-types==0.6.0 +annotated-types==0.7.0 # via pydantic -anyio==4.3.0 +anyio==4.4.0 # via httpx -attrs==23.2.0 +attrs==24.2.0 # via # jsonschema # referencing -boto3==1.35.10 +boto3==1.35.15 # via -r requirements.in -boto3-stubs[s3]==1.35.10 +boto3-stubs[s3]==1.35.15 # via -r requirements.in -botocore==1.35.10 +botocore==1.35.15 # via # boto3 # s3transfer -botocore-stubs==1.34.89 +botocore-stubs==1.35.15 # via boto3-stubs -certifi==2024.2.2 +certifi==2024.8.30 # via # httpcore # httpx # requests -cffi==1.16.0 +cffi==1.17.1 # via cryptography charset-normalizer==3.3.2 # via requests click==8.1.7 # via typer -cosl==0.0.26 +cosl==0.0.32 # via -r requirements.in cryptography==43.0.1 # via -r requirements.in @@ -41,11 +41,11 @@ h11==0.14.0 # via httpcore httpcore==1.0.5 # via httpx -httpx==0.27.0 +httpx==0.27.2 # via lightkube hvac==2.3.0 # via -r requirements.in -idna==3.7 +idna==3.8 # via # anyio # httpx @@ -74,14 +74,16 @@ markupsafe==2.1.5 # via jinja2 mypy-boto3-s3==1.35.2 # via boto3-stubs -ops==2.16.0 +ops==2.16.1 # via # -r requirements.in # cosl # ops-scenario ops-scenario==6.1.6 - # via pytest-interface-tester -packaging==24.0 + # via + # -r requirements.in + # pytest-interface-tester +packaging==24.1 # via pytest pluggy==1.5.0 # via pytest @@ -96,19 +98,19 @@ pydantic-core==2.20.1 # via pydantic pyhcl==0.4.5 # via -r requirements.in -pytest==8.3.2 +pytest==8.3.3 # via pytest-interface-tester pytest-interface-tester==3.1.0 # via -r requirements.in python-dateutil==2.9.0.post0 # via botocore -pyyaml==6.0.1 +pyyaml==6.0.2 # via # cosl # lightkube # ops # ops-scenario -referencing==0.34.0 +referencing==0.35.1 # via # jsonschema # jsonschema-specifications @@ -118,9 +120,10 @@ requests==2.32.3 # hvac rpds-py==0.18.0 # via + # -r requirements.in # jsonschema # referencing -s3transfer==0.10.1 +s3transfer==0.10.2 # via boto3 six==1.16.0 # via python-dateutil @@ -132,11 +135,11 @@ tenacity==9.0.0 # via cosl typer==0.7.0 # via pytest-interface-tester -types-awscrt==0.20.9 +types-awscrt==0.21.5 # via botocore-stubs -types-s3transfer==0.10.1 +types-s3transfer==0.10.2 # via boto3-stubs -typing-extensions==4.11.0 +typing-extensions==4.12.2 # via # boto3-stubs # cosl @@ -147,5 +150,5 @@ urllib3==2.2.2 # via # botocore # requests -websocket-client==1.7.0 +websocket-client==1.8.0 # via ops diff --git a/src/charm.py b/src/charm.py index a079775f..1f6caaea 100755 --- a/src/charm.py +++ b/src/charm.py @@ -754,7 +754,7 @@ def _on_create_backup_action(self, event: ActionEvent) -> None: response = vault.create_snapshot() content_uploaded = s3.upload_content( - content=response.raw, + content=response.raw, # type: ignore[reportArgumentType] bucket_name=s3_parameters["bucket"], key=backup_key, ) @@ -1323,7 +1323,7 @@ def _create_raft_snapshot(self) -> IO[bytes] | None: logger.error("Failed to get Vault client, cannot create snapshot.") return None response = vault.create_snapshot() - return response.raw + return response.raw # type: ignore[reportReturnType] def _restore_vault(self, snapshot: StreamingBody) -> bool: """Restore vault using a raft snapshot. diff --git a/test-requirements.in b/test-requirements.in index e8b7e5b0..6fe8a437 100644 --- a/test-requirements.in +++ b/test-requirements.in @@ -7,4 +7,4 @@ pytest-operator pytest-asyncio==0.21.2 ruff types-hvac -ops-scenario +ops-scenario==6.1.6 diff --git a/test-requirements.txt b/test-requirements.txt index 7250017e..ef70a2e4 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.12 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # pip-compile --constraint=requirements.txt test-requirements.in @@ -8,46 +8,60 @@ asttokens==2.4.1 # via stack-data bcrypt==4.2.0 # via paramiko -cachetools==5.4.0 +cachetools==5.5.0 # via google-auth -certifi==2024.2.2 +certifi==2024.8.30 # via + # -c requirements.txt # kubernetes # requests -cffi==1.16.0 +cffi==1.17.1 # via + # -c requirements.txt # cryptography # pynacl charset-normalizer==3.3.2 - # via requests + # via + # -c requirements.txt + # requests codespell==2.3.0 # via -r test-requirements.in coverage[toml]==7.6.1 # via -r test-requirements.in cryptography==43.0.1 - # via paramiko + # via + # -c requirements.txt + # paramiko decorator==5.1.1 # via # ipdb # ipython -executing==2.0.1 +executing==2.1.0 # via stack-data -google-auth==2.33.0 +google-auth==2.34.0 # via kubernetes hvac==2.3.0 - # via juju -idna==3.7 - # via requests + # via + # -c requirements.txt + # juju +idna==3.8 + # via + # -c requirements.txt + # requests iniconfig==2.0.0 - # via pytest + # via + # -c requirements.txt + # pytest ipdb==0.13.13 # via pytest-operator -ipython==8.26.0 +ipython==8.27.0 # via ipdb jedi==0.19.1 # via ipython jinja2==3.1.4 - # via pytest-operator + # via + # -c requirements.txt + # pytest-operator juju==3.5.2.0 # via # -r test-requirements.in @@ -57,7 +71,9 @@ kubernetes==30.1.0 macaroonbakery==1.3.4 # via juju markupsafe==2.1.5 - # via jinja2 + # via + # -c requirements.txt + # jinja2 matplotlib-inline==0.1.7 # via ipython mypy-extensions==1.0.0 @@ -68,12 +84,17 @@ oauthlib==3.2.2 # via # kubernetes # requests-oauthlib -ops==2.16.0 - # via ops-scenario +ops==2.16.1 + # via + # -c requirements.txt + # ops-scenario ops-scenario==6.1.6 - # via -r test-requirements.in -packaging==24.0 # via + # -c requirements.txt + # -r test-requirements.in +packaging==24.1 + # via + # -c requirements.txt # juju # pytest paramiko==3.4.1 @@ -83,10 +104,12 @@ parso==0.8.4 pexpect==4.9.0 # via ipython pluggy==1.5.0 - # via pytest + # via + # -c requirements.txt + # pytest prompt-toolkit==3.0.47 # via ipython -protobuf==5.27.3 +protobuf==5.28.0 # via macaroonbakery ptyprocess==0.7.0 # via pexpect @@ -100,7 +123,9 @@ pyasn1==0.6.0 pyasn1-modules==0.4.0 # via google-auth pycparser==2.22 - # via cffi + # via + # -c requirements.txt + # cffi pygments==2.18.0 # via ipython pymacaroons==0.13.0 @@ -114,10 +139,11 @@ pyrfc3339==1.1 # via # juju # macaroonbakery -pyright==1.1.378 +pyright==1.1.379 # via -r test-requirements.in -pytest==8.3.2 +pytest==8.3.3 # via + # -c requirements.txt # -r test-requirements.in # pytest-asyncio # pytest-operator @@ -128,11 +154,14 @@ pytest-asyncio==0.21.2 pytest-operator==0.36.0 # via -r test-requirements.in python-dateutil==2.9.0.post0 - # via kubernetes + # via + # -c requirements.txt + # kubernetes pytz==2024.1 # via pyrfc3339 -pyyaml==6.0.1 +pyyaml==6.0.2 # via + # -c requirements.txt # juju # kubernetes # ops @@ -140,6 +169,7 @@ pyyaml==6.0.1 # pytest-operator requests==2.32.3 # via + # -c requirements.txt # hvac # kubernetes # macaroonbakery @@ -148,10 +178,11 @@ requests-oauthlib==2.0.0 # via kubernetes rsa==4.9 # via google-auth -ruff==0.6.1 +ruff==0.6.4 # via -r test-requirements.in six==1.16.0 # via + # -c requirements.txt # asttokens # kubernetes # macaroonbakery @@ -167,24 +198,27 @@ traitlets==5.14.3 # matplotlib-inline types-hvac==2.3.0.20240621 # via -r test-requirements.in -types-requests==2.32.0.20240712 +types-requests==2.32.0.20240907 # via types-hvac -typing-extensions==4.11.0 +typing-extensions==4.12.2 # via + # -c requirements.txt # ipython # typing-inspect typing-inspect==0.9.0 # via juju urllib3==2.2.2 # via + # -c requirements.txt # kubernetes # requests # types-requests wcwidth==0.2.13 # via prompt-toolkit -websocket-client==1.7.0 +websocket-client==1.8.0 # via + # -c requirements.txt # kubernetes # ops -websockets==12.0 +websockets==13.0.1 # via juju diff --git a/tests/integration/vault_kv_requirer_operator/requirements.in b/tests/integration/vault_kv_requirer_operator/requirements.in index 43b731ed..64f5b505 100644 --- a/tests/integration/vault_kv_requirer_operator/requirements.in +++ b/tests/integration/vault_kv_requirer_operator/requirements.in @@ -2,3 +2,4 @@ ops hvac pydantic==2.8.2 pytest-interface-tester +ops-scenario==6.1.6 diff --git a/tests/integration/vault_kv_requirer_operator/requirements.txt b/tests/integration/vault_kv_requirer_operator/requirements.txt index 76788126..d842513a 100644 --- a/tests/integration/vault_kv_requirer_operator/requirements.txt +++ b/tests/integration/vault_kv_requirer_operator/requirements.txt @@ -1,8 +1,8 @@ # -# This file is autogenerated by pip-compile with Python 3.12 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # -# pip-compile requirements.in +# pip-compile tests/integration/vault_kv_requirer_operator/requirements.in # annotated-types==0.7.0 # via pydantic @@ -13,31 +13,33 @@ charset-normalizer==3.3.2 click==8.1.7 # via typer hvac==2.3.0 - # via -r requirements.in + # via -r tests/integration/vault_kv_requirer_operator/requirements.in idna==3.7 # via requests iniconfig==2.0.0 # via pytest ops==2.15.0 # via - # -r requirements.in + # -r tests/integration/vault_kv_requirer_operator/requirements.in # ops-scenario -ops-scenario==6.0.5 - # via pytest-interface-tester +ops-scenario==6.1.6 + # via + # -r tests/integration/vault_kv_requirer_operator/requirements.in + # pytest-interface-tester packaging==24.0 # via pytest pluggy==1.5.0 # via pytest pydantic==2.8.2 # via - # -r requirements.in + # -r tests/integration/vault_kv_requirer_operator/requirements.in # pytest-interface-tester pydantic-core==2.20.1 # via pydantic pytest==8.2.1 # via pytest-interface-tester pytest-interface-tester==3.1.0 - # via -r requirements.in + # via -r tests/integration/vault_kv_requirer_operator/requirements.in pyyaml==6.0.1 # via # ops