Skip to content

Do not override solr-update-core-and-start in the compose and stack files - #471

Open
reekitconcept wants to merge 1 commit into
mainfrom
solr-update-core-not-overridden
Open

Do not override solr-update-core-and-start in the compose and stack files#471
reekitconcept wants to merge 1 commit into
mainfrom
solr-update-core-not-overridden

Conversation

@reekitconcept

@reekitconcept reekitconcept commented Aug 10, 2026

Copy link
Copy Markdown
Member

Companion of kitconcept.solr#108 (merged): the compose and stack files overrode the image's CMD with solr-precreate, which silently disabled the solr-update-core-and-start script baked into the image — so core config changes shipped with a new image never reached an existing core. The script is now called explicitly in command:, so adding a command: back later cannot silently switch it off again.

Scope note: this PR now contains only the command fix. The by-revision pinning of the kitconcept.solr artifacts (backend, frontend, solr image) that used to be the second commit here has moved to #474, which pins to a newer revision that also carries the Plate RAG chunking fix (kitconcept.solr#112). Keeping the pinning in both PRs would only create conflicts between them.

Deployment note (unchanged, see comment below): deploying this recreates the solr container, and since the solr service has no volume the core comes up empty — a reindex is needed after the deploy. Proposal to decouple that: #578.

@reekitconcept
reekitconcept requested review from a team as code owners August 10, 2026 17:31
@reekitconcept
reekitconcept force-pushed the solr-update-core-not-overridden branch from 6177862 to 2fd35e3 Compare August 10, 2026 17:55
@reekitconcept
reekitconcept force-pushed the solr-update-core-not-overridden branch from 2fd35e3 to 15abcd7 Compare August 11, 2026 07:49
@reekitconcept

Copy link
Copy Markdown
Member Author

Deployment note: this needs a Solr reindex after deploying.

The solr service spec changes (command + image tag), so Swarm recreates the solr container — and since the service has no volume, the container comes up with an empty core. Run the usual solr_activate_and_reindex.py after the deploy (on demo: scale up the solr-reindex service).

This is not specific to this PR — today any deploy that recreates the solr container costs a full reindex. Proposal to remove that coupling by persisting /var/solr with a volume: https://gitlab.kitconcept.io/kitconcept/distribution-kitconcept-intranet/-/work_items/578

Silver lining: the sha pin in this PR makes future reindexes more predictable — with the old floating feature-ai-rag tag, any stack redeploy after a branch push could silently pull a new digest and surprise-empty the index; now the solr container only changes when SOLR_TAG is deliberately bumped.

…iles

The ghcr.io/kitconcept/solr image sets CMD
["solr-update-core-and-start"], which refreshes the config of an already
existing core before calling solr-precreate. All three places that start
Solr then set a command: of their own with plain solr-precreate, which
replaces the CMD and disables the refresh, so a core that already exists
on a volume keeps its old config.

Call the script explicitly instead of relying on the CMD, so adding a
command: back later cannot silently switch it off again.
@reekitconcept
reekitconcept force-pushed the solr-update-core-not-overridden branch from 15abcd7 to c1c8eef Compare August 13, 2026 19:10
@reekitconcept reekitconcept changed the title Do not override solr-update-core-and-start; pin solr artifacts by sha Do not override solr-update-core-and-start in the compose and stack files Aug 13, 2026
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