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

[DONOTMERGE] Normalize WMTool value #162

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
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
12 changes: 11 additions & 1 deletion src/htcondor_es/convert_to_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,17 @@ def convert_to_json(
result["CommittedTime"] = result.get("RemoteWallClockTime")
elif "CRAB_Id" in result: # If is an analysis or HC test task.
result["CRAB_PostJobStatus"] = _status

# Normalize wmtool value, this is a temporary change
# Not to be merged (The value was fixed upstream,
# this change is only needed while old tasks
# are still being processed
_wmtool = result.get(
"CMS_WMTool",
"UNKNOWN"
if result.get("CMS_SubmissionTool") != "InstitutionalSchedd"
else "User",
)
result["CMS_WMTool"] = "User" if _wmtool.lower() == "user" else _wmtool
if reduce_data:
result = drop_fields_for_running_jobs(result)

Expand Down