kibana/x-pack/plugins/ml/server/routes
Kibana Machine 72c06f5caa
[8.12] [ML] Data Frame Analytics: ensure job can be deleted from analytics map (#174212) (#174483)
# Backport

This will backport the following commits from `main` to `8.12`:
- [[ML] Data Frame Analytics: ensure job can be deleted from analytics
map (#174212)](https://github.com/elastic/kibana/pull/174212)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Melissa
Alvarez","email":"melissa.alvarez@elastic.co"},"sourceCommit":{"committedDate":"2024-01-08T18:48:19Z","message":"[ML]
Data Frame Analytics: ensure job can be deleted from analytics map
(#174212)\n\n## Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/174131\r\n\r\nThis PR removes
the failed job check - `stats` being undefined sometimes\r\nwas causing
the issue.\r\nThe need for stats is removed when we default to using the
`force=true`\r\noption in the delete endpoint.\r\nUsing that option
removes the need to first try and stop the job, as\r\nthat is handled by
the endpoint when using that option. This works\r\nregardless of the
job's
state.\r\n\r\n\r\n823580f2-3a09-4ed5-8641-9b2055a7051c\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [ ] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [ ] Any UI touched in this PR is
usable by keyboard only (learn more\r\nabout [keyboard
accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] This
was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n---------\r\n\r\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"96a9c8abe24bdd3258047ea0aecc2be108c37e72","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","Feature:Data
Frame Analytics","v8.12.0","v8.13.0"],"title":"[ML] Data Frame
Analytics: ensure job can be deleted from analytics
map","number":174212,"url":"https://github.com/elastic/kibana/pull/174212","mergeCommit":{"message":"[ML]
Data Frame Analytics: ensure job can be deleted from analytics map
(#174212)\n\n## Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/174131\r\n\r\nThis PR removes
the failed job check - `stats` being undefined sometimes\r\nwas causing
the issue.\r\nThe need for stats is removed when we default to using the
`force=true`\r\noption in the delete endpoint.\r\nUsing that option
removes the need to first try and stop the job, as\r\nthat is handled by
the endpoint when using that option. This works\r\nregardless of the
job's
state.\r\n\r\n\r\n823580f2-3a09-4ed5-8641-9b2055a7051c\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [ ] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [ ] Any UI touched in this PR is
usable by keyboard only (learn more\r\nabout [keyboard
accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] This
was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n---------\r\n\r\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"96a9c8abe24bdd3258047ea0aecc2be108c37e72"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","branchLabelMappingKey":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/174212","number":174212,"mergeCommit":{"message":"[ML]
Data Frame Analytics: ensure job can be deleted from analytics map
(#174212)\n\n## Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/174131\r\n\r\nThis PR removes
the failed job check - `stats` being undefined sometimes\r\nwas causing
the issue.\r\nThe need for stats is removed when we default to using the
`force=true`\r\noption in the delete endpoint.\r\nUsing that option
removes the need to first try and stop the job, as\r\nthat is handled by
the endpoint when using that option. This works\r\nregardless of the
job's
state.\r\n\r\n\r\n823580f2-3a09-4ed5-8641-9b2055a7051c\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [ ] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [ ] Any UI touched in this PR is
usable by keyboard only (learn more\r\nabout [keyboard
accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] This
was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n---------\r\n\r\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"96a9c8abe24bdd3258047ea0aecc2be108c37e72"}}]}]
BACKPORT-->

Co-authored-by: Melissa Alvarez <melissa.alvarez@elastic.co>
2024-01-08 12:59:20 -07:00
..
schemas [8.12] [ML] Data Frame Analytics: ensure job can be deleted from analytics map (#174212) (#174483) 2024-01-08 12:59:20 -07:00
alerting.ts [ML] Versioning all ML APIs (#156949) 2023-05-23 21:21:22 +01:00
annotations.ts [ML] Versioning all ML APIs (#156949) 2023-05-23 21:21:22 +01:00
anomaly_detectors.ts [ML] Removing unused reset and records endpoints (#161120) 2023-07-05 17:27:39 +01:00
calendars.ts [ML] Versioning all ML APIs (#156949) 2023-05-23 21:21:22 +01:00
data_frame_analytics.ts [8.12] [ML] Data Frame Analytics: ensure job can be deleted from analytics map (#174212) (#174483) 2024-01-08 12:59:20 -07:00
data_visualizer.ts [ML] Package @kbn/ml-data-grid (#155530) 2023-06-06 11:20:37 +02:00
datafeeds.ts [ML] Versioning all ML APIs (#156949) 2023-05-23 21:21:22 +01:00
fields_service.ts [ML] Versioning all ML APIs (#156949) 2023-05-23 21:21:22 +01:00
filters.ts [ML] Versioning all ML APIs (#156949) 2023-05-23 21:21:22 +01:00
indices.ts [ML] Versioning all ML APIs (#156949) 2023-05-23 21:21:22 +01:00
job_audit_messages.ts [ML] Versioning all ML APIs (#156949) 2023-05-23 21:21:22 +01:00
job_service.ts [ML] Retain created_by setting when exporting anomaly detection jobs (#167319) 2023-09-27 18:45:36 +01:00
job_validation.ts [ML] Versioning all ML APIs (#156949) 2023-05-23 21:21:22 +01:00
json_schema.ts [ML] Versioning all ML APIs (#156949) 2023-05-23 21:21:22 +01:00
management.ts [ML] Serverless compatibility fixes (#163724) 2023-09-13 12:07:55 -07:00
model_management.ts [ML] Serverless compatibility fixes (#163724) 2023-09-13 12:07:55 -07:00
modules.ts [ML] Module filtering (#168721) 2023-10-26 16:55:48 +01:00
notifications.ts [ML] Serverless compatibility fixes (#163724) 2023-09-13 12:07:55 -07:00
README.md Bump apidoc-markdown from v6.0.0 to v7.2.4 (#144007) 2022-12-13 11:08:29 +01:00
results_service.ts [ML] Versioning all ML APIs (#156949) 2023-05-23 21:21:22 +01:00
saved_objects.ts [http] Only allow 2023-10-31 when registering public versions (#159553) 2023-06-15 11:50:54 -04:00
system.ts [ML] Data Frame Analytics Trained models: add ability to reindex after pipeline creation success (#166312) 2023-09-19 16:55:34 -06:00
trained_models.ts [ML] Trained models list: disable 'View training data' action if data frame analytics job no longer exists (#171061) 2023-11-21 08:50:38 -07:00

ML Kibana API routes

This folder contains ML API routes in Kibana.

Each route handler requires apidoc-markdown annotations in order to generate documentation.

There are custom parser and worker (x-pack/plugins/ml/server/routes/apidoc_scripts) to process api schemas for each documentation entry. It's written with typescript so make sure all the scripts in the folder are compiled before executing apidoc command.

Make sure you have run yarn kbn bootstrap to get all requires dev dependencies. Then execute the following command from the ml plugin folder:

yarn run apiDocs

It compiles all the required scripts and generates the documentation both in HTML and Markdown formats.

It will create a new directory routes_doc (next to the routes folder) which contains the documentation in HTML format as well as ML_API.md file.