Skip to content

Conversation

@pcrespov
Copy link
Member

@pcrespov pcrespov commented Jan 23, 2025

What do these changes do?

The primary goal of this PR was to resolve the issue of hanging CI tests. Initially, we suspected it was related to #7008. Although we implemented a fix in #7018, similar tests continued to hang.

Additionally, we identified that the Redis health check was repeatedly retrying indefinitely in [int] webserver 02 and [unit] service-library. To address this, I introduced a maximum cancellation time for the associated health check task, which appears to have resolved the issue.

Overall, the primary cause of the hanging tests, as I noted in #7008, seems to be uncontrolled tasks persistently attempting to access services (e.g., database, Redis) that have already been shut down. This issue needs a follow up!!!

Some mode details of the changes

pytest-simcore and tests

postgres-database

  • ✅ ♻️ unified fixtures to create/destroy postgres engines for testing

servicelib

  • ♻️ renamed context manager to pause container
  • 🐛RedisClientSDK.shutdown has now a max time to cancel health-check task

configurations

  • 🔨 updates .ruff.toml removing warnings due to new configuration

Related issue/s

How to test

Dev-ops

None

@pcrespov pcrespov self-assigned this Jan 23, 2025
@codecov
Copy link

codecov bot commented Jan 23, 2025

Codecov Report

Attention: Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.

Project coverage is 87.69%. Comparing base (1353d02) to head (6f0065f).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7077      +/-   ##
==========================================
+ Coverage   87.15%   87.69%   +0.53%     
==========================================
  Files        1634     1626       -8     
  Lines       64353    63619     -734     
  Branches     2053     2054       +1     
==========================================
- Hits        56089    55788     -301     
+ Misses       7927     7495     -432     
+ Partials      337      336       -1     
Flag Coverage Δ
integrationtests 64.68% <ø> (+1.08%) ⬆️
unittests 85.96% <88.88%> (+0.45%) ⬆️
Components Coverage Δ
api ∅ <ø> (∅)
pkg_aws_library 93.49% <ø> (ø)
pkg_dask_task_models_library 97.09% <ø> (ø)
pkg_models_library 91.31% <ø> (ø)
pkg_notifications_library 84.57% <ø> (ø)
pkg_postgres_database 88.39% <ø> (ø)
pkg_service_integration 70.18% <ø> (ø)
pkg_service_library 74.20% <88.88%> (+0.07%) ⬆️
pkg_settings_library 90.49% <ø> (ø)
pkg_simcore_sdk 85.38% <ø> (ø)
agent 96.45% <ø> (ø)
api_server 90.55% <ø> (ø)
autoscaling 96.10% <ø> (ø)
catalog 90.32% <ø> (ø)
clusters_keeper 99.24% <ø> (ø)
dask_sidecar 91.26% <ø> (ø)
datcore_adapter 93.18% <ø> (ø)
director 77.01% <ø> (+0.08%) ⬆️
director_v2 91.28% <ø> (-0.02%) ⬇️
dynamic_scheduler 97.21% <ø> (ø)
dynamic_sidecar 89.75% <ø> (ø)
efs_guardian 90.39% <ø> (ø)
invitations 93.42% <ø> (ø)
osparc_gateway_server ∅ <ø> (∅)
payments 92.66% <ø> (ø)
resource_usage_tracker 89.17% <ø> (-0.17%) ⬇️
storage 89.57% <ø> (ø)
webclient ∅ <ø> (∅)
webserver 86.17% <ø> (+1.59%) ⬆️

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 1353d02...6f0065f. Read the comment docs.

@pcrespov pcrespov added this to the Singularity milestone Jan 23, 2025
@pcrespov pcrespov added the t:maintenance Some planned maintenance work label Jan 23, 2025
@pcrespov pcrespov force-pushed the mai/hanging-ci branch 2 times, most recently from 89a4fb5 to eb41779 Compare January 27, 2025 13:54
@pcrespov pcrespov changed the title WIP: 🔨 mai/hanging-ci ✅ 🔨 Maintenance: resolves tests hanging in CI Jan 27, 2025
@pcrespov pcrespov added the a:database associated to postgres service and postgres-database package label Jan 27, 2025
@pcrespov pcrespov added the a:redis area: redis service label Jan 27, 2025
@pcrespov pcrespov marked this pull request as ready for review January 27, 2025 23:25
@pcrespov pcrespov enabled auto-merge (squash) January 28, 2025 00:11
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. Please check my comments and questions

Copy link
Member

@odeimaiz odeimaiz left a comment

Choose a reason for hiding this comment

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

💪

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.

Very nice. Thanks for the effort!

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.

Thanks a lot! looks good.

@sonarqubecloud
Copy link

@pcrespov pcrespov merged commit b225239 into ITISFoundation:master Jan 28, 2025
92 of 94 checks passed
@pcrespov pcrespov deleted the mai/hanging-ci branch January 28, 2025 10:52
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Mar 6, 2025
63 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a:database associated to postgres service and postgres-database package a:redis area: redis service t:maintenance Some planned maintenance work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flaky webserver 02 unit tests times-out

7 participants