Skip to content

Medium Priority Issues - GB2PR_PROJECT (5 issues) #3

@Ricky512227

Description

@Ricky512227

MEDIUM Priority Bug Report for GB2PR_PROJECT

Date: 2025-12-23T23:00:12.075Z

Priority: P1
Severity: MEDIUM
Total Issues: 5

1. WatchDog.py:11

Category: code_quality

TODO/FIXME comment found - incomplete implementation

#Fucntion to construct the Message Notification path 
def constructS3PathForNotificationMsg(fileType, monitoringBucketName,MonitoringBucketRegionName,objPath1,objPath2,objPath3,targetDate,tempDataSetID):
	try:
		#s3://gfgpr1-devl-edl2-us-east-1/prepare/cin/dflt/DSET000XXXXX/SQs STATEMACHINETRIGGER/2021-08-25/BKES/
		s3MessagePath = "s3://"+monitoringBucketName+"/"+MonitoringBucketRegionName+"/"+objPath1+"/"+tempDataSetID+"/"+objPath2+"/"+targetDate+"/"+objPath3+"/"
		logger.info("Constructed s3Path for [{0}] File Notification Message :: {1}".format(fileType,s3MessagePath))
		return s3MessagePath

2. WatchDog.py:24

Category: code_quality

TODO/FIXME comment found - incomplete implementation

	try:
		# -z: if the file is zero length, return 0.
		# -f: if the path is a file, return 0.
		#"hdfs dfs -fz s3://gfgpr1-devl-edl2-us-east-1/prepare/cin/dflt/DSET000XXXXX/SQs STATEMACHINETRIGGER/2021-08-25/BKES/"
		cmdToCheckFile = "hdfs dfs -f"+" "+filePath
		logger.info("Searching for the {0} File".format(fileType))
		returnCode, _ = executeCmd(cmdToCheckFile)

3. WatchDog.py:43

Category: code_quality

TODO/FIXME comment found - incomplete implementation

		# -d: f the path is a directory, return 0.
		# -e: if the path exists, return 0.
		# -s: if the path is not empty, return 0.
		#"hdfs dfs -de s3://gfgpr1-devl-edl2-us-east-1/prepare/cin/dflt/DSET000XXXXX/SQs STATEMACHINETRIGGER/2021-08-25/BKES/"
		cmdToCheckDir = "hdfs dfs -de"+" "+objName
		returnCode, _ = executeCmd(cmdToCheckDir)
		if returnCode == 0:

4. logMonitor.py:14

Category: code_quality

TODO/FIXME comment found - incomplete implementation

    logFilePath = os.path.join(logsPath, logFileName)
    print("Log File Path ::" + logFilePath)
    timeFormat = str(datetime.datetime.now().strftime("%Y%m%d %H:%M:%S"))
    logger.basicConfig(filename=logFilePath, format='%(asctime)s - %(levelname)s - %(filename)s :: %(message)s', datefmt='%Y-%m-%d %H:%M:%S', level=logging.DEBUG, filemode='w')
except Exception as ex:
    print('Error occurred :: {0} \tLine No: {1}'.format(ex, sys.exc_info()[2].tb_lineno))
    logger.error('Error occurred :: {0} \tLine No: {1}'.format(ex, sys.exc_info()[2].tb_lineno))

5. src/gb2pr/logMonitor.py:17

Category: code_quality

TODO/FIXME comment found - incomplete implementation

    logFilePath = os.path.join(logsPath, logFileName)
    print("Log File Path ::" + logFilePath)
    timeFormat = str(datetime.datetime.now().strftime("%Y%m%d %H:%M:%S"))
    logger.basicConfig(filename=logFilePath, format='%(asctime)s - %(levelname)s - %(filename)s :: %(message)s', datefmt='%Y-%m-%d %H:%M:%S', level=logging.DEBUG, filemode='w')
except Exception as ex:
    print('Error occurred :: {0} \tLine No: {1}'.format(ex, sys.exc_info()[2].tb_lineno))
    logger.error('Error occurred :: {0} \tLine No: {1}'.format(ex, sys.exc_info()[2].tb_lineno))

Full report available in workflow artifacts.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions