-
Notifications
You must be signed in to change notification settings - Fork 108
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 dbs3-client/dbs3-pycurl-client on a python3 stack #10306
Comments
Just for logging purposes and for keeping everything we'll need for this issue at one place, I am putting a pointer here [1] to a message from Shahzad giving the instructions on how to install a previously compiled single package from the p.s. Thanks @amaltaro and @smuzaffar for the instructions provided. |
Again just to keep track of the process, here is the PR at cmsdist that introduces the py3 version of the dbs3-clinet packages: FYI @amaltaro |
Finally I managed to build those two packages |
After uploading the so build FYI @amaltaro [1]
|
It's good to see this progress. Thanks for the updates! |
Thanks @klannon Here is some more result from the test with my latest (made in a hurry) fixes to the DBS code [1], which made it possible to even import the client, but unfortunately the lack of [1] [2]
|
@todor-ivanov , I said that if you'll replace The jsonwrapper provides a wrapper for different json implementation. On my laptop it loads cjson while on lxplus it loads json, etc. Now, to use it you should take jsonwrapper as is and replace all |
Thanks @vkuznet! |
Hi @vkuznet Thank you very much for providing the
So I allowed myself to take that piece of code and do some changes. I am quite sure they would not be enough to make it universal, but I hope they may at least try to address the needs of the dbs3 client. I am about to upload it in https://github.com/dmwm/DBS/tree/master/Client/utils . If there is another more centralized place where this code is hosted, please let me know so we avoid code duplication. [0] [2]
[3]
|
Here [1] are the few minor changes I suggested to your [1] |
In my opinion, we should only support and AFAIR the conclusion was:
So, if we follow this path, I'd suggest to keep it as simple and robust as possible. Especially after all these inconsistencies that Todor reported above. |
I would agree with Alan, there is no need in another json implementation if standard library in py3 provide the best one. |
Thanks @amaltaro I am about to simplify the wrapper, as I said in my comment to the PR in the DBS repository. Maybe even get rid of the https://cms-dmwm-test.docs.cern.ch/py2py3/json/analyse_py2py3.html And it seems quite better than the standard |
@todor-ivanov , it is decision which should be made by DMWM and DBS teams. The json handling is very critical in DBS as it affects server performance (CPU and RAM wise) as well as time of HTTP response. There are plenty of requests which can be large, I already shown that it is not uncommon that WMCore sends hundreds of MB of JSON to DBS, and this should be taken into account. But also you need to take a responsibility to support extra dependency. I think jsonwrapper allows to achieve both goals, since it can always fall back to standard library json. But as such it also requires to change all code which deals with json to use jsonwrapper. So, at the end as I wrote it is DMWM and DBS team call. |
All the concerns raised by Valentin are pretty valid, and I think most of them - if not all - have been covered by the benchmarks performed by Dario.
Stdlib Regarding DBS, that's not really my call and I'd rather ask Yuyi's input here. @yuyiguo could you please have a look at the JSON libraries evaluation documented by Dario in the link I provided above and share with us what your thoughts are? Just to be explicit, my opinion is the same conclusion we got when it was discussed in the WMCore chat, also replied here: |
Thanks for the quick and careful work on this @todor-ivanov! Just a quick point to consider: for what we need to do (validate Py3 WMAgent), I don't think we need to chose the optimal option. For this case, I would choose the easiest/quickest path to get us to testing WMAgent in a Py3 environment. We can optimize if necessary in a later step. |
Thank you all for this discussion on |
So following our meeting from Monday and also the decisions taken in the meeting between me @mapellidario and @amaltaro I was supposed to split that issue in two and follow the two processes separately:
Which I did... [1] only not in all the affected repositories/sets of issues. So I followed all those actions only in the DBS repository [1] and forgot to reflect them in WMCore. Please take my apologies for that. And here are [2] the related |
So what I basically wanted to stress in my previous comment was that the current issue may be considered resolved for both package build and py3 changes once we have the code merged in DBS into the proper branch and the relevant tags created. Again sorry for not creating two separate issues in WMcore. |
This should have been fixed with: cms-sw/cmsdist#6837 @todor-ivanov shall we keep this issue opened for a day or two more, just so we can update cmsdist with an official DBS tag for the python3 dbs3-client specs? |
As you wish @amaltaro, I am fine both ways. |
@todor-ivanov Yuyi has provided a client tag a few days ago (see dmwm/DBS#653). Can you please make sure everything we need is in place? If so, please provide a new cmsdist PR with the new tag for the py3-dbs3 clients such that we can close this issue. |
Hi @amaltaro |
Perfect! Thanks, Todor. Closing |
Impact of the new feature
WMCore services using the dbs3-client (DbsApi client), like global workqueue and WMAgent.
Is your feature request related to a problem? Please describe.
Yes, this is another WMAgent dependency that needs to be sorted before we can run any WMCore service depending on it.
Perhaps a similar issue should be created in the DBS repository as well(?)
Describe the solution you'd like
We need to have a python3 compatible spec for the
dbs3-client
and its dependencydbs3-pycurl-client
. Then we can use the new spec in our wmagentpy3 spec and try to deploy and run that service within a python3 stack.First alternative would be to create a new spec file for those clients, depending on python3 stack, and see if we can successfully build a package. I don't know how big is dbs3-client, but what if we manage to run it on python3 without any source code changes?
Describe alternatives you've considered
To be discovered once we start working on it.
Additional context
Issue spotted and mentioned here: #10302 (comment)
links to the relevant spec files:
https://github.com/cms-sw/cmsdist/blob/comp_gcc630/dbs3-client.spec
https://github.com/cms-sw/cmsdist/blob/comp_gcc630/dbs3-pycurl-client.spec
Link to the client source:
https://github.com/dmwm/DBS/tree/master/Client
The text was updated successfully, but these errors were encountered: