Problem/Motivation
Hello,
I was testing elasticsearch_connector update to v8.0.0-alpha2, and our DTT tests completely unrelated to search are failing after the update. I was debugging the issue, and the failure is caused by search_api_entity_delete hook, which is triggered when a test deletes a node. This eventually triggers NoNodeAvailableException, since we are not running elasticsearch on our CI.
I would argue that exception handlers like this should also catch Elastic\Transport\Exception\TransportException, so if the elasticsearch is not available, the exception would be handled withing search_api and elasticsearch_connector.
In my case, the NoNodeAvailableException is finally caught in SqlContentEntity::delete and transformed into a EntityStorageException.
Steps to reproduce
Make sure elasticsearch is not available. Delete an entity that tracked by search_api.
Proposed resolution
Handle Elastic\Transport\Exception\TransportException exceptions in BackendClient.
Remaining tasks
Write a patchReview and feedbackRTBC and feedbackCommitRelease— released in 8.0.0-alpha4
User interface changes
API changes
Data model changes
Issue fork elasticsearch_connector-3486375
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
huhhuh commentedComment #4
huhhuh commentedComment #5
huhhuh commentedComment #6
huhhuh commentedComment #9
sokru commentedThanks, looks good!
Comment #10
sokru commentedComment #11
mparker17Unassigning, now that it is complete.
Comment #13
mparker17Updated remaining tasks