-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Add migration support to the event log #58010
Merged
+38
−19
Merged
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
cb86e22
Initial work
mikecote c2b83ca
Add missing file
mikecote dbc3111
Add tests where missing
mikecote 8bca6a9
Merge branch 'master' of github.com:elastic/kibana into event_log/mig…
mikecote 4d3d4a7
Merge branch 'master' of github.com:elastic/kibana into event_log/mig…
mikecote 0d5bde1
Add kibana version to esNames
mikecote 72d9bb1
Merge branch 'master' of github.com:elastic/kibana into event_log/mig…
mikecote c7209d0
Share ILM policy across versions
mikecote File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add tests where missing
commit dbc3111763a9771533f989d860128dd4d0e7ff30
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
x-pack/plugins/event_log/server/lib/get_current_version_as_integer.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
describe('getCurrentVersionAsInteger', () => { | ||
beforeEach(() => jest.resetModules()); | ||
|
||
test('should parse 8.0.0', () => { | ||
jest.mock('../../../../package.json', () => ({ | ||
version: '8.0.0', | ||
})); | ||
const { getCurrentVersionAsInteger } = jest.requireActual('./get_current_version_as_integer'); | ||
expect(getCurrentVersionAsInteger()).toEqual(80000); | ||
}); | ||
|
||
test('should parse 8.1.0', () => { | ||
jest.mock('../../../../package.json', () => ({ | ||
version: '8.1.0', | ||
})); | ||
const { getCurrentVersionAsInteger } = jest.requireActual('./get_current_version_as_integer'); | ||
expect(getCurrentVersionAsInteger()).toEqual(80100); | ||
}); | ||
|
||
test('should parse 8.1.2', () => { | ||
jest.mock('../../../../package.json', () => ({ | ||
version: '8.1.2', | ||
})); | ||
const { getCurrentVersionAsInteger } = jest.requireActual('./get_current_version_as_integer'); | ||
expect(getCurrentVersionAsInteger()).toEqual(80102); | ||
}); | ||
|
||
test('should parse v8.1.2', () => { | ||
jest.mock('../../../../package.json', () => ({ | ||
version: 'v8.1.2', | ||
})); | ||
const { getCurrentVersionAsInteger } = jest.requireActual('./get_current_version_as_integer'); | ||
expect(getCurrentVersionAsInteger()).toEqual(80102); | ||
}); | ||
}); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious why we added the extra body here. I was frankly curious I could create an index WITHOUT a document to begin with, but I'm wondering if this change was deliberate, and if so, why was it done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to set additional settings when creating the initial index. I need this to setup the alias when creating the initial index now that it's not done with the index template anymore.
Reference: https://github.com/elastic/kibana/pull/58010/files#diff-88aee8214a0ea2006f946be367b1d715R66