Skip to content

Close opensearch instance on destroy#547

Open
jmendeza wants to merge 1 commit into
craftercms:support/4.xfrom
jmendeza:bugfix/1265-e-4x
Open

Close opensearch instance on destroy#547
jmendeza wants to merge 1 commit into
craftercms:support/4.xfrom
jmendeza:bugfix/1265-e-4x

Conversation

@jmendeza

Copy link
Copy Markdown
Member

https://github.com/craftersoftware/craftercms/issues/1265
Close opensearch instance on destroy

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

AbstractOpenSearchFactory now overrides instance destruction to log shutdown and close AutoCloseable services. The file also reorganizes the ArrayList import.

Changes

OpenSearch factory lifecycle

Layer / File(s) Summary
Factory instance destruction
src/main/java/org/craftercms/deployer/utils/opensearch/AbstractOpenSearchFactory.java
Adds the destroyInstance lifecycle method, logs shutdown, closes AutoCloseable instances, and reorganizes imports.

Estimated code review effort: 2 (Simple) | ~5 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly matches the main change: closing the OpenSearch instance on destroy.
Description check ✅ Passed The description includes the issue reference and states the change, which matches the repository template well enough.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jmendeza jmendeza marked this pull request as ready for review July 15, 2026 21:05
@jmendeza jmendeza requested a review from sumerjabri as a code owner July 15, 2026 21:05
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