diff --git a/src/DIRAC/FrameworkSystem/Service/ProxyManagerHandler.py b/src/DIRAC/FrameworkSystem/Service/ProxyManagerHandler.py index 88b20b4ce7e..85b90857d93 100644 --- a/src/DIRAC/FrameworkSystem/Service/ProxyManagerHandler.py +++ b/src/DIRAC/FrameworkSystem/Service/ProxyManagerHandler.py @@ -418,6 +418,7 @@ def export_exchangeProxyForToken(self): credDict["username"], credDict["group"], set(credDict.get("groupProperties", []) + credDict.get("properties", [])), + # expires_minutes=credDict.get("tokenLifetime", None), ) diff --git a/src/DIRAC/WorkloadManagementSystem/FutureClient/JobMonitoringClient.py b/src/DIRAC/WorkloadManagementSystem/FutureClient/JobMonitoringClient.py index 28b6d17c6c6..94a3cf69e58 100644 --- a/src/DIRAC/WorkloadManagementSystem/FutureClient/JobMonitoringClient.py +++ b/src/DIRAC/WorkloadManagementSystem/FutureClient/JobMonitoringClient.py @@ -1,9 +1,7 @@ from collections import defaultdict from datetime import datetime -from diracx.client import DiracClient -from diracx.core.preferences import DiracxPreferences -from DIRAC import gConfig +from DIRAC.Core.Security.DiracX import DiracXClient from DIRAC.Core.Utilities.ReturnValues import convertToReturnValue DATETIME_PARAMETERS = [ @@ -21,22 +19,14 @@ class JobMonitoringClient: def _fetch_summary(self, grouping, search=None): - diracxUrl = gConfig.getValue("/DiracX/URL") - if not diracxUrl: - raise ValueError("Missing mandatory /DiracX/URL configuration") - pref = DiracxPreferences(url=diracxUrl) - with DiracClient(diracx_preferences=pref) as api: + with DiracXClient() as api: return api.jobs.summary(grouping=grouping, search=search) def _fetch_search(self, parameters, jobIDs): if not isinstance(jobIDs, list): jobIDs = [jobIDs] - diracxUrl = gConfig.getValue("/DiracX/URL") - if not diracxUrl: - raise ValueError("Missing mandatory /DiracX/URL configuration") - pref = DiracxPreferences(url=diracxUrl) - with DiracClient(diracx_preferences=pref) as api: + with DiracXClient() as api: jobs = api.jobs.search( parameters=(["JobID"] + parameters) if parameters else None, search=[{"parameter": "JobID", "operator": "in", "values": jobIDs}], diff --git a/tests/Jenkins/utilities.sh b/tests/Jenkins/utilities.sh index dad55f9bcba..c963d0503de 100644 --- a/tests/Jenkins/utilities.sh +++ b/tests/Jenkins/utilities.sh @@ -253,6 +253,8 @@ installDIRAC() { fi fi + pip install git+https://github.com/DIRACGrid/diracx.git + if [[ -n "${INSTALLATION_BRANCH}" ]]; then # Use this for (e.g.) running backward-compatibility tests echo "pip-installing DIRAC from git+https://github.com/DIRACGrid/DIRAC.git@${INSTALLATION_BRANCH}#egg=DIRAC[client]"