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

sqlalchemy_utils prevents migration to sqlalchemy 1.4 #11459

Closed
jdavcs opened this issue Feb 24, 2021 · 1 comment
Closed

sqlalchemy_utils prevents migration to sqlalchemy 1.4 #11459

jdavcs opened this issue Feb 24, 2021 · 1 comment
Assignees
Labels
area/database Galaxy's database or data access layer area/dependencies kind/feature
Milestone

Comments

@jdavcs
Copy link
Member

jdavcs commented Feb 24, 2021

Ref: #10892
Updating to SQLAlchemy 1.4 (currently 1.4.0b3 as of 2/15/21) breaks Galaxy. The immediate cause is incompatibility of SQLAlchemy 1.4 with sqlalchemy-utils. The specific error happens because sqlalchemy-utils imports a private member from sqlalchemy (which was removed in this commit). This is just the first error that prevents Galaxy from starting up; there may be more errors.

We use this dependency in 1 unit test + 7 lib modules. We use create_database, database_exists, view.DropView, view.CreateView, and create_view.

I see 3 possible solutions: (a) fix the problem upstream; (b) find an alternative library; (c) implement the required functionality.

EDIT: currently, addressing this upstream.

EDIT 2: after addressing this upstream, I'm restoring the initial version of this issue (see below). Tentatively, I see 2 options: (a) use a patched fork; and (b) implement locally. I'll try both, but I'm inclined to do (b). We really use just a fraction of what sqlalchemy-utils has to offer, so implementing what we need seems the simplest way. To quote the Go community, "A little copying is better than a little dependency".

---restored version:
Given that sqlalchemy-utils is not very actively maintained (v. 0.36.8, highest supported Python = 3.6, last commit on 9/27/20, although there is some discussion in Issues) and has not been updated to support SQLAlchemy 1.4, I think it's unreasonable to patch this one error, as it is unlikely to address the overall compatibility issue.

Selecting another library is an option; however, given the limited scope of its usage in our code base, as well as the relatively simple functionality it provides, I think implementing this in the code base makes more sense. As an extra benefit, that will reduce our dependency graph.

@jdavcs jdavcs added kind/feature area/database Galaxy's database or data access layer area/dependencies labels Feb 24, 2021
@jdavcs jdavcs added this to the 21.05 milestone Feb 24, 2021
@jdavcs jdavcs self-assigned this Feb 24, 2021
@jdavcs
Copy link
Member Author

jdavcs commented Mar 24, 2021

Resolved in #11696.

@jdavcs jdavcs closed this as completed Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/database Galaxy's database or data access layer area/dependencies kind/feature
Projects
None yet
Development

No branches or pull requests

1 participant