Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⬆️ Maintenance/update aioredis #2898

Merged

Conversation

sanderegg
Copy link
Member

@sanderegg sanderegg commented Mar 17, 2022

What do these changes do?

Upgrades aioredis to 2.0.1
webserver: removes aioredlock (was preventing update of aioredis), is replaced by aioredis integrated lock, new tests in place to check functionality.

reduces the amount of warnings while testing

Important NOTE: once the official Redis python package 4.2.0 comes out, then asyncio module will be integrated and aioredis will not be necessary anymore.

1/2 Changes to libraries (only updated libraries are included)

  • #packages before: 5
  • #packages after : 5
# name before after upgrade count
1 aiofiles 0.5.0 0.8.0 minor 1
2 aioredis 1.3.1 2.0.1 MAJOR 3
3 aioredlock 0.7.3 🗑️ removed 1
4 hiredis 2.0.0 🗑️ removed 3
5 redis 4.2.0 4.2.2 1

Bonus:

  • fix unclosed loops in tests:
    • test_resource_manager.py::test_regression_removing_unexisting_user: redis.exceptions.ConnectionError: no running event loop
    • test_version_control_handlers.py::test_delete_project_and_repo:RuntimeError: no running event loop
    • DeprecationWarning: Deprecated, use .url #1654 assert r.url_obj.path == url.path

Related issue/s

How to test

  • Covered by CI

Checklist

@sanderegg sanderegg added this to the E.Shackleton milestone Mar 17, 2022
@sanderegg sanderegg self-assigned this Mar 17, 2022
@sanderegg sanderegg force-pushed the maintenance/update_aioredis branch from a5b6ba4 to 6c5c763 Compare March 17, 2022 07:43
@codecov
Copy link

codecov bot commented Mar 17, 2022

Codecov Report

Merging #2898 (9c33edc) into master (b6fa6c2) will increase coverage by 6.3%.
The diff coverage is 71.6%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #2898      +/-   ##
=========================================
+ Coverage    68.9%   75.2%    +6.3%     
=========================================
  Files         338     681     +343     
  Lines       16126   28398   +12272     
  Branches     2012    3659    +1647     
=========================================
+ Hits        11111   21375   +10264     
- Misses       4596    6323    +1727     
- Partials      419     700     +281     
Flag Coverage Δ
integrationtests ?
unittests 75.2% <71.6%> (-3.7%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ges/settings-library/src/settings_library/redis.py 0.0% <0.0%> (ø)
...ore_service_webserver/exporter/request_handlers.py 38.8% <0.0%> (-52.6%) ⬇️
...r/src/simcore_service_webserver/redis_constants.py 100.0% <ø> (ø)
.../web/server/src/simcore_service_webserver/redis.py 83.3% <37.5%> (-7.3%) ⬇️
...ce_webserver/studies_dispatcher/_studies_access.py 88.1% <76.9%> (+65.4%) ⬆️
...imcore_service_webserver/garbage_collector_core.py 64.7% <85.7%> (+9.4%) ⬆️
...simcore_service_webserver/projects/project_lock.py 90.9% <87.5%> (-3.9%) ⬇️
...odels-library/src/models_library/projects_state.py 98.3% <100.0%> (ø)
...simcore_service_webserver/projects/projects_api.py 75.4% <100.0%> (+15.6%) ⬆️
...ore_service_webserver/resource_manager/registry.py 97.1% <100.0%> (+4.3%) ⬆️
... and 519 more

@sanderegg sanderegg force-pushed the maintenance/update_aioredis branch 2 times, most recently from 4f079fe to 1b52852 Compare March 22, 2022 17:20
@sanderegg sanderegg force-pushed the maintenance/update_aioredis branch from 6148231 to e9d2a1f Compare April 5, 2022 10:45
@sanderegg sanderegg changed the title WIP: ⬆️ Maintenance/update aioredis ⬆️ Maintenance/update aioredis Apr 5, 2022
@sanderegg sanderegg marked this pull request as ready for review April 5, 2022 10:54
@sanderegg sanderegg requested review from pcrespov and GitHK as code owners April 5, 2022 10:54
@sanderegg sanderegg requested a review from mrnicegyu11 April 5, 2022 10:55
Copy link
Member

@mrnicegyu11 mrnicegyu11 left a comment

Choose a reason for hiding this comment

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

Awesome, thanks for this update and the additional tests. Now we make doubly sure all locks are released :--)

Copy link
Contributor

@GitHK GitHK left a comment

Choose a reason for hiding this comment

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

👍
Are you sure about the version of redis-py? I think it's already present in the one you can install now via pip.

@sanderegg
Copy link
Member Author

+1 Are you sure about the version of redis-py? I think it's already present in the one you can install now via pip.

good that you ask as actually I just see redis 4.2.2 came out yesterday. now aioredis is included, so I will change for it.

@sanderegg sanderegg force-pushed the maintenance/update_aioredis branch 5 times, most recently from 243dc06 to 98667d8 Compare April 7, 2022 12:35
@sanderegg sanderegg force-pushed the maintenance/update_aioredis branch from 98667d8 to a3306eb Compare April 7, 2022 14:04
@sanderegg sanderegg merged commit f65fc9a into ITISFoundation:master Apr 7, 2022
@sanderegg sanderegg deleted the maintenance/update_aioredis branch April 7, 2022 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants