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

Support synthetic_source_keep and mapping.source.mode #3596

Merged
merged 5 commits into from
Jan 24, 2025
Merged

Conversation

pquentin
Copy link
Member

This removes a few errors from make validate api=cluster.get_component_template branch=main.

@@ -420,7 +420,8 @@ export class MappingLimitSettings {
nested_objects?: MappingLimitSettingsNestedObjects
field_name_length?: MappingLimitSettingsFieldNameLength
dimension_fields?: MappingLimitSettingsDimensionFields
ignore_malformed?: boolean
source?: MappingLimitSettingsSourceFields
ignore_malformed?: boolean | string
Copy link
Member Author

Choose a reason for hiding this comment

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

I accidentally added this other change. Like all settings, it can be a string, which happens in the cluster.get_component_templates response recordings we have.

This comment was marked as outdated.

@@ -420,7 +420,8 @@ export class MappingLimitSettings {
nested_objects?: MappingLimitSettingsNestedObjects
field_name_length?: MappingLimitSettingsFieldNameLength
dimension_fields?: MappingLimitSettingsDimensionFields
ignore_malformed?: boolean
source?: MappingLimitSettingsSourceFields
Copy link
Contributor

Choose a reason for hiding this comment

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

took me a while to find the matching names in the server code, so I have a suggestion: what about calling this 'source.mode', skipping the intermediate class?

Copy link
Member Author

Choose a reason for hiding this comment

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

I've done this in 3b71a0d (#3596) but that breaks validation, maybe because validation is not smart enough? Ah, the joy of index settings.

This comment was marked as outdated.

Copy link
Contributor

Following you can find the validation results for the APIs you have changed.

API Status Request Response
indices.add_block 🟢 2/2 2/2
indices.analyze 🟢 243/243 243/243
indices.cancel_migrate_reindex 🟢 2/2 2/2
indices.clear_cache 🟢 4/4 4/4
indices.clone 🟢 5/5 5/5
indices.close 🟢 49/49 49/49
indices.create_data_stream 🟢 31/31 31/31
indices.create_from 🟢 4/4 4/4
indices.create 🔴 1083/1166 1166/1166
indices.data_streams_stats 🟢 4/4 4/4
indices.delete_alias 🔴 12/12 5/12
indices.delete_data_lifecycle Missing test Missing test
indices.delete_data_stream 🟢 28/28 28/28
indices.delete_index_template 🟢 1/1 1/1
indices.delete_template 🟢 9/9 9/9
indices.delete 🟢 105/105 105/105
indices.disk_usage 🟢 6/6 6/6
indices.downsample 🟢 1/1 1/1
indices.exists_alias 🟢 37/37 37/37
indices.exists_index_template Missing test Missing test
indices.exists_template 🟢 15/15 15/15
indices.exists 🟢 39/39 39/39
indices.explain_data_lifecycle Missing test Missing test
indices.field_usage_stats 🟢 5/5 5/5
indices.flush 🟢 41/41 41/41
indices.forcemerge 🟢 12/12 12/12
indices.get_alias 🟢 68/68 68/68
indices.get_data_lifecycle_stats Missing test Missing test
indices.get_data_lifecycle Missing test Missing test
indices.get_data_stream 🟢 11/11 11/11
indices.get_field_mapping 🟢 15/15 15/15
indices.get_index_template 🔴 21/21 17/21
indices.get_mapping 🔴 135/135 133/135
indices.get_migrate_reindex_status 🟢 1/1 1/1
indices.get_settings 🔴 75/75 63/75
indices.get_template 🟢 32/32 32/32
indices.get 🟢 55/55 55/55
indices.migrate_reindex 🟢 2/2 2/2
indices.migrate_to_data_stream Missing test Missing test
indices.modify_data_stream Missing test Missing test
indices.open 🟢 20/20 20/20
indices.promote_data_stream Missing test Missing test
indices.put_alias 🔴 58/58 20/58
indices.put_data_lifecycle Missing test Missing test
indices.put_index_template 🔴 59/68 68/68
indices.put_mapping 🔴 111/117 117/117
indices.put_settings 🔴 55/58 58/58
indices.put_template 🔴 45/46 46/46
indices.recovery 🟢 9/9 9/9
indices.refresh 🟢 271/271 271/271
indices.reload_search_analyzers 🟢 2/2 2/2
indices.resolve_cluster 🔴 10/12 12/12
indices.resolve_index 🟢 6/6 6/6
indices.rollover 🔴 26/26 1/26
indices.segments 🔴 6/6 5/6
indices.shard_stores 🔴 5/5 4/5
indices.shrink 🟢 5/5 5/5
indices.simulate_index_template 🔴 6/7 5/7
indices.simulate_template 🔴 5/5 4/5
indices.split 🟢 11/11 11/11
indices.stats 🔴 113/113 30/112
indices.update_aliases 🔴 26/26 7/26
indices.validate_query 🟢 12/12 12/12

You can validate these APIs yourself by using the make validate target.

Copy link
Contributor

Following you can find the validation results for the APIs you have changed.

API Status Request Response
indices.add_block 🟢 2/2 2/2
indices.analyze 🟢 243/243 243/243
indices.cancel_migrate_reindex 🟢 2/2 2/2
indices.clear_cache 🟢 4/4 4/4
indices.clone 🟢 5/5 5/5
indices.close 🟢 49/49 49/49
indices.create_data_stream 🟢 31/31 31/31
indices.create_from 🟢 4/4 4/4
indices.create 🔴 1087/1170 1170/1170
indices.data_streams_stats 🟢 4/4 4/4
indices.delete_alias 🔴 12/12 5/12
indices.delete_data_lifecycle Missing test Missing test
indices.delete_data_stream 🟢 28/28 28/28
indices.delete_index_template 🟢 1/1 1/1
indices.delete_template 🟢 9/9 9/9
indices.delete 🟢 105/105 105/105
indices.disk_usage 🟢 6/6 6/6
indices.downsample 🟢 1/1 1/1
indices.exists_alias 🟢 37/37 37/37
indices.exists_index_template Missing test Missing test
indices.exists_template 🟢 15/15 15/15
indices.exists 🟢 39/39 39/39
indices.explain_data_lifecycle Missing test Missing test
indices.field_usage_stats 🟢 5/5 5/5
indices.flush 🟢 41/41 41/41
indices.forcemerge 🟢 12/12 12/12
indices.get_alias 🟢 68/68 68/68
indices.get_data_lifecycle_stats Missing test Missing test
indices.get_data_lifecycle Missing test Missing test
indices.get_data_stream 🟢 11/11 11/11
indices.get_field_mapping 🟢 15/15 15/15
indices.get_index_template 🔴 21/21 17/21
indices.get_mapping 🔴 135/135 133/135
indices.get_migrate_reindex_status 🟢 1/1 1/1
indices.get_settings 🔴 75/75 63/75
indices.get_template 🟢 32/32 32/32
indices.get 🟢 55/55 55/55
indices.migrate_reindex 🟢 2/2 2/2
indices.migrate_to_data_stream Missing test Missing test
indices.modify_data_stream Missing test Missing test
indices.open 🟢 20/20 20/20
indices.promote_data_stream Missing test Missing test
indices.put_alias 🔴 58/58 20/58
indices.put_data_lifecycle Missing test Missing test
indices.put_index_template 🔴 59/68 68/68
indices.put_mapping 🔴 111/117 117/117
indices.put_settings 🔴 55/58 58/58
indices.put_template 🔴 45/46 46/46
indices.recovery 🟢 9/9 9/9
indices.refresh 🟢 275/275 275/275
indices.reload_search_analyzers 🟢 2/2 2/2
indices.resolve_cluster 🔴 10/12 12/12
indices.resolve_index 🟢 6/6 6/6
indices.rollover 🔴 26/26 1/26
indices.segments 🔴 6/6 5/6
indices.shard_stores 🔴 5/5 4/5
indices.shrink 🟢 5/5 5/5
indices.simulate_index_template 🔴 6/7 5/7
indices.simulate_template 🔴 5/5 4/5
indices.split 🟢 11/11 11/11
indices.stats 🔴 113/113 30/112
indices.update_aliases 🔴 26/26 7/26
indices.validate_query 🟢 12/12 12/12

You can validate these APIs yourself by using the make validate target.

@pquentin pquentin merged commit aecc157 into main Jan 24, 2025
8 checks passed
@pquentin pquentin deleted the synthetic-source branch January 24, 2025 15:00
github-actions bot pushed a commit that referenced this pull request Jan 24, 2025
* Support synthetic_source_keep and mapping.source.mode

* Skip intermediate class

* Revert "Skip intermediate class"

This reverts commit 3b71a0d.

(cherry picked from commit aecc157)
Copy link
Contributor

The backport to 8.17 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-8.17 8.17
# Navigate to the new working tree
cd .worktrees/backport-8.17
# Create a new branch
git switch --create backport-3596-to-8.17
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 aecc157b6c01a4b766728dff030232a53b23f00d
# Push it to GitHub
git push --set-upstream origin backport-3596-to-8.17
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-8.17

Then, create a pull request where the base branch is 8.17 and the compare/head branch is backport-3596-to-8.17.

pquentin added a commit that referenced this pull request Jan 27, 2025
* Support synthetic_source_keep and mapping.source.mode

* Skip intermediate class

* Revert "Skip intermediate class"

This reverts commit 3b71a0d.

(cherry picked from commit aecc157)

# Conflicts:
#	output/schema/schema-serverless.json
#	output/schema/schema.json
@pquentin
Copy link
Member Author

💚 All backports created successfully

Status Branch Result
8.17

Questions ?

Please refer to the Backport tool documentation

pquentin added a commit that referenced this pull request Jan 27, 2025
* Support synthetic_source_keep and mapping.source.mode

* Skip intermediate class

* Revert "Skip intermediate class"

This reverts commit 3b71a0d.

(cherry picked from commit aecc157)

# Conflicts:
#	output/schema/schema-serverless.json
#	output/schema/schema.json
pquentin added a commit that referenced this pull request Jan 28, 2025
* Support synthetic_source_keep and mapping.source.mode

* Skip intermediate class

* Revert "Skip intermediate class"

This reverts commit 3b71a0d.

(cherry picked from commit aecc157)

Co-authored-by: Quentin Pradet <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants