From 62a6d43ecd268b2fb2154070ba801bd61d4a87a3 Mon Sep 17 00:00:00 2001 From: Todor Ivanov Date: Mon, 21 Oct 2024 15:03:18 +0200 Subject: [PATCH] Handle assignment-approved arguments differently inside _handleNoSatusUpdate calls --- src/python/WMCore/ReqMgr/Service/Request.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/python/WMCore/ReqMgr/Service/Request.py b/src/python/WMCore/ReqMgr/Service/Request.py index caa9d4ed67..5cc404db42 100644 --- a/src/python/WMCore/ReqMgr/Service/Request.py +++ b/src/python/WMCore/ReqMgr/Service/Request.py @@ -415,7 +415,7 @@ def _handleNoStatusUpdate(self, workload, request_args, dn): reqArgs = deepcopy(request_args) if not reqArgs: - cherrypy.log("Nothing to be changed at this stage") + cherrypy.log(f"Nothing to be changed at this stage for {workload.name()}") return 'OK' if workqueue_stat_validation(reqArgs): @@ -441,9 +441,15 @@ def _handleNoStatusUpdate(self, workload, request_args, dn): reqArgsNothandled.append(reqArg) cherrypy.log("Unhandled argument for no-status update: %s" % reqArg) + reqStatus = self.reqmgr_db_service.getRequestByNames(workload.name())[workload.name()]['RequestStatus'] + cherrypy.log(f"CurrentRequest status: {reqStatus}") if reqArgsNothandled: - msg = "There were unhandled arguments left for no-status update: %s" % reqArgsNothandled - raise InvalidSpecParameterValue(msg) + if reqStatus == 'assignment-approved': + cherrypy.log(f"Handling assignment-approved arguments differently!") + self._handleAssignmentStateTransition(workload, request_args, dn) + else: + msg = "There were unhandled arguments left for no-status update: %s" % reqArgsNothandled + raise InvalidSpecParameterValue(msg) # Commit the changes of the current workload object to the database: workload.saveCouchUrl(workload.specUrl())