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

dbs3-client - fix specific version in requirements.txt with == #12102

Merged
merged 3 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ CMSCouchapp~=1.3.4 # wmcore,wmagent
CMSMonitoring~=0.6.10 # wmcore,wmagent,reqmgr2,reqmon,global-workqueue,reqmgr2ms-unmerged,reqmgr2ms-output,reqmgr2ms-pileup,reqmgr2ms-monitor,reqmgr2ms-transferor,reqmgr2ms-rulecleaner
coverage~=5.4 # wmcore,wmagent,wmagent-devtools
cx-Oracle~=8.3.0 # wmcore,wmagent
dbs3-client~=4.0.19 # wmcore,wmagent,reqmgr2,reqmon,global-workqueue
dbs3-client==4.0.19 # wmcore,wmagent,wmagent-devtools,reqmgr2,reqmon,global-workqueue,reqmgr2ms-output,reqmgr2ms-transferor
future~=0.18.2 # wmcore,wmagent,wmagent-devtools,reqmgr2,reqmon,acdcserver,global-workqueue,reqmgr2ms-unmerged,reqmgr2ms-output,reqmgr2ms-pileup,reqmgr2ms-monitor,reqmgr2ms-transferor,reqmgr2ms-rulecleaner
gfal2-python~=1.11.0.post3 # wmcore,reqmgr2ms-unmerged
httplib2~=0.20.4 # wmcore,wmagent,reqmgr2,reqmon,acdcserver,global-workqueue,reqmgr2ms-unmerged,reqmgr2ms-output,reqmgr2ms-pileup,reqmgr2ms-monitor,reqmgr2ms-transferor,reqmgr2ms-rulecleaner
Expand Down
14 changes: 10 additions & 4 deletions src/python/WMCore/MicroService/Tools/Common.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@
from WMCore.Services.pycurl_manager import RequestHandler
from WMCore.Services.pycurl_manager import getdata as multi_getdata

# DBS agregators
from dbs.apis.dbsClient import aggRuns, aggFileLumis


# static variables
STEP_PAT = re.compile(r'Step[0-9]')
TASK_PAT = re.compile(r'Task[0-9]')
Expand Down Expand Up @@ -279,6 +275,11 @@ def getFileLumisInBlock(blocks, dbsUrl, validFileOnly=1):
:param validFileOnly: integer flag for valid files only or not
:return: a dict of blocks with list of file/run/lumi info
"""
# importing dbs3-client only in the functions where it is used so that
# we do not need to add it to the docker images of microservices that do
# not use it.
from dbs.apis.dbsClient import aggFileLumis

runLumisByBlock = {}
urls = ['%s/filelumis?validFileOnly=%d&block_name=%s' % (dbsUrl, validFileOnly, quote(b)) for b in blocks]
# limit it to 10 concurrent calls not to overload DBS
Expand Down Expand Up @@ -343,6 +344,11 @@ def getRunsInBlock(blocks, dbsUrl):
:param dbsUrl: string with the DBS URL
:return: a dictionary of block names and a list of run numbers
"""
# importing dbs3-client only in the functions where it is used so that
# we do not need to add it to the docker images of microservices that do
# not use it.
from dbs.apis.dbsClient import aggRuns

runsByBlock = {}
urls = ['%s/runs?block_name=%s' % (dbsUrl, quote(b)) for b in blocks]
logging.info("Executing %d requests against DBS 'runs' API", len(urls))
Expand Down