Skip to content

feat: stream debug logs from go bridge#6637

Merged
thomasschafer merged 2 commits intomainfrom
feat/debug-output-go-bridge
Mar 17, 2026
Merged

feat: stream debug logs from go bridge#6637
thomasschafer merged 2 commits intomainfrom
feat/debug-output-go-bridge

Conversation

@snyk-will
Copy link
Contributor

@snyk-will snyk-will commented Mar 12, 2026

Pull Request Submission Checklist

  • Follows CONTRIBUTING guidelines
  • Commit messages
    are release-note ready, emphasizing
    what was changed, not how.
  • Includes detailed description of changes
  • Contains risk assessment (Low | Medium | High)
  • Highlights breaking API changes (if applicable)
  • Links to automated tests covering new functionality
  • Includes manual testing instructions (if necessary)
  • Updates relevant GitBook documentation (PR link: ___)
  • Includes product update to be announced in the next stable release notes

What does this PR do?

Stream debug logs from the internal go command to the calling typescript when the debug flag is passed.

@snyk-will snyk-will marked this pull request as ready for review March 12, 2026 13:18
@snyk-will snyk-will requested review from a team as code owners March 12, 2026 13:18
@snyk-pr-review-bot

This comment has been minimized.

@snyk-will snyk-will force-pushed the feat/debug-output-go-bridge branch from 97b1a1d to d7bd5d3 Compare March 12, 2026 13:46
@snyk-io
Copy link

snyk-io bot commented Mar 12, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@snyk-pr-review-bot

This comment has been minimized.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 12, 2026

Warnings
⚠️ There are multiple commits on your branch, please squash them locally before merging!

Generated by 🚫 dangerJS against 7fcaad6

@snyk-pr-review-bot

This comment has been minimized.

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this one needs a format.

@thomasschafer thomasschafer force-pushed the feat/debug-output-go-bridge branch from 07aa879 to 50e5729 Compare March 13, 2026 16:43
@thomasschafer thomasschafer enabled auto-merge March 13, 2026 16:43
@snyk-pr-review-bot

This comment has been minimized.

@thomasschafer thomasschafer force-pushed the feat/debug-output-go-bridge branch from 50e5729 to 2757f1c Compare March 16, 2026 09:07
@snyk-pr-review-bot

This comment has been minimized.

@thomasschafer thomasschafer force-pushed the feat/debug-output-go-bridge branch from 2757f1c to 906ce58 Compare March 16, 2026 10:34
@snyk-pr-review-bot

This comment has been minimized.

@thomasschafer thomasschafer force-pushed the feat/debug-output-go-bridge branch from 906ce58 to aabed4d Compare March 16, 2026 12:19
@snyk-pr-review-bot

This comment has been minimized.

@thomasschafer thomasschafer force-pushed the feat/debug-output-go-bridge branch from aabed4d to 409fc30 Compare March 17, 2026 10:18
@snyk-pr-review-bot

This comment has been minimized.

@thomasschafer thomasschafer force-pushed the feat/debug-output-go-bridge branch from 409fc30 to 2050d08 Compare March 17, 2026 12:39
@snyk-pr-review-bot

This comment has been minimized.

@thomasschafer thomasschafer force-pushed the feat/debug-output-go-bridge branch from 2050d08 to 56d7793 Compare March 17, 2026 13:23
@snyk-pr-review-bot

This comment has been minimized.

@thomasschafer thomasschafer force-pushed the feat/debug-output-go-bridge branch from 56d7793 to 7fcaad6 Compare March 17, 2026 16:06
@snyk-pr-review-bot
Copy link

PR Reviewer Guide 🔍

🧪 PR contains tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Potential Loss of Error Context 🟡 [minor]

Once isStderrTruncated is set to true (after stderr exceeds 50MB), the code stops accumulating any further chunks into the stderr variable returned in GoCommandResult. If the Go process produces a large volume of debug logs followed by a terminal error message, that error message will be present in the streamed output (if --debug is active) but missing from the stderr property of the result object. This could lead to poor error reporting by callers who rely on the result object to extract specific error details from the Go bridge. While 50MB is a generous limit, a strategy that preserves the tail of the output (e.g., keeping the last few KB after truncation) would be more robust for error diagnostics.

if (isStderrTruncated) {
  return;
}
📚 Repository Context Analyzed

This review considered 6 relevant code sections from 6 files (average relevance: 1.02)

@thomasschafer thomasschafer merged commit 3ae3a64 into main Mar 17, 2026
9 checks passed
@thomasschafer thomasschafer deleted the feat/debug-output-go-bridge branch March 17, 2026 16:42
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.

3 participants