Skip to content

Commit

Permalink
[deprecations] Remove/update core-api deprecations targeted for remov…
Browse files Browse the repository at this point in the history
…al by 8.8 (#147723)

Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
TinaHeiligers and kibanamachine authored Jan 22, 2023
1 parent 2352b14 commit 188009f
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import type { EuiButtonColor } from '@elastic/eui';
*
* See {@link AppMountParameters} for detailed usage examples.
*
* @remarks prefer {@link ScopedHistory.block} instead
*
* @public
* @deprecated {@link AppMountParameters.onAppLeave} has been deprecated in favor of {@link ScopedHistory.block}
* @removeBy 8.8.0
*/
export type AppLeaveHandler = (
factory: AppLeaveActionFactory,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ export interface AppMountParameters<HistoryLocationState = unknown> {
* This will be called either when the user goes to another application, or when
* trying to close the tab or manually changing the url.
*
*
* @example
*
* ```ts
Expand All @@ -165,8 +166,10 @@ export interface AppMountParameters<HistoryLocationState = unknown> {
* }
* ```
*
* @deprecated {@link ScopedHistory.block} should be used instead.
* @removeBy 8.8.0
* @remarks prefer {@link ScopedHistory.block} instead
* Resources with names containing percent sign with other special characters or
* containing `%25` sequence can experience navigation issues. Refs https://github.com/elastic/kibana/issues/82440 and https://github.com/elastic/kibana/issues/132600
*/
onAppLeave: (handler: AppLeaveHandler) => void;

Expand Down
3 changes: 1 addition & 2 deletions packages/core/metrics/core-metrics-server/src/metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,7 @@ export interface OpsMetrics {
elasticsearch_client: ElasticsearchClientsMetrics;
/**
* Process related metrics.
* @deprecated use the processes field instead.
* @removeBy 8.8.0
* @remarks processes field preferred
*/
process: OpsProcessMetrics;
/** Process related metrics. Reports an array of objects for each kibana pid.*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ describe('DocumentMigrator', () => {
migrations: {
'1.2.3': (doc, { log }) => {
log.info(logTestMsg);
log.warning(logTestMsg);
log.warn(logTestMsg);
return doc;
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export class MigrationLogger implements SavedObjectsMigrationLogger {

public info = (msg: string) => this.logger.info(msg);
public debug = (msg: string) => this.logger.debug(msg);
public warning = (msg: string) => this.logger.warn(msg);
public warn = (msg: string) => this.logger.warn(msg);
public error = (msg: string, meta: LogMeta) => this.logger.error(msg, meta);
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export const createSavedObjectsMigrationLoggerMock =
const mock = {
debug: jest.fn(),
info: jest.fn(),
warning: jest.fn(),
warn: jest.fn(),
error: jest.fn(),
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ export type SavedObjectMigrationFn<InputAttributes = unknown, MigratedAttributes
export interface SavedObjectsMigrationLogger {
debug: (msg: string) => void;
info: (msg: string) => void;
/**
* @deprecated Use `warn` instead.
* @removeBy 8.8.0
*/
warning: (msg: string) => void;
warn: (msg: string) => void;
error: <Meta extends LogMeta = LogMeta>(msg: string, meta: Meta) => void;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const migrations730 = (doc: DashboardDoc700To720, { log }: SavedObjectMig
moveFiltersToQuery(searchSource)
);
} catch (e) {
log.warning(
log.warn(
`Exception @ migrations730 while trying to migrate dashboard query filters!\n` +
`${e.stack}\n` +
`dashboard: ${inspect(doc, false, null)}`
Expand All @@ -80,7 +80,7 @@ export const migrations730 = (doc: DashboardDoc700To720, { log }: SavedObjectMig

delete doc.attributes.uiStateJSON;
} catch (e) {
log.warning(
log.warn(
`Exception @ migrations730 while trying to migrate dashboard panels!\n` +
`Error: ${e.stack}\n` +
`dashboard: ${inspect(doc, false, null)}`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function logMigrationWarning(
errorMsg: string,
doc: SavedObjectUnsanitizedDoc<MapSavedObjectAttributes>
) {
context.log.warning(
context.log.warn(
`map migration failed (${context.migrationVersion}). ${errorMsg}. attributes: ${JSON.stringify(
doc
)}`
Expand Down

0 comments on commit 188009f

Please sign in to comment.