Skip to content

Commit

Permalink
Merge branch 'master' into 112822-node-view
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Sep 28, 2021
2 parents dbbe883 + bd699ac commit e7a6811
Show file tree
Hide file tree
Showing 75 changed files with 206 additions and 246 deletions.
6 changes: 6 additions & 0 deletions docs/migration/migrate_8_0.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,12 @@ URL that it derived from the actual server address and `xpack.security.public` s

*Impact:* Any workflow that involved manually clearing generated bundles will have to be updated with the new path.

[float]
=== Legacy `optimize.*` settings are no longer supported
*Details:* The legacy optimizer has been removed and any `optimize.*` settings have been deprecated since 7.10. These settings have been removed as they are no longer in use.

*Impact:* Any of the legacy `optimize.*` settings will prevent Kibana from starting up. Going forward, to run the `@kbn/optimizer` separately in development, pass `--no-optimizer` to `yarn start`. See https://github.com/elastic/kibana/pull/73154 for more details.

[float]
=== kibana.keystore has moved from the `data` folder to the `config` folder
*Details:* By default, kibana.keystore has moved from the configured `path.data` folder to `<root>/config` for archive distributions
Expand Down
File renamed without changes.
3 changes: 3 additions & 0 deletions legacy_rfcs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Kibana RFCs

We no longer follow this RFC process. Internal developers should review the new RFC process in our [internal developer guide](https://docs.elastic.dev/kibana-team/rfc-process)
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
139 changes: 0 additions & 139 deletions rfcs/README.md

This file was deleted.

19 changes: 0 additions & 19 deletions src/core/server/config/deprecation/core_deprecations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,25 +353,6 @@ const logFilterDeprecation: ConfigDeprecation = (settings, fromPath, addDeprecat
};

export const coreDeprecationProvider: ConfigDeprecationProvider = ({ rename, unusedFromRoot }) => [
unusedFromRoot('optimize.lazy'),
unusedFromRoot('optimize.lazyPort'),
unusedFromRoot('optimize.lazyHost'),
unusedFromRoot('optimize.lazyPrebuild'),
unusedFromRoot('optimize.lazyProxyTimeout'),
unusedFromRoot('optimize.enabled'),
unusedFromRoot('optimize.bundleFilter'),
unusedFromRoot('optimize.bundleDir'),
unusedFromRoot('optimize.viewCaching'),
unusedFromRoot('optimize.watch'),
unusedFromRoot('optimize.watchPort'),
unusedFromRoot('optimize.watchHost'),
unusedFromRoot('optimize.watchPrebuild'),
unusedFromRoot('optimize.watchProxyTimeout'),
unusedFromRoot('optimize.useBundleCache'),
unusedFromRoot('optimize.sourceMaps'),
unusedFromRoot('optimize.workers'),
unusedFromRoot('optimize.profile'),
unusedFromRoot('optimize.validateSyntaxOfNodeModules'),
rename('cpu.cgroup.path.override', 'ops.cGroupOverrides.cpuPath'),
rename('cpuacct.cgroup.path.override', 'ops.cGroupOverrides.cpuAcctPath'),
rename('server.xsrf.whitelist', 'server.xsrf.allowlist'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,4 @@ describe('configuration deprecations', () => {
]
`);
});

it('should log deprecation warnings for core deprecations', async () => {
root = kbnTestServer.createRoot({
optimize: {
lazy: true,
lazyPort: 9090,
},
});

await root.preboot();
await root.setup();

const logs = loggingSystemMock.collect(mockLoggingSystem);
expect(logs.warn.flat()).toMatchInlineSnapshot(`
Array [
"You no longer need to configure \\"optimize.lazy\\".",
"You no longer need to configure \\"optimize.lazyPort\\".",
"\\"logging.silent\\" has been deprecated and will be removed in 8.0. Moving forward, you can use \\"logging.root.level:off\\" in your logging configuration. ",
]
`);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import {
syncDashboardUrlState,
diffDashboardState,
areTimeRangesEqual,
areRefreshIntervalsEqual,
} from '../lib';

export interface UseDashboardStateProps {
Expand Down Expand Up @@ -241,13 +242,17 @@ export const useDashboardAppState = ({

const savedTimeChanged =
lastSaved.timeRestore &&
!areTimeRangesEqual(
(!areTimeRangesEqual(
{
from: savedDashboard?.timeFrom,
to: savedDashboard?.timeTo,
},
timefilter.getTime()
);
) ||
!areRefreshIntervalsEqual(
savedDashboard?.refreshInterval,
timefilter.getRefreshInterval()
));

/**
* changes to the dashboard should only be considered 'unsaved changes' when
Expand Down
13 changes: 9 additions & 4 deletions src/plugins/dashboard/public/application/lib/filter_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ import _ from 'lodash';
import moment, { Moment } from 'moment';
import { Optional } from '@kbn/utility-types';

import { Filter, TimeRange } from '../../services/data';
import { Filter, TimeRange, RefreshInterval } from '../../services/data';

type TimeRangeCompare = Optional<TimeRange>;
type RefreshIntervalCompare = Optional<RefreshInterval>;

/**
* Converts the time to a utc formatted string. If the time is not valid (e.g. it might be in a relative format like
Expand All @@ -31,9 +32,13 @@ export const convertTimeToUTCString = (time?: string | Moment): undefined | stri
}
};

export const areTimeRangesEqual = (rangeA: TimeRangeCompare, rangeB: TimeRangeCompare): boolean => {
return areTimesEqual(rangeA.from, rangeB.from) && areTimesEqual(rangeA.to, rangeB.to);
};
export const areTimeRangesEqual = (rangeA: TimeRangeCompare, rangeB: TimeRangeCompare): boolean =>
areTimesEqual(rangeA.from, rangeB.from) && areTimesEqual(rangeA.to, rangeB.to);

export const areRefreshIntervalsEqual = (
refreshA?: RefreshIntervalCompare,
refreshB?: RefreshIntervalCompare
): boolean => refreshA?.pause === refreshB?.pause && refreshA?.value === refreshB?.value;

/**
* Compares the two times, making sure they are in both compared in string format. Absolute times
Expand Down
2 changes: 1 addition & 1 deletion test/accessibility/apps/dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const testSubjects = getService('testSubjects');
const listingTable = getService('listingTable');

describe.skip('Dashboard', () => {
describe('Dashboard', () => {
const dashboardName = 'Dashboard Listing A11y';
const clonedDashboardName = 'Dashboard Listing A11y Copy';

Expand Down
12 changes: 8 additions & 4 deletions test/accessibility/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,19 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
...functionalConfig.getAll(),

testFiles: [
require.resolve('./apps/discover'),
// these 5 tests all load addSampleDataSet('flights')
// only the last test does removeSampleDataSet('flights')
require.resolve('./apps/dashboard'),
require.resolve('./apps/dashboard_panel'),
require.resolve('./apps/filter_panel'),
require.resolve('./apps/home'),
require.resolve('./apps/kibana_overview'),

// next tests don't use sample data
require.resolve('./apps/discover'),
require.resolve('./apps/visualize'),
require.resolve('./apps/management'),
require.resolve('./apps/console'),
require.resolve('./apps/home'),
require.resolve('./apps/filter_panel'),
require.resolve('./apps/kibana_overview'),
],
pageObjects,
services,
Expand Down
7 changes: 5 additions & 2 deletions test/functional/page_objects/home_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,11 @@ export class HomePageObject extends FtrService {
async addSampleDataSet(id: string) {
const isInstalled = await this.isSampleDataSetInstalled(id);
if (!isInstalled) {
await this.testSubjects.click(`addSampleDataSet${id}`);
await this._waitForSampleDataLoadingAction(id);
await this.retry.waitFor('wait until sample data is installed', async () => {
await this.testSubjects.click(`addSampleDataSet${id}`);
await this._waitForSampleDataLoadingAction(id);
return await this.isSampleDataSetInstalled(id);
});
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,43 +16,43 @@ const serviceOverviewHref = url.format({

const apisToIntercept = [
{
endpoint: '/api/apm/services/opbeans-node/transactions/charts/latency',
endpoint: '/api/apm/services/opbeans-node/transactions/charts/latency?*',
name: 'latencyChartRequest',
},
{
endpoint: '/api/apm/services/opbeans-node/throughput',
endpoint: '/api/apm/services/opbeans-node/throughput?*',
name: 'throughputChartRequest',
},
{
endpoint: '/api/apm/services/opbeans-node/transactions/charts/error_rate',
endpoint: '/api/apm/services/opbeans-node/transactions/charts/error_rate?*',
name: 'errorRateChartRequest',
},
{
endpoint:
'/api/apm/services/opbeans-node/transactions/groups/detailed_statistics',
'/api/apm/services/opbeans-node/transactions/groups/detailed_statistics?*',
name: 'transactionGroupsDetailedRequest',
},
{
endpoint:
'/api/apm/services/opbeans-node/service_overview_instances/detailed_statistics',
'/api/apm/services/opbeans-node/service_overview_instances/detailed_statistics?*',
name: 'instancesDetailedRequest',
},
{
endpoint:
'/api/apm/services/opbeans-node/service_overview_instances/main_statistics',
'/api/apm/services/opbeans-node/service_overview_instances/main_statistics?*',
name: 'instancesMainStatisticsRequest',
},
{
endpoint: '/api/apm/services/opbeans-node/error_groups/main_statistics',
endpoint: '/api/apm/services/opbeans-node/error_groups/main_statistics?*',
name: 'errorGroupsMainStatisticsRequest',
},
{
endpoint: '/api/apm/services/opbeans-node/transaction/charts/breakdown',
endpoint: '/api/apm/services/opbeans-node/transaction/charts/breakdown?*',
name: 'transactonBreakdownRequest',
},
{
endpoint:
'/api/apm/services/opbeans-node/transactions/groups/main_statistics',
'/api/apm/services/opbeans-node/transactions/groups/main_statistics?*',
name: 'transactionsGroupsMainStatisticsRequest',
},
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,17 @@ const serviceOverviewHref = url.format({
const apisToIntercept = [
{
endpoint:
'/api/apm/services/opbeans-java/service_overview_instances/main_statistics',
'/api/apm/services/opbeans-java/service_overview_instances/main_statistics?*',
name: 'instancesMainRequest',
},
{
endpoint:
'/api/apm/services/opbeans-java/service_overview_instances/detailed_statistics',
'/api/apm/services/opbeans-java/service_overview_instances/detailed_statistics?*',
name: 'instancesDetailsRequest',
},
{
endpoint:
'/api/apm/services/opbeans-java/service_overview_instances/details/31651f3c624b81c55dd4633df0b5b9f9ab06b151121b0404ae796632cd1f87ad',
name: 'instanceDetailsRequest',
},
{
endpoint:
'/api/apm/services/opbeans-java/service_overview_instances/details/31651f3c624b81c55dd4633df0b5b9f9ab06b151121b0404ae796632cd1f87ad',
'/api/apm/services/opbeans-java/service_overview_instances/details/31651f3c624b81c55dd4633df0b5b9f9ab06b151121b0404ae796632cd1f87ad?*',
name: 'instanceDetailsRequest',
},
];
Expand Down
Loading

0 comments on commit e7a6811

Please sign in to comment.