Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

devel: pass tags to the Pilot config only once #198

Merged
merged 1 commit into from
Nov 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions Pilot/pilotCommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -740,23 +740,21 @@ def execute(self):
self.log.error("The pilot command output is not json compatible.")
self.exitWithError(1)

self.pp.queueParameters = resourceDict
for queueParamName, queueParamValue in self.pp.queueParameters.items():
if isinstance(queueParamValue, list): # for the tags
queueParamValue = ",".join([str(qpv).strip() for qpv in queueParamValue])
self.cfg.append("-o /LocalSite/%s=%s" % (queueParamName, quote(queueParamValue)))

# Pick up all the relevant resource parameters that will be used in the job matching
if "WholeNode" in resourceDict:
self.pp.tags.append("WholeNode")

# Tags must be added to already defined tags if any
if resourceDict.get("Tag"):
self.pp.tags += resourceDict["Tag"]
self.pp.tags += resourceDict.pop("Tag", [])

# RequiredTags are like Tags.
if resourceDict.get("RequiredTag"):
self.pp.reqtags += resourceDict["RequiredTag"]
self.pp.reqtags += resourceDict.pop("RequiredTag", [])

self.pp.queueParameters = resourceDict
for queueParamName, queueParamValue in self.pp.queueParameters.items():
if isinstance(queueParamValue, list): # for the tags
queueParamValue = ",".join([str(qpv).strip() for qpv in queueParamValue])
self.cfg.append("-o /LocalSite/%s=%s" % (queueParamName, quote(queueParamValue)))
aldbr marked this conversation as resolved.
Show resolved Hide resolved

if self.cfg:
if self.pp.localConfigFile:
Expand Down
Loading