Commit 53ca6ac
Drop grep from the Solr probe by asking the core's ping handler
Follow-up to review feedback that `grep` is as implicit a dependency as `curl` was.
It is not, strictly - in Debian the two differ:
grep: Essential=yes (apt refuses to remove it; it is part of the base system)
curl: Essential=no (genuinely optional, which is why it is now installed explicitly)
But the objection points at something better than installing another package: the probe
does not need grep at all. Asking the core's own ping handler is enough, because an
unregistered core is not a route:
curl -fsS -o /dev/null http://localhost:8983/solr/search/admin/ping
registered core -> HTTP 200, exit 0
unloaded core -> HTTP 404, exit 22
Verified by unloading and recreating the core against the running container.
This is a better probe than the CoreAdmin STATUS + grep it replaces:
- depends on curl alone, no pipe and no second binary
- does not match on Solr's JSON, which a Solr upgrade could reformat
- ping executes a real query against the core, so it checks the core answers rather
than merely appearing in a list
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent f519da8 commit 53ca6ac
1 file changed
Lines changed: 10 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
257 | 262 | | |
258 | | - | |
| 263 | + | |
259 | 264 | | |
260 | 265 | | |
261 | 266 | | |
| |||
0 commit comments