Skip to content

test: respect GitHub ACTIONS_STEP_DEBUG for verbose test logging#3942

Closed
KristjanESPERANTO wants to merge 1 commit intoMagicMirrorOrg:developfrom
KristjanESPERANTO:debug-logging
Closed

test: respect GitHub ACTIONS_STEP_DEBUG for verbose test logging#3942
KristjanESPERANTO wants to merge 1 commit intoMagicMirrorOrg:developfrom
KristjanESPERANTO:debug-logging

Conversation

@KristjanESPERANTO
Copy link
Copy Markdown
Collaborator

When tests failed, I clicked “Enable debug logging” several times when rerunning them and was always disappointed that I couldn't find any more logs. This should fix this.

image

When GitHub Actions step debug logging is enabled via ACTIONS_STEP_DEBUG,
bypass both general log suppression (setLogLevel) and intentional error
suppression (mmTestMode checks) to provide full diagnostic output for
debugging test failures.

This maintains clean test output in normal CI runs while enabling
verbose logging when explicitly requested via GitHub's "Re-run jobs
with debug logging" feature.
@KristjanESPERANTO KristjanESPERANTO marked this pull request as draft November 3, 2025 23:29
@KristjanESPERANTO
Copy link
Copy Markdown
Collaborator Author

I triggered a re-run and it doesn't work as expected 🤔 I'll investigate.

@KristjanESPERANTO
Copy link
Copy Markdown
Collaborator Author

I'm closing this PR because the approach doesn't work as expected.

The Problem:
The "Enable debug logging" feature in GitHub Actions sets ACTIONS_STEP_DEBUG and ACTIONS_RUNNER_DEBUG as secrets for the GitHub Actions runner infrastructure, but these variables are not exposed as environment variables to the shell processes running our tests. They only control GitHub's internal debug output (the ##[debug] lines), not our application code.

Alternative Approach:
We could use a repository variable like ENABLE_VERBOSE_LOGGING that can be set manually and accessed via ${{ vars.ENABLE_VERBOSE_LOGGING }} in the workflow. However, this would require:

  1. Manually setting the variable before re-running tests (not as elegant as a simple checkbox)
  2. Remembering to rest it afterwards

Since this isn't as elegant as the intended "re-run with debug logging" checkbox solution, I'm abandoning this approach.

@KristjanESPERANTO KristjanESPERANTO deleted the debug-logging branch November 4, 2025 20:57
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