New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] Run ES from snapshot when possible #22663

Merged
merged 9 commits into from Sep 6, 2018

Conversation

Projects
None yet
3 participants
@jbudz
Contributor

jbudz commented Sep 4, 2018

We're experiencing what appears to be some gradle outages. Lets move testing to es snapshots while we investigate.

@jbudz jbudz added the :Operations label Sep 4, 2018

@jbudz jbudz self-assigned this Sep 4, 2018

@tylersmalley

This will break anyone relying on a private or elastic branch of the same name. We should only use snapshots when targeting a tracked upstream branch (master,6.x,6.4,etc)

jbudz added some commits Sep 4, 2018

$

jbudz added some commits Sep 4, 2018

@elasticmachine

This comment has been minimized.

Show comment
Hide comment

elasticmachine commented Sep 4, 2018

@elasticmachine

This comment has been minimized.

Show comment
Hide comment

elasticmachine commented Sep 4, 2018

@jbudz jbudz added the review label Sep 4, 2018

@elasticmachine

This comment has been minimized.

Show comment
Hide comment

elasticmachine commented Sep 4, 2018

@tylersmalley

This comment has been minimized.

Show comment
Hide comment
@tylersmalley

tylersmalley Sep 5, 2018

Member

Almost there! I am seeing it running from a snapshot in a few places, but some are still installing from source.

intake: run:apiIntegrationTests
selenium: un:functionalTestsRelease, run:pluginFunctionalTestsRelease

Member

tylersmalley commented Sep 5, 2018

Almost there! I am seeing it running from a snapshot in a few places, but some are still installing from source.

intake: run:apiIntegrationTests
selenium: un:functionalTestsRelease, run:pluginFunctionalTestsRelease

jbudz added some commits Sep 6, 2018

@elasticmachine

This comment has been minimized.

Show comment
Hide comment

elasticmachine commented Sep 6, 2018

@jbudz

This comment has been minimized.

Show comment
Hide comment
@jbudz

jbudz Sep 6, 2018

Contributor

retest

Contributor

jbudz commented Sep 6, 2018

retest

@elasticmachine

This comment has been minimized.

Show comment
Hide comment

elasticmachine commented Sep 6, 2018

@jbudz

This comment has been minimized.

Show comment
Hide comment
@jbudz

jbudz Sep 6, 2018

Contributor

retest

Contributor

jbudz commented Sep 6, 2018

retest

@elasticmachine

This comment has been minimized.

Show comment
Hide comment

elasticmachine commented Sep 6, 2018

@jbudz

This comment has been minimized.

Show comment
Hide comment
@jbudz

jbudz Sep 6, 2018

Contributor

Things are weird here, this preserves current behavior. But there's a long chain of sets. And different tests are started at different levels of abstraction

run -> passes process.env as cli arg | or source if undefined -> process.env lookup in kbn-test -> default of snapshot

Contributor

jbudz commented Sep 6, 2018

Things are weird here, this preserves current behavior. But there's a long chain of sets. And different tests are started at different levels of abstraction

run -> passes process.env as cli arg | or source if undefined -> process.env lookup in kbn-test -> default of snapshot

@jbudz

This comment has been minimized.

Show comment
Hide comment
@jbudz

jbudz Sep 6, 2018

Contributor

Removing all of the esFrom's in tasks/run and setting the default default down in kbn-test to source is an option. I think.

Contributor

jbudz commented Sep 6, 2018

Removing all of the esFrom's in tasks/run and setting the default default down in kbn-test to source is an option. I think.

@tylersmalley tylersmalley merged commit 03553de into elastic:master Sep 6, 2018

2 checks passed

CLA Commit author is a member of Elasticsearch
Details
kibana-ci Build finished.
Details

tylersmalley added a commit to tylersmalley/kibana that referenced this pull request Sep 6, 2018

[ci] Run ES snapshot when possible (#22663)
For instances where we would otherwise be running from source in a tracked elastic/elasticsearch branch, let's use a snapshot instead. This will eliminate some gradle issues we are experiencing in master.

@tylersmalley tylersmalley changed the title from [ci] temporarily test from es snapshot to [ci] Run ES from snapshot when possible Sep 6, 2018

@elasticmachine

This comment has been minimized.

Show comment
Hide comment

elasticmachine commented Sep 7, 2018

tylersmalley added a commit that referenced this pull request Sep 7, 2018

[ci] Run ES snapshot when possible (#22663) (#22788)
For instances where we would otherwise be running from source in a tracked elastic/elasticsearch branch, let's use a snapshot instead. This will eliminate some gradle issues we are experiencing in master.

chrisronline added a commit that referenced this pull request Sep 12, 2018

[Monitoring] APM UI boilerplate (#22453)
* Basic APM present in monitoring UI

* Enhance APM monitoring UI with some beat graphs

* Updates for APM Monitoring UI

* Add memory metrics

* Add events rate per minute

* Adding requests and time since last event

* More metrics for instance page

* Avoid using an unnecessary agg

* Adding more metrics

* Show response success/failure in a single graph

* When an index is deleted, and it's selected in the table, then it's removed from the selection. (#22242)

* Convert usage of notify.error to toastNotifications.addDanger for string messages (#22243)

* Update buildHierarchicalData test.

* Skipping Visualize "data table with index without time filter" (#22323)

* added log info for clarity while running the test with additional parameters (#22277) (#22314)

* Revamp core environment class to support upcoming core<-->legacy bootstrap inversion. (#21885)

* Skipping vertical bar chart with index without time filter (#22337)

* Speed up dashboard add panel (#22278)

* Rebuild modulePath correctly if on Windows

* Change how we find dashboard add panel is loaded

* Add and use find.byClassName instead of remote

* cleanup a comment

* [DOCS] Updates links to role management APIs (#22150)

* translate tutorials(osquery_logs, php_fpm_metrics, postgresql_logs, p… (#22124)

translate tutorials(osquery_logs, php_fpm_metrics, postgresql_logs, postgresql_metrics, prometheus_metrics, rabbitmq_metrics, redis_logs)

* translate tutorials(kafka_logs, kafka_metrics, kibana_metrics, kubern… (#22122)

translate tutorials(kafka_logs, kafka_metrics, kibana_metrics, kubernetes_metrics, logstash_logs, logstash_metrics, memcached_metrics)

* translate tutorials(elasticsearch_metrics, etcd_metrics, golang_metri… (#22121)

translate tutorials(elasticsearch_metrics, etcd_metrics, golang_metrics, haprozy_metrics, iis_logs)

* Bump EUI to 3.7.0 (#22287)

Upgrades EUI from 3.6.1 => 3.7.0

* [DOCS] Updates links to user management APIs (#22161)

* [DOCS] Updates links to token APIs (#22155)

* [DOCS] Updates links to role mapping APIs (#22167)

* let _claimPendingJobs have a valid job when updating leads to version conflict (#21980)

* let _claimPendingJobs have a valid job when updating leads to version conflict

* change _claimJob to reject the promise instead of resolve to true/false

* add _claimPendingJobs tests

* fix tests

* Removes ui-framework/TableInfo component, uses div instead (#22310)

* Introduce component registry for advanced ui settings screen (#22315)

* introduce component registry for advanced ui settings screen

* [build] Include X-Pack plugins and use aliases (#22325)

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* doc: add calendar vis plugin link to docs (#22366)

* fixing flaky vsualize data_table_nontimeindex test (#22288)

* Uses polished (lib) to generate rgba values from existing hex color vars (#22272)

* Adds and uses new rgba generation method for generating rgba colors from hex variables

* Removes old comments and duplicate imports

* Adds tests for rgba method and some jsdocs, and prettier fixes

* Removed custom rgba in favor of polished.rgba

* [Telemetry] Add beats architecture stats to telemetry (#21227)

* Add beats architecture stats to telemetry

* Update tests

* PR feedback

* Use values instead of keys

* Fix "visualize app linked saved searched should allow adding filters while having a linked saved search" (#22380)

* Rebuild modulePath correctly if on Windows

* Adding 1 second sleep to fix flaky test

* Wait to find a gear in the visualization after clicking Edit

* Revert "Wait to find a gear in the visualization after clicking Edit"

This reverts commit 8dac3fb.

* use waitForRenderComplete and change that to 1s timeout

* Add retry.waitFor

* use waitFor and return === result

* Revert to files from another PR

* Remove a debug console.log

* Refactor Sample Data Home section which also fixes flaky sample data functional test (#21655)

* add retry to sample data unstall test

* fix flaky sample data test

* remove retry around expect

* simplify solution

* remove onRequestComplete and just track status in state

* move all state into new SampleDataSetCards

* track processing status in seperate object than sampleDataSets

* display toast notifications from SampleDataSetCards component

* remove checks for toast notifications, just causing flakyness

* only load sample data set status on initial component load

* set processing to false when there is an install failure

* Add more to the instance view

* Remove all specific APM code

* Saved Objects Client handle RequestEntityTooLarge error from Elasticsearch (#22430)

* Saved Objects Client handle RequestEntityTooLarge error from Elasticsearch

* remove console log

* [ftr] capture test output and only log on failure (#21903)

This is an attempt to write a log capture integration for the functional test runner that will collect all log output written during a test, prevent it from being written to stdout to lower the amount of work Jenkins master has to do and include the entire log output for each test in the junit report. I'm slightly concerned about the amount of memory we'll be using to store a copy of the logs for each test, but streaming the XML report isn’t easy and there doesn’t seem to be a library out there to help. If we decide it’s torally necessary we might be able to figure it out.

* [dev-utils/withProcRunner] fix test that swallows promise rejection (#22342)

* [dev-utils/withProcRunner] fix tests that can silently fail

* test async/sync withProcRunner functions

* Wrap consts in kibana tutorials (#22181)

* Wrap consts in kibana tutorials

* Fix onPrem instructions

* Fix rails instructions

* Use arrow functions and implicit return

Co-authored-by: LeanidShutau <leanidshutau@gmail.com>

* [docs] Import APM dashboards in 6.4+ (#22439)

* Make `core` responsible for reading and merging of config files. Simplify legacy config adapter. (#21956)

* [APM] Revert to using apm-* as default indices (#22445)

* [APM] Revert to using apm-* as default indices

* Update docs

* Some more boilerplate

* Add instance code

* Eui sharing top nav (#21997)

* just getting the popover to open and start laying out the context menu

* pass getUnhashableStates to ShareMenu

* generate original and snapshot ids

* move state into ShareUrlContent

* start working on form

* use radio group

* add input for creating short URL

* display URL in alert until copy functionallity gets migrated to EUI

* allowEmbed prop

* replace share directive with showShareContextMenu

* fix button styling

* add jest test for share_context_menu

* use EuiCopy to copy URL, add jest test for ShareUrlContent component

* clean up

* display short URL create error message in form instead of with toast

* switch option order so disbaled option can not be first

* fix discover share functional tests

* add functions required by reporting

* typescript

* remove empty file

* fix typescript compile error

* move import so jest tests work

* fix Failed prop type: The proptextToCopyis marked as required inEuiCopy, but its value isundefined

* move shortUrl out of react state and into Component object

* getUnhashableStates type from any[] to object[]

* add comment about type change once EUI issue is solved

* add functional test for saved object URL sharing

* remove commit

* Remove more specific code

* [Docs] Use literal asterix in APM docs (#22460)

* Remove this custom format

* Fix gauge test (#22472)

* Bump backport to 4.4.1 (#22456)

* Bump backport to 4.4.1

* Update lock file

* [chrome/urlOverflowCheck] use `modifyUrl` helper (#22435)

Fixes #18835

This updates the url-overflow redirect to use the `modifyUrl()` helper which was written almost exclusively to help deal with the confusion that node's `path` and `pathname` nonsense creates. I tested this in Edge and things seem to work well, but I'd appreciate if @baracudda or @chandanpal could checkout this PR and see if it works for them.

* Integrate main i18n tool into build pipeline (#22254)

* Integrate main i18n tool to build process

* Resolve comments

* Remove old task

* Replace default Error with FailError

* Update redux, ,react-redux and corresponding types (#22442)

* Fixing a few typos and some links that were updated (#22470)

* Add translations for Netflow tutorial (#22138)

* Update snapshots

* Changing doc link from ES to Stack docs (#22497)

* Fix tests

* add aria-label to search input on dashboard listing view (#22467)

* Implement inspector for Saved Searches (#22376)

* Implement inspector for Saved Searches

* add inspect top nav to discover app

* add functional test, add support for empty results

* clean up functional test names

* create inspector request before processing response

* [Monitoring] Fix logging when Monitoring reinitializes with HUP signal (#22464)

* [WIP] Logs Sample Data (#22276)

Log sample data, check 

* [Fix] Fix bug with missing license data (#22485)

* Rely on RFC1123 when validating `server.host`. (#22469)

* Convert Chromium reports to puppeteer (#21788)

Update Chromium to a recent version compatible with Puppeteer.

Update Chromium build scripts to initialize build environments and work with
recent versions of Chromium.

Modify Chromium reporting logic to be driven mostly by Puppeteer.

* Created separate pr to handle keybinding for mac and other os. (#22521)

* Functional test to surface index version conflicts (#22509)

* fixing bug discovered by bahvya (#22481)

* Translations for Home page (#22249)

* Translate Home page; add mountWithIntl method into enzyme_helper.js

* Update message ids

* Update component name

* Update message ids

* Fix unit tests

* Remove export from variables that get wrapped by a helper

* Add option to drop partial buckets from date_histogram visuals (#19979)

* Add Drop Partials option to date histogram agg settings UI

* Add timeRange to aggOpts and parse in _response_writer

* Implement dropPartials method in TabifyBuckets

* Fixed a couple issues

* Fixed issue with undefined timeRange

* Use braces for conditionals

* Fix issue with heatmap showing black tiles (#20753)

* Heatmap metric data points should only be quantized while the data full range is grate than the maxmum allowed color count

* The data cell with metric value 'null' should always be hidden in the heatmap

* Add one variable for max color count and follow the coding style

* simplified tabify (#19061)

* Add the new chromium windows path to the CI "CleanExtraBrowsersTask" (#22534)

* Fix flaky dashboard color legend (#22341)

* Rebuild modulePath correctly if on Windows

* Adding 1 second sleep to fix flaky test

* Wait to find a gear in the visualization after clicking Edit

* Revert "Wait to find a gear in the visualization after clicking Edit"

This reverts commit 8dac3fb.

* use waitForRenderComplete and change that to 1s timeout

* Use sleep until TagCloud data-render-complete is fixed

* Different getIsInEditMode courtesy of @chrisdavies

* combine switchToEditMode into one method

* Fix possible flakiness of saveVisualization action (#22356)

* Updated saveVisualization to wait for toast instead of global indicator

* Fix RBAC tests.

The saveVisualization now fails directly if the visualization is not correctly saved.

* Change editor to use toast for errors

* Change saveVisualization method to new saveVisualizationExpectSuccess

For RBAC tests used also saveVisualizationExpectFail

* Fix wrong exists method call

* Fix missing exist function

* updated panel_state to ts gridData i vs id  (#22515)

* updated panel state to ts gridData i vs id property

* changed gridData.id to gridData.i

* Add tip about iTerm 2 settings (#22502)

Changing this setting improved sped up unit tests by about 2x.

* Add windows support to ci_setup/setup script. (#22259)

* Add windows support to ci_setup/setup script.

* Update uname syntax

* Update echo statement to match rest

* Update if statement for node package

* Revert path variable

* Fix regression in CallClient, which caused request errors like timeouts to result in fatal errors. (#22558)

* Fix save and cancel buttons mis-aligned in settings (#21898)

* Fix link in embed visualize docs (#22557)

* [kfetch] Add support for interceptors (#22128)

* Consolodate Kibana and Elasticsearch launch logic in tests (#22328)

* Fix #22579 (#22580)

* [ESLint] Turn off `no-multi-str` rule in eslint config (#22525)

* remove inline rule disabling comments

* turn off no-multi-str

* Improve test coverage for CallClient error cases. (#22599)

* Delete option[value=url] (#22585)

Delete extra file added by mistake

* skip flaky test (#22494)

* [kbn-pm] fix arg syntax

* Refactors properties table, implements typescript (#22402)

* Refactors properties table, implements typescript

* Adds type info for imported variables file

* Small fixes based on code review

* Adds tests for new nested key/value table components

* Removes variable reassignment

* Fixes up styled component snapshots, uses mount instead of shallow

* Small review fixes, adds typings to PropertiesTable index file

* Small review fixes, changes method name

* Fixes test after moving back to JSON file

* [ML] Adding string type check to jobs list search (#22627)

* [ML] Migrate Explorer Charts to React. (#22622)

This migrates the Anomaly Explorer charts to React. The PR aims to change as little of the actual logic to create and render the charts.

* Update Guideline (#22450)

* Update Guideline

* Update Unit tests section

* Updated Guideline

* Add functional tests for visualize loader API (#22595)

* Initial visualize loader functional tests

* Extend plugin test README

* Add temporary tz work around

* Switch to Australia/North timezone

* Add filtering tests

* Add all tests

* Remove unneeded uiExports

* Improve explanation

* Add saved object test, add retry

* [ML] Migrates Anomaly Explorer Swimlanes to React (#22641)

- This PR migrates the Anomaly Explorer Swimlanes from angularjs to React.
- The approach is similar to the one from #22622: Try to refactor as little of the actual logic as possible, just make sure everything works inside the React component lifecycle. So as a guide for the review: No actual code within all the functions/methods changed, only the bits and pieces which needed to be tied into the React component lifecycle.
- The remaining wrapping angular directive is now only listening for data changes and passes its scope and other necessary data on as props to the React component.

* Fix missing email address on account screen (#22652)

This PR fixes #22531, where the current user's email address was not displaying in the UI

* TypeScript Reporting Layouts (#22454)

* wip

WIP

* Changed any ypes to actual types

Made sure all types are set on the new layout classes.

* Changes recommended from code review

Changed location of type interfaces and fixed naming errors

* Latest Code Review Changes

Fix naming on properties and methods as well as a few other fixes

* Name Changes and spacing

Name Changes and spacing

* Name Change

Name Change

* Changes for typescript import and direct reference to layout_factory

Changes for typescript import and direct reference to layout_factory

* Move types locally

* Evaluate function changes for puppeteer

* Removed String as a type and renamed index.d.ts to types.d.ts for consistency

Removed String as a type and renamed index.d.ts to types.d.ts for consistency

* Changed layout_factoy to create_layout

* [ML] Fixing links to results for obs with no results (#22650)

* [ML] Adding milliseconds to watch start and end times (#22659)

* [ML] Removing calendars from job when cloning (#22667)

* Extract index pattern validation rules into ui/public (#22606)

* Rename containsInvalidCharacters to containsIllegalCharacters and return a value which accurately reflects the name.
* Move illegal index pattern characters from Management into ui/public/index_patterns.

* added assertion for the email field.

* [config] logging.useUTC -> logging.timezone (#21561)

* [config] logging.useUTC -> logging.timezone

* docs

* [env] exit if starting as root

* fix import path

* add link and timezone example

* Revert "[env] exit if starting as root"

This reverts commit f6e9090.

* [docs] fix missing float

* [ftr/asyncInstance] fix error thrown for undefined provider instances (#22689)

When a FTR service is created async the promise created by its provider is wrapped in a [`Proxy`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Proxy) that checks before each property access if the instance has finished initializing. This breaks if the service provider returns undefined, which is the case for the `failureDebugging` service, because our truthy check will fail and we throw the error claiming the service is uninitialized, which is probably incorrect.

This PR updates the proxy to use a `Symbol` to indicate when a service instance is not available yet and throws a different error when the proxy receives any request (get, set, etc.) and the service instance is not an object, as required by the Reflect APIs.

* Fix #22510, dashboard-only mode doesn't display saved searches (#22685)

* Move timezone settings into autoload file (#22623)

* Move timezone settings into autoload file

* Remove applying setting from timelion

* Remove manual set from ML

* Remove manual set from monitoring

* Remove now obsolete code from embedding test plugin

* Fix react vis type documentation (#22573)

* Add logging to messages validation (#22296)

* Add logging and parallelization to messages validation

* Refactor dev/i18n

* Resolve comments

* Remove parallelism and fix tests

* Resolve comments

* Fix broken visualize CSS (#22707)

* Fix #22581 by introducing an artificial delay (#22601)

Introduce a delay into reports to allow visualizations time to appear in the DOM. This is intended as a temporary (and hacky) workaround until we come up with a more robust way to determine that all of the visualizations on the page are ready for capture.

* align staging urls with new endpoints (#22691)

* [ML] Fixing issue with incorrect timezones in jobs list (#22714)

* [ML] Fixing issue with incorrect timezones in jobs list

* refactoring min and max calculation

* changes based on review

* changing TimeStamp to Timestamp

* Add instructions for running reporting functional tests to x-pack README (#22683)

* add instructions

* rest of instructions

* pdf-image requirements

* typo

* add Ubutnu commands

* [ML] Makefield type icon component keyboard accessible (#22708)

* [APM] Update Node.js onboarding instructions (#22562)

* Mgmt saved object test (#22564)

* Pass scoped context to tutorial providers when building tutorials (#22260)

* Pass scoped context to tutorial providers when building tutorials

* only generated scoped context one time

* spelling

* Fix IE scrollbar issue on TSVB gauges in dashboard (#22740)

* x-pack tests should use servers from other config files already loaded (#22739)

* x-pack tests should use servers from other config files already loaded

* Fix es_test_config that was using TEST_KIBANA_USERNAME/PASSWORD

* Translations for tutorial common (#22071)

* filebeat_instructions translations

* tutorials common

* fix translations

* use unicode code

* folder path to variable

* Fix message id

* Remove disabling no-multi-str rule, remove spaces

* translate tutorials(apm) (#22217)

* translate tutorials(apm)

* remove tabs from the line beginning

* remove id duplicate

* Remove disabling no-multi-str rule

* Move command to the values

* [APM] Fix broken links (#22592)

* [APM] Fix broken links

* Add missing basepaths

* Remove basepath from getMlJobUrl

* Deprecate xpack:defaultAdminEmail for monitoring alerts (#22195)

* Implement `LegacyService`. Use `core` to start legacy Kibana.  (#22190)

* Implement `LegacyService`. Use `core` to start legacy Kibana.

* Fix Worker tests

* Do not rely on kbnServer when testing mixins.

* [Tools] Fix line breaks in default JSON serializer (#22653)

* [Tools] Fix line breaks in default JSON serializer

* Add test for not escaped line breaks

* [ci] Run ES snapshot when possible (#22663)

For instances where we would otherwise be running from source in a tracked elastic/elasticsearch branch, let's use a snapshot instead. This will eliminate some gradle issues we are experiencing in master.

* Get rid of `__tests__` folders in the core. (#22662)

* [ML] Anomaly Explorer Charts jest tests. (#22759)

After the migration to React in #22622, this PR adds more test coverage based on jest to the Anomaly Explorer charts. This is done as preparation for some further refactoring (#22626) and the integration of the support for charts for the rare detector (#21163). The tests use mock data based on a standard multi-metric job using the farequote dataset.
Besided the tests this PR includes the following changes:
- In explore_series.js the path is no longer a concatenanted string but now using a template literal
- The exploreSeries() function is no longer calling window.open by itself, it just returns the link
because of the above, renamed exploreSeries() to getExploreSeriesLink() and moved it to chart_utils.js
- explorer_charts_container_service.js is no longer requiring jQuery itself, it now receiving the required element as a factory argument. Further work on this is planned to get rid of jQuery.

* [I18n] Update i18n config (#22799)

* Only log deprecation warning if xpack:defaultAdminEmail is actually set (#22774)

This PR fixes the logic for logging the deprecation warning introduced with #22765. Previously Kibana would log the warning if the new `xpack.monitoring.cluster_alerts.email_notifications.email_address` setting was not defined, regardless of `xpack:defaultAdminEmail`'s setting.

Now, we will only log the deprecation warning if all of the following are true:
1) `xpack.monitoring.cluster_alerts.email_notifications.email_address` is not set.
2) `xpack:defaultAdminEmail` is set. (**<-- this is the new part**)
3) We haven't already logged the deprecation warning

* [ML] Disabling single metric viewer links for non-applicable jobs (#22809)

* [ML] Disabling single metric viewer links for non-applicable jobs

* renaming variable

* renaming variable again

* Investigate flaky override colors dashboard test (#22726)

* Run 30x

* attempt a fix

* go back to a single run

* Force date format in context query (#22684)

* Force date format in context query

Fixes issue reported in https://discuss.elastic.co/t/view-surrounding-documents-causes-failed-to-parse-date-field-exception/147234

The default date field format is `strict_date_optional_time||epoch_millis`
so we didn't run into this during testing. If the user has custom
mappings for their timestamp field and `epoch_millis` isn't one of the
optional formats the context query will fail since it always sends the
date in millis. This change forces the query to accept the date in millis.

* Update tests

* Chore: Reorg the x-pack gulp tasks (#22785)

- Removes deprecated, non-functional lint scripts
- Removes some unused (and barely used) dependencies
- Replaces deprecated `gulp-util` dependency
- Adds eslint rule to prevent future use of deprecated `gulp-util` dependency
- Moves all gulp tasks into `tasks` path
- Moves `gulp_helpers` into `tasks/helpers`
- All tasks in `gulpfile.js` were moved into `tasks` and broken up by domain

This is basically a no-op moving files around PR. All the existing tasks appear to work the same with these changes.

<img width="334" alt="screenshot 2018-09-06 15 42 45" src="https://user-images.githubusercontent.com/404731/45188971-8618c000-b1eb-11e8-9b26-b072ccc7ddb7.png">

* Generalize dashboard panel actions to not be dashboard specific (#22775)

*  Add explicit format parameter to docvalue_fields requests (#22771)

Fixes #22484

Elasticsearch 6.4 added an optional `format` parameter for doc_value
fields. In 6.x if the param is not included it defaults to returning
the same values we see in scripted fields. In 7.0 this is changing to
use the mapping configured format by default. In kibana we want our date
values in ISO format, so this PR future proofs us for 7.0. It also eliminates
deprecation warnings ES is returning due to the missing param, which is
currently spamming some users.

* Introduce date histogram time base configuration to EditorConfig (#22344)

* Add `default` and `baseInterval` configuration ability to date histogram EditorConfig
* Change EditorConfig `warning` to `help`, show `help` below date histogram and histogram interval inputs

* docs: dashboard import/export API (#22835)

* docs: dashboard import/export API

* docs: clarify response handling of errors in import api

* Typings for chromium driver (#22688)

* Typings for chromium driver

* buffer => base64

* remove unused param. consolidate imports

* Upgrade to Jest 23.5.0 (#22791)

I'd really like to upgrade to Typescript 3 for its `unknown` type, but we need to upgrade to `jest@23` to support a recent version of `ts-jest@23`. 

The [jest changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md) breaks down the breaking changes in 23.x, but I found it to be slightly incomplete so I've broken down the changes that actually caused breaks for us here, and addressed each in individual commits to make review a little easier:

- the `testURL` config default was changed from `about:blank` to `http://localhost`
    - this cause some XHR requests powered by JSdom to start failing. It seems these requests just do nothing in master but start to fail when JSdom is initialized with an actual URL... I think we would ideally stop sending meaningless XHR requests in the tests, but it was a lot easier to just set the config to `about:blank` for now, and we can worry about cleanup later if necessary
- `expect(...).toThrow()` only passes if an actual error was thrown.
     - In two places in the index pattern code we were throwing strings, which broke the assertions. Fortunately/Unfortunately the errors are not being consumed by anything, so I was able to wrap them in `new Error()` without causing any issues.
- snapshots of mock functions now include a `results` array, detailing the return values of the function
- React fragments are now serialized as `<React.Fragment>` instead of `<UNDEFINED>`
- undefined props in React components are now stripped from snapshots
- minor changes to the ordering of mocks, imports resolution, and before hooks caused the uiSettings API tests to start breaking, but I'm replacing them with totally new tests in #22694 so I just deleted them here
- mocks created with `jest.spyOn()` that are restored now have their `mock.calls` reset, so some of the kbn-pm tests stated failing. This was fixed by restoring them with `jest.restoreAllMocks()` rather than trying to do it before the assertions

* Migrate base path APIs and UiSettings client to new platform (#22694)

Fixes #20697

This PR migrates the base path related methods from `ui/chrome` to `core.basePath` and the uiSettings to `core.uiSettings`. The two are not split into separate PRs because I'm kinda cramped for time right now so rather I split the changes up into two commits so that you can review them separately if you like. If you'd like I can submit them as separate PRs but the basePath PR will block the uiSettings PR either way.

There shouldn't be any API changes except one thing, since the existing implementation is so close to what we'd want from the new platform API I made the one change that is inconsistent with what we've been doing so far and moved `uiSettings.subscribe()` to `uiSettings.getUpdate$().subscribe()`. This method isn't super commonly used, but it is a breaking change that will likely impact plugins so I'll notify some folks if we decide to move forward this way. I can also make a super-light wrapper for angular that just updates this method if you prefer.

* api/export: calculate content length (#22154) (#22847)

* [APM] Fix ML links (#22820)

* [APM] Minor cleanup (#22827)

* Fix _source formatting (#22800)

* Fix _source formatting

* Update unit test

* Add functional test

* Fix CI error, move functional test to the end

* Manage telemetry opt-in via a dedicated document (#22268)

* fix stale snapshot (#22880)

* List "Cleaner" plugin for setting index TTL (#22616)

* Replace theme CSS instead of appending it to DOM. (#21709)

* Ensure tab works on the banner (#22664)

* attempt to fix flaky tests (#22852)

* Translate Input Control component (#22400)

* Translate Input Control component

* Remove export from variables that get wrapped by a helper

* Refactoring

* Update message ids

* Fix unit tests

* [ui/url] TypeScript-ify (#22849)

Looking to use `absoluteToParsedUrl()` in TypeScript and it would be nice if it was TypeScript as well.

* [ci] use es snapshots on non pull requests (#22834)

* [ci] use es snapshots on non pull requests

* remove extra export

* always clone

* Controls vis - safely handle case where value can not be extracted from Kibana filter (#22885)

* handle case where value can not be extracted from Kibana filter

* review feedback

* Upgrade to TypeScript 3 (#22792)

LGTM 🎉 🎉 🎉

* decouple agg configs from vis (#21827)

* changing the way aggconfig field filter works (#22756)

* [ML] Fixes Anomaly Explorer Swimlane race condition, adds tests. (#22814)

This PR addresses parts of #22642:
- It gets rid of the use of var that = this;.
- dragSelect's action strings are moved to a constants file.
- Adds jest tests for the ExplorerSwimlane component.

This also fixes the following bugs:
- The way we subscribe listeners to the events of the dragSelect library could result in the same event being triggered multiple times. This in turn could cause race conditions when on each event new data gets fetched but in between angular's scope gets updated and could end up in a non-intended way. The result of this were view-by swimlanes not updating correctly or anomaly charts showing non-related charts. This PR fixes it by filtering out consecutive swimlane click events.
- When the angular based chart container wrapper directive gets destroyed/re-esetup when using the job pick, it missed unmounting the react component, it didn't trigger componentWillUnmount()and didn't unsubscribe from dragSelectListener.

* fixing sorting of terms bucket (#22919)

* Expose `max_concurrent_shard_requests` for `_msearch` requests (#22379)

Allows Kibana users to configure the max_concurrent_shard_requests param used by Kibana when sending _msearch requests. Exposes the config as an advanced setting. By default we won't send the param at all, relying on the ES default instead.

* [core/public/deepFreeze] fix recursive type for better array support (#22904)

The `deepFreeze()` function used by `core.injectedMetadata` uses a recursive type definition to indicate that all of the child types within the passed argument become readonly, which works fine for objects but represents arrays as objects instead of using the `ReadonlyArray<>` type. 

This PR fixes the type definition to use a `RecursiveReadonlyArray<>` type that properly represents arrays with their methods like `push()`, and iterates into the array properly to propagate `ReadOnly<>`, as proven by the tests.

* Fix rbac test (#22912)

* conditionalize Monitoring tests for Cloud testing

* make security_page/login wait

* revert these files from another PR

* revert these files from another PR

* Default to chromium and add deprecation warning for phantom. (#21505)

* Default to chromium and add deprecation warning for phantom.

* use int, not float

* translate tutorials(aerospike_metrics, apache_logs, apache_metrics) (#22875)

* [core/public] stop loadingCount, improve stop() tests (#22937)

* Migrate reporting top nav to sharing context menu (#22596)

* migrate reporting top nav to sharing menu

* pass share extensions to visualize share menu

* start creating the reporting panel component

* add buttons

* generate report generatation URL

* require save if url changes

* add print layout UI

* putting it all together - generate reports from share context menu

* ensure copy button fills entire menu width

* inject job params functionallity

* refactor print layout out of ReportingContentPanel

* CSV report generation

* disable report generation when app is dirty

* update URL when window is resized

* remove all the old stuff

* clean up CSV report register provider

* fix typescript errors

* fix functional retests

* remove failure_debug folder

* close popover when generate button clicked, more work on functional tests

* set size on button and text, do not use EuiFormRow

* use ReactElement type

* move ShareContextMenuExtensionsRegistryProvider to ui/share and create interfaces for registy

* strictor typing, do not use hard coded object type name

* move registry files to typescript

* remove destructuring in the interface

* convert createReportingJob to async function, remove unneeded comment

* [ML] Explorer Chart Tweaks (#22955)

- The aim of this is to more clearly visualize how the timerange of the cell selected in the swimlane relates to the time span shown in the charts.
- The most important change is that the vertical date axis ticks no longer are randomly positioned by d3. Instead they are aligned with the cell interval of the swimlane. This way, the date information shown in the swimlane tooltip will always align with the date tick shown left of the emphasized area in the chart.
- The highlighted area now features a gray rounded border to resemble the styling of the selected cell in the swimlane.
- The chart also fixes where to long chart headers would wrap the "View" link to a new line.
- The x/y axis labels blackness has been reduced to reduce emphasis on the labels.

* fixed editor state updates for parent pipeline aggs (#22874)

* Remove need for angular directives
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment