Yuvipanda has submitted this change and it was merged. Change subject: Tools: Fix XML output of qstat for webservice2 ......................................................................
Tools: Fix XML output of qstat for webservice2 The output of "qstat -xml" can sometimes contain elements in the "JATASK:" namespace without declaring that as such, thus producing invalid XML. In labs/toollabs's www/content/status.php, this is worked around by piping qstat's output through sed. For webservice2, this change fixes the data directly in Python. Bug: T92039 Change-Id: Id9af95152ebf3c386759fd0fc41960ca78cc9e96 --- M modules/toollabs/files/webservice2 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/toollabs/files/webservice2 b/modules/toollabs/files/webservice2 index 6dcf3d4..4102543 100644 --- a/modules/toollabs/files/webservice2 +++ b/modules/toollabs/files/webservice2 @@ -94,6 +94,10 @@ :return: Job id if the job is found, None otherwise """ output = qstat_xml('-q', queue_name, '-j', job_name) + + # Fix XML. + output = re.sub('JATASK:[^>]*', 'jatask', output) + # GE is stupid. # Returns output like: # <><ST_name>blah</ST_name></> -- To view, visit https://gerrit.wikimedia.org/r/195556 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id9af95152ebf3c386759fd0fc41960ca78cc9e96 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Tim Landscheidt <t...@tim-landscheidt.de> Gerrit-Reviewer: Mattflaschen <mflasc...@wikimedia.org> Gerrit-Reviewer: Yuvipanda <yuvipa...@gmail.com> Gerrit-Reviewer: coren <mpellet...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits