Skip to content

Render Helm customIndexes at the config path Ditto actually reads - #2540

Merged
thjaeckle merged 1 commit into
eclipse-ditto:masterfrom
beyonnex-io:fix/helm-custom-indexes-config-path
Sep 3, 2026
Merged

Render Helm customIndexes at the config path Ditto actually reads#2540
thjaeckle merged 1 commit into
eclipse-ditto:masterfrom
beyonnex-io:fix/helm-custom-indexes-config-path

Conversation

@thjaeckle

Copy link
Copy Markdown
Member

thingsSearch.config.customIndexes never reached Ditto. The template emitted the block under

  ditto.search.updater.persistence.custom-indexes

while SearchConfigValue declares

  CUSTOM_INDEXES("index-initialization.custom-indexes", Collections.emptyMap())

so DittoSearchConfig#loadCustomIndexes looks under ditto.search.index-initialization.custom-indexes and finds nothing. search.conf documents the same location - custom-indexes {} sits inside the index-initialization { } block, next to activated-index-names.

The consequence is worse than the feature silently doing nothing. Because IndexInitializer.dropUndefinedIndices() removes every index whose name is neither built-in nor a configured custom index, declaring an index in the chart made Ditto drop it on startup rather than create and keep it. Operators who had pre-created the index by hand - the recommended approach on a large collection, where a rolling build avoids a cold create - lost it on the next things-search restart.

`thingsSearch.config.customIndexes` never reached Ditto. The template emitted the
block under

  ditto.search.updater.persistence.custom-indexes

while SearchConfigValue declares

  CUSTOM_INDEXES("index-initialization.custom-indexes", Collections.emptyMap())

so DittoSearchConfig#loadCustomIndexes looks under
`ditto.search.index-initialization.custom-indexes` and finds nothing. search.conf
documents the same location - `custom-indexes {}` sits inside the
`index-initialization { }` block, next to `activated-index-names`.

The consequence is worse than the feature silently doing nothing. Because
IndexInitializer.dropUndefinedIndices() removes every index whose name is neither
built-in nor a *configured* custom index, declaring an index in the chart made Ditto
drop it on startup rather than create and keep it. Operators who had pre-created the
index by hand - the recommended approach on a large collection, where a rolling build
avoids a cold create - lost it on the next things-search restart.

Observed on a cluster after deploying a chart that declared two custom indexes:

  index-initialization is aware of defined indices:
      [_namespace, global_read, v_wildcard, v_wildcard_id]
  Dropping undefined indices: [ns_currently_mounted, ns_type_usagetype]
  Index-Initialization was successful.

The fix is positional only: move the block inside `index-initialization`. The emitted
HOCON shape ("name" { fields = [ { name, direction } ] }) already matched search.conf
and is unchanged.

Verified by rendering the chart with a customIndexes value: the block is now nested in
index-initialization, no stray `updater { }` block remains, and a render without
customIndexes emits no custom-indexes at all.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Thomas Jäckle <thomas.jaeckle@beyonnex.io>
@thjaeckle thjaeckle added this to the helm-chart-4.7.1 milestone Sep 3, 2026

@kalinkostashki kalinkostashki left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch 👍

@thjaeckle
thjaeckle merged commit 6de7794 into eclipse-ditto:master Sep 3, 2026
9 checks passed
@thjaeckle thjaeckle self-assigned this Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants