-
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
Migrate server-side usageData service to packages #139844
Migrate server-side usageData service to packages #139844
Conversation
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.
self-review
*/ | ||
|
||
export { CoreUsageDataService, CoreUsageStatsClient } from './src'; | ||
export type { InternalCoreUsageDataSetup } from '@kbn/core-usage-data-base-server-internal'; |
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.
Re-exporting the internal contract type from the base package for consistency, given all other domains allow to import the service impl and the associated contracts from the same package.
@@ -43,7 +43,7 @@ import type { SavedObjectTypeRegistry } from '@kbn/core-saved-objects-base-serve | |||
import type { SavedObjectsServiceStart } from '@kbn/core-saved-objects-server'; | |||
|
|||
import { isConfigured } from './is_configured'; | |||
import { coreUsageStatsType } from './core_usage_stats'; | |||
import { coreUsageStatsType } from './saved_objects'; |
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 moved the stats SO type to a saved_objects
subfolder, as that's our recommended approach
// Because of #79265 we need to explicitly import, then export these types for | ||
// scripts/telemetry_check.js to work as expected | ||
import { | ||
CoreUsageStats, |
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.
No longer required given we had to duplicate the types for #139389
Pinging @elastic/kibana-core (Team:Core) |
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! Just one tiny NIT
export { CoreUsageDataService, CoreUsageStatsClient } from './src'; | ||
export type { InternalCoreUsageDataSetup } from '@kbn/core-usage-data-base-server-internal'; |
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: external exports/imports first?
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Public APIs missing exports
Unknown metric groupsAPI count
ESLint disabled line counts
References to deprecated APIs
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
* create empty packages * moving the files * adapt usages * fix more usages * address NIT
Summary
Fix #135840
The public type and internal base package were already created in #139305
Create the following packages:
@kbn/core-usage-data-server-internal
@kbn/core-usage-data-server-mocks