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

runDangerSubprocess implementation is incorrect (?) #603

Open
miklosme opened this issue May 22, 2018 · 5 comments
Open

runDangerSubprocess implementation is incorrect (?) #603

miklosme opened this issue May 22, 2018 · 5 comments

Comments

@miklosme
Copy link

I encountered an issue, when danger fails on the validateResults function (DangerResults.ts) although the result is actually correct. It throws Results passed to Danger JS did not include fails. The result argument passed here is indeed an empty object, however the result has a correct shape at an earlier point, as it's printed to the console.

I noticed this only happens if I include markdown to the result, and only if the markdown is bigger than a certain size. This makes me think the subprocess stream is not correctly read here: https://github.com/danger/danger-js/blob/master/source/commands/utils/runDangerSubprocess.ts#L38

Because this code assumes the data will arrive in a single chunk (L43), and if it's not a json string (L41), it won't process the data ever.

Am I thinking right?

@orta
Copy link
Member

orta commented May 22, 2018

That could make sense yeah 👍

@orta
Copy link
Member

orta commented Sep 11, 2018

I just triggered this when I started adding console.logs into the output of my dangerfile

@fbartho
Copy link
Member

fbartho commented Nov 15, 2018

I'm also exhibiting this issue, I think because a lot of errors were emitted so the json got big.

@orta
Copy link
Member

orta commented Nov 15, 2018

This should be fixed in the latest builds of Danger JS (it came in with all of the GitHub actions support in #697 )

@fbartho
Copy link
Member

fbartho commented Nov 15, 2018

Oh great! -- Upgrading Presently!

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

No branches or pull requests

3 participants