Skip to content

Commit e9bac74

Browse files
authored
Merge branch 'main' into slm-examples
2 parents 09580d3 + f31d8cf commit e9bac74

File tree

294 files changed

+9190
-2596
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

294 files changed

+9190
-2596
lines changed

.github/workflows/check-backport-labels.yml

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ jobs:
4848
4949
echo "::endgroup::"
5050
51+
has_backport_label=false
5152
has_skip_backport_label=false
52-
has_exact_backport_label=false
5353
declare -A pr_exact_majors=()
5454
declare -A pr_floating_majors=()
5555
@@ -66,12 +66,13 @@ jobs:
6666
continue
6767
fi
6868
69+
has_backport_label=true
70+
6971
if [[ "${pr_label}" =~ ${backport_regex} ]]; then
7072
major="${BASH_REMATCH[1]}"
7173
minor="${BASH_REMATCH[2]}"
7274
if [ "${minor}" != "x" ]; then
7375
pr_exact_majors["${major}"]=1
74-
has_exact_backport_label=true
7576
else
7677
pr_floating_majors["${major}"]=1
7778
fi
@@ -82,15 +83,15 @@ jobs:
8283
8384
echo "::endgroup::"
8485
85-
if [ "${has_skip_backport_label}" = true ] && [ "${has_exact_backport_label}" = true ]; then
86+
if [ "${has_skip_backport_label}" = true ] && [ "${has_backport_label}" = true ]; then
8687
echo "::error::The 'skip-backport' not be used in combination with another backport"\
8788
"label."
8889
exit 1
8990
fi
9091
91-
if [ "${has_skip_backport_label}" != true ] && [ "${has_exact_backport_label}" != true ]; then
92-
echo "::error::No exact backport label found. Please add at least one of the"\
93-
"'backport {major}.{minor}' labels or use 'skip-backport',"\
92+
if [ "${has_skip_backport_label}" != true ] && [ "${has_backport_label}" != true ]; then
93+
echo "::error::No backport label found. Please add at least one of the"\
94+
"'backport {major}.{minor|x}' labels or use 'skip-backport',"\
9495
"if this PR should not be backported."
9596
exit 1
9697
fi
@@ -115,19 +116,3 @@ jobs:
115116
if [ "${has_required_floating_labels}" != true ]; then
116117
exit 1
117118
fi
118-
119-
# Validate that an exact backport label exists for each floating backport label major
120-
# version.
121-
122-
has_required_exact_labels=true
123-
124-
for pr_floating_major in "${!pr_floating_majors[@]}"; do
125-
if [ -z "${pr_exact_majors[${pr_floating_major}]}" ]; then
126-
has_required_exact_labels=false
127-
echo "::error::Missing exact backport label for '${pr_floating_major}.x'"
128-
fi
129-
done
130-
131-
if [ "${has_required_exact_labels}" != true ]; then
132-
exit 1
133-
fi

compiler/src/model/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ export function hoistRequestAnnotations (
668668
const privileges = [
669669
'all', 'cancel_task', 'create_snapshot', 'grant_api_key', 'manage', 'manage_api_key', 'manage_ccr',
670670
'manage_enrich', 'manage_ilm', 'manage_index_templates', 'manage_inference', 'manage_ingest_pipelines', 'manage_logstash_pipelines',
671-
'manage_ml', 'manage_oidc', 'manage_own_api_key', 'manage_pipeline', 'manage_rollup', 'manage_saml', 'manage_search_application', 'manage_search_query_rules',
671+
'manage_ml', 'manage_oidc', 'manage_own_api_key', 'manage_pipeline', 'manage_rollup', 'manage_saml', 'manage_search_application', 'manage_search_query_rules', 'manage_search_synonyms',
672672
'manage_security', 'manage_service_account', 'manage_slm', 'manage_token', 'manage_transform', 'manage_user_profile',
673673
'manage_watcher', 'monitor', 'monitor_ml', 'monitor_rollup', 'monitor_snapshot', 'monitor_text_structure',
674674
'monitor_transform', 'monitor_watcher', 'read_ccr', 'read_ilm', 'read_pipeline', 'read_security', 'read_slm', 'transport_client'

docs/overlays/elasticsearch-openapi-overlays.yaml

Lines changed: 86 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ actions:
7171
application/json:
7272
examples:
7373
getFeaturesResponseExample1:
74-
$ref: "../../specification/features/get_features/FeaturesApiResponseExample1.json"
74+
$ref: "../../specification/features/get_features/examples/response/GetFeaturesResponseExample1.yaml"
7575
- target: "$.paths['/_features/_reset']['post']"
7676
description: "Add examples for reset features operation"
7777
update:
@@ -81,23 +81,23 @@ actions:
8181
application/json:
8282
examples:
8383
resetFeaturesResponseExample1:
84-
$ref: "../../specification/features/reset_features/ResetFeaturesResponseExample1.json"
84+
$ref: "../../specification/features/reset_features/examples/response/ResetFeaturesResponseExample1.yaml"
8585
- target: "$.components['requestBodies']['cluster.allocation_explain']"
8686
description: "Add examples for cluster allocation explain operation"
8787
update:
8888
content:
8989
application/json:
9090
examples:
9191
clusterAllocationExplainRequestExample1:
92-
$ref: "../../specification/cluster/allocation_explain/clusterAllocationExplainRequestExample1.json"
92+
$ref: "../../specification/cluster/allocation_explain/examples/request/clusterAllocationExplainRequestExample1.yaml"
9393
- target: "$.components['responses']['cluster.health#200']"
9494
description: "Add examples for cluster health operation"
9595
update:
9696
content:
9797
application/json:
9898
examples:
9999
clusterHealthResponseExample1:
100-
$ref: "../../specification/cluster/health/clusterHealthResponseExample1.json"
100+
$ref: "../../specification/cluster/health/examples/response/clusterHealthResponseExample1.yaml"
101101
- target: "$.paths['/_cluster/settings']['put']"
102102
description: "Add examples for cluster update settings operation"
103103
update:
@@ -106,7 +106,7 @@ actions:
106106
application/json:
107107
examples:
108108
clusterPutSettingsRequestExample1:
109-
$ref: "../../specification/cluster/put_settings/clusterPutSettingsRequestExample1.json"
109+
$ref: "../../specification/cluster/put_settings/examples/request/ClusterPutSettingsRequestExample1.yaml"
110110
- target: "$.paths['/_cluster/reroute']['post']"
111111
description: "Add examples for cluster reroute operation"
112112
update:
@@ -115,23 +115,23 @@ actions:
115115
application/json:
116116
examples:
117117
clusterRerouteRequestExample1:
118-
$ref: "../../specification/cluster/reroute/clusterRerouteRequestExample1.json"
118+
$ref: "../../specification/cluster/reroute/examples/request/ClusterRerouteRequestExample1.yaml"
119119
- target: "$.components['requestBodies']['nodes.reload_secure_settings']"
120120
description: "Add examples for nodes reload secure settings operation"
121121
update:
122122
content:
123123
application/json:
124124
examples:
125125
clusterNodesReloadSecureSettingsRequestExample1:
126-
$ref: "../../specification/nodes/reload_secure_settings/clusterNodesReloadSecureSettingsRequestExample1.json"
126+
$ref: "../../specification/nodes/reload_secure_settings/examples/request/ReloadSecureSettingsRequestExample1.yaml"
127127
- target: "$.components['responses']['nodes.reload_secure_settings#200']"
128128
description: "Add response examples for nodes reload secure settings operation"
129129
update:
130130
content:
131131
application/json:
132132
examples:
133133
clusterNodesReloadSecureSettingsResponseExample1:
134-
$ref: "../../specification/nodes/reload_secure_settings/clusterNodesReloadSecureSettingsResponseExample1.json"
134+
$ref: "../../specification/nodes/reload_secure_settings/examples/response/ReloadSecureSettingsResponseExample1.yaml"
135135
- target: "$.paths['/_tasks']['get']"
136136
description: "Add examples for task management operation"
137137
update:
@@ -141,7 +141,7 @@ actions:
141141
application/json:
142142
examples:
143143
getTasksResponseExample1:
144-
$ref: "../../specification/tasks/get/getTasksResponseExample1.json"
144+
$ref: "../../specification/tasks/get/examples/response/GetTaskResponseExample1.yaml"
145145
- target: "$.components['responses']['nodes.info#200']"
146146
description: "Add response examples for nodes info"
147147
update:
@@ -159,7 +159,7 @@ actions:
159159
application/json:
160160
examples:
161161
deleteLifecycleResponseExample1:
162-
$ref: "../../specification/ilm/delete_lifecycle/DeleteLifecycleResponseExample1.json"
162+
$ref: "../../specification/ilm/delete_lifecycle/examples/response/DeleteLifecycleResponseExample1.yaml"
163163
- target: "$.paths['/_ilm/policy/{policy}']['put']"
164164
description: "Add examples for create a lifecycle operation"
165165
update:
@@ -168,22 +168,22 @@ actions:
168168
application/json:
169169
examples:
170170
putLifecycleRequestExample1:
171-
$ref: "../../specification/ilm/put_lifecycle/PutLifecycleRequestExample1.json"
171+
$ref: "../../specification/ilm/put_lifecycle/examples/request/PutLifecycleRequestExample1.yaml"
172172
responses:
173173
200:
174174
content:
175175
application/json:
176176
examples:
177177
putLifecycleResponseExample1:
178-
$ref: "../../specification/ilm/put_lifecycle/PutLifecycleResponseExample1.json"
178+
$ref: "../../specification/ilm/put_lifecycle/examples/response/PutLifecycleResponseExample1.yaml"
179179
- target: "$.components['responses']['ilm.get_lifecycle#200']"
180180
description: "Add examples for get lifecycle policy operation"
181181
update:
182182
content:
183183
application/json:
184184
examples:
185185
getLifecycleResponseExample1:
186-
$ref: "../../specification/ilm/get_lifecycle/GetLifecycleResponseExample1.json"
186+
$ref: "../../specification/ilm/get_lifecycle/examples/response/GetLifecycleResponseExample1.yaml"
187187
- target: "$.paths['/_ilm/migrate_to_data_tiers']['post']"
188188
description: "Add examples for migrate to data tiers routing operation"
189189
update:
@@ -192,14 +192,14 @@ actions:
192192
application/json:
193193
examples:
194194
migrateToDataTiersRequestExample1:
195-
$ref: "../../specification/ilm/migrate_to_data_tiers/MigrateToDataTiersRequestExample1.json"
195+
$ref: "../../specification/ilm/migrate_to_data_tiers/examples/request/RequestExample1.yaml"
196196
responses:
197197
200:
198198
content:
199199
application/json:
200200
examples:
201201
migrateToDataTiersResponseExample1:
202-
$ref: "../../specification/ilm/migrate_to_data_tiers/MigrateToDataTiersResponseExample1.json"
202+
$ref: "../../specification/ilm/migrate_to_data_tiers/examples/response/ResponseExample1.yaml"
203203
- target: "$.paths['/_ilm/move/{index}']['post']"
204204
description: "Add examples for move to lifecycle step operation"
205205
update:
@@ -208,14 +208,16 @@ actions:
208208
application/json:
209209
examples:
210210
moveToStepRequestExample1:
211-
$ref: "../../specification/ilm/move_to_step/MoveToStepRequestExample1.json"
211+
$ref: "../../specification/ilm/move_to_step/examples/request/MoveToStepRequestExample1.yaml"
212+
moveToStepRequestExample2:
213+
$ref: "../../specification/ilm/move_to_step/examples/request/MoveToStepRequestExample2.yaml"
212214
responses:
213215
200:
214216
content:
215217
application/json:
216218
examples:
217219
moveToStepResponseExample1:
218-
$ref: "../../specification/ilm/move_to_step/MoveToStepResponseExample1.json"
220+
$ref: "../../specification/ilm/move_to_step/examples/response/MoveToStepResponseExample1.yaml"
219221
- target: "$.paths['/_ilm/start']['post']"
220222
description: "Add examples for start index lifecycle management operation"
221223
update:
@@ -225,7 +227,7 @@ actions:
225227
application/json:
226228
examples:
227229
startILMResponseExample1:
228-
$ref: "../../specification/ilm/start/StartILMResponseExample1.json"
230+
$ref: "../../specification/ilm/start/examples/response/StartILMResponseExample1.yaml"
229231
- target: "$.paths['/_ilm/stop']['post']"
230232
description: "Add examples for stop index lifecycle management operation"
231233
update:
@@ -235,7 +237,7 @@ actions:
235237
application/json:
236238
examples:
237239
stopILMResponseExample1:
238-
$ref: "../../specification/ilm/stop/stopILMResponseExample1.json"
240+
$ref: "../../specification/ilm/stop/examples/response/StopILMResponseExample1.yaml"
239241
- target: "$.paths['/_ilm/status']['get']"
240242
description: "Add examples for get index lifecycle management status operation"
241243
update:
@@ -245,7 +247,7 @@ actions:
245247
application/json:
246248
examples:
247249
getILMStatusResponseExample1:
248-
$ref: "../../specification/ilm/get_status/GetILMStatusResponseExample1.json"
250+
$ref: "../../specification/ilm/get_status/examples/response/GetILMStatusResponseExample1.yaml"
249251
- target: "$.paths['/{index}/_ilm/explain']['get']"
250252
description: "Add examples for explain lifecycle operation"
251253
update:
@@ -255,7 +257,7 @@ actions:
255257
application/json:
256258
examples:
257259
explainLifecycleResponseExample1:
258-
$ref: "../../specification/ilm/explain_lifecycle/ExplainLifecycleResponseExample1.json"
260+
$ref: "../../specification/ilm/explain_lifecycle/examples/response/ExplainLifecycleResponseExample1.yaml"
259261
- target: "$.paths['/{index}/_ilm/remove']['post']"
260262
description: "Add examples for remove policy from index operation"
261263
update:
@@ -265,7 +267,7 @@ actions:
265267
application/json:
266268
examples:
267269
removePolicyResponseExample1:
268-
$ref: "../../specification/ilm/remove_policy/RemovePolicyResponseExample1.json"
270+
$ref: "../../specification/ilm/remove_policy/examples/response/RemovePolicyResponseExample1.yaml"
269271
- target: "$.components['requestBodies']['indices.clone']"
270272
description: "Add examples for clone index request"
271273
update:
@@ -283,7 +285,7 @@ actions:
283285
application/json:
284286
examples:
285287
indicesCloseResponseExample1:
286-
$ref: "../../specification/indices/close/indicesCloseResponseExample1.yaml"
288+
$ref: "../../specification/indices/close/examples/response/CloseIndexResponseExample1.yaml"
287289
- target: "$.components['responses']['indices.data_streams_stats#200']"
288290
description: "Add example for data stream stats response"
289291
update:
@@ -402,6 +404,44 @@ actions:
402404
examples:
403405
postBehavioralAnalyticsEventRequestExample1:
404406
$ref: "../../specification/search_application/post_behavioral_analytics_event/BehavioralAnalyticsEventPostRequestExample1.yaml"
407+
## Examples for indices
408+
- target: "$.paths['/_lifecycle/stats']['get']"
409+
description: "Add examples for get lifecycle stats operation"
410+
update:
411+
responses:
412+
200:
413+
content:
414+
application/json:
415+
examples:
416+
dataStreamLifecycleStatsResponseExample1:
417+
$ref: "../../specification/indices/get_data_lifecycle_stats/examples/response/IndicesGetDataLifecycleStatsResponseExample1.yaml"
418+
## Examples for ingest
419+
- target: "$.components['requestBodies']['simulate.ingest']"
420+
description: "Add example for simulate ingest request"
421+
update:
422+
content:
423+
application/json:
424+
examples:
425+
simulateIngestRequestExample1:
426+
$ref: "../../specification/simulate/ingest/examples/request/SimulateIngestRequestExample1.yaml"
427+
simulateIngestRequestExample2:
428+
$ref: "../../specification/simulate/ingest/examples/request/SimulateIngestRequestExample2.yaml"
429+
simulateIngestRequestExample3:
430+
$ref: "../../specification/simulate/ingest/examples/request/SimulateIngestRequestExample3.yaml"
431+
simulateIngestRequestExample4:
432+
$ref: "../../specification/simulate/ingest/examples/request/SimulateIngestRequestExample4.yaml"
433+
- target: "$.components['responses']['simulate.ingest#200']"
434+
description: "Add example for simulate ingest response"
435+
update:
436+
content:
437+
application/json:
438+
examples:
439+
simulateIngestResponseExample1:
440+
$ref: "../../specification/simulate/ingest/examples/response/SimulateIngestResponseExample1.yaml"
441+
simulateIngestResponseExample2:
442+
$ref: "../../specification/simulate/ingest/examples/response/SimulateIngestResponseExample2.yaml"
443+
simulateIngestResponseExample3:
444+
$ref: "../../specification/simulate/ingest/examples/response/SimulateIngestResponseExample3.yaml"
405445
## Examples for licensing
406446
- target: "$.paths['/_license/basic_status']['get']"
407447
description: "Add example for get basic status response"
@@ -471,7 +511,7 @@ actions:
471511
$ref: "../../specification/search_application/render_query/SearchApplicationsRenderQueryRequestExample1.yaml"
472512
renderSearchApplicationQueryResponseExample1:
473513
$ref: "../../specification/search_application/render_query/SearchApplicationsRenderQueryResponseExample1.yaml"
474-
514+
# Examples for security
475515
- target: "$.paths['/_security/api_key/_bulk_update']['post']"
476516
description: "Add examples for bulk update API keys operation"
477517
update:
@@ -505,4 +545,25 @@ actions:
505545
application/json:
506546
examples:
507547
delegatePkiResponseExample1:
508-
$ref: "../../specification/security/delegate_pki/examples/200_response/SecurityDelegatePkiResponseExample1.yaml"
548+
$ref: "../../specification/security/delegate_pki/examples/200_response/SecurityDelegatePkiResponseExample1.yaml"
549+
## Examples for watcher
550+
- target: "$.paths['/_watcher/settings']['put']"
551+
description: "Add request example for update watcher settings"
552+
update:
553+
requestBody:
554+
content:
555+
application/json:
556+
examples:
557+
updateWatcherSettingsRequestExample1:
558+
$ref: "../../specification/watcher/update_settings/examples/request/WatcherUpdateSettingsRequestExample1.yaml"
559+
- target: "$.paths['/_watcher/settings']['get']"
560+
description: "Add response example for get watcher settings"
561+
update:
562+
responses:
563+
200:
564+
content:
565+
application/json:
566+
examples:
567+
updateWatcherSettingsRequestExample1:
568+
$ref: "../../specification/watcher/get_settings/examples/200_response/WatcherGetSettingsResponseExample1.yaml"
569+

0 commit comments

Comments
 (0)