Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

fix: Missing replacement of connection with session for ORM query #553

Merged
merged 5 commits into from
Mar 21, 2022

Conversation

fregataa
Copy link
Member

@fregataa fregataa commented Mar 17, 2022

fix: lablup/backend.ai#393
follow-up-for: #541

SQLAlchemy connection: https://docs.sqlalchemy.org/en/14/core/connections.html#sqlalchemy.engine.Connection
SQLAlchemy session: https://docs.sqlalchemy.org/en/14/orm/session_api.html#sqlalchemy.orm.Session

Connection is a functionality for DB-API, while Session can manage operations for ORM-mapped objects.
Session should be used when we want to use ORM functionalities.

@fregataa fregataa added the bug label Mar 17, 2022
@fregataa fregataa self-assigned this Mar 17, 2022
@fregataa fregataa requested review from achimnol and kyujin-cho March 17, 2022 06:42
@codecov
Copy link

codecov bot commented Mar 17, 2022

Codecov Report

Merging #553 (5d2dc0b) into main (7f7a49f) will decrease coverage by 1.83%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main     #553      +/-   ##
==========================================
- Coverage   49.66%   47.83%   -1.84%     
==========================================
  Files          55       55              
  Lines        8946     9701     +755     
==========================================
+ Hits         4443     4640     +197     
- Misses       4503     5061     +558     
Impacted Files Coverage Δ
src/ai/backend/manager/models/image.py 49.38% <0.00%> (-0.13%) ⬇️
src/ai/backend/manager/plugin/error_monitor.py 45.76% <0.00%> (-20.34%) ⬇️
src/ai/backend/manager/scheduler/predicates.py 51.85% <0.00%> (-0.68%) ⬇️
src/ai/backend/manager/registry.py 17.42% <0.00%> (-0.29%) ⬇️
src/ai/backend/manager/models/base.py 53.80% <0.00%> (-0.24%) ⬇️
src/ai/backend/manager/server.py 63.85% <0.00%> (+0.16%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7f7a49f...5d2dc0b. Read the comment docs.

@achimnol achimnol added this to the 22.03 milestone Mar 21, 2022
@achimnol achimnol changed the title fix: change db connection to session for sqlalch orm fix: Missing replacement connection to session for ORM query Mar 21, 2022
@achimnol achimnol changed the title fix: Missing replacement connection to session for ORM query fix: Missing replacement of connection with session for ORM query Mar 21, 2022
@achimnol achimnol merged commit c1a2c20 into main Mar 21, 2022
@achimnol achimnol deleted the fix/change-dbconn-to-sess branch March 21, 2022 14:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix image in client-py
2 participants