Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[teraslice, elasticsearch-store] opensearch2 mappings missing dynamics: false field #3808

Merged
merged 8 commits into from
Oct 28, 2024

Conversation

busma13
Copy link
Contributor

@busma13 busma13 commented Oct 24, 2024

This PR makes the following changes:

  • updates ensureNoTypeInMapping() to copy dynamic property when removing type from mapping.
  • creates method-helpers-spec.ts and adds unit tests for ensureNoTypeInMapping().
  • creates an e2e storage-spec.ts to confirm that the jobs state storage index mapping is created with dynamic set to false.
  • bump teraslice from version 2.6.2 to 2.6.3
  • bump elasticsearch-api from 1.3.2 to 1.3.3
  • bump elasticsearch-store from 1.3.2 to 1.3.3
  • bump terafoundation from 1.5.3 to 1.5.4

Ref: #3809

@busma13 busma13 marked this pull request as ready for review October 25, 2024 21:59
@busma13 busma13 requested a review from jsnoble October 25, 2024 22:01
@busma13 busma13 changed the title opensearch2 mappings missing dynamics: false field [teraslice, elasticsearch-store] opensearch2 mappings missing dynamics: false field Oct 25, 2024
it('should have a jobs index with dynamic mapping false', async () => {
const mapping = await terasliceHarness.client.indices.getMapping({ index: '*__jobs' });
const indexName = Object.keys(mapping)[0];
const searchVersion = (await terasliceHarness.client.info()).version.number;
Copy link
Member

@jsnoble jsnoble Oct 25, 2024

Choose a reason for hiding this comment

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

(await terasliceHarness.client.info()).version.number; is not very readable and its uneeded. The client already has that information on it so there is no need to make the call either through terasliceHarness.client.distributionMeta though the types wont like that or through terasliceHarness.client.__meta

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't know that. Thanks

@@ -111,5 +111,6 @@ export {
MINIO_ACCESS_KEY,
MINIO_SECRET_KEY,
ENCRYPT_MINIO,
ROOT_CERT_PATH
ROOT_CERT_PATH,
TEST_OPENSEARCH
Copy link
Member

Choose a reason for hiding this comment

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

you can also pull the version from the enviroment not only just TEST_OPENSEARCH

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For my use case I would need to expose both elasticsearch and opensearch versions, so I'll stick will getting the version from client.__meta.

Copy link
Member

@jsnoble jsnoble left a comment

Choose a reason for hiding this comment

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

LGTM besides some simple test changes

@godber godber merged commit 0ca4fe7 into master Oct 28, 2024
49 checks passed
@godber godber deleted the os2-mappings-bug branch October 28, 2024 23:20
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.

3 participants