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

[TT-1140] fix logical error #948

Merged
merged 1 commit into from
May 10, 2024
Merged

[TT-1140] fix logical error #948

merged 1 commit into from
May 10, 2024

Conversation

Tofel
Copy link
Contributor

@Tofel Tofel commented May 10, 2024

logic in for loop was incorrect and the allowed message was still failing the test :/


Below is a summarization created by an LLM (gpt-4-0125-preview). Be mindful of hallucinations and verify accuracy.

Why

The changes improve the semantics of the LogAllowed type by renaming it to WarnAboutAllowedMsgs, making its purpose clearer in the context of handling log messages. This change also includes a minor logic improvement in handling allowed log messages within the log file verification process.

What

  • testreporters/reporter_model.go
    • Renamed the LogAllowed type to WarnAboutAllowedMsgs to clarify that it controls warnings about allowed messages.
      • Changed LogAllowed_Yes to WarnAboutAllowedMsgs_Yes and LogAllowed_No to WarnAboutAllowedMsgs_No to match the new type name.
    • Modified the NewAllowedLogMessage function parameter type from LogAllowed to WarnAboutAllowedMsgs to reflect the type change.
    • Improved handling of allowed log messages in the VerifyLogFile function by using a label (SCANNER_LOOP) for the loop, allowing for cleaner skipping of allowed messages after logging them (when configured to do so). This logic enhancement simplifies the control flow and makes the intent of skipping the rest of the processing for allowed messages more explicit.

@cl-sonarqube-production
Copy link

cl-sonarqube-production bot commented May 10, 2024

@Tofel Tofel marked this pull request as ready for review May 10, 2024 14:44
@Tofel Tofel requested review from sebawo and a team as code owners May 10, 2024 14:44
@Tofel Tofel merged commit 539fd52 into main May 10, 2024
21 of 22 checks passed
@Tofel Tofel deleted the tt_1140_log_scanner_fix branch May 10, 2024 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants