Skip to content

Commit 301752b

Browse files
authored
Merge pull request #183 from lsst-sqre/tickets/DM-50331
DM-50331: Commit the DB session in ingest-lsst-texmf CLI
2 parents 2840315 + 6f7fde5 commit 301752b

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
<!-- scriv-insert-here -->
44

5+
<a id='changelog-0.13.1'></a>
6+
## 0.13.1 (2025-04-30)
7+
8+
### Bug fixes
9+
10+
- The database session is now committed after running `ook ingest-lsst-texmf`.
11+
512
<a id='changelog-0.13.0'></a>
613

714
## 0.13.0 (2025-04-30)

src/ook/cli.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ async def ingest_lsst_texmf(*, git_ref: str) -> None:
229229
) as factory:
230230
ingest_service = await factory.create_lsst_texmf_ingest_service()
231231
await ingest_service.ingest(git_ref=git_ref)
232+
await factory.db_session.commit()
232233
await engine.dispose()
233234
logger.info("Completed ingest of lsst/lsst-texmf", git_ref=git_ref)
234235

src/ook/factory.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,11 @@ def http_client(self) -> AsyncClient:
168168
"""The shared HTTP client."""
169169
return self._process_context.http_client
170170

171+
@property
172+
def db_session(self) -> async_scoped_session:
173+
"""The database session."""
174+
return self._session
175+
171176
def create_github_client_factory(self) -> GitHubAppClientFactory:
172177
"""Create a GitHub client factory.
173178

0 commit comments

Comments
 (0)