Skip to content

VCST-5155: Add skipDocCountVerification to bypass count gate for empty document types#242

Merged
AndrewEhlo merged 2 commits into
masterfrom
VCST-5155
May 29, 2026
Merged

VCST-5155: Add skipDocCountVerification to bypass count gate for empty document types#242
AndrewEhlo merged 2 commits into
masterfrom
VCST-5155

Conversation

@AndrewEhlo
Copy link
Copy Markdown
Contributor

@AndrewEhlo AndrewEhlo commented May 29, 2026

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.

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

- uses: VirtoCommerce/vc-github-actions/run-pytest-tests@master
  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

Platform reusable workflows (Platform/.github) need the matching input wired through — separate PR for ui-autotests.yml, e2e-autotests.yml (pytest-tests.yml already had it).

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).
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.

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

  • uses: VirtoCommerce/vc-github-actions/run-pytest-tests@master
    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 skipDocCountVerification path 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.ps1 gains -skipDocCountVerification (string array). Reindex still runs for all types; only types not in the skip list are passed to Wait-AllIndexedCountsReady. Unknown skip names fail before reindex with a clear error so typos cannot silently no-op.

run-pytest-tests, run-graphql-tests, and run-e2e-tests expose 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.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread docker-env-full/scripts/start-indexing.ps1 Outdated
@AndrewEhlo AndrewEhlo merged commit 6d750ed into master May 29, 2026
3 checks passed
@AndrewEhlo AndrewEhlo deleted the VCST-5155 branch May 29, 2026 05:20
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.

1 participant