Skip to content

Conversation

@JordanGoasdoue
Copy link

@JordanGoasdoue JordanGoasdoue commented Jan 15, 2026

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:

  1. The logger was initialized before command-line flags were parsed
  2. During config loading (which includes dependency resolution), a discard logger was used
  3. Even --debug and --log-level flags had no effect

Impact:

  • Git clone failures: silent (no error shown)
  • Git pull failures: silent (no error shown)
  • Network issues: silent (no error shown)
  • Any dependency error: completely invisible
  • Impossible to troubleshoot dependency issues

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:

  • Modified BuildRoot() to parse flags before calling parseConfig()
  • Added configureLogLevel() helper function to centralize log level configuration
  • Modified parseConfig() to use factory logger instead of log.Discard
  • Ensured SetDevSpaceRoot() and LoadWithParser() use the properly configured logger

Please 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):

devspace build
info Using namespace 'xxx'
info Using kube context 'xxx'
Building...
# No information about dependency pull failure
# Silently continues with stale cached version

After (logs properly displayed):

devspace build
info Git pull failed for dependency 'xxx.'
[...]
info Attempting automatic recovery by re-cloning
done Successfully recovered dependency 'https://github.com/xxx.git'
info Using namespace 'xxx'
info Using kube context 'xxx'
Building...

@netlify
Copy link

netlify bot commented Jan 15, 2026

Deploy Preview for devspace-docs canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit da95600
🔍 Latest deploy log https://app.netlify.com/projects/devspace-docs/deploys/6968d61a682be800086525e3

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.

1 participant