Skip to content

Migrate reporting FTRs from the Stats Usage API#151808

Merged
afharo merged 2 commits intoelastic:mainfrom
afharo:migrate-reporting-ftrs-to-actual-telemetry-endpoint
Feb 23, 2023
Merged

Migrate reporting FTRs from the Stats Usage API#151808
afharo merged 2 commits intoelastic:mainfrom
afharo:migrate-reporting-ftrs-to-actual-telemetry-endpoint

Conversation

@afharo
Copy link
Copy Markdown
Member

@afharo afharo commented Feb 21, 2023

Summary

Part of #150429. To unblock #151082 we need to migrate the reporting FTRs away from the deprecated Stats API to use the actual telemetry API.

Checklist

For maintainers

@afharo afharo self-assigned this Feb 21, 2023
@afharo afharo added Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// Feature:Telemetry Feature:Functional Testing Team:SharedUX Platform AppEx-SharedUX (formerly Global Experience) t// release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting labels Feb 21, 2023
@afharo afharo added the zDeprecated Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead label Feb 21, 2023
@afharo afharo force-pushed the migrate-reporting-ftrs-to-actual-telemetry-endpoint branch from bf7834b to 0654211 Compare February 21, 2023 23:45
Comment on lines 14 to 21
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

adding these overrides to make it easier to consumers to deal with the output data.

Comment on lines 24 to 33
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Removing the API as it not recommended for its use to fetch usage.

@afharo afharo force-pushed the migrate-reporting-ftrs-to-actual-telemetry-endpoint branch from 0654211 to c418438 Compare February 22, 2023 02:02
@afharo afharo marked this pull request as ready for review February 22, 2023 10:31
@afharo afharo requested review from a team as code owners February 22, 2023 10:31
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-core (Team:Core)

@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/appex-sharedux (Team:SharedUX)

@afharo afharo enabled auto-merge (squash) February 22, 2023 10:34
@tsullivan tsullivan self-requested a review February 23, 2023 00:25
describe('server', function () {
this.tags('skipCloud');
it('configuration settings of the tests_server', async () => {
const usage = await usageAPI.getUsageStats();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I wonder if this will help resolve #134517

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I tried unskipping it, but it was still flaky. I can try to debug it on a follow up PR. I wouldn't like to delay this one further because it's blocking a community PR 🧡

Copy link
Copy Markdown
Member

@tsullivan tsullivan left a comment

Choose a reason for hiding this comment

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

x-pack/test/reporting_api_integration changes LGTM! Thanks for handling this!

stack_stats: object;
// Needed for testing to make fields easier to access
// eslint-disable-next-line @typescript-eslint/no-explicit-any
stack_stats: Record<string, any>;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

any is a footgun, if we want to use it to avoid real types I think we should rather cast to any in the test. Even if it means we're having to repeat it a bit more.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I see your point! I reverted this change and specified this test-friendlier type in the FTR helper in 4c813a5 (#151808)

@kibana-ci
Copy link
Copy Markdown

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

cc @afharo

@afharo afharo merged commit 82191fe into elastic:main Feb 23, 2023
@afharo afharo deleted the migrate-reporting-ftrs-to-actual-telemetry-endpoint branch February 23, 2023 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Feature:Functional Testing Feature:Telemetry release_note:skip Skip the PR/issue when compiling release notes Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// Team:SharedUX Platform AppEx-SharedUX (formerly Global Experience) t// v8.8.0 zDeprecated Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants