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

feat: asynchronously process monitor args #884

Merged
merged 1 commit into from
Nov 28, 2019
Merged

Conversation

gitphill
Copy link
Contributor

@gitphill gitphill commented Nov 27, 2019

  • Ready for review
  • Follows CONTRIBUTING rules
  • Reviewed by Snyk internal team

What does this PR do?

Use Promise.all on each path passed to monitor.
Added test for monitor using multiple paths.

How should this be manually tested?

Run 'snyk monitor ./path1 ./path2 ./path3 ...'
Use DEBUG=* to see each path is now processed asynchronously.

Any background context you want to provide?

In preparation for auto detect --all-projects feature.

What are the relevant tickets?

BST-1079

@gitphill gitphill requested a review from a team November 27, 2019 13:37
@gitphill gitphill self-assigned this Nov 27, 2019
@ghost ghost requested review from lili2311 and orsagie November 27, 2019 13:37
const postingMonitorSpinnerLabel =
'Posting monitor snapshot for ' + displayPath + ' ...';

await spinner(analyzingDepsSpinnerLabel);
Copy link
Contributor Author

@gitphill gitphill Nov 27, 2019

Choose a reason for hiding this comment

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

not sure about these spinners anymore? copied from existing, but since this is now done asynchronously the spinner can flicker as other jobs kick in

Copy link
Contributor

Choose a reason for hiding this comment

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

can we start a spinner around this asyncMonitor? and update it as we start more jobs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's ok for now, does indicate what's currently happening

Use Promise.all on each path passed to monitor.
Added test for monitor using multiple paths.
@gitphill gitphill merged commit 631b0fa into master Nov 28, 2019
@gitphill gitphill deleted the feat/parallelize-monitor branch November 28, 2019 11:39
@snyksec
Copy link

snyksec commented Nov 28, 2019

🎉 This PR is included in version 1.252.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

ivanstanev added a commit that referenced this pull request Dec 3, 2019
This reverts commit 631b0fa, reversing
changes made to f92319f.
ivanstanev added a commit that referenced this pull request Dec 3, 2019
feat: Revert "Merge pull request #884 from snyk/feat/parallelize-monitor"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants