VCST-5155: Add skipDocCountVerification to bypass count gate for empty document types#242
Merged
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2a63b87. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
start-indexing.ps1post-reindex count gate currently fails when the seed dataset has zero source records for a document type (e.g.PickupLocation) — the index reports0 docs, the configured minimum (34) is never reached, and the gate spins for ~15 min before timing out. This PR adds an opt-in skip list so callers can bypass the count check for known-empty types while still triggering the reindex.Changes
-skipDocCountVerificationstring-array param. Filters$minDocCountsbeforeWait-AllIndexedCountsReady; reindex itself still runs for every type. Validates each value against$minDocCounts.Keysand throws on unknown types (typo guard — silent no-op would defeat the whole purpose of the flag).skipDocCountVerificationinput (comma-separated, default''). Splatted into the script so the param is omitted when empty — keeps existing master-pinned callers safe.Usage
Behaviour
Input | Result -- | -- empty (default) | identical to current behaviour PickupLocation | reindex runs for all 5 types, count gate skips PickupLocation only PickupLocaiton (typo) | hard fail at script start with: unknown document type(s): PickupLocaiton. Valid types: Category, CustomerOrder, Member, PickupLocation, Product.Companion PR
Platform reusable workflows (Platform/.github) need the matching input wired through — separate PR for
ui-autotests.yml,e2e-autotests.yml(pytest-tests.ymlalready had it).Test plan
- Run
- Run with
- Run with the input unset — verify behaviour is unchanged (all 5 types gated).
Summary start-indexing.ps1 post-reindex count gate currently fails when the seed dataset has zero source records for a document type (e.g. PickupLocation) — the index reports 0 docs, the configured minimum (34) is never reached, and the gate spins for ~15 min before timing out. This PR adds an opt-in skip list so callers can bypass the count check for known-empty types while still triggering the reindex.pytest-testsworkflow withskipDocCountVerification: PickupLocationagainst the current seed dataset — verify the previous timeout no longer occurs and tests proceed.skipDocCountVerification: TypoHere— verify the script fails fast with the validation message.Changes
docker-env-full/scripts/start-indexing.ps1 — new -skipDocCountVerification string-array param. Filters $minDocCounts before Wait-AllIndexedCountsReady; reindex itself still runs for every type. Validates each value against $minDocCounts.Keys and throws on unknown types (typo guard — silent no-op would defeat the whole purpose of the flag).
run-pytest-tests/action.yml, run-graphql-tests/action.yml, run-e2e-tests/action.yml — new skipDocCountVerification input (comma-separated, default ''). Splatted into the script so the param is omitted when empty — keeps existing master-pinned callers safe.
Usage
with:
skipDocCountVerification: PickupLocation # or 'PickupLocation,ContentFile'
Behaviour
Input Result
empty (default) identical to current behaviour
PickupLocation reindex runs for all 5 types, count gate skips PickupLocation only
PickupLocaiton (typo) hard fail at script start with: unknown document type(s): PickupLocaiton. Valid types: Category, CustomerOrder, Member, PickupLocation, Product.
Companion PR
https://github.com/VirtoCommerce/.github/pull/57)](https://github.com/VirtoCommerce/.github/pull/57
Test plan
Run pytest-tests workflow with skipDocCountVerification: PickupLocation against the current seed dataset — verify the previous timeout no longer occurs and tests proceed.
Run with skipDocCountVerification: TypoHere — verify the script fails fast with the validation message.
Run with the input unset — verify behaviour is unchanged (all 5 types gated).
Note
Low Risk
CI/indexing script and composite action wiring only; default empty input preserves existing count verification behavior.
Overview
Adds an opt-in
skipDocCountVerificationpath so CI can finish indexing when a seeded document type legitimately has zero indexed docs (e.g.PickupLocation) without waiting for the post-reindex minimum-count gate to time out.start-indexing.ps1gains-skipDocCountVerification(string array). Reindex still runs for all types; only types not in the skip list are passed toWait-AllIndexedCountsReady. Unknown skip names fail before reindex with a clear error so typos cannot silently no-op.run-pytest-tests,run-graphql-tests, andrun-e2e-testsexpose the same setting as an optional comma-separated workflow input, splatted into the script only when non-empty (default behavior unchanged).Reviewed by Cursor Bugbot for commit e2482fa. Bugbot is set up for automated code reviews on this repo. Configure here.