question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Splitting / Parallelism support via filter flags

See original GitHub issue

Many CI services offer split job execution on multiple runners in parallel. For instance, CircleCI calls this feature “parallelism”.

You could configure your build job with parallelism: 3, which would spawn 3 runners in total, each with these environment variables:

  1. CIRCLE_NODE_TOTAL=3, CIRCLE_NODE_INDEX=0
  2. CIRCLE_NODE_TOTAL=3, CIRCLE_NODE_INDEX=1
  3. CIRCLE_NODE_TOTAL=3, CIRCLE_NODE_INDEX=2

It would be awesome, if lerna could natively support deterministic splitting on the filter flags level, to make commands like lerna run “just work”.

For instance, with command flags inspired from ember-exam:

$ yarn lerna run \
  --stream \
  --concurrency 1 \
  --split $CIRCLE_NODE_TOTAL
  --partition $CIRCLE_NODE_INDEX
  test

Would you be open to a pull request implementing that feature?


Edit: I published lerna-parallelism, which does exactly that.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:11

github_iconTop GitHub Comments

3reactions
buschtoenscommented, Jul 1, 2020

🤦 omg, I didn’t notice. Sorry, it’s published now. 😅

1reaction
buschtoenscommented, Jun 25, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

Speed Up CI Test Pipelines Using Parallelism - Harness.io Docs
The first time you run with parallelism, the pipeline splits the tests by file size and collects timing data for all tests.
Read more >
Tuning TBB Algorithms: Granularity, Locality, Parallelism, and ...
In Chapter 2, we described the generic parallel algorithms provided by the TBB library and gave a few examples to show how they...
Read more >
GNU Parallel Tutorial
GNU Parallel Tutorial . This tutorial shows off much of GNU parallel's functionality. The tutorial is meant to learn the options in...
Read more >
When to Use a Parallel Stream in Java - Baeldung
The fork-join framework is in charge of splitting the source data between worker threads and handling callback on task completion. Let's take a ......
Read more >
Parallel Algorithms - CMU School of Computer Science
the parallelism in an algorithm can be exploited by using multiple functional units, ... In this chapter we divide parallel models into two...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found