Repository navigation
[v8] fix SQLAlchemy 2.1 incompatibility in InstalledComponentsDB - #8855
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Backports to
rel-v8r0of the SQLAlchemy 2.x compatibility fixes already merged intorel-v9r0via #8561:fix: avoid using text— rewritesInstalledComponentsDBto use ORM expressions instead of building raw SQL strings (removessession.execute(<legacy Query>), which SQLAlchemy 2.1 rejects, and removes the SQL-injection-prone f-stringtext()filters)fix: use object properties directly— replaces the remainingtext(Column.attr == value)callsBoth cherry-picked without conflicts.
Context: conda-forge published SQLAlchemy 2.1.0 on 2026-09-25. The DIRACOS2 installer builds with
sqlalchemy >=1.4.36(no upper bound), so installers built since then ship SQLAlchemy 2.1.x and the DIRACOS2Integration tests (Py3 server) (rel-v8r0)job has been failing on every run since (e.g. DIRACOS2#204 andmain's scheduled runs).rel-v9r0andintegrationpass because they already contain these fixes.Evidence
Local repro against SQLAlchemy 2.1.6 (same version the failing CI installer resolves), driving the real
InstalledComponentsDBwith an in-memory engine:Merge Danger
Door: two-way (revertable cherry-picks; no schema or API changes)
Blast Radius:
InstalledComponentsDB/ComponentMonitoringon DIRAC v8 installations. Once merged, DIRACOS2's rel-v8r0 integration job (installed from therel-v8r0branch) should go green again.