flexport / quarantine

Quarantine flaky Ruby Rspec tests
MIT License
65 stars 21 forks source link

DynamoDB validation error when outputing more than 25 specs in a batch. #32

Open andre-b-fernandes opened 3 years ago

andre-b-fernandes commented 3 years ago

Description

Running this fails when we have a huge amount of spec files and attempt to run a RSPEC pipeline on them. It also occurs when someone attempts to use DynamoDB as a database. This causes the gem to attempt to perform a batch request with more than 25 requests which exceeds the maximum size as it says in the DynamoDB documentation. https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchWriteItem.html

The error is: [Member must have length less than or equal to 25, Member must have length greater than or equal to 1]

Steps to reproduce

  1. Create a folder with multiple file specs, and write rspec unit tests on them. (Can be simple ones). Write like 30 unit tests per file and create like 10 files.
  2. Attempt to run rspec on that folder while using the quarantine gem and using DynamoDB as a database.
brett-anderson commented 3 years ago

We are also seeing this issue with dynamoDB, using buildkite and knapsack pro to run rspec.

andre-b-fernandes commented 3 years ago

I ended up writing my own implementation, I think the gem needs to divide the items to send within the batch and group them in smaller chunks.