Skip to content

Conversation

@krzysztof04
Copy link

Jira-Ref: BCF-6329: Add mechanism to send rear warnings to sentry at backup time

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request introduces a new mechanism to redirect warning messages to a separate error stream (fd8) instead of standard output. This allows ReaR warnings to be captured and sent to monitoring systems like Sentry at backup time.

Changes:

  • Adds two new functions (PrintWarn and WarnPrint) to output warning messages to fd8 (STDERR)
  • Updates four warning messages in efi_get_current_full_bootloader_path function to use the new WarnPrint function

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
usr/share/rear/lib/_framework-setup-and-functions.sh Introduces PrintWarn and WarnPrint functions to route warning messages to fd8
usr/share/rear/lib/uefi-functions.sh Updates four warning messages to use WarnPrint instead of LogPrint

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +518 to +523
# For cove warning messages
function WarnPrint() {
{ Log "$@"
PrintWarn "$@"
} 2>>/dev/$DISPENSABLE_OUTPUT_DEV
}
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

The WarnPrint function lacks documentation. Based on the pattern of other similar functions in this file (LogPrint, DebugPrint, etc.), this function should have a comment describing its purpose. The comment should explain that it logs warning messages to the log file and also outputs them to the original STDERR (fd8) for separate capture. Please add a descriptive comment similar to the style used for other functions in this file.

Copilot uses AI. Check for mistakes.
{ echo "$*" 1>&7 || true ; } 2>>/dev/$DISPENSABLE_OUTPUT_DEV
}

# For cove warn messages
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

The comment "For cove warn messages" contains a typo or unclear reference. Should this be "For COVE warn messages" (uppercase, assuming COVE is an acronym) or should it say "For core warn messages" if referring to core functionality? Please clarify the intended meaning and correct the comment accordingly.

Suggested change
# For cove warn messages
# For core warning messages

Copilot uses AI. Check for mistakes.
} 2>>/dev/$DISPENSABLE_OUTPUT_DEV
}

# For cove warning messages
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

The comment "For cove warning messages" contains a typo or unclear reference. Should this be "For COVE warning messages" (uppercase, assuming COVE is an acronym) or should it say "For core warning messages" if referring to core functionality? Please clarify the intended meaning and correct the comment accordingly.

Suggested change
# For cove warning messages
# For warning messages that should appear in the log file and on the user's terminal:

Copilot uses AI. Check for mistakes.
{ echo "$*" 1>&7 || true ; } 2>>/dev/$DISPENSABLE_OUTPUT_DEV
}

# For cove warn messages
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

The PrintWarn function lacks documentation. Based on the pattern of other similar functions in this file (Print, PrintError, etc.), this function should have a comment describing its purpose. The comment should explain that it outputs warning messages to the original STDERR (fd8) to allow capturing warnings separately from normal output. Please add a descriptive comment similar to the style used for other functions in this file.

Suggested change
# For cove warn messages
# For warning messages that are intended for the user output to the original STDERR (fd8)
# so that warning messages can be captured or redirected separately from normal output:

Copilot uses AI. Check for mistakes.
Jira-Ref: BCF-6329: Add mechanism to send rear warnings to sentry at backup time
@krzysztof04 krzysztof04 force-pushed the feature/BCF-6329-Add-mechanism-to-send-ReaR-warnings-to-Sentry-at-backup-time branch from 560fc86 to eb339c8 Compare January 21, 2026 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants