Automattic / vip-cli

The VIP-CLI
https://docs.wpvip.com/vip-cli/
MIT License
59 stars 16 forks source link

`vip @example.env -- wp vip-search index-versions list term` returns document_count = 0 intermittently for fresh Version 2 #1961

Open NinjutsuSunrise opened 3 months ago

NinjutsuSunrise commented 3 months ago

Expected/Desired Behavior

After running vip @example.env -- wp vip-search index --indexables="term" --version="next" the document_count for Version 2 of the Index should be accurate via vip @example.env -- wp vip-search index-versions list term.

Actual Behavior

After running vip @example.env -- wp vip-search index --indexables="term" --version="next" the document_count for Version 2 of the Index is intermittently 0 via vip @example.env -- wp vip-search index-versions list term. First 0, then 253681, then 0, then 253681 and staying consistent after some time.

As an aside, vip @example.env -- wp vip-search health validate-terms-count was always accurate. Still, the buggy document_count introduces confusion and doubt.

Note: vip -v = 3.7.0

Steps to Reproduce the Problem

  1. vip @example.env -- wp vip-search index --indexables="term" --version="next"
  2. vip @example.env -- wp vip-search index-versions list term (was 0)
  3. vip @example.env -- wp vip-search index-versions list term (was 253681)
  4. vip @example.env -- wp vip-search health validate-terms-count (no problem)
  5. vip @example.env -- wp vip-search index-versions list term (was 0)
  6. vip @example.env -- wp vip-search index-versions list term (was 253681)
sjinks commented 3 months ago

This probably belongs to https://github.com/Automattic/vip-go-mu-plugins

cc @rebeccahum @rinatkhaziev

rebeccahum commented 3 months ago

Hmm I can't seem to reproduce. The only thing that comes to mind is if the ES request fails (which is why it's intermittently happening): https://github.com/Automattic/vip-go-mu-plugins/blob/44e6293555331be77646e30ee2df97c961fcd34c/search/includes/classes/class-health.php#L1168

github-actions[bot] commented 1 month ago

This issue has been marked stale because it has been open for 60 days with no activity. If there is no activity within 7 days, it will be closed.

This is an automation to keep issues manageable and actionable and is not a comment on the quality of this issue nor on the work done so far. Closed issues are still valuable to the project and are available to be searched.