Bhanu Agrawal 3801525263
Introduce unified ES/OS client API + separate index management (#23425)
* Setup new client for ES/OS

* Migrated createIndex and addIndexAlias methods

* Migrated createAliases method to new ES/OS client

* Migrated updateIndex and deleteIndex methods

* Updated indexExists methods

* refactor: extract index management operations into dedicated manager classes

* Add tests for ElasticSearch and OpenSearch index managers

* chore: fix code style issues"

* Added integeration tests for ES/OS index manager

* Fix log level

* Fixed priority key mapping for test_case_result_index

* fix test to use field name in the query as domains.id not domain.id

* Fixed failing tests

* Set headers so 8.x client can work with 7.17x or higher server for ES

* Added OpenSearch compatible stemmer configuration

* Fix java code style

* Fixed java checkstyle issue

* Added support for 7.17.x backward compatibility

* Fixed failing tests

* Updated client availability checks in both index manager classes to use the consistent !isClientAvailable pattern

* Removed comment

* chore: Fix line formatting in Playwright test files

- Adjusted line length in Domains.spec.ts for better readability
- Fixed indentation and formatting in Lineage.spec.ts
- Added missing newline at end of files

* Added new line

* Migrated other index related methods and add tests
2025-10-12 02:35:56 +05:30

207 lines
9.2 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>openmetadata-shaded-deps</artifactId>
<groupId>org.open-metadata</groupId>
<version>1.10.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>elasticsearch-deps</artifactId>
<name>Shaded Deps for OpenMetadata Server</name>
<description>Shaded version of dependencies used only for internal OpenMetadata code.</description>
<dependencies>
<!-- All dependencies should be marked as optional to work around
https://issues.apache.org/jira/browse/MSHADE-206 which makes it so
the dependency reduced pom is not reflected in a multi-module build
correctly. -->
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-high-level-client</artifactId>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- New Elasticsearch Java API Client -->
<dependency>
<groupId>co.elastic.clients</groupId>
<artifactId>elasticsearch-java</artifactId>
<version>8.11.0</version>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
</exclusion>
<exclusion>
<groupId>org.eclipse.parsson</groupId>
<artifactId>parsson</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<configuration>
<doclint>none</doclint>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<keepDependenciesWithProvidedScope>false</keepDependenciesWithProvidedScope>
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
<minimizeJar>false</minimizeJar>
<artifactSet>
<includes>
<include>*:*</include>
</includes>
</artifactSet>
<relocations combine.children="append">
<relocation>
<pattern>org.elasticsearch</pattern>
<shadedPattern>es.org.elasticsearch</shadedPattern>
</relocation>
<relocation>
<pattern>org.elasticsearch.client</pattern>
<shadedPattern>es.org.elasticsearch.client</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.lucene</pattern>
<shadedPattern>es.org.apache.lucene</shadedPattern>
</relocation>
<!-- New Elasticsearch Java API Client relocations -->
<relocation>
<pattern>co.elastic</pattern>
<shadedPattern>es.co.elastic</shadedPattern>
</relocation>
<relocation>
<pattern>co.elastic.clients</pattern>
<shadedPattern>es.co.elastic.clients</shadedPattern>
</relocation>
<relocation>
<pattern>META-INF/versions/9/org/apache/logging/log4j/</pattern>
<shadedPattern>org/apache/logging/log4j/</shadedPattern>
</relocation>
</relocations>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.sf</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.dsa</exclude>
<exclude>META-INF/*.RSA</exclude>
<exclude>META-INF/*.rsa</exclude>
<exclude>META-INF/*.EC</exclude>
<exclude>META-INF/*.ec</exclude>
<exclude>META-INF/MSFTSIG.SF</exclude>
<exclude>META-INF/MSFTSIG.RSA</exclude>
<exclude>META-INF/LICENSE.txt</exclude>
<exclude>META-INF/NOTICE.txt</exclude>
</excludes>
</filter>
</filters>
</configuration>
</plugin>
<plugin>
<!--
Purpose of build-helper-maven-plugin is to ensure that IntelliJ sees shaded classes.
-->
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.4.0</version>
<executions>
<execution>
<id>workaround-makeItVisibleOnIntellij</id>
<phase>none</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>${project.build.directory}/${project.build.finalName}.jar</file>
<type>jar</type>
<classifier>optional</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>