-
Notifications
You must be signed in to change notification settings - Fork 0
BCF-6329: feat(bm): Move WARN messages from standard output to error stream #74
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
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 (
PrintWarnandWarnPrint) to output warning messages to fd8 (STDERR) - Updates four warning messages in
efi_get_current_full_bootloader_pathfunction to use the newWarnPrintfunction
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.
| # For cove warning messages | ||
| function WarnPrint() { | ||
| { Log "$@" | ||
| PrintWarn "$@" | ||
| } 2>>/dev/$DISPENSABLE_OUTPUT_DEV | ||
| } |
Copilot
AI
Jan 21, 2026
There was a problem hiding this comment.
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.
| { echo "$*" 1>&7 || true ; } 2>>/dev/$DISPENSABLE_OUTPUT_DEV | ||
| } | ||
|
|
||
| # For cove warn messages |
Copilot
AI
Jan 21, 2026
There was a problem hiding this comment.
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.
| # For cove warn messages | |
| # For core warning messages |
| } 2>>/dev/$DISPENSABLE_OUTPUT_DEV | ||
| } | ||
|
|
||
| # For cove warning messages |
Copilot
AI
Jan 21, 2026
There was a problem hiding this comment.
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.
| # For cove warning messages | |
| # For warning messages that should appear in the log file and on the user's terminal: |
| { echo "$*" 1>&7 || true ; } 2>>/dev/$DISPENSABLE_OUTPUT_DEV | ||
| } | ||
|
|
||
| # For cove warn messages |
Copilot
AI
Jan 21, 2026
There was a problem hiding this comment.
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.
| # 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: |
Jira-Ref: BCF-6329: Add mechanism to send rear warnings to sentry at backup time
560fc86 to
eb339c8
Compare
Jira-Ref: BCF-6329: Add mechanism to send rear warnings to sentry at backup time