Skip to content
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

fix: write dep-graph payloads to stdout stream #5405

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

mcombuechen
Copy link
Contributor

What does this PR do?

This PR changes the way we output dep-graph payloads from console.log to NodeJS Streams, writing to process.stdout. This way we can replace jsonStringifyLargeObject with JsonStreamStringify.

This PR is a precursor to #5399, which had too much happening all at once.

How should this be manually tested?

Can be tested with snyk test --print-graph, snyk container test --print-graph, and snyk test --unmanaged --print-graph.

@mcombuechen mcombuechen requested a review from a team as a code owner August 9, 2024 07:54
@mcombuechen mcombuechen force-pushed the fix/stream-dep-graphs branch from c6a175d to c7ab2d5 Compare August 9, 2024 08:45
Copy link
Contributor

@cmars cmars left a comment

Choose a reason for hiding this comment

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

LGTM with the e2e formatting test restored. Thanks again for this!

src/lib/snyk-test/assemble-payloads.ts Show resolved Hide resolved
src/lib/snyk-test/common.ts Show resolved Hide resolved
test/jest/unit/lib/ecosystems/common.spec.ts Show resolved Hide resolved
Copy link
Contributor

@cmars cmars left a comment

Choose a reason for hiding this comment

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

Thanks again for this!

@mcombuechen mcombuechen enabled auto-merge August 15, 2024 13:44
@mcombuechen mcombuechen force-pushed the fix/stream-dep-graphs branch from 0f559c5 to 8f9383b Compare August 15, 2024 14:15
@mcombuechen mcombuechen merged commit 589ac68 into main Aug 15, 2024
11 checks passed
@mcombuechen mcombuechen deleted the fix/stream-dep-graphs branch August 15, 2024 17:08
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.

2 participants