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

Maintain "behavior" meta-data in specification #2638

Merged
merged 4 commits into from
Jun 28, 2024
Merged

Conversation

flobernd
Copy link
Member

Adds a new behavior_meta decorator that allows to specify supplementary meta-data per implemented behavior.

Closes #2637

@flobernd flobernd force-pushed the behavior-metadata branch 3 times, most recently from b875339 to 43080f9 Compare June 21, 2024 09:20
@flobernd flobernd marked this pull request as ready for review June 21, 2024 09:21
@flobernd flobernd requested review from swallez and a team June 21, 2024 09:21
@elastic elastic deleted a comment from github-actions bot Jun 21, 2024
@elastic elastic deleted a comment from github-actions bot Jun 21, 2024

This comment has been minimized.

@elastic elastic deleted a comment from github-actions bot Jun 21, 2024
@flobernd flobernd force-pushed the behavior-metadata branch from f0196fa to e0d1082 Compare June 25, 2024 13:19

This comment has been minimized.

2 similar comments
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 🟢 20/20 20/20
indices.clear_cache 🟢 4/4 4/4
indices.clone 🟢 5/5 5/5
indices.close 🟢 49/49 49/49
indices.create_data_stream 🟢 28/28 28/28
indices.create 🔴 908/945 945/945
indices.data_streams_stats 🟢 4/4 4/4
indices.delete_alias 🔴 15/15 5/15
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 🟢 5/5 5/5
indices.downsample 🟢 1/1 1/1
indices.exists_alias 🟢 36/36 36/36
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 🟢 30/30 30/30
indices.forcemerge 🔴 12/12 11/12
indices.get_alias 🔴 83/83 71/83
indices.get_data_lifecycle Missing test Missing test
indices.get_data_stream 🔴 12/12 3/12
indices.get_field_mapping 🔴 15/15 14/15
indices.get_index_template 🔴 19/19 15/19
indices.get_mapping 🔴 120/120 108/120
indices.get_settings 🔴 61/61 59/61
indices.get_template 🟢 30/30 30/30
indices.get 🟢 53/53 53/53
indices.migrate_to_data_stream Missing test Missing test
indices.modify_data_stream Missing test Missing test
indices.open 🟢 18/18 18/18
indices.promote_data_stream Missing test Missing test
indices.put_alias 🔴 59/59 20/59
indices.put_data_lifecycle Missing test Missing test
indices.put_index_template 🔴 50/52 52/52
indices.put_mapping 🔴 75/103 103/103
indices.put_settings 🔴 54/57 57/57
indices.put_template 🔴 44/49 49/49
indices.recovery 🟢 9/9 9/9
indices.refresh 🟢 264/264 264/264
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 🔴 103/103 31/102
indices.unfreeze 🟢 1/1 1/1
indices.update_aliases 🔴 26/26 7/26
indices.validate_query 🟢 7/7 7/7
ingest.simulate 🔴 4/7 6/7
nodes.info 🔴 120/120 1/120
search 🔴 2062/2143 2077/2125
watcher.ack_watch 🟢 1/1 1/1
watcher.activate_watch 🟢 1/1 1/1
watcher.deactivate_watch 🟢 1/1 1/1
watcher.delete_watch 🟢 2/2 2/2
watcher.execute_watch 🟢 7/7 7/7
watcher.get_settings 🟠 Missing type Missing type
watcher.get_watch 🟢 9/9 9/9
watcher.put_watch 🔴 29/38 38/38
watcher.query_watches Missing test Missing test
watcher.start 🟢 1/1 1/1
watcher.stats 🟢 1/1 1/1
watcher.stop 🟢 1/1 1/1
watcher.update_settings 🟠 Missing type Missing type

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 🟢 20/20 20/20
indices.clear_cache 🟢 4/4 4/4
indices.clone 🟢 5/5 5/5
indices.close 🟢 49/49 49/49
indices.create_data_stream 🟢 28/28 28/28
indices.create 🔴 908/945 945/945
indices.data_streams_stats 🟢 4/4 4/4
indices.delete_alias 🔴 15/15 5/15
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 🟢 5/5 5/5
indices.downsample 🟢 1/1 1/1
indices.exists_alias 🟢 36/36 36/36
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 🟢 30/30 30/30
indices.forcemerge 🔴 12/12 11/12
indices.get_alias 🔴 83/83 71/83
indices.get_data_lifecycle Missing test Missing test
indices.get_data_stream 🔴 12/12 3/12
indices.get_field_mapping 🔴 15/15 14/15
indices.get_index_template 🔴 19/19 15/19
indices.get_mapping 🔴 120/120 108/120
indices.get_settings 🔴 61/61 59/61
indices.get_template 🟢 30/30 30/30
indices.get 🟢 53/53 53/53
indices.migrate_to_data_stream Missing test Missing test
indices.modify_data_stream Missing test Missing test
indices.open 🟢 18/18 18/18
indices.promote_data_stream Missing test Missing test
indices.put_alias 🔴 59/59 20/59
indices.put_data_lifecycle Missing test Missing test
indices.put_index_template 🔴 50/52 52/52
indices.put_mapping 🔴 75/103 103/103
indices.put_settings 🔴 54/57 57/57
indices.put_template 🔴 44/49 49/49
indices.recovery 🟢 9/9 9/9
indices.refresh 🟢 264/264 264/264
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 🔴 103/103 31/102
indices.unfreeze 🟢 1/1 1/1
indices.update_aliases 🔴 26/26 7/26
indices.validate_query 🟢 7/7 7/7
ingest.simulate 🔴 4/7 6/7
nodes.info 🔴 120/120 1/120
search 🔴 2062/2143 2077/2125
watcher.ack_watch 🟢 1/1 1/1
watcher.activate_watch 🟢 1/1 1/1
watcher.deactivate_watch 🟢 1/1 1/1
watcher.delete_watch 🟢 2/2 2/2
watcher.execute_watch 🟢 7/7 7/7
watcher.get_settings 🟠 Missing type Missing type
watcher.get_watch 🟢 9/9 9/9
watcher.put_watch 🔴 29/38 38/38
watcher.query_watches Missing test Missing test
watcher.start 🟢 1/1 1/1
watcher.stats 🟢 1/1 1/1
watcher.stop 🟢 1/1 1/1
watcher.update_settings 🟠 Missing type Missing type

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

Copy link
Member

@pquentin pquentin left a comment

Choose a reason for hiding this comment

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

While I don't think this affects any top-level types and thus does not affect the generator I work on, this makes sense to me! LGTM.

Copy link
Member

@JoshMock JoshMock left a comment

Choose a reason for hiding this comment

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

This shouldn't have any effect on the JS generator, but I do see some possible opportunities to use behavior metadata to simplify some code. 🙌

@flobernd flobernd force-pushed the behavior-metadata branch from da75a4c to 6c10c4b Compare June 28, 2024 08:50
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 🟢 20/20 20/20
indices.clear_cache 🟢 4/4 4/4
indices.clone 🟢 5/5 5/5
indices.close 🟢 49/49 49/49
indices.create_data_stream 🟢 28/28 28/28
indices.create 🔴 909/946 946/946
indices.data_streams_stats 🟢 4/4 4/4
indices.delete_alias 🔴 15/15 5/15
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 🟢 5/5 5/5
indices.downsample 🟢 1/1 1/1
indices.exists_alias 🟢 36/36 36/36
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 🟢 30/30 30/30
indices.forcemerge 🔴 12/12 11/12
indices.get_alias 🔴 83/83 71/83
indices.get_data_lifecycle Missing test Missing test
indices.get_data_stream 🔴 12/12 3/12
indices.get_field_mapping 🔴 15/15 14/15
indices.get_index_template 🔴 19/19 15/19
indices.get_mapping 🔴 121/121 109/121
indices.get_settings 🔴 61/61 59/61
indices.get_template 🟢 30/30 30/30
indices.get 🟢 53/53 53/53
indices.migrate_to_data_stream Missing test Missing test
indices.modify_data_stream Missing test Missing test
indices.open 🟢 18/18 18/18
indices.promote_data_stream Missing test Missing test
indices.put_alias 🔴 59/59 20/59
indices.put_data_lifecycle Missing test Missing test
indices.put_index_template 🔴 50/52 52/52
indices.put_mapping 🔴 75/103 103/103
indices.put_settings 🔴 54/57 57/57
indices.put_template 🔴 44/49 49/49
indices.recovery 🟢 9/9 9/9
indices.refresh 🟢 265/265 265/265
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 🔴 103/103 31/102
indices.unfreeze 🟢 1/1 1/1
indices.update_aliases 🔴 26/26 7/26
indices.validate_query 🟢 7/7 7/7
ingest.simulate 🔴 4/7 6/7
nodes.info 🔴 120/120 1/120
search 🔴 2095/2166 2100/2148
watcher.ack_watch 🟢 1/1 1/1
watcher.activate_watch 🟢 1/1 1/1
watcher.deactivate_watch 🟢 1/1 1/1
watcher.delete_watch 🟢 2/2 2/2
watcher.execute_watch 🟢 7/7 7/7
watcher.get_settings 🟠 Missing type Missing type
watcher.get_watch 🟢 9/9 9/9
watcher.put_watch 🔴 29/38 38/38
watcher.query_watches Missing test Missing test
watcher.start 🟢 1/1 1/1
watcher.stats 🟢 1/1 1/1
watcher.stop 🟢 1/1 1/1
watcher.update_settings 🟠 Missing type Missing type

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

@flobernd flobernd merged commit c80b3fd into main Jun 28, 2024
8 checks passed
@flobernd flobernd deleted the behavior-metadata branch June 28, 2024 08:55
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.

Proposal: Maintain "behavior" meta-data in specification
3 participants