Skip to content
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

[ML] Fix the file upload telemetry #157888

Merged
merged 1 commit into from
May 17, 2023

Conversation

darnautov
Copy link
Contributor

@darnautov darnautov commented May 16, 2023

Summary

Fixes the usage collector for the file upload plugin. According to the git history it hasn't been working since #60418.

The saved objects repository required for retrieving telemetry data wasn't provided, causing telemetry to fall back to index_creation_count: 0 after each check.

How to test

Execute the following request in the Dev Console.

POST kbn:/api/telemetry/v2/clusters/_stats
{ "unencrypted": true }

mlUsage shouldn't be null.

@darnautov darnautov added Feature:File Upload telemetry Issues related to the addition of telemetry to a feature v8.9.0 v8.8.1 labels May 16, 2023
@darnautov darnautov requested a review from peteharverson May 16, 2023 14:42
@darnautov darnautov requested a review from a team as a code owner May 16, 2023 14:42
@darnautov darnautov self-assigned this May 16, 2023
@darnautov darnautov added the release_note:skip Skip the PR/issue when compiling release notes label May 16, 2023
Copy link
Contributor

@nreese nreese left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested as described and LGTM

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
securitySolution 400 404 +4
total +6

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
securitySolution 480 484 +4
total +6

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @darnautov

@darnautov darnautov merged commit 57af98f into elastic:main May 17, 2023
@darnautov darnautov deleted the fild-upload-fix-telemetry branch May 17, 2023 09:37
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.8

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request May 17, 2023
## Summary

Fixes the usage collector for the file upload plugin. According to the
git history it hasn't been working since
elastic#60418.

The saved objects repository required for retrieving telemetry data
wasn't provided, causing telemetry to fall back to
`index_creation_count: 0` after each check.

### How to test

Execute the following request in the Dev Console.

```
POST kbn:/api/telemetry/v2/clusters/_stats
{ "unencrypted": true }
```

[`mlUsage`](https://github.com/elastic/kibana/blob/9047d69d574225212996ea9dbcd15dddc607d11e/x-pack/plugins/file_upload/server/telemetry/usage_collector.ts#L36)
shouldn't be `null`.

(cherry picked from commit 57af98f)
kibanamachine added a commit that referenced this pull request May 17, 2023
# Backport

This will backport the following commits from `main` to `8.8`:
- [[ML] Fix the file upload telemetry
(#157888)](#157888)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT [{"author":{"name":"Dima
Arnautov","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-05-17T09:36:58Z","message":"[ML]
Fix the file upload telemetry (#157888)\n\n## Summary\r\n\r\nFixes the
usage collector for the file upload plugin. According to the\r\ngit
history it hasn't been working
since\r\nhttps://github.com//pull/60418.\r\n\r\nThe saved
objects repository required for retrieving telemetry data\r\nwasn't
provided, causing telemetry to fall back to\r\n`index_creation_count: 0`
after each check.\r\n\r\n\r\n### How to test \r\n\r\nExecute the
following request in the Dev Console.\r\n\r\n```\r\nPOST
kbn:/api/telemetry/v2/clusters/_stats\r\n{ \"unencrypted\": true
}\r\n```\r\n\r\n\r\n[`mlUsage`](https://github.com/elastic/kibana/blob/9047d69d574225212996ea9dbcd15dddc607d11e/x-pack/plugins/file_upload/server/telemetry/usage_collector.ts#L36)\r\nshouldn't
be
`null`.","sha":"57af98f38a535432f7f085abaa3c9e7e4f67a53a","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Feature:File
Upload","telemetry","v8.9.0","v8.8.1"],"number":157888,"url":"https://github.com/elastic/kibana/pull/157888","mergeCommit":{"message":"[ML]
Fix the file upload telemetry (#157888)\n\n## Summary\r\n\r\nFixes the
usage collector for the file upload plugin. According to the\r\ngit
history it hasn't been working
since\r\nhttps://github.com//pull/60418.\r\n\r\nThe saved
objects repository required for retrieving telemetry data\r\nwasn't
provided, causing telemetry to fall back to\r\n`index_creation_count: 0`
after each check.\r\n\r\n\r\n### How to test \r\n\r\nExecute the
following request in the Dev Console.\r\n\r\n```\r\nPOST
kbn:/api/telemetry/v2/clusters/_stats\r\n{ \"unencrypted\": true
}\r\n```\r\n\r\n\r\n[`mlUsage`](https://github.com/elastic/kibana/blob/9047d69d574225212996ea9dbcd15dddc607d11e/x-pack/plugins/file_upload/server/telemetry/usage_collector.ts#L36)\r\nshouldn't
be
`null`.","sha":"57af98f38a535432f7f085abaa3c9e7e4f67a53a"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/157888","number":157888,"mergeCommit":{"message":"[ML]
Fix the file upload telemetry (#157888)\n\n## Summary\r\n\r\nFixes the
usage collector for the file upload plugin. According to the\r\ngit
history it hasn't been working
since\r\nhttps://github.com//pull/60418.\r\n\r\nThe saved
objects repository required for retrieving telemetry data\r\nwasn't
provided, causing telemetry to fall back to\r\n`index_creation_count: 0`
after each check.\r\n\r\n\r\n### How to test \r\n\r\nExecute the
following request in the Dev Console.\r\n\r\n```\r\nPOST
kbn:/api/telemetry/v2/clusters/_stats\r\n{ \"unencrypted\": true
}\r\n```\r\n\r\n\r\n[`mlUsage`](https://github.com/elastic/kibana/blob/9047d69d574225212996ea9dbcd15dddc607d11e/x-pack/plugins/file_upload/server/telemetry/usage_collector.ts#L36)\r\nshouldn't
be
`null`.","sha":"57af98f38a535432f7f085abaa3c9e7e4f67a53a"}},{"branch":"8.8","label":"v8.8.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Dima Arnautov <[email protected]>
jasonrhodes pushed a commit that referenced this pull request May 17, 2023
## Summary

Fixes the usage collector for the file upload plugin. According to the
git history it hasn't been working since
#60418.

The saved objects repository required for retrieving telemetry data
wasn't provided, causing telemetry to fall back to
`index_creation_count: 0` after each check.


### How to test 

Execute the following request in the Dev Console.

```
POST kbn:/api/telemetry/v2/clusters/_stats
{ "unencrypted": true }
```


[`mlUsage`](https://github.com/elastic/kibana/blob/9047d69d574225212996ea9dbcd15dddc607d11e/x-pack/plugins/file_upload/server/telemetry/usage_collector.ts#L36)
shouldn't be `null`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:File Upload release_note:skip Skip the PR/issue when compiling release notes telemetry Issues related to the addition of telemetry to a feature v8.8.0 v8.8.1 v8.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants