Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

[Backport 5.0] insights: allow repo iterators to be created over zero repos#50745

Merged
coury-clark merged 1 commit into
5.0from
backport-50561-to-5.0
Apr 17, 2023
Merged

[Backport 5.0] insights: allow repo iterators to be created over zero repos#50745
coury-clark merged 1 commit into
5.0from
backport-50561-to-5.0

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Currently insights that have resolve to matching no repos will fail the backfill because a repo iterator isn't allowed to be created for 0 repos. I don't see a reason why we need to disallow empty iterators. This removes that restriction.

Test plan

Unit test added
Created an insight over 0 repos using repo search repo:notarepo - verified insight completed backfilling with zero data.
<!-- All pull requests REQUIRE a test plan: https://docs.sourcegraph.com/dev/background-information/testing_principles -->

Backport c928f0a from #50561

Currently insights that have resolve to matching no repos will fail the
backfill because a repo iterator isn't allowed to be created for 0
repos. I don't see a reason why we need to disallow empty iterators.
This removes that restriction.
## Test plan
Unit test added
Created an insight over 0 repos using repo search `repo:notarepo` -
verified insight completed backfilling with zero data.
<!-- All pull requests REQUIRE a test plan:
https://docs.sourcegraph.com/dev/background-information/testing_principles
-->

(cherry picked from commit c928f0a)
@coury-clark coury-clark merged commit 722aaba into 5.0 Apr 17, 2023
@coury-clark coury-clark deleted the backport-50561-to-5.0 branch April 17, 2023 20:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant