DIRACGrid / DIRAC

DIRAC Grid
http://diracgrid.org
GNU General Public License v3.0
113 stars 176 forks source link

[8.0] fix: type issue in JobCleaningAgent; #7550

Closed VladimirRomanovsky closed 7 months ago

VladimirRomanovsky commented 7 months ago

Bug: looking for index of integer in list of strings

BEGINRELEASENOTES *WorkloadManagement FIX: JobCleaningAgent: fix exception in deleteJobsByStatus caused by mismatching job ID types ENDRELEASENOTES

aldbr commented 7 months ago

Tests are passing, I can see them in the Actions tab but they don't appear in the PR, I don't know why.

andresailer commented 7 months ago

How does the bug materialize itself? Exception? Or silently no jobs are cleaned?

aldbr commented 7 months ago

How does the bug materialize itself? Exception? Or silently no jobs are cleaned?

This is the exception we get:

2024-04-02 00:43:51 UTC WorkloadManagement/JobCleaningAgent/WorkloadManagement/JobCleaningAgent ERROR: Agent exception while calling method <bound method JobCleaningAgent.execute of <DIRAC.WorkloadManagementSystem.Agent.JobCleaningAgent.JobCleaningAgent object at 0x7f9545dffe90>>
Traceback (most recent call last):
  File "/opt/dirac/versions/v11.0.36-1710951635/Linux-x86_64/lib/python3.11/site-packages/DIRAC/Core/Base/AgentModule.py", line 310, in am_secureCall
    result = functor(*args)
             ^^^^^^^^^^^^^^
  File "/opt/dirac/versions/v11.0.36-1710951635/Linux-x86_64/lib/python3.11/site-packages/DIRAC/WorkloadManagementSystem/Agent/JobCleaningAgent.py", line 129, in execute
    result = self.deleteJobsByStatus(condDict, delTime)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/dirac/versions/v11.0.36-1710951635/Linux-x86_64/lib/python3.11/site-packages/DIRAC/WorkloadManagementSystem/Agent/JobCleaningAgent.py", line 233, in deleteJobsByStatus
    jobList.pop(jobList.index(job))
                ^^^^^^^^^^^^^^^^^^
ValueError: 851580019 is not in list
DIRACGridBot commented 7 months ago

Sweep summary

Sweep ran in https://github.com/DIRACGrid/DIRAC/actions/runs/8551054154

Successful: