Skip to content

[9.1] fix (RMS): stop the ReqProxy from dropping the operations of cached requests - #8832

Merged
fstagni merged 2 commits into
DIRACGrid:integrationfrom
chrisburr:fix/reqproxy-lost-operations
Oct 19, 2026
Merged

fstagni merged 2 commits into
DIRACGrid:integrationfrom
chrisburr:fix/reqproxy-lost-operations

Conversation

@chrisburr

Copy link
Copy Markdown
Member

The context is that Request.__init__ and Operation.__init__ deleted the "Operations"/"Files" key from the dict they were given.

This then combined poorly with c467386 due to json.dumps(requestDict) being called after Request(requestDict) meaning every request cached by a ReqProxy lost it's Operations.

In LHCb this has so far left ~14k empty requests in the RMS.

This PR fixes it by making it so that Request.__init__ and Operation.__init__ no longer mutate the argument given to them.

BEGINRELEASENOTES
*RequestManagement
FIX: The ReqProxy no longer drops the operations of the requests it caches
CHANGE: Request and Operation constructors no longer modify the dictionary they are given
ENDRELEASENOTES
EOF

…equests

Request.__init__ and Operation.__init__ deleted the "Operations"/"Files" key
from the dict they were given. Since c467386 the ReqProxy saves the dict it
passed to Request() rather than the original JSON, so every request forwarded
through a ReqProxy was stored without any operations.
…n them

When a Waiting request has no operation to execute (e.g. it has no operations
at all), RequestTask crashed with "'NoneType' object has no attribute 'Type'"
and the agent picked the request up again a few minutes later, forever.
Set an error on the request and delay it by a day instead, so it stays
available for recovery.
@fstagni
fstagni merged commit a790137 into DIRACGrid:integration Oct 19, 2026
25 checks passed
@DIRACGridBot DIRACGridBot added the sweep:ignore Prevent sweeping from being ran for this PR label Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sweep:ignore Prevent sweeping from being ran for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants