Imported from kestra-io/plugin-opensearch-lib (
AGENTS.md). Install upstream withnpx skills add kestra-io/plugin-opensearch-lib. Copyright stays with the author.
AGENTS.md
What
- Shared kernel library published as
io.kestra.plugin:plugin-opensearch-lib, consumed byplugin-opensearch(OSS) andplugin-ee-opensearch(EE). It is not a loadable Kestra plugin — it ships no task, no trigger, no plugin docs or icons, and cannot be registered on a running Kestra instance on its own. - Provides classes under
io.kestra.plugin.opensearch.shared:OpensearchConnection(hosts, basic auth, headers, TLS trust, path prefix, strict deprecation mode) andBulkService(buffered bulk indexing withrequests.count/records/requests.durationmetrics).
Why
- OSS and EE each shipped a near-verbatim, but drifted, copy of the connection-building and bulk-indexing code. This library removes that duplication so both consumers evolve the connection and bulk logic in one place instead of drifting further apart.
Local rules
- This library is shared between OSS and EE only — it is not a general-purpose OpenSearch client wrapper. Do not add task/trigger classes, plugin docs, or plugin icons here; each consumer keeps its own.
- It is a plain library, not a plugin: no
package-info.javawith@PluginSubGroup, noshadowJar, noX-Kestra-*jar manifest, noDockerfile/docker-compose.yml. - This library is the single source of the OpenSearch client version (inherited from the
io.kestra:platformBOM); neither consumer declares it anymore. Both inherit it transitively through theapidependency, so bumping it here changes theconnectionschema for OSS and EE simultaneously — bump deliberately and QA both. - Preserve metric names (
requests.count,records,requests.duration) byte-for-byte, and keep the stable, user-facing shape of error/log messages (e.g. theIndexer failed bulk:prefix, the header/host validation wording) — both consumers' users template outputs and grep logs on these. This does not forbid bounded improvements to error content:BulkService.logErrorintentionally caps the per-item errors it renders (MAX_LOGGED_ERRORS) and appends... (N more errors omitted)rather than building an unbounded string for a large failed bulk. - Must be released to Maven Central before either consumer can pin a released (non-
SNAPSHOT) version; until then, consumers resolve it frommavenLocal()/the Sonatype snapshots repository.