Skip to content

Commit

Permalink
Merge branch 'master' into fix/main-branch
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Oct 28, 2021
2 parents b892eac + 5338e19 commit fd09eb7
Show file tree
Hide file tree
Showing 92 changed files with 519 additions and 1,538 deletions.
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"/>.
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.

4 changes: 2 additions & 2 deletions packages/elastic-apm-synthtrace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ const esEvents = toElasticsearchOutput([

Via the CLI, you can upload scenarios, either using a fixed time range or continuously generating data. Some examples are available in in `src/scripts/examples`. Here's an example for live data:

`$ node packages/elastic-apm-synthtrace/src/scripts/run packages/elastic-apm-generator/src/examples/01_simple_trace.ts --target=http://admin:changeme@localhost:9200 --live`
`$ node packages/elastic-apm-synthtrace/src/scripts/run packages/elastic-apm-synthtrace/src/scripts/examples/01_simple_trace.ts --target=http://admin:changeme@localhost:9200 --live`

For a fixed time window:
`$ node packages/elastic-apm-synthtrace/src/scripts/run packages/elastic-apm-generator/src/examples/01_simple_trace.ts --target=http://admin:changeme@localhost:9200 --from=now-24h --to=now`
`$ node packages/elastic-apm-synthtrace/src/scripts/run packages/elastic-apm-synthtrace/src/scripts/examples/01_simple_trace.ts --target=http://admin:changeme@localhost:9200 --from=now-24h --to=now`

The script will try to automatically find bootstrapped APM indices. __If these indices do not exist, the script will exit with an error. It will not bootstrap the indices itself.__

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 @@ -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 @@ -440,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
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ export interface UsageStats {
'banners:textColor': string;
'banners:backgroundColor': string;
'labs:canvas:enable_ui': boolean;
'labs:canvas:byValueEmbeddable': boolean;
'labs:canvas:useDataService': boolean;
'labs:presentation:timeToPresent': boolean;
'labs:dashboard:enable_ui': boolean;
Expand Down
17 changes: 1 addition & 16 deletions src/plugins/presentation_util/common/labs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ import { i18n } from '@kbn/i18n';
export const LABS_PROJECT_PREFIX = 'labs:';
export const DEFER_BELOW_FOLD = `${LABS_PROJECT_PREFIX}dashboard:deferBelowFold` as const;
export const DASHBOARD_CONTROLS = `${LABS_PROJECT_PREFIX}dashboard:dashboardControls` as const;
export const BY_VALUE_EMBEDDABLE = `${LABS_PROJECT_PREFIX}canvas:byValueEmbeddable` as const;

export const projectIDs = [DEFER_BELOW_FOLD, DASHBOARD_CONTROLS, BY_VALUE_EMBEDDABLE] as const;
export const projectIDs = [DEFER_BELOW_FOLD, DASHBOARD_CONTROLS] as const;
export const environmentNames = ['kibana', 'browser', 'session'] as const;
export const solutionNames = ['canvas', 'dashboard', 'presentation'] as const;

Expand Down Expand Up @@ -50,19 +48,6 @@ export const projects: { [ID in ProjectID]: ProjectConfig & { id: ID } } = {
}),
solutions: ['dashboard'],
},
[BY_VALUE_EMBEDDABLE]: {
id: BY_VALUE_EMBEDDABLE,
isActive: true,
isDisplayed: true,
environments: ['kibana', 'browser', 'session'],
name: i18n.translate('presentationUtil.labs.enableByValueEmbeddableName', {
defaultMessage: 'By-Value Embeddables',
}),
description: i18n.translate('presentationUtil.labs.enableByValueEmbeddableDescription', {
defaultMessage: 'Enables support for by-value embeddables in Canvas',
}),
solutions: ['canvas'],
},
};

export type ProjectID = typeof projectIDs[number];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,31 +1,11 @@
.quickButtonGroup {
.euiButtonGroup__buttons {
border-radius: $euiBorderRadius;

.quickButtonGroup__button {
background-color: $euiColorEmptyShade;
@include kbnThemeStyle('v8') {
// sass-lint:disable-block no-important
border-width: $euiBorderWidthThin !important;
border-style: solid !important;
border-color: $euiBorderColor !important;
}
}

.quickButtonGroup__button:first-of-type {
@include kbnThemeStyle('v8') {
// sass-lint:disable-block no-important
border-top-left-radius: $euiBorderRadius !important;
border-bottom-left-radius: $euiBorderRadius !important;
}
}

.quickButtonGroup__button:last-of-type {
@include kbnThemeStyle('v8') {
// sass-lint:disable-block no-important
border-top-right-radius: $euiBorderRadius !important;
border-bottom-right-radius: $euiBorderRadius !important;
}
.quickButtonGroup__button {
background-color: $euiColorEmptyShade;
@include kbnThemeStyle('v8') {
// sass-lint:disable-block no-important
border-width: $euiBorderWidthThin !important;
border-style: solid !important;
border-color: $euiBorderColor !important;
}
}
}
6 changes: 0 additions & 6 deletions src/plugins/telemetry/schema/oss_plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -7677,12 +7677,6 @@
"description": "Non-default value of setting."
}
},
"labs:canvas:byValueEmbeddable": {
"type": "boolean",
"_meta": {
"description": "Non-default value of setting."
}
},
"labs:canvas:useDataService": {
"type": "boolean",
"_meta": {
Expand Down
3 changes: 1 addition & 2 deletions test/functional/apps/visualize/_timelion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
expect(value).to.eql('.es()');
});

// FLAKY: https://github.com/elastic/kibana/issues/116033
describe.skip('dynamic suggestions for argument values', () => {
describe('dynamic suggestions for argument values', () => {
describe('.es()', () => {
it('should show index pattern suggestions for index argument', async () => {
await monacoEditor.setCodeEditorValue('');
Expand Down
12 changes: 10 additions & 2 deletions test/functional/page_objects/timelion_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,21 @@
*/

import { FtrService } from '../ftr_provider_context';
import type { WebElementWrapper } from '../services/lib/web_element_wrapper';

export class TimelionPageObject extends FtrService {
private readonly testSubjects = this.ctx.getService('testSubjects');
private readonly retry = this.ctx.getService('retry');

public async getSuggestionItemsText() {
const timelionCodeEditor = await this.testSubjects.find('timelionCodeEditor');
const lists = await timelionCodeEditor.findAllByClassName('monaco-list-row');
let lists: WebElementWrapper[] = [];
await this.retry.try(async () => {
const timelionCodeEditor = await this.testSubjects.find('timelionCodeEditor');
lists = await timelionCodeEditor.findAllByClassName('monaco-list-row');
if (lists.length === 0) {
throw new Error('suggestion list not populated');
}
});
return await Promise.all(lists.map(async (element) => await element.getVisibleText()));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide
});
});

describe('Delete modal', () => {
// FLAKY: https://github.com/elastic/kibana/issues/116059
describe.skip('Delete modal', () => {
it('should display a warning then trying to delete hidden saved objects', async () => {
await PageObjects.savedObjects.clickCheckboxByTitle('A Pie');
await PageObjects.savedObjects.clickCheckboxByTitle('A Dashboard');
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/apm/ftr_e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ APM uses [FTR](../../../../packages/kbn-test/README.md) (functional test runner)

## Running tests

Go to [tests documentation](../scripts/test#e2e-tests-cypress/README.md)
Go to [tests documentation](../dev_docs/testing.md#e2e-tests-cypress)
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/*
* 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.
*/

const timeRange = {
rangeFrom: Cypress.env('START_DATE'),
rangeTo: Cypress.env('END_DATE'),
};

describe('Dependencies', () => {
beforeEach(() => {
cy.loginAsReadOnlyUser();
});

describe('top-level dependencies page', () => {
it('has a list of dependencies and you can navigate to the page for one', () => {
cy.visit(`/app/apm/services?${new URLSearchParams(timeRange)}`);
cy.contains('nav a', 'Dependencies').click();

// `force: true` because Cypress says the element is 0x0
cy.contains('postgresql').click({ force: true });

cy.contains('h1', 'postgresql');
});
});

describe('dependency overview page', () => {
it('shows dependency information and you can navigate to a page for an upstream service', () => {
cy.visit(
`/app/apm/backends/overview?${new URLSearchParams({
...timeRange,
backendName: 'postgresql',
})}`
);

cy.get('[data-test-subj="latencyChart"]');
cy.get('[data-test-subj="throughputChart"]');
cy.get('[data-test-subj="errorRateChart"]');

cy.contains('opbeans-python').click({ force: true });

cy.contains('h1', 'opbeans-python');
});
});

describe('service overview page', () => {
it('shows dependency information and you can navigate to a page for a dependency', () => {
cy.visit(
`/app/apm/services/opbeans-python/overview?${new URLSearchParams(
timeRange
)}`
);

cy.contains('postgresql').click({ force: true });

cy.contains('h1', 'postgresql');
});
});

describe('service dependencies tab', () => {
it('shows dependency information and you can navigate to a page for a dependency', () => {
cy.visit(
`/app/apm/services/opbeans-python/overview?${new URLSearchParams(
timeRange
)}`
);

cy.contains('a[role="tab"]', 'Dependencies').click();

cy.contains('Time spent by dependency');

cy.contains('postgresql').click({ force: true });

cy.contains('h1', 'postgresql');
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
*/

import { ExpressionTypeDefinition } from '../../../../../src/plugins/expressions';
import { EmbeddableInput } from '../../types';
import { EmbeddableInput } from '../../../../../src/plugins/embeddable/common/';
import { EmbeddableTypes } from './embeddable_types';

export const EmbeddableExpressionType = 'embeddable';
export { EmbeddableTypes, EmbeddableInput };

export interface EmbeddableExpression<Input extends EmbeddableInput> {
/**
* The type of the expression result
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,21 @@
*/

import { functions as commonFunctions } from '../common';
import { functions as externalFunctions } from '../external';
import { location } from './location';
import { markdown } from './markdown';
import { urlparam } from './urlparam';
import { escount } from './escount';
import { esdocs } from './esdocs';
import { essql } from './essql';

export const functions = [location, markdown, urlparam, escount, esdocs, essql, ...commonFunctions];
export const functions = [
location,
markdown,
urlparam,
escount,
esdocs,
essql,
...commonFunctions,
...externalFunctions,
];
Loading

0 comments on commit fd09eb7

Please sign in to comment.