Skip to content

Commit

Permalink
Merge branch 'master' into transform-retain-meta-on-clone
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Oct 28, 2021
2 parents 885a949 + 2e4c872 commit af00b45
Show file tree
Hide file tree
Showing 145 changed files with 1,593 additions and 2,464 deletions.
3 changes: 2 additions & 1 deletion .backportrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"upstream": "elastic/kibana",
"targetBranchChoices": [
{ "name": "master", "checked": true },
"8.0",
"7.16",
"7.15",
"7.14",
Expand Down Expand Up @@ -32,7 +33,7 @@
],
"targetPRLabels": ["backport"],
"branchLabelMapping": {
"^v8.0.0$": "master",
"^v8.1.0$": "master",
"^v(\\d+).(\\d+).\\d+$": "$1.$2"
},
"autoMerge": true,
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/pipelines/hourly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ steps:
agents:
queue: ci-group-6
depends_on: build
timeout_in_minutes: 150
timeout_in_minutes: 250
key: default-cigroup
retry:
automatic:
Expand Down
3 changes: 3 additions & 0 deletions .buildkite/scripts/pipelines/pull_request/pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ const uploadPipeline = (pipelineContent) => {
if (
(await doAnyChangesMatch([
/^x-pack\/plugins\/security_solution/,
/^x-pack\/plugins\/cases/,
/^x-pack\/plugins\/lists/,
/^x-pack\/plugins\/timelines/,
/^x-pack\/test\/security_solution_cypress/,
/^x-pack\/plugins\/triggers_actions_ui\/public\/application\/sections\/action_connector_form/,
/^x-pack\/plugins\/triggers_actions_ui\/public\/application\/context\/actions_connectors_context\.tsx/,
Expand Down
58 changes: 58 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Configuration for probot-stale - https://github.com/probot/stale

# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 180

# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
daysUntilClose: false

# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
onlyLabels: ["Team:apm"]

# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
exemptLabels: ["technical debt", "prevent stale"]

# Set to true to ignore issues in a project (defaults to false)
exemptProjects: false

# Set to true to ignore issues in a milestone (defaults to false)
exemptMilestones: false

# Set to true to ignore issues with an assignee (defaults to false)
exemptAssignees: false

# Label to use when marking as stale
staleLabel: stale

# Comment to post when marking as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when removing the stale label.
# unmarkComment: >
# Your comment here.

# Comment to post when closing a stale Issue or Pull Request.
# closeComment: >
# Your comment here.

# Limit the number of actions per hour, from 1-30. Default is 30
limitPerRun: 30

# Limit to only `issues` or `pulls`
only: issues

# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
# pulls:
# daysUntilStale: 30
# markComment: >
# This pull request has been automatically marked as stale because it has not had
# recent activity. It will be closed if no further activity occurs. Thank you
# for your contributions.

# issues:
# exemptLabels:
# - confirmed
2 changes: 1 addition & 1 deletion dev_docs/tutorials/saved_objects.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -254,4 +254,4 @@ the error should be verbose and informative so that the corrupt document can be

### Testing Migrations

Bugs in a migration function cause downtime for our users and therefore have a very high impact. Follow the <DocLink id="kibDevTutorialTestingPlugins" section="saved-object-migrations" text="Saved Object migrations section in the plugin testing guide"/>.
Bugs in a migration function cause downtime for our users and therefore have a very high impact. Follow the <DocLink id="kibDevTutorialTestingPlugins" section="saved-objects-migrations" text="Saved Object migrations section in the plugin testing guide"/>.
3 changes: 3 additions & 0 deletions docs/management/advanced-options.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,9 @@ Enables the legacy charts library for timelion charts in Visualize.
**This setting is deprecated and will not be supported as of 8.0.**
Maps values to specific colors in charts using the *Compatibility* palette.

[[visualization-uselegacytimeaxis]]`visualization:useLegacyTimeAxis`::
Enables the legacy time axis for charts in Lens, Discover, Visualize and TSVB

[[visualization-heatmap-maxbuckets]]`visualization:heatmap:maxBuckets`::
The maximum number of buckets a datasource can return. High numbers can have a negative impact on your browser rendering performance.

Expand Down
2 changes: 1 addition & 1 deletion docs/settings/spaces-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ return all spaces using a single `_search` from {es}, so you must
configure this setting lower than the `index.max_result_window` in {es}.
The default is `1000`.

`monitoring.cluster_alerts-allowedSpaces` {ess-icon}::
`monitoring.cluster_alerts.allowedSpaces` {ess-icon}::
Specifies the spaces where cluster alerts are automatically generated.
You must specify all spaces where you want to generate alerts, including the default space.
When the default space is unspecified, {kib} is unable to generate an alert for the default space.
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dashboarding"
],
"private": true,
"version": "8.0.0",
"version": "8.1.0",
"branch": "master",
"types": "./kibana.d.ts",
"tsdocMetadata": "./build/tsdoc-metadata.json",
Expand Down Expand Up @@ -98,7 +98,7 @@
"@elastic/apm-synthtrace": "link:bazel-bin/packages/elastic-apm-synthtrace",
"@elastic/apm-rum": "^5.9.1",
"@elastic/apm-rum-react": "^1.3.1",
"@elastic/charts": "38.0.1",
"@elastic/charts": "38.1.0",
"@elastic/datemath": "link:bazel-bin/packages/elastic-datemath",
"@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@^8.0.0-canary.35",
"@elastic/ems-client": "8.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pageLoadAssetSize:
console: 46091
core: 435325
crossClusterReplication: 65408
dashboard: 186763
dashboard: 82025
dashboardEnhanced: 65646
devTools: 38637
discover: 99999
Expand Down Expand Up @@ -76,7 +76,7 @@ pageLoadAssetSize:
watcher: 43598
runtimeFields: 41752
stackAlerts: 29684
presentationUtil: 94301
presentationUtil: 84606
osquery: 107090
fileUpload: 25664
dataVisualizer: 27530
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ const { startES } = kbnTestServer.createTestServers({
});
let esServer: kbnTestServer.TestElasticsearchUtils;

// Failing: See https://github.com/elastic/kibana/issues/113697
describe.skip('migration actions', () => {
describe('migration actions', () => {
let client: ElasticsearchClient;

beforeAll(async () => {
Expand Down Expand Up @@ -1158,7 +1157,7 @@ describe.skip('migration actions', () => {
it('resolves left wait_for_task_completion_timeout when the task does not complete within the timeout', async () => {
const res = (await pickupUpdatedMappings(
client,
'existing_index_with_docs'
'.kibana_1'
)()) as Either.Right<UpdateByQueryResponse>;

const task = waitForPickupUpdatedMappingsTask({
Expand Down Expand Up @@ -1539,7 +1538,8 @@ describe.skip('migration actions', () => {
}
`);
});
it('resolves left request_entity_too_large_exception when the payload is too large', async () => {
// TODO: unskip after https://github.com/elastic/kibana/issues/116111
it.skip('resolves left request_entity_too_large_exception when the payload is too large', async () => {
const newDocs = new Array(10000).fill({
_source: {
title:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe('migration v2 with corrupt saved object documents', () => {
await new Promise((resolve) => setTimeout(resolve, 10000));
});

it('collects corrupt saved object documents across batches', async () => {
it.skip('collects corrupt saved object documents across batches', async () => {
const { startES } = kbnTestServer.createTestServers({
adjustTimeout: (t: number) => jest.setTimeout(t),
settings: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe('migration v2', () => {
await new Promise((resolve) => setTimeout(resolve, 10000));
});

it('migrates the documents to the highest version', async () => {
it.skip('migrates the documents to the highest version', async () => {
const migratedIndex = `.kibana_${pkg.version}_001`;
const { startES } = kbnTestServer.createTestServers({
adjustTimeout: (t: number) => jest.setTimeout(t),
Expand Down
1 change: 1 addition & 0 deletions src/plugins/charts/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*/

export const COLOR_MAPPING_SETTING = 'visualization:colorMapping';
export const LEGACY_TIME_AXIS = 'visualization:useLegacyTimeAxis';

export {
CustomPaletteArguments,
Expand Down
17 changes: 16 additions & 1 deletion src/plugins/charts/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import { i18n } from '@kbn/i18n';
import { schema } from '@kbn/config-schema';
import { CoreSetup, Plugin } from 'kibana/server';
import { COLOR_MAPPING_SETTING, palette, systemPalette } from '../common';
import { COLOR_MAPPING_SETTING, LEGACY_TIME_AXIS, palette, systemPalette } from '../common';
import { ExpressionsServerSetup } from '../../expressions/server';

interface SetupDependencies {
Expand Down Expand Up @@ -45,6 +45,21 @@ export class ChartsServerPlugin implements Plugin<object, object> {
category: ['visualization'],
schema: schema.string(),
},
[LEGACY_TIME_AXIS]: {
name: i18n.translate('charts.advancedSettings.visualization.useLegacyTimeAxis.name', {
defaultMessage: 'Legacy chart time axis',
}),
value: false,
description: i18n.translate(
'charts.advancedSettings.visualization.useLegacyTimeAxis.description',
{
defaultMessage:
'Enables the legacy time axis for charts in Lens, Discover, Visualize and TSVB',
}
),
category: ['visualization'],
schema: schema.boolean(),
},
});

return {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ export const EditorMenu = ({ dashboardContainer, createNewVisType }: Props) => {
<SolutionToolbarPopover
ownFocus
label={i18n.translate('dashboard.solutionToolbar.editorMenuButtonLabel', {
defaultMessage: 'Select type',
defaultMessage: 'All types',
})}
iconType="arrowDown"
iconSide="right"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ export function DiscoverChart({
onResetQuery={resetSavedSearch}
/>
</EuiFlexItem>

{showViewModeToggle && (
<EuiFlexItem grow={false}>
<DocumentViewModeToggle
Expand All @@ -124,7 +123,6 @@ export function DiscoverChart({
/>
</EuiFlexItem>
)}

{timefield && (
<EuiFlexItem className="dscResultCount__toggle" grow={false}>
<EuiPopover
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ import {
Settings,
TooltipType,
XYChartElementEvent,
GridLineStyle,
AxisStyle,
RecursivePartial,
} from '@elastic/charts';
import { IUiSettingsClient } from 'kibana/public';
import {
Expand All @@ -35,6 +38,7 @@ import { DataCharts$, DataChartsMessage } from '../../services/use_saved_search'
import { FetchStatus } from '../../../../types';
import { DiscoverServices } from '../../../../../build_services';
import { useDataState } from '../../utils/use_data_state';
import { LEGACY_TIME_AXIS } from '../../../../../../../charts/common';

export interface DiscoverHistogramProps {
savedSearchData$: DataCharts$;
Expand Down Expand Up @@ -179,6 +183,48 @@ export function DiscoverHistogram({

const xAxisFormatter = services.data.fieldFormats.deserialize(chartData.yAxisFormat);

const useLegacyTimeAxis = uiSettings.get(LEGACY_TIME_AXIS, false);
const gridLineStyle: RecursivePartial<GridLineStyle> = useLegacyTimeAxis
? {}
: { strokeWidth: 0.1, stroke: isDarkMode ? 'white' : 'black' };
const verticalAxisStyle: RecursivePartial<AxisStyle> = useLegacyTimeAxis
? {}
: {
axisLine: {
visible: false,
},
tickLabel: {
fontSize: 11,
},
};
const xAxisStyle: RecursivePartial<AxisStyle> = useLegacyTimeAxis
? {}
: {
axisLine: {
stroke: isDarkMode ? 'lightgray' : 'darkgray',
strokeWidth: 1,
},
tickLine: {
size: 12,
strokeWidth: 0.15,
stroke: isDarkMode ? 'white' : 'black',
padding: -10,
visible: true,
},
tickLabel: {
fontSize: 11,
padding: 0,
alignment: {
vertical: Position.Bottom,
horizontal: Position.Left,
},
offset: {
x: 1.5,
y: 0,
},
},
};

return (
<React.Fragment>
<div className="dscHistogram" data-test-subj="discoverChart" data-time-range={timeRangeText}>
Expand All @@ -195,15 +241,19 @@ export function DiscoverHistogram({
<Axis
id="discover-histogram-left-axis"
position={Position.Left}
ticks={5}
ticks={2}
integersOnly
tickFormat={(value) => xAxisFormatter.convert(value)}
gridLine={gridLineStyle}
style={verticalAxisStyle}
/>
<Axis
id="discover-histogram-bottom-axis"
position={Position.Bottom}
tickFormat={formatXValue}
ticks={10}
timeAxisLayerCount={useLegacyTimeAxis ? 0 : 2}
gridLine={gridLineStyle}
style={xAxisStyle}
/>
<CurrentTime isDarkMode={isDarkMode} domainEnd={domainEnd} />
<Endzones
Expand All @@ -222,6 +272,7 @@ export function DiscoverHistogram({
xAccessor="x"
yAccessors={['y']}
data={data}
yNice
timeZone={timeZone}
name={chartData.yAxisLabel}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ export const stackManagementSchema: MakeSchemaFrom<UsageStats> = {
type: 'text',
_meta: { description: 'Non-default value of setting.' },
},
'visualization:useLegacyTimeAxis': {
type: 'boolean',
_meta: { description: 'Non-default value of setting.' },
},
'visualization:regionmap:showWarnings': {
type: 'boolean',
_meta: { description: 'Non-default value of setting.' },
Expand Down Expand Up @@ -436,10 +440,6 @@ export const stackManagementSchema: MakeSchemaFrom<UsageStats> = {
type: 'boolean',
_meta: { description: 'Non-default value of setting.' },
},
'labs:canvas:byValueEmbeddable': {
type: 'boolean',
_meta: { description: 'Non-default value of setting.' },
},
'labs:canvas:useDataService': {
type: 'boolean',
_meta: { description: 'Non-default value of setting.' },
Expand Down
Loading

0 comments on commit af00b45

Please sign in to comment.