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

rationalize use of HTTPRequests across Server and Client #7986

Open
belforte opened this issue Oct 27, 2023 · 2 comments
Open

rationalize use of HTTPRequests across Server and Client #7986

belforte opened this issue Oct 27, 2023 · 2 comments

Comments

@belforte
Copy link
Member

There is too much duplication and name confusion now.
I propose the following structure:

  • HTTPRequests is a file of its own with different implementation in Cient and Server
    • Server: HTTPRequestsPycurl.py
    • CLient: HTTPRequestsCurl.py
  • usage: from HTTPRequestsPycurl import HTTPRequests etc.
  • CRABRest becomes a common file/class (in ServerUtilities ? So it goes to Client as well w/o any other change)
  • getDBSRest (only in Client atm) becames a new class DBSRest (how knows, may be useful in server too) (in ServerUtilities again?)

Problem/Question
HTTPRequestsCurl could be useful in Server as well as fallback ... who knows... so a single file/class with an extra argument ?
beware that "import pycurl" breaks Client on some CMSSW versions and surely we do not want to import from WMCore.
I.e. On server it may be good to have access to everyghing, buy on client we need "curl only", which is why back then we
went for some code duplication and no file sharing.

@novicecpp @mapellidario opinions ? Is this worth pursuing ?

@novicecpp
Copy link
Contributor

This should do together with #7765

I think it good to refactor but I cannot say it ok or agree with your proposal due to my limited knowledge (need to research and sleep on it for some time).

HTTPRequestsCurl could be useful in Server.

IMO, no. Because of what you said beware that "import pycurl" breaks Client.
On servers, we have a single version that runs at a time, so we do not need to care much about backward compatibility. If it breaks, just hot-patch it and think about a long-term solution later.

@belforte
Copy link
Member Author

thanks for pointing out to #7765 !

Indeed, let's sleep on it and take our time. It is little code and main thing is to avoid headaches

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

2 participants