Browse Source

HPCC-17363 Generate versioned result file for queries.

Change result file name generation.

Improve format of error category logging.

Add details to exception messages to help identifing further --pq
related problems.

Signed-off-by: Attila Vamos <attila.vamos@gmail.com>
Attila Vamos 8 years ago
parent
commit
8c6ce37aa7

+ 3 - 0
testing/regress/hpcc/common/logger.py

@@ -128,6 +128,9 @@ class Logger(object):
                 if record.levelname == 'DEBUG':
                     msg +=" [asctime:"+record.asctime+", process:"+str(record.process)+", processName:"+record.processName+", thread:"+str(record.thread)+", threadName:"+record.threadName+"]"
                     msg = "{0:3d}".format(taskId) + ". Debug-[debug-"+record.asctime+"]: "+msg
+                if record.levelname == 'ERROR':
+                    msg +=" [asctime:"+record.asctime+", process:"+str(record.process)+", processName:"+record.processName+", thread:"+str(record.thread)+", threadName:"+record.threadName+"]"
+                    msg = "{0:3d}".format(taskId) + ". Error-[error-"+record.asctime+"]: "+msg
                 if record.levelname == 'CRITICAL':
                     msg += " [level: "+record.levelname+" ]"
                     msg = "{0:3d}".format(taskId) +". " + msg

+ 2 - 2
testing/regress/hpcc/regression/regress.py

@@ -535,7 +535,7 @@ class Regression:
                                           password=self.config.password,
                                           retryCount=self.config.maxAttemptCount)
                 except Error as e:
-                    logging.debug("Exception raised:'%s'"  % ( str(e)),  extra={'taskId':cnt})
+                    logging.debug("Exception raised:'%s' (line: %s )"  % ( str(e), str(inspect.stack()[0][2]) ),  extra={'taskId':cnt})
                     res = False
                     wuid = 'Not found'
                     query.setWuid(wuid)
@@ -543,7 +543,7 @@ class Regression:
                     report[0].addResult(query)
                     pass
                 except:
-                    logging.error("Unexpected error:'%s'" %( sys.exc_info()[0]) ,  extra={'taskId':cnt})
+                    logging.error("Unexpected error:'%s' (line: %s )" %( sys.exc_info()[0], str(inspect.stack()[0][2]) ) ,  extra={'taskId':cnt})
 
                 wuid = query.getWuid()
                 logging.debug("CMD result: '%s', wuid:'%s'"  % ( res,  wuid),  extra={'taskId':cnt})

+ 1 - 1
testing/regress/hpcc/util/ecl/file.py

@@ -223,7 +223,7 @@ class ECLFile:
         return path
 
     def getResults(self):
-        return os.path.join(self.dir_r, self.xml_r)
+        return os.path.join(self.dir_r, self.getJobname() + '.xml')
 
     def getArchive(self):
         logging.debug("%3d. getArchive (isVersions:'%s')", self.taskId, self.isVersions )