backstage icon indicating copy to clipboard operation
backstage copied to clipboard

🐛 Bug Report: linguist-backend plugin skips the initial batch

Open elizabeth-prairie opened this issue 3 years ago • 2 comments

📜 Description

The lingluist-backend plugin skips the initial batch.

👍 Expected behavior

Entities [0, batchSize) should be processed.

👎 Actual Behavior with Screenshots

Entities [0, batchSize) are not being processed.

👟 Reproduction steps

When attempting to use the Linguist plugin with 5 entities and a batchSize of 20, the 5 entities are never processed. We believe this to be due to only one argument being provided to slice here. The slice documentation indicates that if only one argument is provided then it will be used as the start parameter.

📃 Provide the context for the Bug.

No response

🖥️ Your Environment

@backstage/plugin-linguist-backend:0.1.0

👀 Have you spent some time to check if this bug has been raised before?

  • [X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Are you willing to submit PR?

Yes I am willing to submit a PR!

elizabeth-prairie avatar Feb 15 '23 17:02 elizabeth-prairie

Thanks for reporting and working on a PR to fix this @elizabeth-a-hobbs! I totally missed this, but I'm confused as to how it worked at all. 🤔

ahhhndre avatar Feb 15 '23 19:02 ahhhndre

Ah, now I understand what you mean by "initial batch" you mean the n number of entities before the slice. Not the total batch of entities that Linguist tries to process. Based on that yeah, this doesn't work, 🍳 on my face 😭

ahhhndre avatar Feb 15 '23 20:02 ahhhndre