From 3c56371153cad2c99d94511299b2aba7dd4225ea Mon Sep 17 00:00:00 2001 From: Andrea Villaverde Date: Thu, 2 Jul 2020 17:01:31 +0200 Subject: [PATCH 1/9] Update known-plugins.asciidoc (#69370) Co-authored-by: Elastic Machine --- docs/plugins/known-plugins.asciidoc | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/plugins/known-plugins.asciidoc b/docs/plugins/known-plugins.asciidoc index cd07596ad37ef5e..8fc2b7381de8352 100644 --- a/docs/plugins/known-plugins.asciidoc +++ b/docs/plugins/known-plugins.asciidoc @@ -59,6 +59,7 @@ This list of plugins is not guaranteed to work on your version of Kibana. Instea * https://github.com/sbeyn/kibana-plugin-traffic-sg[Traffic] (sbeyn) * https://github.com/PhaedrusTheGreek/transform_vis[Transform Visualization] (PhaedrusTheGreek) * https://github.com/nyurik/kibana-vega-vis[Vega-based visualizations] (nyurik) - Support for user-defined graphs, external data sources, maps, images, and user-defined interactivity. +* https://github.com/Camichan/kbn_aframe[VR Graph Visualizations] (Camichan) [float] === Other From 59ece7992b29597b83f2acc78268c51fc1675de5 Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Thu, 2 Jul 2020 08:24:42 -0700 Subject: [PATCH 2/9] Make Index Management functional and API integration tests robust against side effects introduced by Ingest Manager. (#70533) --- .../apis/management/index_management/templates.js | 8 ++++---- .../test/functional/apps/index_management/home_page.ts | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/x-pack/test/api_integration/apis/management/index_management/templates.js b/x-pack/test/api_integration/apis/management/index_management/templates.js index 003fb21b09ccc59..fcee8ed6a183fc3 100644 --- a/x-pack/test/api_integration/apis/management/index_management/templates.js +++ b/x-pack/test/api_integration/apis/management/index_management/templates.js @@ -24,8 +24,7 @@ export default function ({ getService }) { updateTemplate, } = registerHelpers({ supertest }); - // blocking es snapshot promotion: https://github.com/elastic/kibana/issues/70532 - describe.skip('index templates', () => { + describe('index templates', () => { after(() => Promise.all([cleanUpEsResources()])); describe('get all', () => { @@ -41,8 +40,9 @@ export default function ({ getService }) { it('should list all the index templates with the expected parameters', async () => { const { body: allTemplates } = await getAllTemplates().expect(200); - // Composable templates - expect(allTemplates.templates).to.eql([]); + // Composable index templates may have been created by other apps, e.g. Ingest Manager, + // so we don't make any assertion about these contents. + expect(allTemplates.templates).to.be.an('array'); // Legacy templates const legacyTemplate = allTemplates.legacyTemplates.find( diff --git a/x-pack/test/functional/apps/index_management/home_page.ts b/x-pack/test/functional/apps/index_management/home_page.ts index b5b0197aad4b325..eab90e1fc19cffe 100644 --- a/x-pack/test/functional/apps/index_management/home_page.ts +++ b/x-pack/test/functional/apps/index_management/home_page.ts @@ -13,8 +13,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const log = getService('log'); const browser = getService('browser'); - // blocking es snapshot promotion: https://github.com/elastic/kibana/issues/70532 - describe.skip('Home page', function () { + describe('Home page', function () { before(async () => { await pageObjects.common.navigateToApp('indexManagement'); }); @@ -82,9 +81,10 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const url = await browser.getCurrentUrl(); expect(url).to.contain(`/component_templates`); - // There should be no component templates by default, so we verify the empty prompt displays - const componentTemplateEmptyPrompt = await testSubjects.exists('emptyList'); - expect(componentTemplateEmptyPrompt).to.be(true); + // Verify content. Component templates may have been created by other apps, e.g. Ingest Manager, + // so we don't make any assertion about the presence or absence of component templates. + const componentTemplateList = await testSubjects.exists('componentTemplateList'); + expect(componentTemplateList).to.be(true); }); }); }); From 8a09f247e30987eff89824fc007953b815670fa3 Mon Sep 17 00:00:00 2001 From: Michael Hirsch Date: Thu, 2 Jul 2020 11:35:40 -0400 Subject: [PATCH 3/9] [ML] Updates APM Module to Work with Service Maps (#70361) * updates apm integration job to work with service maps * rename apm job in setup_module test * modifies detector description Co-authored-by: Elastic Machine --- .../modules/apm_transaction/manifest.json | 16 ++++----- ...afeed_high_mean_transaction_duration.json} | 2 +- .../ml/high_mean_response_time.json | 30 ---------------- .../ml/high_mean_transaction_duration.json | 35 +++++++++++++++++++ .../apis/ml/modules/setup_module.ts | 2 +- 5 files changed, 45 insertions(+), 40 deletions(-) rename x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/ml/{datafeed_high_mean_response_time.json => datafeed_high_mean_transaction_duration.json} (75%) delete mode 100644 x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/ml/high_mean_response_time.json create mode 100644 x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/ml/high_mean_transaction_duration.json diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/manifest.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/manifest.json index 5e185e80a60386c..f8feaef3be5f85c 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/manifest.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/manifest.json @@ -1,29 +1,29 @@ { "id": "apm_transaction", "title": "APM", - "description": "Detect anomalies in high mean of transaction duration (ECS).", + "description": "Detect anomalies in transactions from your APM services.", "type": "Transaction data", "logoFile": "logo.json", - "defaultIndexPattern": "apm-*", + "defaultIndexPattern": "apm-*-transaction", "query": { "bool": { "filter": [ { "term": { "processor.event": "transaction" } }, - { "term": { "transaction.type": "request" } } + { "exists": { "field": "transaction.duration" } } ] } }, "jobs": [ { - "id": "high_mean_response_time", - "file": "high_mean_response_time.json" + "id": "high_mean_transaction_duration", + "file": "high_mean_transaction_duration.json" } ], "datafeeds": [ { - "id": "datafeed-high_mean_response_time", - "file": "datafeed_high_mean_response_time.json", - "job_id": "high_mean_response_time" + "id": "datafeed-high_mean_transaction_duration", + "file": "datafeed_high_mean_transaction_duration.json", + "job_id": "high_mean_transaction_duration" } ] } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/ml/datafeed_high_mean_response_time.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/ml/datafeed_high_mean_transaction_duration.json similarity index 75% rename from x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/ml/datafeed_high_mean_response_time.json rename to x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/ml/datafeed_high_mean_transaction_duration.json index dc37d05d181110b..d312577902f517c 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/ml/datafeed_high_mean_response_time.json +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/ml/datafeed_high_mean_transaction_duration.json @@ -7,7 +7,7 @@ "bool": { "filter": [ { "term": { "processor.event": "transaction" } }, - { "term": { "transaction.type": "request" } } + { "exists": { "field": "transaction.duration.us" } } ] } } diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/ml/high_mean_response_time.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/ml/high_mean_response_time.json deleted file mode 100644 index f6c230a6792fb3a..000000000000000 --- a/x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/ml/high_mean_response_time.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "job_type": "anomaly_detector", - "groups": [ - "apm" - ], - "description": "Detect anomalies in high mean of transaction duration", - "analysis_config": { - "bucket_span": "15m", - "detectors": [ - { - "detector_description": "high_mean(\"transaction.duration.us\")", - "function": "high_mean", - "field_name": "transaction.duration.us" - } - ], - "influencers": [] - }, - "analysis_limits": { - "model_memory_limit": "10mb" - }, - "data_description": { - "time_field": "@timestamp" - }, - "model_plot_config": { - "enabled": true - }, - "custom_settings": { - "created_by": "ml-module-apm-transaction" - } -} diff --git a/x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/ml/high_mean_transaction_duration.json b/x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/ml/high_mean_transaction_duration.json new file mode 100644 index 000000000000000..77284cb275cd8df --- /dev/null +++ b/x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/ml/high_mean_transaction_duration.json @@ -0,0 +1,35 @@ +{ + "job_type": "anomaly_detector", + "groups": [ + "apm" + ], + "description": "Detect transaction duration anomalies across transaction types for your APM services.", + "analysis_config": { + "bucket_span": "15m", + "detectors": [ + { + "detector_description": "high duration by transaction type for an APM service", + "function": "high_mean", + "field_name": "transaction.duration.us", + "by_field_name": "transaction.type", + "partition_field_name": "service.name" + } + ], + "influencers": [ + "transaction.type", + "service.name" + ] + }, + "analysis_limits": { + "model_memory_limit": "32mb" + }, + "data_description": { + "time_field": "@timestamp" + }, + "model_plot_config": { + "enabled": true + }, + "custom_settings": { + "created_by": "ml-module-apm-transaction" + } +} diff --git a/x-pack/test/api_integration/apis/ml/modules/setup_module.ts b/x-pack/test/api_integration/apis/ml/modules/setup_module.ts index 1c98cd3a4e379be..10c0f00234abc59 100644 --- a/x-pack/test/api_integration/apis/ml/modules/setup_module.ts +++ b/x-pack/test/api_integration/apis/ml/modules/setup_module.ts @@ -218,7 +218,7 @@ export default ({ getService }: FtrProviderContext) => { responseCode: 200, jobs: [ { - jobId: 'pf5_high_mean_response_time', + jobId: 'pf5_high_mean_transaction_duration', jobState: JOB_STATE.CLOSED, datafeedState: DATAFEED_STATE.STOPPED, modelMemoryLimit: '11mb', From 55922cb9a083007f7f14775d18873478ac09d1ae Mon Sep 17 00:00:00 2001 From: patrykkopycinski Date: Thu, 2 Jul 2020 17:37:29 +0200 Subject: [PATCH 4/9] [Security Solution] Reposition EuiPopovers on scroll (#69433) * [Security Solution] Reposition EuiPopovers on scroll * update snapshots Co-authored-by: Elastic Machine --- src/plugins/data/public/ui/filter_bar/filter_bar.tsx | 1 + src/plugins/data/public/ui/filter_bar/filter_options.tsx | 1 + .../data/public/ui/query_string_input/language_switcher.tsx | 1 + .../saved_query_management/saved_query_management_component.tsx | 1 + .../rule_actions_overflow/__snapshots__/index.test.tsx.snap | 1 + .../alerts/components/rules/rule_actions_overflow/index.tsx | 1 + .../rules/all/rules_table_filters/tags_filter_popover.tsx | 1 + .../public/cases/components/filter_popover/index.tsx | 1 + .../public/cases/components/property_actions/index.tsx | 1 + .../components/exceptions/viewer/exceptions_pagination.tsx | 1 + .../ml/score/__snapshots__/anomaly_score.test.tsx.snap | 1 + .../public/common/components/ml/score/anomaly_score.tsx | 1 + .../filters/__snapshots__/groups_filter_popover.test.tsx.snap | 1 + .../ml_popover/jobs_table/filters/groups_filter_popover.tsx | 1 + .../public/common/components/ml_popover/ml_popover.tsx | 2 ++ .../public/common/components/paginated_table/index.tsx | 1 + .../public/common/components/tables/helpers.tsx | 1 + .../public/common/components/utility_bar/utility_bar_action.tsx | 1 + .../public/management/pages/policy/view/policy_list.tsx | 1 + .../plugins/security_solution/public/resolver/view/submenu.tsx | 1 + .../timelines/components/field_renderers/field_renderers.tsx | 1 + .../components/timeline/body/events/event_column_view.tsx | 1 + .../components/timeline/insert_timeline_popover/index.tsx | 1 + .../components/timeline/properties/properties_right.tsx | 1 + 24 files changed, 25 insertions(+) diff --git a/src/plugins/data/public/ui/filter_bar/filter_bar.tsx b/src/plugins/data/public/ui/filter_bar/filter_bar.tsx index 43dba150bf8d44b..fdd952e2207d93c 100644 --- a/src/plugins/data/public/ui/filter_bar/filter_bar.tsx +++ b/src/plugins/data/public/ui/filter_bar/filter_bar.tsx @@ -109,6 +109,7 @@ function FilterBarUI(props: Props) { panelPaddingSize="none" ownFocus={true} initialFocus=".filterEditor__hiddenItem" + repositionOnScroll >
diff --git a/src/plugins/data/public/ui/filter_bar/filter_options.tsx b/src/plugins/data/public/ui/filter_bar/filter_options.tsx index 3fb7f198d5466a6..b97e0e33f2400b8 100644 --- a/src/plugins/data/public/ui/filter_bar/filter_options.tsx +++ b/src/plugins/data/public/ui/filter_bar/filter_options.tsx @@ -167,6 +167,7 @@ class FilterOptionsUI extends Component { anchorPosition="rightUp" panelPaddingSize="none" withTitle + repositionOnScroll > setIsPopoverOpen(false)} withTitle + repositionOnScroll >
diff --git a/x-pack/plugins/security_solution/public/alerts/pages/detection_engine/rules/all/rules_table_filters/tags_filter_popover.tsx b/x-pack/plugins/security_solution/public/alerts/pages/detection_engine/rules/all/rules_table_filters/tags_filter_popover.tsx index b453125223c3078..fd75c229d479d2d 100644 --- a/x-pack/plugins/security_solution/public/alerts/pages/detection_engine/rules/all/rules_table_filters/tags_filter_popover.tsx +++ b/x-pack/plugins/security_solution/public/alerts/pages/detection_engine/rules/all/rules_table_filters/tags_filter_popover.tsx @@ -61,6 +61,7 @@ export const TagsFilterPopoverComponent = ({ isOpen={isTagPopoverOpen} closePopover={() => setIsTagPopoverOpen(!isTagPopoverOpen)} panelPaddingSize="none" + repositionOnScroll > {tags.map((tag, index) => ( diff --git a/x-pack/plugins/security_solution/public/cases/components/filter_popover/index.tsx b/x-pack/plugins/security_solution/public/cases/components/filter_popover/index.tsx index 7b66bcffc89a12b..4c16a8c0f3243db 100644 --- a/x-pack/plugins/security_solution/public/cases/components/filter_popover/index.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/filter_popover/index.tsx @@ -84,6 +84,7 @@ export const FilterPopoverComponent = ({ isOpen={isPopoverOpen} closePopover={setIsPopoverOpenCb} panelPaddingSize="none" + repositionOnScroll > {options.map((option, index) => ( diff --git a/x-pack/plugins/security_solution/public/cases/components/property_actions/index.tsx b/x-pack/plugins/security_solution/public/cases/components/property_actions/index.tsx index 6b8e00921abcb74..29f1a2c5a14955d 100644 --- a/x-pack/plugins/security_solution/public/cases/components/property_actions/index.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/property_actions/index.tsx @@ -71,6 +71,7 @@ export const PropertyActions = React.memo(({ propertyActio id="settingsPopover" isOpen={showActions} closePopover={onClosePopover} + repositionOnScroll > diff --git a/x-pack/plugins/security_solution/public/common/components/ml/score/__snapshots__/anomaly_score.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/ml/score/__snapshots__/anomaly_score.test.tsx.snap index a9ec474a7b68405..6694cec53987b22 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/score/__snapshots__/anomaly_score.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/common/components/ml/score/__snapshots__/anomaly_score.test.tsx.snap @@ -95,6 +95,7 @@ exports[`anomaly_scores renders correctly against snapshot 1`] = ` onClick={[Function]} ownFocus={false} panelPaddingSize="m" + repositionOnScroll={true} > setIsOpen(!isOpen)} closePopover={() => setIsOpen(!isOpen)} button={} + repositionOnScroll > setIsGroupPopoverOpen(!isGroupPopoverOpen)} panelPaddingSize="none" + repositionOnScroll > {uniqueGroups.map((group, index) => ( { } isOpen={isPopoverOpen} closePopover={() => setIsPopoverOpen(!isPopoverOpen)} + repositionOnScroll > @@ -147,6 +148,7 @@ export const MlPopover = React.memo(() => { } isOpen={isPopoverOpen} closePopover={() => setIsPopoverOpen(!isPopoverOpen)} + repositionOnScroll > {i18n.ML_JOB_SETTINGS} diff --git a/x-pack/plugins/security_solution/public/common/components/paginated_table/index.tsx b/x-pack/plugins/security_solution/public/common/components/paginated_table/index.tsx index 3b3130af77cfd74..9f95284d989a94a 100644 --- a/x-pack/plugins/security_solution/public/common/components/paginated_table/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/paginated_table/index.tsx @@ -273,6 +273,7 @@ const PaginatedTableComponent: FC = ({ isOpen={isPopoverOpen} closePopover={closePopover} panelPaddingSize="none" + repositionOnScroll > diff --git a/x-pack/plugins/security_solution/public/common/components/tables/helpers.tsx b/x-pack/plugins/security_solution/public/common/components/tables/helpers.tsx index b8ea32969c015b3..55e5758775504f7 100644 --- a/x-pack/plugins/security_solution/public/common/components/tables/helpers.tsx +++ b/x-pack/plugins/security_solution/public/common/components/tables/helpers.tsx @@ -195,6 +195,7 @@ export const PopoverComponent = ({ closePopover={() => setIsOpen(!isOpen)} id={`${idPrefix}-popover`} isOpen={isOpen} + repositionOnScroll > {children} diff --git a/x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar_action.tsx b/x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar_action.tsx index 250ed75f134c134..f072b27274ed708 100644 --- a/x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar_action.tsx +++ b/x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar_action.tsx @@ -33,6 +33,7 @@ const Popover = React.memo( } closePopover={() => setPopoverState(false)} isOpen={popoverState} + repositionOnScroll > {popoverContent?.(closePopover)} diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx index 08c6ec89ff051fa..447a70ef998a945 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx @@ -92,6 +92,7 @@ export const TableRowActions = React.memo<{ items: EuiContextMenuPanelProps['ite } isOpen={isOpen} closePopover={handleCloseMenu} + repositionOnScroll > diff --git a/x-pack/plugins/security_solution/public/resolver/view/submenu.tsx b/x-pack/plugins/security_solution/public/resolver/view/submenu.tsx index d3bb6123ce04da1..ce126bf695559d8 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/submenu.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/submenu.tsx @@ -215,6 +215,7 @@ const NodeSubMenuComponents = React.memo( button={submenuPopoverButton} isOpen={menuIsOpen} closePopover={closePopover} + repositionOnScroll > {menuIsOpen && typeof optionsWithActions === 'object' && ( diff --git a/x-pack/plugins/security_solution/public/timelines/components/field_renderers/field_renderers.tsx b/x-pack/plugins/security_solution/public/timelines/components/field_renderers/field_renderers.tsx index 7296e0ee4b97193..80fe7cb33779a2b 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/field_renderers/field_renderers.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/field_renderers/field_renderers.tsx @@ -274,6 +274,7 @@ export const DefaultFieldRendererOverflow = React.memo setIsOpen(!isOpen)} + repositionOnScroll > ( closePopover={closePopover} panelPaddingSize="none" anchorPosition="downLeft" + repositionOnScroll > diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/insert_timeline_popover/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/insert_timeline_popover/index.tsx index 83417cdb51b6995..0adf76730826950 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/insert_timeline_popover/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/insert_timeline_popover/index.tsx @@ -100,6 +100,7 @@ export const InsertTimelinePopoverComponent: React.FC = ({ button={insertTimelineButton} isOpen={isPopoverOpen} closePopover={handleClosePopover} + repositionOnScroll > = ({ id="timelineSettingsPopover" isOpen={showActions} closePopover={onClosePopover} + repositionOnScroll > {capabilitiesCanUserCRUD && ( From 0b6674edf5bf201064fdd9787e93ca479fbd0e8c Mon Sep 17 00:00:00 2001 From: Tyler Smalley Date: Thu, 2 Jul 2020 08:37:37 -0700 Subject: [PATCH 5/9] Adds FOSSA CLI configuration file (#70137) FOSSA analysis by default checks for dependencies in the following order: 1. Parse output from `npm ls --json --production` - Runs if npm exists on the system and provides an accurate list of all dependencies needed to build the production project. 2. Parse `package.json` - Runs if `package.json` can be successfully parsed into a dependency graph. 3. Run yarn list --json - This command verifies through yarn what the actual dependencies which are installed on the system are. This strategy runs with `NODE_ENV=production` by default to find production dependencies. 4. Parse `yarn.lock` - Detects dependencies based on the yarn lockfile. 5. Parse `npm-shrinkwrap.json` - Detects dependencies based on the lockfile. 6. Parse `package-lock.json` - Detects dependencies based on the lockfile. Since our dependencies specified in `package.json` use compatible version matching (`^`), the reported version would often not be what the `yarn.lock` is currently specified to use. Because of this, we are defining a single module with a strategy on `yarn.lock`. Our `yarn.lock` file includes all dependencies. Signed-off-by: Tyler Smalley --- .fossa.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 .fossa.yml diff --git a/.fossa.yml b/.fossa.yml new file mode 100755 index 000000000000000..17d86d1f8552184 --- /dev/null +++ b/.fossa.yml @@ -0,0 +1,15 @@ +# Generated by FOSSA CLI (https://github.com/fossas/fossa-cli) +# Visit https://fossa.com to learn more + +version: 2 +cli: + server: https://app.fossa.com + fetcher: custom + project: kibana +analyze: + modules: + - name: kibana + type: nodejs + strategy: yarn.lock + target: . + path: . From 12460b456cc9faa1c64e6a50eaaa873d08f8754d Mon Sep 17 00:00:00 2001 From: Tre Date: Thu, 2 Jul 2020 10:01:54 -0600 Subject: [PATCH 6/9] [QA] [Code Coverage] Add Three Dot Compare Url (#70525) --- .ci/Jenkinsfile_coverage | 9 +- .../ingest_coverage/__tests__/either.test.js | 20 ++-- .../__tests__/transforms.test.js | 10 +- .../integration_tests/ingest_coverage.test.js | 94 +++++++++++++------ .../code_coverage/ingest_coverage/maybe.js | 84 +++++++++++++++++ .../ingest_coverage/transforms.js | 50 +++++++--- .../shell_scripts/ingest_coverage.sh | 4 + vars/kibanaCoverage.groovy | 56 +++++++++-- 8 files changed, 268 insertions(+), 59 deletions(-) create mode 100644 src/dev/code_coverage/ingest_coverage/maybe.js diff --git a/.ci/Jenkinsfile_coverage b/.ci/Jenkinsfile_coverage index bd55bd73966fffe..3986367d660a18c 100644 --- a/.ci/Jenkinsfile_coverage +++ b/.ci/Jenkinsfile_coverage @@ -23,15 +23,22 @@ kibanaPipeline(timeoutMinutes: 240) { } def handleIngestion(timestamp) { + def previousSha = handlePreviousSha() kibanaPipeline.downloadCoverageArtifacts() kibanaCoverage.prokLinks("### Process HTML Links") kibanaCoverage.collectVcsInfo("### Collect VCS Info") kibanaCoverage.generateReports("### Merge coverage reports") kibanaCoverage.uploadCombinedReports() - kibanaCoverage.ingest(env.JOB_NAME, BUILD_NUMBER, BUILD_URL, timestamp, '### Ingest && Upload') + kibanaCoverage.ingest(env.JOB_NAME, BUILD_NUMBER, BUILD_URL, timestamp, previousSha, '### Ingest && Upload') kibanaCoverage.uploadCoverageStaticSite(timestamp) } +def handlePreviousSha() { + def previous = kibanaCoverage.downloadPrevious('### Download OLD Previous') + kibanaCoverage.uploadPrevious('### Upload NEW Previous') + return previous +} + def handleFail() { def buildStatus = buildUtils.getBuildStatus() if(params.NOTIFY_ON_FAILURE && buildStatus != 'SUCCESS' && buildStatus != 'ABORTED' && buildStatus != 'UNSTABLE') { diff --git a/src/dev/code_coverage/ingest_coverage/__tests__/either.test.js b/src/dev/code_coverage/ingest_coverage/__tests__/either.test.js index cce8fd3c2e62d95..3a493539f6743ab 100644 --- a/src/dev/code_coverage/ingest_coverage/__tests__/either.test.js +++ b/src/dev/code_coverage/ingest_coverage/__tests__/either.test.js @@ -17,39 +17,39 @@ * under the License. */ -import { fromNullable, tryCatch, left, right } from '../either'; +import * as Either from '../either'; import { noop } from '../utils'; import expect from '@kbn/expect'; const pluck = (x) => (obj) => obj[x]; const expectNull = (x) => expect(x).to.equal(null); -const attempt = (obj) => fromNullable(obj).map(pluck('detail')); +const attempt = (obj) => Either.fromNullable(obj).map(pluck('detail')); describe(`either datatype functions`, () => { describe(`helpers`, () => { it(`'fromNullable' should be a fn`, () => { - expect(typeof fromNullable).to.be('function'); + expect(typeof Either.fromNullable).to.be('function'); }); - it(`'tryCatch' should be a fn`, () => { - expect(typeof tryCatch).to.be('function'); + it(`' Either.tryCatch' should be a fn`, () => { + expect(typeof Either.tryCatch).to.be('function'); }); it(`'left' should be a fn`, () => { - expect(typeof left).to.be('function'); + expect(typeof Either.left).to.be('function'); }); it(`'right' should be a fn`, () => { - expect(typeof right).to.be('function'); + expect(typeof Either.right).to.be('function'); }); }); - describe('tryCatch', () => { + describe(' Either.tryCatch', () => { let sut = undefined; it(`should return a 'Left' on error`, () => { - sut = tryCatch(() => { + sut = Either.tryCatch(() => { throw new Error('blah'); }); expect(sut.inspect()).to.be('Left(Error: blah)'); }); it(`should return a 'Right' on successful execution`, () => { - sut = tryCatch(noop); + sut = Either.tryCatch(noop); expect(sut.inspect()).to.be('Right(undefined)'); }); }); diff --git a/src/dev/code_coverage/ingest_coverage/__tests__/transforms.test.js b/src/dev/code_coverage/ingest_coverage/__tests__/transforms.test.js index 2fd1d5cbe8d48d8..746bccc3d718a49 100644 --- a/src/dev/code_coverage/ingest_coverage/__tests__/transforms.test.js +++ b/src/dev/code_coverage/ingest_coverage/__tests__/transforms.test.js @@ -18,7 +18,7 @@ */ import expect from '@kbn/expect'; -import { ciRunUrl, coveredFilePath, itemizeVcs } from '../transforms'; +import { ciRunUrl, coveredFilePath, itemizeVcs, prokPrevious } from '../transforms'; describe(`Transform fn`, () => { describe(`ciRunUrl`, () => { @@ -61,6 +61,14 @@ describe(`Transform fn`, () => { }); }); }); + describe(`prokPrevious`, () => { + const comparePrefixF = () => 'https://github.com/elastic/kibana/compare'; + process.env.FETCHED_PREVIOUS = 'A'; + it(`should return a previous compare url`, () => { + const actual = prokPrevious(comparePrefixF)('B'); + expect(actual).to.be(`https://github.com/elastic/kibana/compare/A...B`); + }); + }); describe(`itemizeVcs`, () => { it(`should return a sha url`, () => { const vcsInfo = [ diff --git a/src/dev/code_coverage/ingest_coverage/integration_tests/ingest_coverage.test.js b/src/dev/code_coverage/ingest_coverage/integration_tests/ingest_coverage.test.js index 2a65839f85ac316..95056d9f0d8d7e2 100644 --- a/src/dev/code_coverage/ingest_coverage/integration_tests/ingest_coverage.test.js +++ b/src/dev/code_coverage/ingest_coverage/integration_tests/ingest_coverage.test.js @@ -31,6 +31,7 @@ const env = { ES_HOST: 'https://super:changeme@some.fake.host:9243', NODE_ENV: 'integration_test', COVERAGE_INGESTION_KIBANA_ROOT: '/var/lib/jenkins/workspace/elastic+kibana+code-coverage/kibana', + FETCHED_PREVIOUS: 'FAKE_PREVIOUS_SHA', }; describe('Ingesting coverage', () => { @@ -68,31 +69,64 @@ describe('Ingesting coverage', () => { expect(folderStructure.test(actualUrl)).ok(); }); }); - describe(`vcsInfo`, () => { + let stdOutWithVcsInfo = ''; describe(`without a commit msg in the vcs info file`, () => { - let vcsInfo; - const args = [ - 'scripts/ingest_coverage.js', - '--verbose', - '--vcsInfoPath', - 'src/dev/code_coverage/ingest_coverage/integration_tests/mocks/VCS_INFO_missing_commit_msg.txt', - '--path', - ]; - beforeAll(async () => { + const args = [ + 'scripts/ingest_coverage.js', + '--verbose', + '--vcsInfoPath', + 'src/dev/code_coverage/ingest_coverage/integration_tests/mocks/VCS_INFO_missing_commit_msg.txt', + '--path', + ]; const opts = [...args, resolved]; const { stdout } = await execa(process.execPath, opts, { cwd: ROOT_DIR, env }); - vcsInfo = stdout; + stdOutWithVcsInfo = stdout; }); it(`should be an obj w/o a commit msg`, () => { const commitMsgRE = /"commitMsg"/; - expect(commitMsgRE.test(vcsInfo)).to.not.be.ok(); + expect(commitMsgRE.test(stdOutWithVcsInfo)).to.not.be.ok(); + }); + }); + describe(`including previous sha`, () => { + let stdOutWithPrevious = ''; + beforeAll(async () => { + const opts = [...verboseArgs, resolved]; + const { stdout } = await execa(process.execPath, opts, { cwd: ROOT_DIR, env }); + stdOutWithPrevious = stdout; + }); + + it(`should have a vcsCompareUrl`, () => { + const previousCompareUrlRe = /vcsCompareUrl.+\s*.*https.+compare\/FAKE_PREVIOUS_SHA\.\.\.f07b34f6206/; + expect(previousCompareUrlRe.test(stdOutWithPrevious)).to.be.ok(); + }); + }); + describe(`with a commit msg in the vcs info file`, () => { + beforeAll(async () => { + const args = [ + 'scripts/ingest_coverage.js', + '--verbose', + '--vcsInfoPath', + 'src/dev/code_coverage/ingest_coverage/integration_tests/mocks/VCS_INFO.txt', + '--path', + ]; + const opts = [...args, resolved]; + const { stdout } = await execa(process.execPath, opts, { cwd: ROOT_DIR, env }); + stdOutWithVcsInfo = stdout; + }); + + it(`should be an obj w/ a commit msg`, () => { + const commitMsgRE = /commitMsg/; + expect(commitMsgRE.test(stdOutWithVcsInfo)).to.be.ok(); }); }); }); describe(`team assignment`, () => { + let shouldNotHavePipelineOut = ''; + let shouldIndeedHavePipelineOut = ''; + const args = [ 'scripts/ingest_coverage.js', '--verbose', @@ -101,26 +135,30 @@ describe('Ingesting coverage', () => { '--path', ]; - it(`should not occur when going to the totals index`, async () => { - const teamAssignRE = /"pipeline":/; - const shouldNotHavePipelineOut = await prokJustTotalOrNot(true, args); + const teamAssignRE = /pipeline:/; + + beforeAll(async () => { + const summaryPath = 'jest-combined/coverage-summary-just-total.json'; + const resolved = resolve(MOCKS_DIR, summaryPath); + const opts = [...args, resolved]; + const { stdout } = await execa(process.execPath, opts, { cwd: ROOT_DIR, env }); + shouldNotHavePipelineOut = stdout; + }); + beforeAll(async () => { + const summaryPath = 'jest-combined/coverage-summary-manual-mix.json'; + const resolved = resolve(MOCKS_DIR, summaryPath); + const opts = [...args, resolved]; + const { stdout } = await execa(process.execPath, opts, { cwd: ROOT_DIR, env }); + shouldIndeedHavePipelineOut = stdout; + }); + + it(`should not occur when going to the totals index`, () => { const actual = teamAssignRE.test(shouldNotHavePipelineOut); expect(actual).to.not.be.ok(); }); - it(`should indeed occur when going to the coverage index`, async () => { - const shouldIndeedHavePipelineOut = await prokJustTotalOrNot(false, args); - const onlyForTestingRe = /ingest-pipe=>team_assignment/; - const actual = onlyForTestingRe.test(shouldIndeedHavePipelineOut); + it(`should indeed occur when going to the coverage index`, () => { + const actual = /ingest-pipe=>team_assignment/.test(shouldIndeedHavePipelineOut); expect(actual).to.be.ok(); }); }); }); -async function prokJustTotalOrNot(isTotal, args) { - const justTotalPath = 'jest-combined/coverage-summary-just-total.json'; - const notJustTotalPath = 'jest-combined/coverage-summary-manual-mix.json'; - - const resolved = resolve(MOCKS_DIR, isTotal ? justTotalPath : notJustTotalPath); - const opts = [...args, resolved]; - const { stdout } = await execa(process.execPath, opts, { cwd: ROOT_DIR, env }); - return stdout; -} diff --git a/src/dev/code_coverage/ingest_coverage/maybe.js b/src/dev/code_coverage/ingest_coverage/maybe.js new file mode 100644 index 000000000000000..89936d6fc4b0ee1 --- /dev/null +++ b/src/dev/code_coverage/ingest_coverage/maybe.js @@ -0,0 +1,84 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/* eslint new-cap: 0 */ +/* eslint no-unused-vars: 0 */ + +/** + * Just monad used for valid values + */ +export function Just(x) { + return { + value: () => x, + map: (f) => Maybe.of(f(x)), + isJust: () => true, + inspect: () => `Just(${x})`, + }; +} +Just.of = function of(x) { + return Just(x); +}; +export function just(x) { + return Just.of(x); +} + +/** + * Maybe monad. + * Maybe.fromNullable` lifts an `x` into either a `Just` + * or a `Nothing` typeclass. + */ +export function Maybe(x) { + return { + chain: (f) => f(x), + map: (f) => Maybe(f(x)), + inspect: () => `Maybe(${x})`, + nothing: () => Nothing(), + isNothing: () => false, + isJust: () => false, + }; +} +Maybe.of = function of(x) { + return just(x); +}; + +export function maybe(x) { + return Maybe.of(x); +} +export function fromNullable(x) { + return x !== null && x !== undefined && x !== false && x !== 'undefined' ? just(x) : nothing(); +} + +/** + * Nothing wraps undefined or null values and prevents errors + * that otherwise occur when mapping unexpected undefined or null + * values + */ +export function Nothing() { + return { + value: () => { + throw new TypeError(`Nothing algebraic data type returns...no value :)`); + }, + map: (f) => {}, + isNothing: () => true, + inspect: () => `[Nothing]`, + }; +} +export function nothing() { + return Nothing(); +} diff --git a/src/dev/code_coverage/ingest_coverage/transforms.js b/src/dev/code_coverage/ingest_coverage/transforms.js index 4cb6c2892c4f2ad..b8c9acd6fc49d62 100644 --- a/src/dev/code_coverage/ingest_coverage/transforms.js +++ b/src/dev/code_coverage/ingest_coverage/transforms.js @@ -17,10 +17,11 @@ * under the License. */ -import { left, right, fromNullable } from './either'; +import * as Either from './either'; +import { fromNullable } from './maybe'; import { always, id, noop } from './utils'; -const maybeTotal = (x) => (x === 'total' ? left(x) : right(x)); +const maybeTotal = (x) => (x === 'total' ? Either.left(x) : Either.right(x)); const trimLeftFrom = (text, x) => x.substr(x.indexOf(text)); @@ -54,13 +55,13 @@ const root = (urlBase) => (ts) => (testRunnerType) => `${urlBase}/${ts}/${testRunnerType.toLowerCase()}-combined`; const prokForTotalsIndex = (mutateTrue) => (urlRoot) => (obj) => - right(obj) + Either.right(obj) .map(mutateTrue) .map(always(`${urlRoot}/index.html`)) .fold(noop, id); const prokForCoverageIndex = (root) => (mutateFalse) => (urlRoot) => (obj) => (siteUrl) => - right(siteUrl) + Either.right(siteUrl) .map((x) => { mutateFalse(obj); return x; @@ -87,7 +88,7 @@ export const coveredFilePath = (obj) => { const withoutCoveredFilePath = always(obj); const leadingSlashRe = /^\//; - const maybeDropLeadingSlash = (x) => (leadingSlashRe.test(x) ? right(x) : left(x)); + const maybeDropLeadingSlash = (x) => (leadingSlashRe.test(x) ? Either.right(x) : Either.left(x)); const dropLeadingSlash = (x) => x.replace(leadingSlashRe, ''); const dropRoot = (root) => (x) => maybeDropLeadingSlash(x.replace(root, '')).fold(id, dropLeadingSlash); @@ -97,11 +98,23 @@ export const coveredFilePath = (obj) => { }; export const ciRunUrl = (obj) => - fromNullable(process.env.CI_RUN_URL).fold(always(obj), (ciRunUrl) => ({ ...obj, ciRunUrl })); + Either.fromNullable(process.env.CI_RUN_URL).fold(always(obj), (ciRunUrl) => ({ + ...obj, + ciRunUrl, + })); const size = 50; -const truncateMsg = (msg) => (msg.length > size ? `${msg.slice(0, 50)}...` : msg); - +const truncateMsg = (msg) => { + const res = msg.length > size ? `${msg.slice(0, 50)}...` : msg; + return res; +}; +const comparePrefix = () => 'https://github.com/elastic/kibana/compare'; +export const prokPrevious = (comparePrefixF) => (currentSha) => { + return Either.fromNullable(process.env.FETCHED_PREVIOUS).fold( + noop, + (previousSha) => `${comparePrefixF()}/${previousSha}...${currentSha}` + ); +}; export const itemizeVcs = (vcsInfo) => (obj) => { const [branch, sha, author, commitMsg] = vcsInfo; @@ -111,12 +124,23 @@ export const itemizeVcs = (vcsInfo) => (obj) => { author, vcsUrl: `https://github.com/elastic/kibana/commit/${sha}`, }; - const res = fromNullable(commitMsg).fold(always({ ...obj, vcs }), (msg) => ({ - ...obj, - vcs: { ...vcs, commitMsg: truncateMsg(msg) }, - })); - return res; + const mutateVcs = (x) => (vcs.commitMsg = truncateMsg(x)); + fromNullable(commitMsg).map(mutateVcs); + + const vcsCompareUrl = process.env.FETCHED_PREVIOUS + ? `${comparePrefix()}/${process.env.FETCHED_PREVIOUS}...${sha}` + : 'PREVIOUS SHA NOT PROVIDED'; + + // const withoutPreviousL = always({ ...obj, vcs }); + const withPreviousR = () => ({ + ...obj, + vcs: { + ...vcs, + vcsCompareUrl, + }, + }); + return withPreviousR(); }; export const testRunner = (obj) => { const { jsonSummaryPath } = obj; diff --git a/src/dev/code_coverage/shell_scripts/ingest_coverage.sh b/src/dev/code_coverage/shell_scripts/ingest_coverage.sh index d3cf31fc0f427f3..0b67dac3074738f 100644 --- a/src/dev/code_coverage/shell_scripts/ingest_coverage.sh +++ b/src/dev/code_coverage/shell_scripts/ingest_coverage.sh @@ -14,6 +14,10 @@ CI_RUN_URL=$3 export CI_RUN_URL echo "### debug CI_RUN_URL: ${CI_RUN_URL}" +FETCHED_PREVIOUS=$4 +export FETCHED_PREVIOUS +echo "### debug FETCHED_PREVIOUS: ${FETCHED_PREVIOUS}" + ES_HOST="https://${USER_FROM_VAULT}:${PASS_FROM_VAULT}@${HOST_FROM_VAULT}" export ES_HOST diff --git a/vars/kibanaCoverage.groovy b/vars/kibanaCoverage.groovy index e511d7a8fc15ea1..66ebe3478fbec60 100644 --- a/vars/kibanaCoverage.groovy +++ b/vars/kibanaCoverage.groovy @@ -1,3 +1,46 @@ +def downloadPrevious(title) { + def vaultSecret = 'secret/gce/elastic-bekitzur/service-account/kibana' + + withGcpServiceAccount.fromVaultSecret(vaultSecret, 'value') { + kibanaPipeline.bash(''' + + gsutil -m cp -r gs://elastic-bekitzur-kibana-coverage-live/previous_pointer/previous.txt . || echo "### Previous Pointer NOT FOUND?" + + if [ -e ./previous.txt ]; then + mv previous.txt downloaded_previous.txt + echo "### downloaded_previous.txt" + cat downloaded_previous.txt + fi + + ''', title) + + def previous = sh(script: 'cat downloaded_previous.txt', label: '### Capture Previous Sha', returnStdout: true).trim() + + return previous + } +} + +def uploadPrevious(title) { + def vaultSecret = 'secret/gce/elastic-bekitzur/service-account/kibana' + + withGcpServiceAccount.fromVaultSecret(vaultSecret, 'value') { + kibanaPipeline.bash(''' + + collectPrevious() { + PREVIOUS=$(git log --pretty=format:%h -1) + echo "### PREVIOUS: ${PREVIOUS}" + echo $PREVIOUS > previous.txt + } + collectPrevious + + gsutil cp previous.txt gs://elastic-bekitzur-kibana-coverage-live/previous_pointer/ + + + ''', title) + + } +} + def uploadCoverageStaticSite(timestamp) { def uploadPrefix = "gs://elastic-bekitzur-kibana-coverage-live/" def uploadPrefixWithTimeStamp = "${uploadPrefix}${timestamp}/" @@ -67,6 +110,7 @@ EOF cat src/dev/code_coverage/www/index.html ''', "### Combine Index Partials") } + def collectVcsInfo(title) { kibanaPipeline.bash(''' predicate() { @@ -125,31 +169,31 @@ def uploadCombinedReports() { ) } -def ingestData(jobName, buildNum, buildUrl, title) { +def ingestData(jobName, buildNum, buildUrl, previousSha, title) { kibanaPipeline.bash(""" source src/dev/ci_setup/setup_env.sh yarn kbn bootstrap --prefer-offline # Using existing target/kibana-coverage folder - . src/dev/code_coverage/shell_scripts/ingest_coverage.sh '${jobName}' ${buildNum} '${buildUrl}' + . src/dev/code_coverage/shell_scripts/ingest_coverage.sh '${jobName}' ${buildNum} '${buildUrl}' ${previousSha} """, title) } -def ingestWithVault(jobName, buildNum, buildUrl, title) { +def ingestWithVault(jobName, buildNum, buildUrl, previousSha, title) { def vaultSecret = 'secret/kibana-issues/prod/coverage/elasticsearch' withVaultSecret(secret: vaultSecret, secret_field: 'host', variable_name: 'HOST_FROM_VAULT') { withVaultSecret(secret: vaultSecret, secret_field: 'username', variable_name: 'USER_FROM_VAULT') { withVaultSecret(secret: vaultSecret, secret_field: 'password', variable_name: 'PASS_FROM_VAULT') { - ingestData(jobName, buildNum, buildUrl, title) + ingestData(jobName, buildNum, buildUrl, previousSha, title) } } } } -def ingest(jobName, buildNumber, buildUrl, timestamp, title) { +def ingest(jobName, buildNumber, buildUrl, timestamp, previousSha, title) { withEnv([ "TIME_STAMP=${timestamp}", ]) { - ingestWithVault(jobName, buildNumber, buildUrl, title) + ingestWithVault(jobName, buildNumber, buildUrl, previousSha, title) } } From 67067ec9a9ace63632a36dbf91b7089b46852f5f Mon Sep 17 00:00:00 2001 From: Melissa Alvarez Date: Thu, 2 Jul 2020 12:23:40 -0400 Subject: [PATCH 7/9] update reg evaluate property names (#70604) --- .../application/data_frame_analytics/common/analytics.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/common/analytics.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/common/analytics.ts index a423722d1447a13..5715687402bcbfd 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/common/analytics.ts +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/common/analytics.ts @@ -128,7 +128,7 @@ export interface Eval { export interface RegressionEvaluateResponse { regression: { - mean_squared_error: { + mse: { value: number; }; r_squared: { @@ -311,7 +311,7 @@ export const isRegressionEvaluateResponse = (arg: any): arg is RegressionEvaluat return ( keys.length === 1 && keys[0] === ANALYSIS_CONFIG_TYPE.REGRESSION && - arg?.regression?.mean_squared_error !== undefined && + arg?.regression?.mse !== undefined && arg?.regression?.r_squared !== undefined ); }; @@ -410,7 +410,7 @@ export const useRefreshAnalyticsList = ( const DEFAULT_SIG_FIGS = 3; export function getValuesFromResponse(response: RegressionEvaluateResponse) { - let meanSquaredError = response?.regression?.mean_squared_error?.value; + let meanSquaredError = response?.regression?.mse?.value; if (meanSquaredError) { meanSquaredError = Number(meanSquaredError.toPrecision(DEFAULT_SIG_FIGS)); From d3c35c751895e997e41ab02d455385e7df1fd391 Mon Sep 17 00:00:00 2001 From: Luca Belluccini Date: Thu, 2 Jul 2020 19:07:48 +0200 Subject: [PATCH 8/9] [DOC] CSV Reporting settings (#67742) * [DOC] CSV Reporting settings We have some undocumented CSV reporting settings. Those should be backported to 7.3+ probably. * Update docs/settings/reporting-settings.asciidoc Co-authored-by: Kaarina Tungseth * Update docs/settings/reporting-settings.asciidoc Co-authored-by: Kaarina Tungseth * Update docs/settings/reporting-settings.asciidoc Co-authored-by: Kaarina Tungseth * Apply suggestions from code review Co-authored-by: Kaarina Tungseth Co-authored-by: Kaarina Tungseth Co-authored-by: Tim Sullivan --- docs/settings/reporting-settings.asciidoc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/settings/reporting-settings.asciidoc b/docs/settings/reporting-settings.asciidoc index 928878fdcdb03a2..c83cd068eff5b3a 100644 --- a/docs/settings/reporting-settings.asciidoc +++ b/docs/settings/reporting-settings.asciidoc @@ -210,6 +210,25 @@ When `xpack.reporting.capture.browser.type` is set to `chromium` (default) you c large exports from causing performance and storage issues. Defaults to `10485760` (10mB). +| `xpack.reporting.csv.scroll.size` + | Number of documents retrieved from {es} for each scroll iteration during a CSV + export. + Defaults to `500`. + +| `xpack.reporting.csv.scroll.duration` + | Amount of time allowed before {kib} cleans the scroll context during a CSV export. + Defaults to `30s`. + +| `xpack.reporting.csv.checkForFormulas` + | Enables a check that warns you when there's a potential formula involved in the output (=, -, +, and @ chars). + See OWASP: https://www.owasp.org/index.php/CSV_Injection + Defaults to `true`. + +| `xpack.reporting.csv.enablePanelActionDownload` + | Enables CSV export from a saved search on a dashboard. This action is available in the dashboard + panel menu for the saved search. + Defaults to `true`. + |=== [float] From 0e008e30e98f760c5e08db0e5847e103eff49ca6 Mon Sep 17 00:00:00 2001 From: Jonathan Budzenski Date: Thu, 2 Jul 2020 12:46:40 -0500 Subject: [PATCH 9/9] skip fleet agent flow tests --- x-pack/test/api_integration/apis/fleet/agent_flow.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/test/api_integration/apis/fleet/agent_flow.ts b/x-pack/test/api_integration/apis/fleet/agent_flow.ts index 71057b81d1b0976..a6a4003a554fcb1 100644 --- a/x-pack/test/api_integration/apis/fleet/agent_flow.ts +++ b/x-pack/test/api_integration/apis/fleet/agent_flow.ts @@ -18,7 +18,7 @@ export default function (providerContext: FtrProviderContext) { const supertestWithoutAuth = getSupertestWithoutAuth(providerContext); const esClient = getService('es'); - describe('fleet_agent_flow', () => { + describe.skip('fleet_agent_flow', () => { before(async () => { await esArchiver.load('empty_kibana'); });