dmwm / WMCore

Core workflow management components for CMS.
Apache License 2.0
46 stars 107 forks source link

Unused getIO() and ioForTask() methods, removeable or future use? #12046

Closed oljemark closed 4 months ago

oljemark commented 4 months ago

Impact of the new feature When browsing MicroServices/Tools/Common.py I saw that the function ioForTask(request,url) is only called by getIO() in the same file, and doing a search for the latter function name, it is not called anywhere in WMCore repository, nor when I searched GitHub for any public repositories importing from WMCore.MicroService.Tools.Common did I find anyone importing this function nor anyone importing * .

Is your feature request related to a problem? Please describe. Can these functions be deleted, or or are they still usable in private repositories or potential future debugging?

Describe the solution you'd like Delete if unnecessary?

Describe alternatives you've considered

Additional context

amaltaro commented 4 months ago

Hi @oljemark , thank you for creating this ticket. I had a look at those 2 functions and they are indeed not used. They have been inherited from the Unified system, so we kept them around for a while, in case we would decide to use them.

This has not happen for a few years now, so I would just go ahead and delete them. Would you be willing to make a PR removing them?

oljemark commented 4 months ago

Like this? Didn't find out how the unit test in test/python/WMCore_t/MicroService_t/Tools_t is manually run.

amaltaro commented 4 months ago

For the unit tests, you would have to pull an image from CERN registry, which is behind SSO. I can either test it myself, or we let automated Jenkins to test it, but first you will have to join a team in this repository (you should have received an invitation). However, that is not a problem, as I this code was never used and I didn't see any unit tests for it as well.

Thank you very much for the PR, really appreciated!