-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Search: Allow no active versions and change initial state to no versions #3963
Conversation
28743f3
to
9c1938a
Compare
Codecov Report
@@ Coverage Diff @@
## develop #3963 +/- ##
=============================================
+ Coverage 28.52% 32.48% +3.96%
+ Complexity 4566 3874 -692
=============================================
Files 265 232 -33
Lines 20246 17138 -3108
=============================================
- Hits 5775 5568 -207
+ Misses 14471 11570 -2901
|
9c1938a
to
f4fdd45
Compare
464ac40
to
e898170
Compare
d7225e5
to
d5c37d3
Compare
e554750
to
a4ae935
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Manually tested in all possible scenarios I could come up with, seems to work great, but would still be nice to figure out the rollout strategy for this, as the change is pretty big.
…d remove redundancy in deactivate_helper()
a4ae935
to
c855b2a
Compare
SonarCloud Quality Gate failed.
|
Kudos, SonarCloud Quality Gate passed!
|
Description
This change does the below:
deactivate
WP-CLI command:wp vip-search index-versions deactivate post 1
If there's no active versions but search is enabled, search will fall back to DB.
Changelog Description
Plugin Updated: Enterprise Search
Add deactivate CLI command, allow a state of having no active indexes and set initial state to no versions
Checklist
Please make sure the items below have been covered before requesting a review:
Steps to Test
Note: when testing on dev-env, you'll need to run
wp vip-search index --setup
since the current version useswp elasticsearch index --setup
which doesn't take into account the changes in this PR. see Automattic/vip-container-images#390wp vip-search index-versions deactivate post <index-id>
on an active version and usewp vip-search index-versions list post
to verify it's no longer marked as active?s=<searchTerm>
and observe that in Search Dev Tools, there's no query run anymorewp vip-search index-versions delete post <index-id
until there's no more indexes left inwp vip-search index-versions list post
wp vip-search index --using-versions --setup --indexables=post
and expect an error message returnedwp vip-search index --setup
and verify that a new version has been created perwp vip-search index-versions list post
wp vip-search index --setup --indexables=post --version=<index id from step 6>
and verify that no new indexes have been added and only the index from step 6 was indexed