opensearch-project / opensearch-build-libraries

Apache License 2.0
7 stars 25 forks source link

[Bug]: Bug with `_aliases` update in publish libraries #535

Closed prudhvigodithi closed 4 weeks ago

prudhvigodithi commented 1 month ago

Describe the bug

When alias added in index mapping, the following is the error.

Failed to create index. Error message: {"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Root mapping definition has unsupported parameters:  [aliases : {opensearch-integration-test-results={}}]"}],"type":"mapper_parsing_exception","reason":"Failed to parse mapping [_doc]: Root mapping definition has unsupported parameters:  [aliases : {opensearch-integration-test-results={}}]","caused_by":{"type":"mapper_parsing_exception","reason":"Root mapping definition has unsupported parameters:  [aliases : {opensearch-integration-test-results={}}]"}},"status":400}

To reproduce

Additional context

Impacted Libraries https://github.com/opensearch-project/opensearch-build-libraries/blob/main/vars/publishGradleCheckTestResults.groovy https://github.com/opensearch-project/opensearch-build-libraries/blob/main/vars/publishIntegTestResults.groovy https://github.com/opensearch-project/opensearch-build-libraries/blob/main/vars/publishDistributionBuildResults.groovy

Relevant log output

No response

prudhvigodithi commented 4 weeks ago

Closing this issue and bug fix has been pushed in 7.2.0 library version. Sample build https://build.ci.opensearch.org/job/integ-test/8840/console which updates the alias when the index is created for the 1st time.

Screenshot 2024-10-22 at 9 34 46 AM

Thank you @getsaurabh02 @gaiksaya