Skip to content

Commit

Permalink
Merge branch 'master' into d/2021-10-18-scss-in-packages
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Oct 29, 2021
2 parents f61f811 + ddf092f commit 269d319
Show file tree
Hide file tree
Showing 97 changed files with 2,635 additions and 2,015 deletions.
2 changes: 0 additions & 2 deletions .buildkite/pipelines/performance/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ steps:
agents:
queue: ci-group-6
depends_on: build
concurrency: 50
concurrency_group: 'performance-test-group'

- wait: ~
continue_on_failure: true
Expand Down
2 changes: 2 additions & 0 deletions .buildkite/scripts/steps/functional/performance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ cat << EOF | buildkite-agent pipeline upload
steps:
- command: .buildkite/scripts/steps/functional/performance_sub.sh
parallelism: "$ITERATION_COUNT"
concurrency: 20
concurrency_group: 'performance-test-group'
EOF


Expand Down
27 changes: 0 additions & 27 deletions .github/workflows/sync-main-branch.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ readonly links: {
readonly ingest: Record<string, string>;
readonly fleet: Readonly<{
datastreamsILM: string;
beatsAgentComparison: string;
guide: string;
fleetServer: string;
fleetServerAddFleetServer: string;
Expand Down

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,7 @@
"cypress": "^8.5.0",
"cypress-axe": "^0.13.0",
"cypress-cucumber-preprocessor": "^2.5.2",
"cypress-file-upload": "^5.0.8",
"cypress-multi-reporters": "^1.5.0",
"cypress-pipe": "^2.0.0",
"cypress-real-events": "^1.5.1",
Expand Down
2 changes: 2 additions & 0 deletions src/core/public/doc_links/doc_links_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,7 @@ export class DocLinksService {
settingsFleetServerHostSettings: `${FLEET_DOCS}fleet-settings.html#fleet-server-hosts-setting`,
troubleshooting: `${FLEET_DOCS}fleet-troubleshooting.html`,
elasticAgent: `${FLEET_DOCS}elastic-agent-installation.html`,
beatsAgentComparison: `${FLEET_DOCS}beats-agent-comparison.html`,
datastreams: `${FLEET_DOCS}data-streams.html`,
datastreamsILM: `${FLEET_DOCS}data-streams.html#data-streams-ilm`,
datastreamsNamingScheme: `${FLEET_DOCS}data-streams.html#data-streams-naming-scheme`,
Expand Down Expand Up @@ -736,6 +737,7 @@ export interface DocLinksStart {
readonly ingest: Record<string, string>;
readonly fleet: Readonly<{
datastreamsILM: string;
beatsAgentComparison: string;
guide: string;
fleetServer: string;
fleetServerAddFleetServer: string;
Expand Down
1 change: 1 addition & 0 deletions src/core/public/public.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,7 @@ export interface DocLinksStart {
readonly ingest: Record<string, string>;
readonly fleet: Readonly<{
datastreamsILM: string;
beatsAgentComparison: string;
guide: string;
fleetServer: string;
fleetServerAddFleetServer: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ function RevealImageComponent({
return imgStyles;
}

const additionaAlignerStyles: AlignerStyles = {};
const additionalAlignerStyles: AlignerStyles = {};

if (isValidUrl(emptyImage ?? '')) {
// only use empty image if one is provided
additionaAlignerStyles.backgroundImage = `url(${emptyImage})`;
additionalAlignerStyles.backgroundImage = `url(${emptyImage})`;
}

let additionalImgStyles: ImageStyles = {};
Expand All @@ -136,10 +136,10 @@ function RevealImageComponent({
return (
<div
className="revealImageAligner"
css={css({
css={{
...revealImageAlignerStyle,
...additionaAlignerStyles,
})}
...additionalAlignerStyles,
}}
>
<img
ref={imgRef}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import React from 'react';
import { getRenderedHref } from '../../../../utils/testHelpers';
import { MLExplorerLink } from './MLExplorerLink';

// FLAKY: https://github.com/elastic/kibana/issues/113695
describe.skip('MLExplorerLink', () => {
describe('MLExplorerLink', () => {
it('should produce the correct URL with jobId', async () => {
const href = await getRenderedHref(
() => (
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { preprocessLegacyFields } from './get_apm_package_policy_definition';

const apmServerSchema = {
'apm-server.host': '0.0.0.0:8200',
'apm-server.secret_token': 'asdfkjhasdf',
'apm-server.read_timeout': 3600,
'apm-server.rum.event_rate.limit': 100,
'apm-server.rum.event_rate.lru_size': 100,
'apm-server.rum.allow_service_names': 'opbeans-test',
'logging.level': 'error',
'queue.mem.events': 2000,
'queue.mem.flush.timeout': '1s',
'setup.template.settings.index.number_of_jshards': 1,
};

describe('get_apm_package_policy_definition', () => {
describe('preprocessLegacyFields', () => {
it('should replace legacy fields with supported fields', () => {
const result = preprocessLegacyFields({ apmServerSchema });
expect(result).toMatchInlineSnapshot(`
Object {
"apm-server.auth.anonymous.allow_service": "opbeans-test",
"apm-server.auth.anonymous.rate_limit.event_limit": 100,
"apm-server.auth.anonymous.rate_limit.ip_limit": 100,
"apm-server.auth.secret_token": "asdfkjhasdf",
"apm-server.host": "0.0.0.0:8200",
"apm-server.read_timeout": 3600,
"logging.level": "error",
"queue.mem.events": 2000,
"queue.mem.flush.timeout": "1s",
"setup.template.settings.index.number_of_jshards": 1,
}
`);
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function getApmPackagePolicyDefinition(
};
}

function preprocessLegacyFields({
export function preprocessLegacyFields({
apmServerSchema,
}: {
apmServerSchema: Record<string, any>;
Expand All @@ -64,6 +64,10 @@ function preprocessLegacyFields({
key: 'apm-server.auth.anonymous.allow_service',
legacyKey: 'apm-server.rum.allow_service_names',
},
{
key: 'apm-server.auth.secret_token',
legacyKey: 'apm-server.secret_token',
},
].forEach(({ key, legacyKey }) => {
if (!copyOfApmServerSchema[key]) {
copyOfApmServerSchema[key] = copyOfApmServerSchema[legacyKey];
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { SavedObjectsClientContract } from 'kibana/server';
import { getUnsupportedApmServerSchema } from './get_unsupported_apm_server_schema';

const apmServerSchema = {
'apm-server.host': '0.0.0.0:8200',
'apm-server.secret_token': 'asdfkjhasdf',
'apm-server.read_timeout': 3600,
'apm-server.rum.event_rate.limit': 100,
'apm-server.rum.event_rate.lru_size': 100,
'apm-server.rum.allow_service_names': 'opbeans-test',
'logging.level': 'error',
'queue.mem.events': 2000,
'queue.mem.flush.timeout': '1s',
'setup.template.settings.index.number_of_jshards': 1,
};

const mockSavaedObectsClient = {
get: () => ({
attributes: { schemaJson: JSON.stringify(apmServerSchema) },
}),
} as unknown as SavedObjectsClientContract;

describe('get_unsupported_apm_server_schema', () => {
describe('getUnsupportedApmServerSchema', () => {
it('should return key-value pairs of unsupported configs', async () => {
const result = await getUnsupportedApmServerSchema({
savedObjectsClient: mockSavaedObectsClient,
});
expect(result).toMatchInlineSnapshot(`
Array [
Object {
"key": "logging.level",
"value": "error",
},
Object {
"key": "queue.mem.events",
"value": 2000,
},
Object {
"key": "queue.mem.flush.timeout",
"value": "1s",
},
Object {
"key": "setup.template.settings.index.number_of_jshards",
"value": 1,
},
]
`);
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ import {
APM_SERVER_SCHEMA_SAVED_OBJECT_TYPE,
APM_SERVER_SCHEMA_SAVED_OBJECT_ID,
} from '../../../common/apm_saved_object_constants';
import { apmConfigMapping } from './get_apm_package_policy_definition';
import {
apmConfigMapping,
preprocessLegacyFields,
} from './get_apm_package_policy_definition';

export async function getUnsupportedApmServerSchema({
savedObjectsClient,
Expand All @@ -24,7 +27,10 @@ export async function getUnsupportedApmServerSchema({
const apmServerSchema: Record<string, any> = JSON.parse(
(attributes as { schemaJson: string }).schemaJson
);
return Object.entries(apmServerSchema)
const preprocessedApmServerSchema = preprocessLegacyFields({
apmServerSchema,
});
return Object.entries(preprocessedApmServerSchema)
.filter(([name]) => !(name in apmConfigMapping))
.map(([key, value]) => ({ key, value }));
}
Loading

0 comments on commit 269d319

Please sign in to comment.