Skip to content

Commit 282efcb

Browse files
Robin VAN DE MERGHELRobin-Van-de-Merghel
authored andcommitted
refactor: Moved down diracx installation to fix auth
1 parent ac22d9d commit 282efcb

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

src/DIRAC/Core/Tornado/Client/ClientSelector.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from DIRAC.Core.DISET.RPCClient import RPCClient
1717
from DIRAC.Core.DISET.TransferClient import TransferClient
1818
from DIRAC.Core.Tornado.Client.TornadoClient import TornadoClient
19-
19+
import traceback
2020

2121
sLog = gLogger.getSubLogger(__name__)
2222

@@ -81,15 +81,13 @@ def ClientSelector(disetClient, *args, **kwargs): # We use same interface as RP
8181

8282
if completeUrl.startswith("http"):
8383
sLog.debug(f"Using HTTPS for service {serviceName}")
84-
rpc = tornadoClient(*args, **kwargs)
85-
else:
86-
rpc = disetClient(*args, **kwargs)
84+
return tornadoClient(*args, **kwargs)
8785
except Exception as e: # pylint: disable=broad-except
8886
# If anything went wrong in the resolution, we return default RPCClient
8987
# So the behaviour is exactly the same as before implementation of Tornado
9088
sLog.warn("Could not select DISET or Tornado client", f"{repr(e)}")
91-
rpc = disetClient(*args, **kwargs)
92-
return rpc
89+
print(traceback.format_exc())
90+
return disetClient(*args, **kwargs)
9391

9492

9593
# Client to use for RPC selection

src/DIRAC/WorkloadManagementSystem/Client/JobMonitoringClient.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ def __init__(self, **kwargs):
1818
super().__init__(**kwargs)
1919
self.setServer("WorkloadManagement/JobMonitoring")
2020

21-
# Removed to avoid using it in ClientSelector
22-
# diracxClient = futureJobMonitoringClient
21+
# Set to NULL to avoid using it in ClientSelector
22+
diracxClient = None
2323

2424
@ignoreEncodeWarning
2525
def getJobsStatus(self, jobIDs):

tests/Jenkins/utilities.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -255,12 +255,6 @@ installDIRAC() {
255255
done
256256
fi
257257

258-
echo "==> Installing main branch of diracx"
259-
installDIRACX core client
260-
261-
echo "$DIRAC"
262-
echo "$PATH"
263-
264258
echo "==> Done installing, now configuring"
265259

266260
if ! dirac-proxy-init --nocs --no-upload; then
@@ -285,6 +279,13 @@ installDIRAC() {
285279
fi
286280

287281
echo '==> Done installDIRAC'
282+
283+
echo "==> Installing main branch of diracx"
284+
installDIRACX core client
285+
286+
echo "$DIRAC"
287+
echo "$PATH"
288+
288289
}
289290

290291
##############################################################################

0 commit comments

Comments
 (0)