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

[build] Drop py2-mysqldb from crabserver.spec "Requires" list #6228

Closed
mapellidario opened this issue Oct 30, 2020 · 7 comments
Closed

[build] Drop py2-mysqldb from crabserver.spec "Requires" list #6228

mapellidario opened this issue Oct 30, 2020 · 7 comments

Comments

@mapellidario
Copy link
Member

crabserver.spec lists py2-mysqldb.spec as a dependency.

py2-mysqldb builds v1.2.4b4 of MySQLdb - github, but MySQLdb does not support python3.

I had a quick look at CRABServer repository and I could not find any import of MySQLdb, in particular I could not find

import MySQLdb
# or
import _mysql_exceptions.py

Thus, I would consider safe dropping the dependency from py2-mysqldb in crabserver.spec.

Do you agree? Did I miss something?

@amaltaro
Copy link

Thanks Dario!

@belforte
Copy link
Member

Well.. yes and no. Let me explain.
CRAB picks DataBase via WMCore. So if we wanted to deploy CRABServer on MySQLdb we would
activate lines like
if request.db['type'].__name__ == 'MySQLdb':
in ./src/python/WMCore/REST/Server.py
I do not know how that eventually imports the actual MySQLdb interface library, since WMCore does not have that import either, most likely via sqlalchemy which I assume has a dependency from MySql in one way or another.
In other words, you can try, but I believe that simply dropping the dependency either gives an error from sqlalchemy at buld time, or only crashes painfully in case one asks the code to talk to MySQL (the latter is hard to try for sure, let's not do it!),

That said, developers have been very good originally to write code which supports both DB's, but in practice we have never ran CRAB on MySql, so if you tell me "only use Oracle from now one", I have no problem.

I hope I answered the question. Indeed I do not have clear cut wisdom here, but would say: let's do whatever you decide for WMA/DBS and will work for CRAB as well.

@belforte
Copy link
Member

@mapellidario @amaltaro I am keeping this open. Take your time and let me know how it ends !

@belforte belforte assigned amaltaro and mapellidario and unassigned belforte Oct 30, 2020
@amaltaro
Copy link

Okay. I still have to test how WMAgent deals with MySQL/MariaDB without that dependency. This is something I don't fully understand, but if WMAgent works without it, I see no reason why CRABServer wouldn't (even though it has never been enabled against MySQLDB backend over the last few years...).

@belforte
Copy link
Member

I fully agree. Maybe we can even close this ?

@amaltaro
Copy link

I'd leave it opened until we really get rid of that dependency from our spec files.

@belforte belforte self-assigned this Oct 30, 2020
@belforte
Copy link
Member

belforte commented Mar 1, 2021

py2-mysqldb was successfully remove from crab spec files.
cms-sw/cmsdist@cf51d11#diff-06b03e7a1e5ff9a166627fc1b08dff0fe1c995ff38bb0f42e0c1c996022f463f

@belforte belforte closed this as completed Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants