Skip to content

Commit

Permalink
Merge branch '7.17' into backport/7.17/pr-132455
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Jun 1, 2022
2 parents 9264602 + 2eee19d commit 8cd62c0
Show file tree
Hide file tree
Showing 12 changed files with 71 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ non-dev version and accepts any of the
https://www.elastic.co/guide/en/kibana/current/settings.html[standard
settings].

[discrete]
=== Using an Alternate YML File

To run Kibana with an alternate yml file, use the `--config` option to specify the path to the desired yml file. For example: `yarn start --config=config/my_config.yml`

[discrete]
=== Potential Optimization Pitfalls

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
"d3-array": "1.2.4",
"d3-cloud": "1.2.5",
"d3-interpolate": "^3.0.1",
"d3-scale": "1.0.7",
"d3-scale": "^2.2.2",
"d3-shape": "^1.1.0",
"d3-time": "^1.1.0",
"dedent": "^0.7.0",
Expand Down Expand Up @@ -514,7 +514,7 @@
"@types/d3": "^3.5.43",
"@types/d3-array": "^1.2.7",
"@types/d3-interpolate": "^2.0.0",
"@types/d3-scale": "^2.1.1",
"@types/d3-scale": "^2.2.6",
"@types/d3-shape": "^1.3.1",
"@types/d3-time": "^1.0.10",
"@types/d3-time-format": "^2.1.1",
Expand Down
6 changes: 3 additions & 3 deletions test/package/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@ Vagrant.configure("2") do |config|
config.vm.boot_timeout = 600
config.vm.define "deb" do |deb|
deb.vm.box = 'elastic/debian-9-x86_64'
deb.vm.provision "ansible" do |ansible|
deb.vm.provision "ansible_local" do |ansible|
ansible.playbook = "deb.yml"
end
deb.vm.network "private_network", ip: "192.168.56.5"
end

config.vm.define "rpm" do |rpm|
rpm.vm.box = 'elastic/centos-7-x86_64'
rpm.vm.provision "ansible" do |ansible|
rpm.vm.provision "ansible_local" do |ansible|
ansible.playbook = "rpm.yml"
end
rpm.vm.network "private_network", ip: "192.168.56.6"
end

config.vm.define "docker" do |docker|
docker.vm.box = 'elastic/ubuntu-18.04-x86_64'
docker.vm.provision "ansible" do |ansible|
docker.vm.provision "ansible_local" do |ansible|
ansible.playbook = "docker.yml"
end
docker.vm.network "private_network", ip: "192.168.56.7"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,14 @@ export function TimelineAxis({

{topTraceDuration > 0 && (
<LastTickValue
x={xScale(topTraceDuration)}
x={xScale(topTraceDuration) ?? 0}
value={topTraceDurationFormatted}
marginTop={28}
/>
)}

{marks.map((mark) => (
<Marker key={mark.id} mark={mark} x={xScale(mark.offset)} />
<Marker key={mark.id} mark={mark} x={xScale(mark.offset) ?? 0} />
))}
</XYPlot>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ export const DensityChart: React.FC<DensityChartProps> = ({
const xScale = scaleLinear().domain([0, xMax]).range([0, width]);

const path = area<LogEntriesSummaryBucket>()
.x0(xScale(0))
.x1((bucket) => xScale(bucket.entriesCount))
.y0((bucket) => yScale(bucket.start))
.y1((bucket) => yScale(bucket.end))
.x0(xScale(0) ?? 0)
.x1((bucket) => xScale(bucket.entriesCount) ?? 0)
.y0((bucket) => yScale(bucket.start) ?? 0)
.y1((bucket) => yScale(bucket.end) ?? 0)
.curve(curveMonotoneY);

const firstBucket = buckets[0];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export class LogMinimap extends React.Component<LogMinimapProps, LogMinimapState
};

public getPositionOfTime = (time: number) => {
return this.getYScale()(time);
return this.getYScale()(time) ?? 0;
};

private updateTimeCursor: React.MouseEventHandler<SVGSVGElement> = (event) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class SearchMarkers extends React.PureComponent<SearchMarkersProps, {}> {
>
<SearchMarker
bucket={bucket}
height={yScale(bucket.end) - yScale(bucket.start)}
height={(yScale(bucket.end) ?? 0) - (yScale(bucket.start) ?? 0)}
width={width}
jumpToTarget={jumpToTarget}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const TimeRuler: React.FC<TimeRulerProps> = ({ end, height, start, tickCo
return (
<g>
{ticks.map((tick, tickIndex) => {
const y = yScale(tick);
const y = yScale(tick) ?? 0;

return (
<g key={`tick${tickIndex}`}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ export const SwimlaneAnnotationContainer: FC<SwimlaneAnnotationContainerProps> =
annotationsData.forEach((d) => {
const annotationWidth = Math.max(
d.end_timestamp
? xScale(Math.min(d.end_timestamp, domain.max)) -
Math.max(xScale(d.timestamp), startingXPos)
? (xScale(Math.min(d.end_timestamp, domain.max)) as number) -
Math.max(xScale(d.timestamp) as number, startingXPos)
: 0,
ANNOTATION_MIN_WIDTH
);

const xPos = d.timestamp >= domain.min ? xScale(d.timestamp) : startingXPos;
const xPos = d.timestamp >= domain.min ? (xScale(d.timestamp) as number) : startingXPos;
svg
.append('rect')
.classed('mlAnnotationRect', true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const SourceArrow = React.memo<{
return (
<EuiFlexGroup alignItems="center" gutterSize="none" justifyContent="center">
<EuiFlexItem grow={false}>
<ArrowBody height={sourceArrowHeight} />
<ArrowBody height={sourceArrowHeight ?? 0} />
</EuiFlexItem>

{sourceBytes != null && !isNaN(Number(sourceBytes)) ? (
Expand All @@ -95,7 +95,7 @@ const SourceArrow = React.memo<{
) : null}

<EuiFlexItem grow={false}>
<ArrowBody data-test-subj="source-arrow" height={sourceArrowHeight} />
<ArrowBody data-test-subj="source-arrow" height={sourceArrowHeight ?? 0} />
</EuiFlexItem>

{sourcePackets != null && !isNaN(Number(sourcePackets)) ? (
Expand All @@ -114,7 +114,7 @@ const SourceArrow = React.memo<{
) : null}

<EuiFlexItem grow={false}>
<ArrowBody height={sourceArrowHeight} />
<ArrowBody height={sourceArrowHeight ?? 0} />
</EuiFlexItem>

<EuiFlexItem grow={false}>
Expand Down Expand Up @@ -158,7 +158,7 @@ const DestinationArrow = React.memo<{
</EuiFlexItem>

<EuiFlexItem grow={false}>
<ArrowBody height={destinationArrowHeight} />
<ArrowBody height={destinationArrowHeight ?? 0} />
</EuiFlexItem>

{destinationBytes != null && !isNaN(Number(destinationBytes)) ? (
Expand All @@ -184,7 +184,7 @@ const DestinationArrow = React.memo<{
) : null}

<EuiFlexItem grow={false}>
<ArrowBody height={destinationArrowHeight} />
<ArrowBody height={destinationArrowHeight ?? 0} />
</EuiFlexItem>

{destinationPackets != null && !isNaN(Number(destinationPackets)) ? (
Expand All @@ -205,7 +205,7 @@ const DestinationArrow = React.memo<{
) : null}

<EuiFlexItem grow={false}>
<ArrowBody height={destinationArrowHeight} />
<ArrowBody height={destinationArrowHeight ?? 0} />
</EuiFlexItem>
</EuiFlexGroup>
);
Expand Down
47 changes: 24 additions & 23 deletions x-pack/test/functional/apps/ml/anomaly_detection/advanced_job.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,19 +151,19 @@ export default function ({ getService }: FtrProviderContext) {
},
{
suiteTitle: 'with categorization detector and default datafeed settings',
jobSource: 'ft_ecommerce',
jobId: `ec_advanced_2_${Date.now()}`,
jobSource: 'ft_categorization_small',
jobId: `categorization_advanced_2_${Date.now()}`,
get jobIdClone(): string {
return `${this.jobId}_clone`;
},
jobDescription:
'Create advanced job from ft_ecommerce dataset with a categorization detector and default datafeed settings',
jobGroups: ['automated', 'ecommerce', 'advanced'],
'Create advanced job from ft_categorization_small dataset with a categorization detector and default datafeed settings',
jobGroups: ['automated', 'categorization', 'advanced'],
get jobGroupsClone(): string[] {
return [...this.jobGroups, 'clone'];
},
pickFieldsConfig: {
categorizationField: 'products.product_name',
categorizationField: 'field1',
detectors: [
{
identifier: 'count by mlcategory',
Expand All @@ -178,30 +178,30 @@ export default function ({ getService }: FtrProviderContext) {
datafeedConfig: {} as DatafeedConfig,
expected: {
wizard: {
timeField: 'order_date',
timeField: '@timestamp',
},
row: {
recordCount: '4,675',
recordCount: '1,000',
memoryStatus: 'ok',
jobState: 'closed',
datafeedState: 'stopped',
latestTimestamp: '2019-07-12 23:45:36',
latestTimestamp: '2019-11-21 00:01:13',
},
counts: {
processed_record_count: '4,675',
processed_field_count: '4,675',
input_bytes: '354.2 KB',
input_field_count: '4,675',
processed_record_count: '1,000',
processed_field_count: '1,000',
input_bytes: '148.8 KB',
input_field_count: '1,000',
invalid_date_count: '0',
missing_field_count: '0',
out_of_order_timestamp_count: '0',
empty_bucket_count: '0',
empty_bucket_count: '1,073',
sparse_bucket_count: '0',
bucket_count: '185',
earliest_record_timestamp: '2019-06-12 00:04:19',
latest_record_timestamp: '2019-07-12 23:45:36',
input_record_count: '4,675',
latest_bucket_timestamp: '2019-07-12 20:00:00',
bucket_count: '1,378',
earliest_record_timestamp: '2019-04-05 11:25:35',
latest_record_timestamp: '2019-11-21 00:01:13',
input_record_count: '1,000',
latest_bucket_timestamp: '2019-11-21 00:00:00',
},
modelSizeStats: {
result_type: 'model_size_stats',
Expand All @@ -211,20 +211,21 @@ export default function ({ getService }: FtrProviderContext) {
total_partition_field_count: '2',
bucket_allocation_failures_count: '0',
memory_status: 'ok',
timestamp: '2019-07-12 16:00:00',
timestamp: '2019-11-20 20:00:00',
},
},
},
];

const calendarId = `wizard-test-calendar_${Date.now()}`;

// Failing: See https://github.com/elastic/kibana/issues/133020
describe.skip('advanced job', function () {
describe('advanced job', function () {
this.tags(['mlqa']);
before(async () => {
await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/ml/ecommerce');
await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/ml/categorization_small');
await ml.testResources.createIndexPatternIfNeeded('ft_ecommerce', 'order_date');
await ml.testResources.createIndexPatternIfNeeded('ft_categorization_small', '@timestamp');
await ml.testResources.setKibanaTimeZoneToUTC();

await ml.api.createCalendar(calendarId);
Expand All @@ -234,6 +235,7 @@ export default function ({ getService }: FtrProviderContext) {
after(async () => {
await ml.api.cleanMlIndices();
await ml.testResources.deleteIndexPatternByTitle('ft_ecommerce');
await ml.testResources.deleteIndexPatternByTitle('ft_categorization_small');
});

for (const testData of testDataList) {
Expand Down Expand Up @@ -421,8 +423,7 @@ export default function ({ getService }: FtrProviderContext) {
await ml.jobWizardCommon.advanceToSummarySection();
});

// Failing ES Promotion: https://buildkite.com/elastic/kibana-elasticsearch-snapshot-verify/builds/1253
it.skip('job creation runs the job and displays it correctly in the job list', async () => {
it('job creation runs the job and displays it correctly in the job list', async () => {
await ml.testExecution.logTestStep(
'job creation creates the job and finishes processing'
);
Expand Down
26 changes: 19 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5330,12 +5330,12 @@
resolved "https://registry.yarnpkg.com/@types/d3-path/-/d3-path-1.0.7.tgz#a0736fceed688a695f48265a82ff7a3369414b81"
integrity sha512-U8dFRG+8WhkLJr2sxZ9Cw/5WeRgBnNqMxGdA1+Z0+ZG6tK0s75OQ4OXnxeyfKuh6E4wQPY8OAKr1+iNDx01BEQ==

"@types/d3-scale@^2.1.1":
version "2.1.1"
resolved "https://registry.yarnpkg.com/@types/d3-scale/-/d3-scale-2.1.1.tgz#405e58771ec6ae7b8f7b4178ee1887620759e8f7"
integrity sha512-kNTkbZQ+N/Ip8oX9PByXfDLoCSaZYm+VUOasbmsa6KD850/ziMdYepg/8kLg2plHzoLANdMqPoYQbvExevLUHg==
"@types/d3-scale@^2.2.6":
version "2.2.6"
resolved "https://registry.yarnpkg.com/@types/d3-scale/-/d3-scale-2.2.6.tgz#28540b4dfc99d978970e873e4138a6bea2ea6ab8"
integrity sha512-CHu34T5bGrJOeuhGxyiz9Xvaa9PlsIaQoOqjDg7zqeGj2x0rwPhGquiy03unigvcMxmvY0hEaAouT0LOFTLpIw==
dependencies:
"@types/d3-time" "*"
"@types/d3-time" "^1"

"@types/d3-shape@^1.3.1":
version "1.3.1"
Expand All @@ -5349,7 +5349,7 @@
resolved "https://registry.yarnpkg.com/@types/d3-time-format/-/d3-time-format-2.1.1.tgz#dd2c79ec4575f1355484ab6b10407824668eba42"
integrity sha512-tJSyXta8ZyJ52wDDHA96JEsvkbL6jl7wowGmuf45+fAkj5Y+SQOnz0N7/H68OWmPshPsAaWMQh+GAws44IzH3g==

"@types/d3-time@*", "@types/d3-time@^1.0.10":
"@types/d3-time@^1", "@types/d3-time@^1.0.10":
version "1.0.10"
resolved "https://registry.yarnpkg.com/@types/d3-time/-/d3-time-1.0.10.tgz#d338c7feac93a98a32aac875d1100f92c7b61f4f"
integrity sha512-aKf62rRQafDQmSiv1NylKhIMmznsjRN+MnXRXTqHoqm0U/UZzVpdrtRnSIfdiLS616OuC1soYeX1dBg2n1u8Xw==
Expand Down Expand Up @@ -11274,7 +11274,7 @@ d3-sankey@^0.7.1:
d3-collection "1"
d3-shape "^1.2.0"

d3-scale@1.0.7, d3-scale@^1.0.5, d3-scale@^1.0.7:
d3-scale@^1.0.5, d3-scale@^1.0.7:
version "1.0.7"
resolved "https://registry.yarnpkg.com/d3-scale/-/d3-scale-1.0.7.tgz#fa90324b3ea8a776422bd0472afab0b252a0945d"
integrity sha512-KvU92czp2/qse5tUfGms6Kjig0AhHOwkzXG0+PqIJB3ke0WUv088AHMZI0OssO9NCkXt4RP8yju9rpH8aGB7Lw==
Expand All @@ -11287,6 +11287,18 @@ d3-scale@1.0.7, d3-scale@^1.0.5, d3-scale@^1.0.7:
d3-time "1"
d3-time-format "2"

d3-scale@^2.2.2:
version "2.2.2"
resolved "https://registry.yarnpkg.com/d3-scale/-/d3-scale-2.2.2.tgz#4e880e0b2745acaaddd3ede26a9e908a9e17b81f"
integrity sha512-LbeEvGgIb8UMcAa0EATLNX0lelKWGYDQiPdHj+gLblGVhGLyNbaCn3EvrJf0A3Y/uOOU5aD6MTh5ZFCdEwGiCw==
dependencies:
d3-array "^1.2.0"
d3-collection "1"
d3-format "1"
d3-interpolate "1"
d3-time "1"
d3-time-format "2"

d3-scale@^4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/d3-scale/-/d3-scale-4.0.2.tgz#82b38e8e8ff7080764f8dcec77bd4be393689396"
Expand Down

0 comments on commit 8cd62c0

Please sign in to comment.