Skip to content

Conversation

@pcrespov
Copy link
Member

@pcrespov pcrespov commented Jun 30, 2025

What do these changes do?

  • πŸ”¨ Introduced a new recipe to update dependencies whose names start with a given prefix.
    • Useful for batch-updating related packages (e.g., all pytest* or pydantic* libraries).
  • β¬†οΈβœ… Usage & upgrade:
    • Navigate to requirements/tools and run make help for instructions.
    • ⬆️ Example executed in this PR: Upgrade all pytest* libraries across the repo using:
      make req-all startswith=pytest
    • βœ… fixes removal of event_loop in pytest-asyncio. Followed migration instructions.
  • Screenshot:
    image
  • βœ… tests using uvloop where used in production

Changes

In the tables below, you can see that all pytest* library versions have been unified across the entire repository. Additionally, some updates were made to celery-library to correct previously incorrect requirements.

  • #packages before ~ 34
  • #packages after ~ 36
# name before after upgrade count packages
1 aiohttp 3.12.12 3.12.13 1 testsπŸ§ͺ
2 aiosignal 1.3.2 1.4.0 minor 1 testsπŸ§ͺ
3 attrs 25.1.0 25.3.0 minor 1 testsπŸ§ͺ
4 certifi 2025.1.31 2025.6.15 minor 1 testsπŸ§ͺ
5 charset-normalizer 3.4.1 3.4.2 1 testsπŸ§ͺ
6 coverage 7.6.12 7.9.2 minor 1 testsπŸ§ͺ
7 frozenlist 1.5.0 1.7.0 minor 1 testsπŸ§ͺ
8 iniconfig 2.0.0 2.1.0 minor 1 testsπŸ§ͺ
9 jsonschema 4.23.0 4.24.0 minor 1 testsπŸ§ͺ
10 jsonschema-specifications 2024.10.1 2025.4.1 MAJOR 1 testsπŸ§ͺ
11 lazy-object-proxy 1.10.0 1.11.0 minor 1 testsπŸ§ͺ
12 more-itertools 10.6.0 10.7.0 minor 1 testsπŸ§ͺ
13 multidict 6.1.0 6.6.3 minor 1 testsπŸ§ͺ
14 openapi-core 0.19.4 0.19.5 1 testsπŸ§ͺ
15 openapi-spec-validator 0.7.1 0.7.2 1 testsπŸ§ͺ
16 packaging 24.2 25.0 MAJOR 1 testsπŸ§ͺ
17 pluggy 1.5.0 1.6.0 minor 1 testsπŸ§ͺ
18 propcache 0.3.0 0.3.2 1 testsπŸ§ͺ
19 psutil 6.1.1 7.0.0 MAJOR 2 storage⬆️πŸ§ͺ
20 pygments 2.19.1 2.18.0,2.19.2,2.17.2,2.19.1 2 models-libraryπŸ”§
public-apiπŸ§ͺ
21 pytest 8.3.5 8.4.1 minor 37 agentπŸ§ͺ
api-serverπŸ§ͺ
autoscalingπŸ§ͺ
aws-libraryπŸ§ͺ
catalogπŸ§ͺ
celery-libraryπŸ§ͺ
clusters-keeperπŸ§ͺ
common-libraryπŸ§ͺ
dask-sidecarπŸ§ͺ
dask-task-models-libraryπŸ§ͺ
datcore-adapterπŸ§ͺ
director-v2πŸ§ͺ
directorπŸ§ͺ
docker-api-proxyπŸ§ͺ
dynamic-schedulerπŸ§ͺ
dynamic-sidecarπŸ§ͺ
e2e-playwrightπŸ§ͺπŸ§ͺ
environment-setupπŸ§ͺ
invitationsπŸ§ͺ
migrationπŸ§ͺ
models-libraryπŸ§ͺ
notifications-libraryπŸ§ͺ
notificationsπŸ§ͺ
paymentsπŸ§ͺ
postgres-databaseπŸ§ͺ
public-apiπŸ§ͺ
resource-usage-trackerπŸ§ͺ
service-integrationπŸ§ͺπŸ§ͺ
service-libraryπŸ§ͺ
settings-libraryπŸ§ͺ
simcore-sdkπŸ§ͺ
storageπŸ§ͺ
swarm-deployπŸ§ͺ
testsπŸ§ͺ
webπŸ§ͺ
22 pytest-asyncio 0.26.0 1.0.0 MAJOR 32 agentπŸ§ͺ
api-serverπŸ§ͺ
autoscalingπŸ§ͺ
aws-libraryπŸ§ͺ
catalogπŸ§ͺ
celery-libraryπŸ§ͺ
clusters-keeperπŸ§ͺ
common-libraryπŸ§ͺ
dask-sidecarπŸ§ͺ
dask-task-models-libraryπŸ§ͺ
datcore-adapterπŸ§ͺ
director-v2πŸ§ͺ
directorπŸ§ͺ
docker-api-proxyπŸ§ͺ
dynamic-schedulerπŸ§ͺ
dynamic-sidecarπŸ§ͺ
environment-setupπŸ§ͺ
invitationsπŸ§ͺ
migrationπŸ§ͺ
models-libraryπŸ§ͺ
notifications-libraryπŸ§ͺ
notificationsπŸ§ͺ
paymentsπŸ§ͺ
postgres-databaseπŸ§ͺ
public-apiπŸ§ͺ
resource-usage-trackerπŸ§ͺ
service-libraryπŸ§ͺ
simcore-sdkπŸ§ͺ
storageπŸ§ͺ
swarm-deployπŸ§ͺ
testsπŸ§ͺ
webπŸ§ͺ
23 pytest-celery 1.1.3 1.2.0 minor 1 storageπŸ§ͺ
24 pytest-cov 6.0.0, 6.1.1 6.2.1 minor 31 agentπŸ§ͺ
api-serverπŸ§ͺ
autoscalingπŸ§ͺ
aws-libraryπŸ§ͺ
catalogπŸ§ͺ
celery-libraryπŸ§ͺ
clusters-keeperπŸ§ͺ
common-libraryπŸ§ͺ
dask-sidecarπŸ§ͺ
dask-task-models-libraryπŸ§ͺ
datcore-adapterπŸ§ͺ
director-v2πŸ§ͺ
directorπŸ§ͺ
docker-api-proxyπŸ§ͺ
dynamic-schedulerπŸ§ͺ
dynamic-sidecarπŸ§ͺ
invitationsπŸ§ͺ
migrationπŸ§ͺ
models-libraryπŸ§ͺ
notifications-libraryπŸ§ͺ
notificationsπŸ§ͺ
paymentsπŸ§ͺ
postgres-databaseπŸ§ͺ
resource-usage-trackerπŸ§ͺ
service-integrationπŸ§ͺ
service-libraryπŸ§ͺ
settings-libraryπŸ§ͺ
simcore-sdkπŸ§ͺ
storageπŸ§ͺ
testsπŸ§ͺ
webπŸ§ͺ
25 pytest-docker 3.2.0, 3.2.1 3.2.3 8 api-serverπŸ§ͺ
catalogπŸ§ͺ
director-v2πŸ§ͺ
directorπŸ§ͺ
migrationπŸ§ͺ
postgres-databaseπŸ§ͺ
service-libraryπŸ§ͺ
webπŸ§ͺ
26 pytest-docker-tools 3.1.3 3.1.9 1 storageπŸ§ͺ
27 pytest-mock 3.14.0 3.14.1 28 agentπŸ§ͺ
api-serverπŸ§ͺ
autoscalingπŸ§ͺ
aws-libraryπŸ§ͺ
catalogπŸ§ͺ
celery-libraryπŸ§ͺ
clusters-keeperπŸ§ͺ
common-libraryπŸ§ͺ
dask-sidecarπŸ§ͺ
dask-task-models-libraryπŸ§ͺ
datcore-adapterπŸ§ͺ
director-v2πŸ§ͺ
directorπŸ§ͺ
docker-api-proxyπŸ§ͺ
dynamic-schedulerπŸ§ͺ
dynamic-sidecarπŸ§ͺ
migrationπŸ§ͺ
models-libraryπŸ§ͺ
notifications-libraryπŸ§ͺ
notificationsπŸ§ͺ
paymentsπŸ§ͺ
resource-usage-trackerπŸ§ͺ
service-libraryπŸ§ͺ
settings-libraryπŸ§ͺ
simcore-sdkπŸ§ͺ
storageπŸ§ͺ
swarm-deployπŸ§ͺ
webπŸ§ͺ
28 pytest-xdist 3.6.1 3.8.0 minor 5 datcore-adapterπŸ§ͺ
director-v2πŸ§ͺ
service-libraryπŸ§ͺ
simcore-sdkπŸ§ͺ
webπŸ§ͺ
29 requests 2.32.3 2.32.4 1 testsπŸ§ͺ
30 rpds-py 0.23.1 0.26.0 minor 1 testsπŸ§ͺ
31 termcolor 2.5.0 3.1.0 MAJOR 1 testsπŸ§ͺ
32 urllib3 2.3.0 2.5.0 minor 1 testsπŸ§ͺ
33 werkzeug 3.1.3 3.1.1 πŸ”₯ downgrade 1 testsπŸ§ͺ
34 yarl 1.18.3 1.20.1 minor 1 testsπŸ§ͺ

Legend:

  • ⬆️ base dependency (only services because packages are floating)
  • πŸ§ͺ test dependency
  • πŸ”§ tool dependency

Repo-wide overview of libraries

  • #reqs files parsed: 107
# name versions-base versions-test versions-tool
260 pytest 8.4.1 8.4.1
261 pytest-aiohttp 1.1.0
262 pytest-asyncio 1.0.0
263 pytest-base-url 2.1.0
264 pytest-benchmark 5.1.0
265 pytest-celery 1.2.0
266 pytest-cov 6.2.1
267 pytest-docker 3.2.3
268 pytest-docker-tools 3.1.9
269 pytest-html 4.1.1
270 pytest-icdiff 0.9
271 pytest-instafail 0.5.0
272 pytest-localftpserver 1.3.2
273 pytest-metadata 3.1.1
274 pytest-mock 3.14.1
275 pytest-playwright 0.7.0
276 pytest-runner 6.0.1
277 pytest-sugar 1.0.0
278 pytest-xdist 3.8.0

Related issue/s

How to test

cd requirements/tools
make shell
$ make help
...
$ make -n reqs startswith=pytest

Dev-ops

None

@pcrespov pcrespov self-assigned this Jun 30, 2025
@pcrespov pcrespov added the t:maintenance Some planned maintenance work label Jun 30, 2025
@pcrespov pcrespov changed the title Mai/pytest upgrade repo wide πŸ”¨β¬†οΈ Add support for batch-updating dependencies by prefix (e.g., pytest*) Jun 30, 2025
@pcrespov pcrespov marked this pull request as ready for review June 30, 2025 12:18
@pcrespov pcrespov added this to the Engage milestone Jun 30, 2025
Copy link
Collaborator

@matusdrobuliak66 matusdrobuliak66 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice improvement thanks!

@pcrespov pcrespov force-pushed the mai/pytest-upgrade-repo-wide branch from 126f85c to c3fd298 Compare June 30, 2025 12:24
@codecov
Copy link

codecov bot commented Jun 30, 2025

Codecov Report

All modified and coverable lines are covered by tests βœ…

Project coverage is 88.25%. Comparing base (f47c538) to head (31ed953).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8014      +/-   ##
==========================================
+ Coverage   87.90%   88.25%   +0.35%     
==========================================
  Files        1855     1855              
  Lines       71517    71517              
  Branches     1258     1258              
==========================================
+ Hits        62865    63117     +252     
+ Misses       8288     8036     -252     
  Partials      364      364              
Flag Coverage Ξ”
integrationtests 64.25% <ΓΈ> (+0.08%) ⬆️
unittests 86.87% <100.00%> (+0.32%) ⬆️
Components Coverage Ξ”
api 76.84% <ΓΈ> (ΓΈ)
pkg_aws_library 93.93% <ΓΈ> (ΓΈ)
pkg_celery_library 87.15% <ΓΈ> (ΓΈ)
pkg_dask_task_models_library 79.62% <ΓΈ> (ΓΈ)
pkg_models_library 93.27% <ΓΈ> (ΓΈ)
pkg_notifications_library 85.26% <ΓΈ> (ΓΈ)
pkg_postgres_database 88.19% <ΓΈ> (ΓΈ)
pkg_service_integration 69.92% <ΓΈ> (ΓΈ)
pkg_service_library 71.37% <100.00%> (-0.25%) ⬇️
pkg_settings_library 90.64% <ΓΈ> (ΓΈ)
pkg_simcore_sdk 85.05% <ΓΈ> (+0.05%) ⬆️
agent 96.29% <ΓΈ> (ΓΈ)
api_server 92.64% <ΓΈ> (ΓΈ)
autoscaling 96.03% <ΓΈ> (ΓΈ)
catalog 92.58% <ΓΈ> (+0.37%) ⬆️
clusters_keeper 99.13% <ΓΈ> (ΓΈ)
dask_sidecar 92.35% <ΓΈ> (ΓΈ)
datcore_adapter 97.94% <ΓΈ> (ΓΈ)
director 76.91% <ΓΈ> (+0.09%) ⬆️
director_v2 90.95% <ΓΈ> (ΓΈ)
dynamic_scheduler 96.69% <ΓΈ> (ΓΈ)
dynamic_sidecar 90.09% <ΓΈ> (ΓΈ)
efs_guardian 89.65% <ΓΈ> (ΓΈ)
invitations 93.60% <ΓΈ> (ΓΈ)
payments 92.57% <ΓΈ> (ΓΈ)
resource_usage_tracker 92.52% <ΓΈ> (+3.52%) ⬆️
storage 86.78% <ΓΈ> (+0.50%) ⬆️
webclient βˆ… <ΓΈ> (βˆ…)
webserver 88.63% <ΓΈ> (+0.87%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data
Powered by Codecov. Last update f47c538...31ed953. Read the comment docs.

πŸš€ New features to boost your workflow:
  • πŸ“¦ JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pcrespov
Copy link
Member Author

pcrespov commented Jun 30, 2025

@giancarloromeo can you please folow up and investigate why we have two versions of pytest-celery?
image
image

@giancarloromeo
Copy link
Contributor

giancarloromeo commented Jun 30, 2025

@giancarloromeo can you please folow up and investigate why we have two versions of pytest-celery? image image

This seems the reason why pytest-celery remained to the previous in storage compared to the one in celery-library:

services/storage/requirements on ξ‚  add-notifications-service [!?] via 🐍 v3.11.12 (.venv) 
❯ make reqs upgrade=pytest-celery==1.2.0 
cd ..; \
uv pip compile --upgrade-package "pytest-celery==1.2.0" \
        --no-header \
        --output-file requirements/_test.txt requirements/_test.in
  Γ— No solution found when resolving dependencies:
  ╰─▢ Because pytest-celery==1.2.0 depends on psutil>=7.0.0 and psutil==6.1.1, we can conclude that pytest-celery==1.2.0 cannot be
      used.
      And because you require pytest-celery==1.2.0, we can conclude that your requirements are unsatisfiable.

Copy link
Member

@sanderegg sanderegg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@pcrespov pcrespov force-pushed the mai/pytest-upgrade-repo-wide branch from d426e67 to 6aaa755 Compare July 3, 2025 16:09
@pcrespov pcrespov changed the title πŸ”¨β¬†οΈ Add support for batch-updating dependencies by prefix (e.g., pytest*) πŸ”¨β¬†οΈ Add support for batch-updating dependencies by prefix (e.g., pytest*) + βœ… tests using uvloop Jul 3, 2025
Copy link
Contributor

@bisgaard-itis bisgaard-itis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thanks a lot for the effort

@pcrespov pcrespov enabled auto-merge (squash) July 4, 2025 13:22
@pcrespov
Copy link
Member Author

pcrespov commented Jul 4, 2025

@mergify queue

@mergify
Copy link
Contributor

mergify bot commented Jul 4, 2025

queue

🟠 Waiting for conditions to match

  • -closed [πŸ“Œ queue requirement]
  • any of: [πŸ”€ queue conditions]
    • all of: [πŸ“Œ queue conditions of queue default]
      • branch-protection-review-decision = APPROVED [πŸ›‘ GitHub branch protection]
      • #approved-reviews-by >= 2 [πŸ›‘ GitHub branch protection]
      • #approved-reviews-by>=2
      • #changes-requested-reviews-by = 0 [πŸ›‘ GitHub branch protection]
      • #changes-requested-reviews-by=0
      • #review-threads-unresolved = 0 [πŸ›‘ GitHub branch protection]
      • #review-threads-unresolved=0
      • -conflict
      • -draft
      • base=master
      • label!=πŸ€–-do-not-merge
      • label=πŸ€–-automerge
      • any of: [πŸ›‘ GitHub branch protection]
        • check-skipped = deploy to dockerhub
        • check-neutral = deploy to dockerhub
        • check-success = deploy to dockerhub
      • any of: [πŸ›‘ GitHub branch protection]
        • check-success = system-tests
        • check-neutral = system-tests
        • check-skipped = system-tests
      • any of: [πŸ›‘ GitHub branch protection]
        • check-success = unit-tests
        • check-neutral = unit-tests
        • check-skipped = unit-tests
      • any of: [πŸ›‘ GitHub branch protection]
        • check-success = check OAS' are up to date
        • check-neutral = check OAS' are up to date
        • check-skipped = check OAS' are up to date
      • any of: [πŸ›‘ GitHub branch protection]
        • check-success = integration-tests
        • check-neutral = integration-tests
        • check-skipped = integration-tests
      • any of: [πŸ›‘ GitHub branch protection]
        • check-success = build-test-images (frontend) / build-test-images
        • check-neutral = build-test-images (frontend) / build-test-images
        • check-skipped = build-test-images (frontend) / build-test-images
  • -conflict [πŸ“Œ queue requirement]
  • -draft [πŸ“Œ queue requirement]
  • any of: [πŸ“Œ queue -> configuration change requirements]
    • -mergify-configuration-changed
    • check-success = Configuration changed

@pcrespov pcrespov added the πŸ€–-automerge marks PR as ready to be merged for Mergify label Jul 4, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 4, 2025

@pcrespov pcrespov disabled auto-merge July 4, 2025 18:02
@pcrespov pcrespov merged commit 44e0e4e into ITISFoundation:master Jul 4, 2025
201 of 205 checks passed
@pcrespov pcrespov deleted the mai/pytest-upgrade-repo-wide branch July 4, 2025 18:02
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Aug 5, 2025
88 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

πŸ€–-automerge marks PR as ready to be merged for Mergify t:maintenance Some planned maintenance work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants