-
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
[ResponseOps][Cases] Fix a bug with cases telemetry where data from other spaces are not included #193166
[ResponseOps][Cases] Fix a bug with cases telemetry where data from other spaces are not included #193166
Conversation
305d4b5
to
1032d86
Compare
Pinging @elastic/response-ops (Team:ResponseOps) |
Pinging @elastic/response-ops-cases (Feature:Cases) |
@@ -26,6 +26,7 @@ export const getCasesSystemActionData = async ({ | |||
cardinality: { field: `${CASE_RULES_SAVED_OBJECT}.attributes.rules.id` }, | |||
}, | |||
}, | |||
namespaces: ['*'], |
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.
nit: maybe we could also update case_system_action.test.ts
to have expect(savedObjectsClient.find...).toHaveBeenCalledWith
or something like that. I see the other tests do that.
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.
Good point! Done!
@@ -86,6 +86,7 @@ describe('pushes', () => { | |||
page: 0, | |||
perPage: 0, | |||
type: 'cases-user-actions', | |||
namespaces: ['*'], |
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.
Why is this test file called pushed.test.ts
😄 I think it's a typo.
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.
lol I think it should be push
you are right. I will change it.
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.
TIL! Never thought about other spaces data 👍
…kibana into cases_fix_telemetry_namespaces
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @cnasikas |
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
…ther spaces are not included (elastic#193166) ## Summary The Find SO API supports the `namespaces` parameter where you can define the spaces that the SO client should search for. If you omit the `namespaces` parameter, the SO client will use the active space. This PR creates a wrapper around the SO client to add the `namespaces: ['*']` to all Find SO usages to count telemetry on all spaces. ### Checklist Delete any items that are not applicable to this PR. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios ### For maintainers - [x] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 6b372b7) # Conflicts: # x-pack/test/cases_api_integration/common/plugins/cases/server/plugin.ts
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…ther spaces are not included (elastic#193166) ## Summary The Find SO API supports the `namespaces` parameter where you can define the spaces that the SO client should search for. If you omit the `namespaces` parameter, the SO client will use the active space. This PR creates a wrapper around the SO client to add the `namespaces: ['*']` to all Find SO usages to count telemetry on all spaces. ### Checklist Delete any items that are not applicable to this PR. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios ### For maintainers - [x] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 6b372b7) # Conflicts: # x-pack/test/cases_api_integration/common/plugins/cases/server/plugin.ts # x-pack/test/cases_api_integration/common/plugins/cases/tsconfig.json
@@ -178,4 +179,32 @@ export const registerRoutes = (core: CoreSetup<FixtureStartDeps>, logger: Logger | |||
} | |||
} | |||
); | |||
|
|||
router.post( |
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.
do we need to add this new route to the http versioning tasks? I see no versioning here
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.
Hey! This is a fake route on a fake plugin that is registered only for testing.
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.
woops 👍
…from other spaces are not included (#193166) (#193417) # Backport This will backport the following commits from `main` to `8.x`: - [[ResponseOps][Cases] Fix a bug with cases telemetry where data from other spaces are not included (#193166)](#193166) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Christos Nasikas","email":"christos.nasikas@elastic.co"},"sourceCommit":{"committedDate":"2024-09-19T12:06:30Z","message":"[ResponseOps][Cases] Fix a bug with cases telemetry where data from other spaces are not included (#193166)\n\n## Summary\r\n\r\nThe Find SO API supports the `namespaces` parameter where you can define\r\nthe spaces that the SO client should search for. If you omit the\r\n`namespaces` parameter, the SO client will use the active space. This PR\r\ncreates a wrapper around the SO client to add the `namespaces: ['*']` to\r\nall Find SO usages to count telemetry on all spaces.\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [x] [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\r\n### For maintainers\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"6b372b7b45913a0171958a7795b4663ea865d137","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","Team:ResponseOps","v9.0.0","Feature:Cases","v8.16.0","v8.15.2"],"number":193166,"url":"https://github.com/elastic/kibana/pull/193166","mergeCommit":{"message":"[ResponseOps][Cases] Fix a bug with cases telemetry where data from other spaces are not included (#193166)\n\n## Summary\r\n\r\nThe Find SO API supports the `namespaces` parameter where you can define\r\nthe spaces that the SO client should search for. If you omit the\r\n`namespaces` parameter, the SO client will use the active space. This PR\r\ncreates a wrapper around the SO client to add the `namespaces: ['*']` to\r\nall Find SO usages to count telemetry on all spaces.\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [x] [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\r\n### For maintainers\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"6b372b7b45913a0171958a7795b4663ea865d137"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.15"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193166","number":193166,"mergeCommit":{"message":"[ResponseOps][Cases] Fix a bug with cases telemetry where data from other spaces are not included (#193166)\n\n## Summary\r\n\r\nThe Find SO API supports the `namespaces` parameter where you can define\r\nthe spaces that the SO client should search for. If you omit the\r\n`namespaces` parameter, the SO client will use the active space. This PR\r\ncreates a wrapper around the SO client to add the `namespaces: ['*']` to\r\nall Find SO usages to count telemetry on all spaces.\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [x] [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\r\n### For maintainers\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"6b372b7b45913a0171958a7795b4663ea865d137"}},{"branch":"8.x","label":"v8.16.0","labelRegex":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.15","label":"v8.15.2","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
… from other spaces are not included (#193166) (#193418) # Backport This will backport the following commits from `main` to `8.15`: - [[ResponseOps][Cases] Fix a bug with cases telemetry where data from other spaces are not included (#193166)](#193166) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Christos Nasikas","email":"christos.nasikas@elastic.co"},"sourceCommit":{"committedDate":"2024-09-19T12:06:30Z","message":"[ResponseOps][Cases] Fix a bug with cases telemetry where data from other spaces are not included (#193166)\n\n## Summary\r\n\r\nThe Find SO API supports the `namespaces` parameter where you can define\r\nthe spaces that the SO client should search for. If you omit the\r\n`namespaces` parameter, the SO client will use the active space. This PR\r\ncreates a wrapper around the SO client to add the `namespaces: ['*']` to\r\nall Find SO usages to count telemetry on all spaces.\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [x] [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\r\n### For maintainers\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"6b372b7b45913a0171958a7795b4663ea865d137","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","Team:ResponseOps","v9.0.0","Feature:Cases","v8.16.0","v8.15.2"],"number":193166,"url":"https://github.com/elastic/kibana/pull/193166","mergeCommit":{"message":"[ResponseOps][Cases] Fix a bug with cases telemetry where data from other spaces are not included (#193166)\n\n## Summary\r\n\r\nThe Find SO API supports the `namespaces` parameter where you can define\r\nthe spaces that the SO client should search for. If you omit the\r\n`namespaces` parameter, the SO client will use the active space. This PR\r\ncreates a wrapper around the SO client to add the `namespaces: ['*']` to\r\nall Find SO usages to count telemetry on all spaces.\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [x] [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\r\n### For maintainers\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"6b372b7b45913a0171958a7795b4663ea865d137"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.15"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193166","number":193166,"mergeCommit":{"message":"[ResponseOps][Cases] Fix a bug with cases telemetry where data from other spaces are not included (#193166)\n\n## Summary\r\n\r\nThe Find SO API supports the `namespaces` parameter where you can define\r\nthe spaces that the SO client should search for. If you omit the\r\n`namespaces` parameter, the SO client will use the active space. This PR\r\ncreates a wrapper around the SO client to add the `namespaces: ['*']` to\r\nall Find SO usages to count telemetry on all spaces.\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [x] [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\r\n### For maintainers\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"6b372b7b45913a0171958a7795b4663ea865d137"}},{"branch":"8.x","label":"v8.16.0","labelRegex":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.15","label":"v8.15.2","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Summary
The Find SO API supports the
namespaces
parameter where you can define the spaces that the SO client should search for. If you omit thenamespaces
parameter, the SO client will use the active space. This PR creates a wrapper around the SO client to add thenamespaces: ['*']
to all Find SO usages to count telemetry on all spaces.Checklist
Delete any items that are not applicable to this PR.
For maintainers