fix: restore logging for dependency operations#3105
Open
JordanGoasdoue wants to merge 1 commit intodevspace-sh:mainfrom
Open
fix: restore logging for dependency operations#3105JordanGoasdoue wants to merge 1 commit intodevspace-sh:mainfrom
JordanGoasdoue wants to merge 1 commit intodevspace-sh:mainfrom
Conversation
Signed-off-by: JordanGoasdoue <jordan.goasdoue@dailymotion.com>
✅ Deploy Preview for devspace-docs canceled.Built without sensitive environment variables
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What issue type does this pull request address?
/kind bugfix
What does this pull request do? Which issues does it resolve?
Fixes dependency operations running with completely discarded logs (including errors and fatal messages), making failures impossible to troubleshoot.
Problem:
Dependency resolution (git clone, pull, etc.) was using a discard logger, causing all log messages to be lost, including errors and fatal failures. This happened because:
--debugand--log-levelflags had no effectImpact:
Solution:
Parse command-line flags early in the boot sequence (before config loading) to configure the logger with the correct level, then use the factory logger (which properly outputs) instead of discard logger during dependency operations.
Changes:
BuildRoot()to parse flags before callingparseConfig()configureLogLevel()helper function to centralize log level configurationparseConfig()to use factory logger instead oflog.DiscardSetDevSpaceRoot()andLoadWithParser()use the properly configured loggerPlease provide a short message that should be published in the DevSpace release notes
Fixed dependency operations running with discarded logs, restoring visibility into git clone/pull operations and making troubleshooting possible.
What else do we need to know?
Note: This PR works in conjunction with #3104 (auto-reclone feature). The "After" example below shows both fixes working together:
Testing
Tested with a git dependency that has rewritten history (force-pushed branch).
Before (logs discarded):
After (logs properly displayed):