Skip to content

Conversation

@fstagni
Copy link
Contributor

@fstagni fstagni commented Jan 6, 2026

BEGINRELEASENOTES

*WMS
NEW: added a new table to TaskQueueDB for RAM requirements and matching

ENDRELEASENOTES

The new table should be automatically created when the DB class is instantiated (at service restart)

@fstagni fstagni force-pushed the 90_more_RAM_matching branch 8 times, most recently from 7801c52 to 76938f4 Compare January 12, 2026 15:08
@fstagni fstagni force-pushed the 90_more_RAM_matching branch 2 times, most recently from 24d38b8 to 7e9bf4a Compare January 12, 2026 17:07
@fstagni fstagni marked this pull request as ready for review January 12, 2026 17:20
except IndexError: # we are in Jenkins
J.setInputSandbox([find_all("exe-script-with-input.py", "/home/dirac", "DIRAC/tests/Workflow")[0]])
J.setExecutable("exe-script-with-input.py", "", "helloWorld.log")
J.setInputData(["/dteam/user/f/fstagni/test/testInputFile.txt"])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, where do this file and testInputFileSingleLocation.txt come from?
Do we have access to them?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I simply uploaded myself...

What do you mean with "access"? If another user can access it? I believe yes.

resourceDict[name] = resourceDescription[name]

for name in multiValueMatchFields:
for name in singleValueDefFields + multiValueMatchFields + ("MaxRAM",):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for not having a rangeValueMatchFields in TaskQueueDB that would contain MaxRAM?
So that we avoid having hardcoded value like MaxRAM spread throughout the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rangeValueMatchFields also includes MinRAM, which here is not needed.

nProcessors = int(nProcessors)
except ValueError:
nProcessors = None
for param, key, limit, increment in [(maxRAM, "MB", 1024 * 1024, 256), (nProcessors, "Processors", 1024, 1)]:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious, don't you need that mechanism anymore?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update: I think I get it, it's because you now define range values, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mechanism is still there, just it's only needed for Processors (since RAM requirements are not stored anymore as tags).

if not retVal["OK"]:
# If table doesn't exist (e.g., old installation), log a warning but continue
# This provides backward compatibility
if "doesn't exist" in retVal["Message"] or "Table" in retVal["Message"]:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds a bit fragile but I guess you don't have much choice.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's indeed a bit fragile, but already the chances of hitting this case are close to 0, as the table SHOULD be existing here (I am tempted to actually remove this check...).

@fstagni fstagni force-pushed the 90_more_RAM_matching branch from 7e9bf4a to d3c8663 Compare January 12, 2026 17:29
@chrisburr chrisburr merged commit 6d2c3f1 into DIRACGrid:integration Jan 12, 2026
21 checks passed
@DIRACGridBot DIRACGridBot added the sweep:ignore Prevent sweeping from being ran for this PR label Jan 12, 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