-
Notifications
You must be signed in to change notification settings - Fork 90
Fix transform index spec #964
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
d21b60d
Fix schema
jsoriano c29c146
Fix transform index spec
jsoriano 4521e80
Fail if spec is empty for a spec file
jsoriano 3f2efa6
Merge remote-tracking branch 'origin/main' into version-patch-lookup-…
jsoriano 42985e5
Reuse definitions for index template settings
jsoriano 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
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
106 changes: 61 additions & 45 deletions
106
spec/integration/elasticsearch/transform/manifest.spec.yml
This file contains hidden or 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 |
|---|---|---|
| @@ -1,45 +1,61 @@ | ||
| type: object | ||
| additionalProperties: false | ||
| definitions: | ||
| index_template: | ||
| $ref: "../../data_stream/manifest.spec.yml#/properties/elasticsearch/properties/index_template" | ||
| properties: | ||
| destination_index_template: | ||
| description: Elasticsearch index template for the transform's destination index | ||
| type: object | ||
| additionalProperties: false | ||
| properties: | ||
| settings: | ||
| type: object | ||
| additionalProperties: false | ||
| properties: | ||
| index: | ||
| type: object | ||
| additionalProperties: false | ||
| properties: | ||
| mode: | ||
| description: Index mode for lookup indices. | ||
| type: string | ||
| enum: | ||
| - lookup | ||
| codec: | ||
| $ref: "../../data_stream/manifest.spec.yml#/properties/elasticsearch/properties/index_template/properties/settings/properties/index/properties/codec" | ||
| mapping: | ||
| $ref: "../../data_stream/manifest.spec.yml#/properties/elasticsearch/properties/index_template/properties/settings/properties/index/properties/mapping" | ||
| sort: | ||
| $ref: "../../data_stream/manifest.spec.yml#/properties/elasticsearch/properties/index_template/properties/settings/properties/index/properties/sort" | ||
| number_of_shards: | ||
| $ref: "../../data_stream/manifest.spec.yml#/properties/elasticsearch/properties/index_template/properties/settings/properties/number_of_shards" | ||
| analysis: | ||
| $ref: "../../data_stream/manifest.spec.yml#/properties/elasticsearch/properties/index_template/properties/settings/properties/analysis" | ||
| mappings: | ||
| $ref: "../../data_stream/manifest.spec.yml#/properties/elasticsearch/properties/index_template/properties/mappings" | ||
| ingest_pipeline: | ||
| $ref: "../../data_stream/manifest.spec.yml#/properties/elasticsearch/properties/index_template/properties/ingest_pipeline" | ||
| data_stream: | ||
| $ref: "../../data_stream/manifest.spec.yml#/properties/elasticsearch/properties/index_template/properties/data_stream" | ||
| required: false | ||
| start: | ||
| description: Determines if the transform will be started upon installation | ||
| type: boolean | ||
| default: true | ||
| spec: | ||
| type: object | ||
| additionalProperties: false | ||
| properties: | ||
| destination_index_template: | ||
| description: Elasticsearch index template for the transform's destination index | ||
| type: object | ||
| additionalProperties: false | ||
| properties: | ||
| settings: | ||
| type: object | ||
| additionalProperties: false | ||
| properties: | ||
| analysis: | ||
| $ref: "../../data_stream/manifest.spec.yml#/definitions/index_template_setting_analysis" | ||
| index: | ||
| type: object | ||
| additionalProperties: false | ||
| properties: | ||
| codec: | ||
| $ref: "../../data_stream/manifest.spec.yml#/definitions/index_template_setting_index/properties/codec" | ||
| mapping: | ||
| $ref: "../../data_stream/manifest.spec.yml#/definitions/index_template_setting_index/properties/mapping" | ||
| mode: | ||
| description: Index mode for lookup indices. | ||
| type: string | ||
| enum: | ||
| - lookup | ||
| refresh_interval: | ||
| description: > | ||
| How often to perform a refresh operation, which makes recent changes to the index visible to search. | ||
| type: string | ||
| example: 1s | ||
| sort: | ||
| $ref: "../../data_stream/manifest.spec.yml#/definitions/index_template_setting_index/properties/sort" | ||
| number_of_shards: | ||
| $ref: "../../data_stream/manifest.spec.yml#/definitions/index_template_setting_number_of_shards" | ||
| number_of_routing_shards: | ||
| description: Number used when splitting shards. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure that this |
||
| $ref: "../../data_stream/manifest.spec.yml#/definitions/index_template_setting_number_of_shards" | ||
| hidden: | ||
| description: Makes the index hidden. | ||
| type: boolean | ||
| default: false | ||
| mappings: | ||
| $ref: "../../data_stream/manifest.spec.yml#/definitions/elasticsearch_index_template/properties/mappings" | ||
| ingest_pipeline: | ||
| $ref: "../../data_stream/manifest.spec.yml#/definitions/elasticsearch_index_template/properties/ingest_pipeline" | ||
| data_stream: | ||
| $ref: "../../data_stream/manifest.spec.yml#/definitions/elasticsearch_index_template/properties/data_stream" | ||
| start: | ||
| description: Determines if the transform will be started upon installation | ||
| type: boolean | ||
| default: true | ||
|
|
||
|
|
||
| versions: | ||
| - before: 3.4.0 | ||
| patch: | ||
| - op: remove | ||
| path: "/properties/destination_index_template/properties/settings/properties/index/properties/mode" # Lookup index mode is not supported in older stacks. | ||
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.
Safeguard added to avoid introducing this kind of issues again.