-
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
Delete connector usage reporting task in on-prem and cloud #199650
Delete connector usage reporting task in on-prem and cloud #199650
Conversation
Pinging @elastic/response-ops (Team:ResponseOps) |
Should we / can we also skip starting the connector usage reporting task service on startup? Otherwise we'd be scheduling and running the task once on every Kibana startup, I believe. |
Then we have to remove it from the functional test that keeps track of the registered tasks. |
I took a deeper look, I think it makes sense to keep the task registered in any scenario (stateless or stateful) given we have this out already. Perhaps we can wrap the |
…m' into remove-reporting-task-for-on-prem
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
…erdal/kibana into remove-reporting-task-for-on-prem
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]
History
cc @ersin-erdal |
Done |
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.
LGTM. Verified an existing task in a deployment with no project ID gets deleted and that the task is never scheduled for new deployments with no project ID.
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/12028368247 |
…99650) Towards: elastic/response-ops-team#209 `connector_usage_reporting` task is supposed to work only in serverless. As there is no check for that, even though it reports nothing, It was working for on-prem and cloud as well. This PR deletes the `connector_usage_reporting` task after the first run by checking if `plugins.cloud.serverless.projectId` is missing. ### To verify: Run Kibana on this branch, then check the reporting task in the console by running the below query. There shouldn't be any task. ``` GET .kibana_task_manager_*/_search { "query": { "prefix": { "task.taskType": { "value": "actions:" } } } } ``` Then remove or comment out the line (`shouldDeleteTask: true`) added by this PR and save the file, Kibana will restart and register the task again. You can use the above query again to see that the task is still registered. (cherry picked from commit a1e97b1)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…9650) (#201741) # Backport This will backport the following commits from `main` to `8.x`: - [Delete connector usage reporting task in on-prem and cloud (#199650)](#199650) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Ersin Erdal","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-26T10:12:23Z","message":"Delete connector usage reporting task in on-prem and cloud (#199650)\n\nTowards: https://github.com/elastic/response-ops-team/issues/209\r\n\r\n`connector_usage_reporting` task is supposed to work only in serverless.\r\nAs there is no check for that, even though it reports nothing, It was\r\nworking for on-prem and cloud as well.\r\nThis PR deletes the `connector_usage_reporting` task after the first run\r\nby checking if `plugins.cloud.serverless.projectId` is missing.\r\n\r\n### To verify:\r\nRun Kibana on this branch, then check the reporting task in the console\r\nby running the below query.\r\nThere shouldn't be any task.\r\n\r\n```\r\nGET .kibana_task_manager_*/_search\r\n{\r\n \"query\": {\r\n \"prefix\": {\r\n \"task.taskType\": {\r\n \"value\": \"actions:\"\r\n }\r\n }\r\n }\r\n}\r\n```\r\n\r\nThen remove or comment out the line (`shouldDeleteTask: true`) added by\r\nthis PR and save the file, Kibana will restart and register the task\r\nagain. You can use the above query again to see that the task is still\r\nregistered.","sha":"a1e97b1a43f2971dbf528201b3b82fb4b178b6bb","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","v9.0.0","backport:prev-minor","ci:project-deploy-observability"],"title":"Delete connector usage reporting task in on-prem and cloud","number":199650,"url":"https://github.com/elastic/kibana/pull/199650","mergeCommit":{"message":"Delete connector usage reporting task in on-prem and cloud (#199650)\n\nTowards: https://github.com/elastic/response-ops-team/issues/209\r\n\r\n`connector_usage_reporting` task is supposed to work only in serverless.\r\nAs there is no check for that, even though it reports nothing, It was\r\nworking for on-prem and cloud as well.\r\nThis PR deletes the `connector_usage_reporting` task after the first run\r\nby checking if `plugins.cloud.serverless.projectId` is missing.\r\n\r\n### To verify:\r\nRun Kibana on this branch, then check the reporting task in the console\r\nby running the below query.\r\nThere shouldn't be any task.\r\n\r\n```\r\nGET .kibana_task_manager_*/_search\r\n{\r\n \"query\": {\r\n \"prefix\": {\r\n \"task.taskType\": {\r\n \"value\": \"actions:\"\r\n }\r\n }\r\n }\r\n}\r\n```\r\n\r\nThen remove or comment out the line (`shouldDeleteTask: true`) added by\r\nthis PR and save the file, Kibana will restart and register the task\r\nagain. You can use the above query again to see that the task is still\r\nregistered.","sha":"a1e97b1a43f2971dbf528201b3b82fb4b178b6bb"}},"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/199650","number":199650,"mergeCommit":{"message":"Delete connector usage reporting task in on-prem and cloud (#199650)\n\nTowards: https://github.com/elastic/response-ops-team/issues/209\r\n\r\n`connector_usage_reporting` task is supposed to work only in serverless.\r\nAs there is no check for that, even though it reports nothing, It was\r\nworking for on-prem and cloud as well.\r\nThis PR deletes the `connector_usage_reporting` task after the first run\r\nby checking if `plugins.cloud.serverless.projectId` is missing.\r\n\r\n### To verify:\r\nRun Kibana on this branch, then check the reporting task in the console\r\nby running the below query.\r\nThere shouldn't be any task.\r\n\r\n```\r\nGET .kibana_task_manager_*/_search\r\n{\r\n \"query\": {\r\n \"prefix\": {\r\n \"task.taskType\": {\r\n \"value\": \"actions:\"\r\n }\r\n }\r\n }\r\n}\r\n```\r\n\r\nThen remove or comment out the line (`shouldDeleteTask: true`) added by\r\nthis PR and save the file, Kibana will restart and register the task\r\nagain. You can use the above query again to see that the task is still\r\nregistered.","sha":"a1e97b1a43f2971dbf528201b3b82fb4b178b6bb"}}]}] BACKPORT--> Co-authored-by: Ersin Erdal <[email protected]>
…99650) Towards: elastic/response-ops-team#209 `connector_usage_reporting` task is supposed to work only in serverless. As there is no check for that, even though it reports nothing, It was working for on-prem and cloud as well. This PR deletes the `connector_usage_reporting` task after the first run by checking if `plugins.cloud.serverless.projectId` is missing. ### To verify: Run Kibana on this branch, then check the reporting task in the console by running the below query. There shouldn't be any task. ``` GET .kibana_task_manager_*/_search { "query": { "prefix": { "task.taskType": { "value": "actions:" } } } } ``` Then remove or comment out the line (`shouldDeleteTask: true`) added by this PR and save the file, Kibana will restart and register the task again. You can use the above query again to see that the task is still registered.
…99650) Towards: elastic/response-ops-team#209 `connector_usage_reporting` task is supposed to work only in serverless. As there is no check for that, even though it reports nothing, It was working for on-prem and cloud as well. This PR deletes the `connector_usage_reporting` task after the first run by checking if `plugins.cloud.serverless.projectId` is missing. ### To verify: Run Kibana on this branch, then check the reporting task in the console by running the below query. There shouldn't be any task. ``` GET .kibana_task_manager_*/_search { "query": { "prefix": { "task.taskType": { "value": "actions:" } } } } ``` Then remove or comment out the line (`shouldDeleteTask: true`) added by this PR and save the file, Kibana will restart and register the task again. You can use the above query again to see that the task is still registered.
Towards: https://github.com/elastic/response-ops-team/issues/209
connector_usage_reporting
task is supposed to work only in serverless.As there is no check for that, even though it reports nothing, It was working for on-prem and cloud as well.
This PR deletes the
connector_usage_reporting
task after the first run by checking ifplugins.cloud.serverless.projectId
is missing.To verify:
Run Kibana on this branch, then check the reporting task in the console by running the below query.
There shouldn't be any task.
Then remove or comment out the line (
shouldDeleteTask: true
) added by this PR and save the file, Kibana will restart and register the task again. You can use the above query again to see that the task is still registered.