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

Fix validator bug with DFS_STATUS error log message #10045

Merged
merged 1 commit into from
Mar 14, 2023

Conversation

pvannierop
Copy link
Contributor

Problem

The python validator throws a python error when there is a data-dependent error in the DFS_STATUS column.

Solution

This is caused by the passing of a f-string variable where there is no need for string replacement (no % present in message string). Removal of the second argument corrects this problem.

@pvannierop pvannierop self-assigned this Feb 23, 2023
Copy link

@SRodenburg SRodenburg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Remarkable how this never came up before.

@@ -2941,7 +2941,6 @@ def checkLine(self, data):
self.logger.error(
'Value in DFS_STATUS column is not 0:DiseaseFree, '
'1:Recurred/Progressed, 1:Recurred, 1:Progressed',
Copy link
Member

@dippindots dippindots Mar 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pvannierop I think we should still keep these values recommendations, I was wondering if you delete the comma at the end of this line, will that fix the problem too?

Suggested change
'1:Recurred/Progressed, 1:Recurred, 1:Progressed',
'1:Recurred/Progressed, 1:Recurred, 1:Progressed,'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is already there. The final message will state:

Value in DFS_STATUS column is not 0:DiseaseFree, 1:Recurred/Progressed, 1:Recurred, 1:Progressed

@@ -2941,7 +2941,6 @@ def checkLine(self, data):
self.logger.error(
'Value in DFS_STATUS column is not 0:DiseaseFree, '
'1:Recurred/Progressed, 1:Recurred, 1:Progressed',
'DiseaseFree, Recurred/Progressed, Recurred or Progressed',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pvannierop I see, I was wondering why we delete DiseaseFree, Recurred/Progressed, Recurred or Progressed. Now I get it. You are right. We don't support formats like these DiseaseFree, Recurred/Progressed, Recurred or Progressed anymore, we only support values with the prefix 0 or 1. So we should delete this line.

Copy link
Member

@dippindots dippindots left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, thanks for answering my question!

Does not expect a second argument since there is no '%' in the message.
@sonarcloud
Copy link

sonarcloud bot commented Mar 10, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@dippindots dippindots merged commit 0fb036f into master Mar 14, 2023
@dippindots dippindots added the bug label Mar 14, 2023
@dippindots dippindots deleted the pvannierop-patch-3 branch July 20, 2023 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants