-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Data Usage] use auto ops service #196312
[Data Usage] use auto ops service #196312
Conversation
@@ -78,7 +81,7 @@ class AutoOpsAPIService { | |||
}, | |||
}; | |||
|
|||
const response = await axios<UsageMetricsResponseSchemaBody>(requestConfig).catch( | |||
const response = await axios<UsageMetricsAutoOpsResponseSchemaBody>(requestConfig).catch( |
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.
check against the auto ops response instead of our api response
/ci |
x-pack/plugins/data_usage/server/routes/internal/usage_metrics_handler.ts
Outdated
Show resolved
Hide resolved
…ptunian/kibana into implement-autoops-api-service
@@ -53,6 +53,8 @@ export class DataUsagePlugin | |||
} | |||
setup(coreSetup: CoreSetup, pluginsSetup: DataUsageSetupDependencies): DataUsageServerSetup { | |||
this.logger.debug('data usage plugin setup'); | |||
const dataUsageService = new DataUsageService(this.dataUsageContext); |
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.
I was thinking of adding only the auto ops service to the appContextService on start, but this is much neater. 🚀
from: string; | ||
to: string; |
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.
I'm hoping they come through with strings for date ranges. I don't see the open API spec updated yet about it. 🤞🏼
💚 Build Succeeded
Metrics [docs]Async chunks
History
|
Starting backport for target branches: 8.x |
## Summary - use AutoOpsAPIService service and removes mock data - removes checking for serviceConfig.enabled to register routes as they won't register if the plugin isn't enabled - adds UI toasts with error message when requests fail - adds centralized DataUsageService for managing other services (cherry picked from commit 7af4c6d)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `8.x`: - [[Data Usage] use auto ops service (#196312)](#196312) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Sandra G","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-17T19:30:05Z","message":"[Data Usage] use auto ops service (#196312)\n\n## Summary\r\n\r\n- use AutoOpsAPIService service and removes mock data\r\n- removes checking for serviceConfig.enabled to register routes as they\r\nwon't register if the plugin isn't enabled\r\n- adds UI toasts with error message when requests fail\r\n- adds centralized DataUsageService for managing other services","sha":"7af4c6da4a08b6452c0c6e1264d1ceffbf628c42","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor"],"title":"[Data Usage] use auto ops service","number":196312,"url":"https://github.com/elastic/kibana/pull/196312","mergeCommit":{"message":"[Data Usage] use auto ops service (#196312)\n\n## Summary\r\n\r\n- use AutoOpsAPIService service and removes mock data\r\n- removes checking for serviceConfig.enabled to register routes as they\r\nwon't register if the plugin isn't enabled\r\n- adds UI toasts with error message when requests fail\r\n- adds centralized DataUsageService for managing other services","sha":"7af4c6da4a08b6452c0c6e1264d1ceffbf628c42"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196312","number":196312,"mergeCommit":{"message":"[Data Usage] use auto ops service (#196312)\n\n## Summary\r\n\r\n- use AutoOpsAPIService service and removes mock data\r\n- removes checking for serviceConfig.enabled to register routes as they\r\nwon't register if the plugin isn't enabled\r\n- adds UI toasts with error message when requests fail\r\n- adds centralized DataUsageService for managing other services","sha":"7af4c6da4a08b6452c0c6e1264d1ceffbf628c42"}}]}] BACKPORT--> Co-authored-by: Sandra G <[email protected]>
Starting backport for target branches: 8.16, 8.x |
## Summary - use AutoOpsAPIService service and removes mock data - removes checking for serviceConfig.enabled to register routes as they won't register if the plugin isn't enabled - adds UI toasts with error message when requests fail - adds centralized DataUsageService for managing other services (cherry picked from commit 7af4c6d)
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `8.16`: - [[Data Usage] use auto ops service (#196312)](#196312) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Sandra G","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-17T19:30:05Z","message":"[Data Usage] use auto ops service (#196312)\n\n## Summary\r\n\r\n- use AutoOpsAPIService service and removes mock data\r\n- removes checking for serviceConfig.enabled to register routes as they\r\nwon't register if the plugin isn't enabled\r\n- adds UI toasts with error message when requests fail\r\n- adds centralized DataUsageService for managing other services","sha":"7af4c6da4a08b6452c0c6e1264d1ceffbf628c42","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","v8.16.0","backport:version","v8.17.0"],"title":"[Data Usage] use auto ops service","number":196312,"url":"https://github.com/elastic/kibana/pull/196312","mergeCommit":{"message":"[Data Usage] use auto ops service (#196312)\n\n## Summary\r\n\r\n- use AutoOpsAPIService service and removes mock data\r\n- removes checking for serviceConfig.enabled to register routes as they\r\nwon't register if the plugin isn't enabled\r\n- adds UI toasts with error message when requests fail\r\n- adds centralized DataUsageService for managing other services","sha":"7af4c6da4a08b6452c0c6e1264d1ceffbf628c42"}},"sourceBranch":"main","suggestedTargetBranches":["8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196312","number":196312,"mergeCommit":{"message":"[Data Usage] use auto ops service (#196312)\n\n## Summary\r\n\r\n- use AutoOpsAPIService service and removes mock data\r\n- removes checking for serviceConfig.enabled to register routes as they\r\nwon't register if the plugin isn't enabled\r\n- adds UI toasts with error message when requests fail\r\n- adds centralized DataUsageService for managing other services","sha":"7af4c6da4a08b6452c0c6e1264d1ceffbf628c42"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/196769","number":196769,"state":"MERGED","mergeCommit":{"sha":"d2bcd89599918d7094b2c16dbfb34a227e762441","message":"[8.x] [Data Usage] use auto ops service (#196312) (#196769)\n\n# Backport\n\nThis will backport the following commits from `main` to `8.x`:\n- [[Data Usage] use auto ops service\n(#196312)](https://github.com/elastic/kibana/pull/196312)\n\n<!--- Backport version: 9.4.3 -->\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT [{\"author\":{\"name\":\"Sandra\nG\",\"email\":\"[email protected]\"},\"sourceCommit\":{\"committedDate\":\"2024-10-17T19:30:05Z\",\"message\":\"[Data\nUsage] use auto ops service (#196312)\\n\\n## Summary\\r\\n\\r\\n- use\nAutoOpsAPIService service and removes mock data\\r\\n- removes checking\nfor serviceConfig.enabled to register routes as they\\r\\nwon't register\nif the plugin isn't enabled\\r\\n- adds UI toasts with error message when\nrequests fail\\r\\n- adds centralized DataUsageService for managing other\nservices\",\"sha\":\"7af4c6da4a08b6452c0c6e1264d1ceffbf628c42\",\"branchLabelMapping\":{\"^v9.0.0$\":\"main\",\"^v8.17.0$\":\"8.x\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"release_note:skip\",\"v9.0.0\",\"backport:prev-minor\"],\"title\":\"[Data\nUsage] use auto ops\nservice\",\"number\":196312,\"url\":\"https://github.com/elastic/kibana/pull/196312\",\"mergeCommit\":{\"message\":\"[Data\nUsage] use auto ops service (#196312)\\n\\n## Summary\\r\\n\\r\\n- use\nAutoOpsAPIService service and removes mock data\\r\\n- removes checking\nfor serviceConfig.enabled to register routes as they\\r\\nwon't register\nif the plugin isn't enabled\\r\\n- adds UI toasts with error message when\nrequests fail\\r\\n- adds centralized DataUsageService for managing other\nservices\",\"sha\":\"7af4c6da4a08b6452c0c6e1264d1ceffbf628c42\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[],\"targetPullRequestStates\":[{\"branch\":\"main\",\"label\":\"v9.0.0\",\"branchLabelMappingKey\":\"^v9.0.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"https://github.com/elastic/kibana/pull/196312\",\"number\":196312,\"mergeCommit\":{\"message\":\"[Data\nUsage] use auto ops service (#196312)\\n\\n## Summary\\r\\n\\r\\n- use\nAutoOpsAPIService service and removes mock data\\r\\n- removes checking\nfor serviceConfig.enabled to register routes as they\\r\\nwon't register\nif the plugin isn't enabled\\r\\n- adds UI toasts with error message when\nrequests fail\\r\\n- adds centralized DataUsageService for managing other\nservices\",\"sha\":\"7af4c6da4a08b6452c0c6e1264d1ceffbf628c42\"}}]}]\nBACKPORT-->\n\nCo-authored-by: Sandra G <[email protected]>"}}]}] BACKPORT--> Co-authored-by: Sandra G <[email protected]>
Summary