Skip to content

Conversation

@alexanderjeurissen
Copy link

@alexanderjeurissen alexanderjeurissen commented Mar 21, 2021

Context

When working on #103 an edge case was observed where a pattern (or list in #103) resulting allocator.node_tests when smaller then the number of CI_NODES results in 1-n nodes executing the complete test suite.

relevant line in rspec runner (bug applies to all runners):

cmd = %Q[bundle exec rspec #{args} --default-path #{allocator.test_dir} -- #{allocator.stringify_node_tests}]

This interpolated string, with an empty node_tests array results in the following command being executed (assuming a test-dir of spec and no additional args):

bundle exec rspec --default-path spec --

This behaves the same as bundle exec rspec --default-path spec which executes all specs.

Solution

This PR adds a guard clause to all runners to return whenever the node_tests is empty for a given node. This seems to be the desired behavior: there are no specs left to execute for this node, so do nothing.

@alexanderjeurissen
Copy link
Author

@ArturT could you review this ?

@ArturT
Copy link
Member

ArturT commented Apr 18, 2021

Hi @alexanderjeurissen

Note for myself to review it later:

It looks like this PR depends on the source code from the #103 (comment)
We need to decide first what to do with that PR before merging this PR.

@3v0k4
Copy link
Contributor

3v0k4 commented Oct 17, 2024

We officially archived Knapsack, you can read more about it in the README.

Thank you for caring and creating this PR.

I'm sorry we couldn't get this done for you.

@3v0k4 3v0k4 closed this Oct 17, 2024
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