Skip to content

Commit

Permalink
Cache HTTP requests (GSI-1235) (#107)
Browse files Browse the repository at this point in the history
* Swap MockRouter out in favor of FastAPI app

* Enable general caching with async_client

* Uncomment accidentally commented-out test cases

* Add garbage collection in downloader

* Add cache-control header
and remove url from _get_authorization

* Get WOT and S3 download url for every part again

* Implement DL caching in existing integration tests

* Update other integration tests

* Cleanup hanging async tasks in file ops tests and fix mypy complaints

* Remove unused duplicate module

* Remove unused constants and imports

* Use default cache limit of 128 and refactor use of client in testing

* Make sure not to cache S3 part downloads

* Move mock app fixturing to mock app module

* Test caching of WPS calls

* Make mypy happy without using ignores

* Add missing mock_external_calls fixture

* Add CACHE_MIN_FRESH constant and update caching behavior in API calls

* Bump version to 1.6.0

* Reflect WPS and DCS caching headers in mock responses

* Reduce cache TTL
  • Loading branch information
TheByronHimes authored Jan 8, 2025
1 parent dc4040e commit 2a733c3
Show file tree
Hide file tree
Showing 18 changed files with 724 additions and 730 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ repos:
- id: no-commit-to-branch
args: [--branch, dev, --branch, int, --branch, main]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.2
rev: v0.8.3
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
3 changes: 2 additions & 1 deletion .pyproject_generation/pyproject_custom.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "ghga_connector"
version = "1.5.1"
version = "1.6.0"
description = "GHGA Connector - A CLI client application for interacting with the GHGA system."
dependencies = [
"typer~=0.12",
Expand All @@ -9,6 +9,7 @@ dependencies = [
"hexkit[s3]>=3, <4",
"rich>=13.7.1, <14",
"tenacity >=9.0.0, <10",
"hishel>=0.1.1, < 0.2",
]


Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,21 @@ We recommend using the provided Docker container.

A pre-build version is available at [docker hub](https://hub.docker.com/repository/docker/ghga/ghga-connector):
```bash
docker pull ghga/ghga-connector:1.5.1
docker pull ghga/ghga-connector:1.6.0
```

Or you can build the container yourself from the [`./Dockerfile`](./Dockerfile):
```bash
# Execute in the repo's root dir:
docker build -t ghga/ghga-connector:1.5.1 .
docker build -t ghga/ghga-connector:1.6.0 .
```

For production-ready deployment, we recommend using Kubernetes, however,
for simple use cases, you could execute the service using docker
on a single server:
```bash
# The entrypoint is preconfigured:
docker run -p 8080:8080 ghga/ghga-connector:1.5.1 --help
docker run -p 8080:8080 ghga/ghga-connector:1.6.0 --help
```

If you prefer not to use containers, you may install the service from source:
Expand Down
109 changes: 57 additions & 52 deletions lock/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,20 @@ bcrypt==4.2.1 \
--hash=sha256:e84e0e6f8e40a242b11bce56c313edc2be121cec3e0ec2d76fce01f6af33c07c \
--hash=sha256:f85b1ffa09240c89aa2e1ae9f3b1c687104f7b2b9d2098da4e923f1b7082d331
# via crypt4gh
boto3==1.35.79 \
--hash=sha256:1fa26217cd33ded82e55aed4460cd55f7223fa647916aa0d3c5d6828e6ec7135 \
--hash=sha256:a673b0b6378c9ccbf045a31a43195b175e12aa5c37fb7635fcbfc8f48fb857b3
boto3==1.35.83 \
--hash=sha256:a4828d67b12892cb11fe9e6d86f40975a06db470676e61194968e3a32ec4c536 \
--hash=sha256:df2e0d57241de0f9c31b62e73093c2126e4fd73b87b1897ecf280a1b87a2b825
# via hexkit
botocore==1.35.79 \
--hash=sha256:245bfdda1b1508539ddd1819c67a8a2cc81780adf0715d3de418d64c4247f346 \
--hash=sha256:e6b10bb9a357e3f5ca2e60f6dd15a85d311b9a476eb21b3c0c2a3b364a2897c8
botocore==1.35.83 \
--hash=sha256:ba363183e4df79fbcfd5f3600fd473bd45a1de03d0d0b5e78abd59f276971d27 \
--hash=sha256:df5e4384838e50bbafd47e9b5fefb995e83cbb9412e7cd7c0db9555174d91bba
# via
# boto3
# hexkit
# s3transfer
certifi==2024.8.30 \
--hash=sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8 \
--hash=sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9
certifi==2024.12.14 \
--hash=sha256:1275f7a45be9464efc1173084eaa30f866fe2e47d389406136d332ed4967ec56 \
--hash=sha256:b650d30f370c2b724812bee08008be0c4163b163ddaec3f2546c1caf65f191db
# via
# httpcore
# httpx
Expand Down Expand Up @@ -385,6 +385,10 @@ hexkit==3.8.1 \
# via
# ghga-connector (pyproject.toml)
# ghga-service-commons
hishel==0.1.1 \
--hash=sha256:1f6421b78cc23fc43c610f651b7848c9b8eee2d29551d64a2ab0d45b319b6559 \
--hash=sha256:5b51acc340303faeef2f5cfc1658acb1db1fdc3e3ad76406265a485f9707c5d6
# via ghga-connector (pyproject.toml)
httpcore==1.0.7 \
--hash=sha256:8551cb62a169ec7162ac7be8d4817d561f60e08eaa485234898414bb5a8a0b4c \
--hash=sha256:a3fff8f43dc260d5bd363d9f9cf1830fa3a458b332856f34282de498ed420edd
Expand Down Expand Up @@ -440,6 +444,7 @@ httpx==0.27.2 \
# via
# -r lock/requirements-dev-template.in
# ghga-service-commons
# hishel
# pytest-httpx
identify==2.6.3 \
--hash=sha256:62f5dae9b5fef52c84cc188514e9ea4f3f636b1d8799ab5ebc475471f9e47a02 \
Expand Down Expand Up @@ -652,9 +657,9 @@ pydantic-core==2.27.1 \
--hash=sha256:f69ed81ab24d5a3bd93861c8c4436f54afdf8e8cc421562b0c7504cf3be58206 \
--hash=sha256:f82d068a2d6ecfc6e054726080af69a6764a10015467d7d7b9f66d6ed5afa23b
# via pydantic
pydantic-settings==2.6.1 \
--hash=sha256:7fb0637c786a558d3103436278a7c4f1cfd29ba8973238a50c5bb9a55387da87 \
--hash=sha256:e0f92546d8a9923cb8941689abf85d6601a8c19a23e97a34b2964a2e3f813ca0
pydantic-settings==2.7.0 \
--hash=sha256:ac4bfd4a36831a48dbf8b2d9325425b549a0a6f18cea118436d728eb4f1c4d66 \
--hash=sha256:e00c05d5fa6cbbb227c84bd7487c5c1065084119b750df7c8c1a554aed236eb5
# via hexkit
pygments==2.18.0 \
--hash=sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199 \
Expand Down Expand Up @@ -682,9 +687,9 @@ pytest==8.3.4 \
# pytest-asyncio
# pytest-cov
# pytest-httpx
pytest-asyncio==0.24.0 \
--hash=sha256:a811296ed596b69bf0b6f3dc40f83bcaf341b155a269052d82efa2b25ac7037b \
--hash=sha256:d081d828e576d85f875399194281e92bf8a68d60d72d1a2faf2feddb6c46b276
pytest-asyncio==0.25.0 \
--hash=sha256:8c0610303c9e0442a5db8604505fc0f545456ba1528824842b37b4a626cbf609 \
--hash=sha256:db5432d18eac6b7e28b46dcd9b69921b55c3b1086e85febfe04e70b18d9e81b3
# via -r lock/requirements-dev-template.in
pytest-cov==6.0.0 \
--hash=sha256:eee6f1b9e61008bd34975a4d5bab25801eb31898b032dd55addc93e96fcaaa35 \
Expand Down Expand Up @@ -777,25 +782,25 @@ rich==13.9.4 \
# via
# ghga-connector (pyproject.toml)
# typer
ruff==0.8.2 \
--hash=sha256:1ca4e3a87496dc07d2427b7dd7ffa88a1e597c28dad65ae6433ecb9f2e4f022f \
--hash=sha256:2aae99ec70abf43372612a838d97bfe77d45146254568d94926e8ed5bbb409ea \
--hash=sha256:32096b41aaf7a5cc095fa45b4167b890e4c8d3fd217603f3634c92a541de7248 \
--hash=sha256:5fe716592ae8a376c2673fdfc1f5c0c193a6d0411f90a496863c99cd9e2ae25d \
--hash=sha256:60f578c11feb1d3d257b2fb043ddb47501ab4816e7e221fbb0077f0d5d4e7b6f \
--hash=sha256:705832cd7d85605cb7858d8a13d75993c8f3ef1397b0831289109e953d833d29 \
--hash=sha256:729850feed82ef2440aa27946ab39c18cb4a8889c1128a6d589ffa028ddcfc22 \
--hash=sha256:81c148825277e737493242b44c5388a300584d73d5774defa9245aaef55448b0 \
--hash=sha256:ac42caaa0411d6a7d9594363294416e0e48fc1279e1b0e948391695db2b3d5b1 \
--hash=sha256:b402ddee3d777683de60ff76da801fa7e5e8a71038f57ee53e903afbcefdaa58 \
--hash=sha256:b84f4f414dda8ac7f75075c1fa0b905ac0ff25361f42e6d5da681a465e0f78e5 \
--hash=sha256:c49ab4da37e7c457105aadfd2725e24305ff9bc908487a9bf8d548c6dad8bb3d \
--hash=sha256:cbd5cf9b0ae8f30eebc7b360171bd50f59ab29d39f06a670b3e4501a36ba5897 \
--hash=sha256:d261d7850c8367704874847d95febc698a950bf061c9475d4a8b7689adc4f7fa \
--hash=sha256:e769083da9439508833cfc7c23e351e1809e67f47c50248250ce1ac52c21fb93 \
--hash=sha256:ec016beb69ac16be416c435828be702ee694c0d722505f9c1f35e1b9c0cc1bf5 \
--hash=sha256:f05cdf8d050b30e2ba55c9b09330b51f9f97d36d4673213679b965d25a785f3c \
--hash=sha256:fb88e2a506b70cfbc2de6fae6681c4f944f7dd5f2fe87233a7233d888bad73e8
ruff==0.8.3 \
--hash=sha256:01b14b2f72a37390c1b13477c1c02d53184f728be2f3ffc3ace5b44e9e87b90d \
--hash=sha256:19048f2f878f3ee4583fc6cb23fb636e48c2635e30fb2022b3a1cd293402f964 \
--hash=sha256:1ae441ce4cf925b7f363d33cd6570c51435972d697e3e58928973994e56e1452 \
--hash=sha256:53babd6e63e31f4e96ec95ea0d962298f9f0d9cc5990a1bbb023a6baf2503a82 \
--hash=sha256:5be450bb18f23f0edc5a4e5585c17a56ba88920d598f04a06bd9fd76d324cb20 \
--hash=sha256:5e7558304353b84279042fc584a4f4cb8a07ae79b2bf3da1a7551d960b5626d3 \
--hash=sha256:6567be9fb62fbd7a099209257fef4ad2c3153b60579818b31a23c886ed4147ea \
--hash=sha256:75fb782f4db39501210ac093c79c3de581d306624575eddd7e4e13747e61ba18 \
--hash=sha256:7f26bc76a133ecb09a38b7868737eded6941b70a6d34ef53a4027e83913b6502 \
--hash=sha256:8d5d273ffffff0acd3db5bf626d4b131aa5a5ada1276126231c4174543ce20d6 \
--hash=sha256:8faeae3827eaa77f5721f09b9472a18c749139c891dbc17f45e72d8f2ca1f8fc \
--hash=sha256:9c0a60a825e3e177116c84009d5ebaa90cf40dfab56e1358d1df4e29a9a14b13 \
--hash=sha256:c356e770811858bd20832af696ff6c7e884701115094f427b64b25093d6d932d \
--hash=sha256:d7c65bc0cadce32255e93c57d57ecc2cca23149edd52714c0c5d6fa11ec328cd \
--hash=sha256:db503486e1cf074b9808403991663e4277f5c664d3fe237ee0d994d1305bb060 \
--hash=sha256:e4d66a21de39f15c9757d00c50c8cdd20ac84f55684ca56def7891a025d7e939 \
--hash=sha256:f7df94f57d7418fa7c3ffb650757e0c2b96cf2501a0b192c18e4fb5571dfada9 \
--hash=sha256:fe2756edf68ea79707c8d68b78ca9a58ed9af22e430430491ee03e718b5e4936
# via -r lock/requirements-dev-template.in
s3transfer==0.10.4 \
--hash=sha256:244a76a24355363a68164241438de1b72f8781664920260c48465896b712a41e \
Expand Down Expand Up @@ -922,24 +927,24 @@ urllib3==1.26.20 \
# docker
# requests
# testcontainers
uv==0.5.8 \
--hash=sha256:0f2bcdd00a49ad1669e217a2787448cac1653c9968d74bfa3732f3c25ca26f69 \
--hash=sha256:2b3076c79746d4f83257c9dea5ba0833b0711aeff8e6695670eadd140a0cf67f \
--hash=sha256:2ee40bc9c08fea0e71092838c0fc36df83f741807d8be9acf2fd4c4757b3171e \
--hash=sha256:365eb6bbb551c5623a73b1ed530f4e69083016f70f0cf5ca1a30ec66413bcda2 \
--hash=sha256:4a3325af8ed1effa7076967472c063b0000d609fd6f561c7751e43bab30297f1 \
--hash=sha256:56715389d240ac989af2188cd3bfc2b603d31b42330e915dacfe113b34d8e65b \
--hash=sha256:5989bbbbca072edc1875036c76aed74ec3dfc4741de7d1f060e181717efea6ac \
--hash=sha256:8058ab06d2f69355694f6e9a36edc45164474c516b4e2895bd67f8232d9022ed \
--hash=sha256:84f26ce1736d075d1df34f7c3f6b0b728cecd9a4da3e5160d5d887587830e7ce \
--hash=sha256:8a8cbe1ffa0ef5c2f1c90622e07211a8f93f48daa2be1bd4592bb8cda52b0285 \
--hash=sha256:a7956787658fb9253fba49741886409402a48039bee64b1697397d27284919af \
--hash=sha256:aa03c338e19456d3a6544a94293bd2905837ae22720cc161c83ea0fd13c3b09f \
--hash=sha256:c56022edc0f61febbdef89e6f699a0e991932c493b7293635b4814e102d040d2 \
--hash=sha256:c91d0a2b8218af2aa0385b867da8c13a620db22077686793c7231f012cb40619 \
--hash=sha256:defd5da3685f43f74698634ffc197aaf9b836b8ba0de0e57b34d7bc74d856fa9 \
--hash=sha256:e146062e4cc39db334cbde38d56d2c6301dd9cf6739ce07ce5a4d71b4cbc2d00 \
--hash=sha256:f8ade0430b6618ae0e21e52f61f6f3943dd6f3184ef6dc4491087b27940427f9
uv==0.5.10 \
--hash=sha256:064e977957e61aaaf7215bbd8f8566bcb22d7662c8adc929d039010fdb686436 \
--hash=sha256:06eb14988a75cc178241747a9437d23faad7d62e2d9b955db7e8a8098853341a \
--hash=sha256:253a02e03bf83bc0ec4e17242f54a4af2fef6191fcfb392b2613defd2b2a2f89 \
--hash=sha256:27f27eba58b9a71c3a7905ca966c69adf5a4a1df1dd14ef4d064c40cbaabc49e \
--hash=sha256:326603d44454a8856a5660bb406e99194f3c8d2cc4504c97c99871da59575022 \
--hash=sha256:4e0b91598e67d8c1228b47894a61fffb9d82caf8f1080bb9f21df49530118db6 \
--hash=sha256:502d9d10f5f139c850b1f6085a0c5719d49dd39d767504ce7c4245b47531f156 \
--hash=sha256:5890ca6703c371cecc88c2a7bf32fc47187a865fc577df0d40d390fcbdec76f0 \
--hash=sha256:68a6b992b7ebae9f3fa2f395348c95e6f05745246b067a26e7597a6730fcb690 \
--hash=sha256:7337ed40bae6f37d9335bf7f83bb43d08b6c141212b1ca3b15a9194c4d438ffe \
--hash=sha256:87dd4473ebf585fcd78a818bf8735ab39a157bef4f712e8b22e753b7344f6290 \
--hash=sha256:8bc47bd623b1f8fa883b7afbf480286b946512d9ac7bf23105e7d63ef702ea7b \
--hash=sha256:936759d8de8f78969756ee2b1558b4e9bd4b059922d0840cdd162a190c95ac50 \
--hash=sha256:adc0dad56118127b3a1cc0126149a9b8c643fd4e4c5fa37be6af4bd84d33d30c \
--hash=sha256:b61812ee4765f07db02ff616d4aac9c514857c0648459242a286243fe92d6223 \
--hash=sha256:d0d0e75a4337076f43936b11d6cc4cb11e261948c719adb8e208b78454a122a0 \
--hash=sha256:fa8607cc07cc9e666e531a9533b02d45bbb376ae314721434643c328298709b4
# via -r lock/requirements-dev-template.in
uvicorn==0.29.0 \
--hash=sha256:2c2aac7ff4f4365c206fd773a39bf4ebd1047c238f8b8268ad996829323473de \
Expand Down
76 changes: 67 additions & 9 deletions lock/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ annotated-types==0.7.0 \
# via
# -c lock/requirements-dev.txt
# pydantic
anyio==4.7.0 \
--hash=sha256:2f834749c602966b7d456a7567cafcb309f96482b5081d14ac93ccd457f9dd48 \
--hash=sha256:ea60c3723ab42ba6fff7e8ccb0488c898ec538ff4df1f1d5e642c3601d07e352
# via
# -c lock/requirements-dev.txt
# httpx
bcrypt==4.2.1 \
--hash=sha256:041fa0155c9004eb98a232d54da05c0b41d4b8e66b6fc3cb71b4b3f6144ba837 \
--hash=sha256:04e56e3fe8308a88b77e0afd20bec516f74aecf391cdd6e374f15cbed32783d6 \
Expand Down Expand Up @@ -33,20 +39,27 @@ bcrypt==4.2.1 \
# via
# -c lock/requirements-dev.txt
# crypt4gh
boto3==1.35.79 \
--hash=sha256:1fa26217cd33ded82e55aed4460cd55f7223fa647916aa0d3c5d6828e6ec7135 \
--hash=sha256:a673b0b6378c9ccbf045a31a43195b175e12aa5c37fb7635fcbfc8f48fb857b3
boto3==1.35.83 \
--hash=sha256:a4828d67b12892cb11fe9e6d86f40975a06db470676e61194968e3a32ec4c536 \
--hash=sha256:df2e0d57241de0f9c31b62e73093c2126e4fd73b87b1897ecf280a1b87a2b825
# via
# -c lock/requirements-dev.txt
# hexkit
botocore==1.35.79 \
--hash=sha256:245bfdda1b1508539ddd1819c67a8a2cc81780adf0715d3de418d64c4247f346 \
--hash=sha256:e6b10bb9a357e3f5ca2e60f6dd15a85d311b9a476eb21b3c0c2a3b364a2897c8
botocore==1.35.83 \
--hash=sha256:ba363183e4df79fbcfd5f3600fd473bd45a1de03d0d0b5e78abd59f276971d27 \
--hash=sha256:df5e4384838e50bbafd47e9b5fefb995e83cbb9412e7cd7c0db9555174d91bba
# via
# -c lock/requirements-dev.txt
# boto3
# hexkit
# s3transfer
certifi==2024.12.14 \
--hash=sha256:1275f7a45be9464efc1173084eaa30f866fe2e47d389406136d332ed4967ec56 \
--hash=sha256:b650d30f370c2b724812bee08008be0c4163b163ddaec3f2546c1caf65f191db
# via
# -c lock/requirements-dev.txt
# httpcore
# httpx
cffi==1.17.1 \
--hash=sha256:045d61c734659cc045141be4bae381a41d89b741f795af1dd018bfb532fd0df8 \
--hash=sha256:0984a4925a435b1da406122d4d7968dd861c1385afe3b45ba82b750f229811e2 \
Expand Down Expand Up @@ -168,18 +181,55 @@ docopt==0.6.2 \
# via
# -c lock/requirements-dev.txt
# crypt4gh
exceptiongroup==1.2.2 \
--hash=sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b \
--hash=sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc
# via
# -c lock/requirements-dev.txt
# anyio
ghga-service-commons==3.2.0 \
--hash=sha256:05f2fd0b31f282aaacccdbaddde9a7b2a56f5c5bac418961217b2738ed60e662 \
--hash=sha256:0849fde66b8e0ad546d5e76d9be01ae0429cab21703afc342b0d3f53a9d17c04
# via
# -c lock/requirements-dev.txt
# ghga-connector (pyproject.toml)
h11==0.14.0 \
--hash=sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d \
--hash=sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761
# via
# -c lock/requirements-dev.txt
# httpcore
hexkit==3.8.1 \
--hash=sha256:51c9f00003f5ed8dfe0585617031c530f2d08f704955f5c5e3340e6f947d597a \
--hash=sha256:d33b390e861e41deb54217ce85d0a5f3c8fe6ddc3656514d45cc173fe2775553
# via
# -c lock/requirements-dev.txt
# ghga-connector (pyproject.toml)
hishel==0.1.1 \
--hash=sha256:1f6421b78cc23fc43c610f651b7848c9b8eee2d29551d64a2ab0d45b319b6559 \
--hash=sha256:5b51acc340303faeef2f5cfc1658acb1db1fdc3e3ad76406265a485f9707c5d6
# via
# -c lock/requirements-dev.txt
# ghga-connector (pyproject.toml)
httpcore==1.0.7 \
--hash=sha256:8551cb62a169ec7162ac7be8d4817d561f60e08eaa485234898414bb5a8a0b4c \
--hash=sha256:a3fff8f43dc260d5bd363d9f9cf1830fa3a458b332856f34282de498ed420edd
# via
# -c lock/requirements-dev.txt
# httpx
httpx==0.27.2 \
--hash=sha256:7bb2708e112d8fdd7829cd4243970f0c223274051cb35ee80c03301ee29a3df0 \
--hash=sha256:f7c2be1d2f3c3c3160d441802406b206c2b76f5947b11115e6df10c6c65e66c2
# via
# -c lock/requirements-dev.txt
# hishel
idna==3.10 \
--hash=sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9 \
--hash=sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3
# via
# -c lock/requirements-dev.txt
# anyio
# httpx
jmespath==1.0.1 \
--hash=sha256:02e2e4cc71b5bcab88332eebf907519190dd9e6e82107fa7f83b1003a6252980 \
--hash=sha256:90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe
Expand Down Expand Up @@ -317,9 +367,9 @@ pydantic-core==2.27.1 \
# via
# -c lock/requirements-dev.txt
# pydantic
pydantic-settings==2.6.1 \
--hash=sha256:7fb0637c786a558d3103436278a7c4f1cfd29ba8973238a50c5bb9a55387da87 \
--hash=sha256:e0f92546d8a9923cb8941689abf85d6601a8c19a23e97a34b2964a2e3f813ca0
pydantic-settings==2.7.0 \
--hash=sha256:ac4bfd4a36831a48dbf8b2d9325425b549a0a6f18cea118436d728eb4f1c4d66 \
--hash=sha256:e00c05d5fa6cbbb227c84bd7487c5c1065084119b750df7c8c1a554aed236eb5
# via
# -c lock/requirements-dev.txt
# hexkit
Expand Down Expand Up @@ -439,6 +489,13 @@ six==1.17.0 \
# via
# -c lock/requirements-dev.txt
# python-dateutil
sniffio==1.3.1 \
--hash=sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2 \
--hash=sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc
# via
# -c lock/requirements-dev.txt
# anyio
# httpx
tenacity==9.0.0 \
--hash=sha256:807f37ca97d62aa361264d497b0e31e92b8027044942bfa756160d908320d73b \
--hash=sha256:93de0c98785b27fcf659856aa9f54bfbd399e29969b0621bc7f762bd441b4539
Expand All @@ -456,6 +513,7 @@ typing-extensions==4.12.2 \
--hash=sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8
# via
# -c lock/requirements-dev.txt
# anyio
# pydantic
# pydantic-core
# rich
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ classifiers = [
"Intended Audience :: Developers",
]
name = "ghga_connector"
version = "1.5.1"
version = "1.6.0"
description = "GHGA Connector - A CLI client application for interacting with the GHGA system."
dependencies = [
"typer~=0.12",
Expand All @@ -30,6 +30,7 @@ dependencies = [
"hexkit[s3]>=3, <4",
"rich>=13.7.1, <14",
"tenacity >=9.0.0, <10",
"hishel>=0.1.1, < 0.2",
]

[project.license]
Expand Down
1 change: 1 addition & 0 deletions src/ghga_connector/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@
MAX_PART_NUMBER = 10000
MAX_RETRIES = 5
MAX_WAIT_TIME = 60 * 60
CACHE_MIN_FRESH = 3
1 change: 1 addition & 0 deletions src/ghga_connector/core/api_calls/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def is_service_healthy(api_url: str, *, timeout_in_seconds: int = 5) -> bool:
def check_url(api_url: str, *, timeout_in_seconds: int = 5) -> bool:
"""Checks, if an url is reachable within a certain time"""
try:
# Don't cache health checks
response = httpx.get(url=api_url, timeout=timeout_in_seconds)
except httpx.RequestError:
return False
Expand Down
Loading

0 comments on commit 2a733c3

Please sign in to comment.