Skip to content
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

Handle test failures better #9251

Merged

Conversation

thomasneirynck
Copy link
Contributor

@thomasneirynck thomasneirynck commented Nov 29, 2016

When a test used to fail, the error used to be swallowed and the done() method would not be called. This caused the entire suite to fail with time-out errors, when a single test failed, because the other tests would not be triggered to run. Resolved this now by explicitly trapping the errors and calling done().

Also improved the error messages for individual assertions.

This may not fix the intermittent errors in CI, but

  • it will give us a more meaningful error message when a test failure does happen
  • a single failing test will not bring down the entire test suite with timeout errors

UPDATE:

Along with tests against 5.1 (#9254) and 5.x (#9255), the tests fail about 1/5 times. They always fail with an identical issue across all branches: one tag is placed at the center, while two other tags are moved away far outside the viewport. The 'wrong' positions are always identical for each test-stub. So the test fails "correctly" on an assertion, and not due to an unexpected error.

b79ec60: this reorganizes the test suite. It makes all tests synchronous, isolating each assertion into its own stub, and moves all bootstrapping of the test into the before-handler. The advantage is that we get better labeling of the tests and their failures, and perhaps we get more consistent behavior. The reasoning for this is fairly thin: if there is latency in the stub, it is now moved to the bootstrapping phase, which may have less of an impact. That said, the reorganization also helps readability because the assertions are no longer nested in callback hell. (@spalger suggested further simplifcations)

7bb150f: removes the time limit for a single cloud-layout on each tick. I don't think this is necessary because we truncate the cloud already to have a manageable number of tags on screen. However, perhaps because of this the layout does not complete in time, causing cloud to be stuck mid-way.


UPDATE 2:

f6463b8: Skips the tests when they fail in the particular way outlined above. Failures for any other reason will continue to propagate correctly. This will keep the tests from bringing down the entire test-suite in CI. In the long term, we will need to address a different way, by identifying why this random failure occurs.

The diff of the test-file looks rather scary. Note that the content has not changed, but right now it uses a cleaner syntax (async/await instead of promises + done-callback).

@@ -102,11 +102,16 @@ describe('tag cloud', function () {
tagCloud.setData(test.data);
tagCloud.setOptions(test.options);
tagCloud.on('renderComplete', function onRender() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these tests would be a lot easier to follow if they were using promises, and as a bonus errors would already be propagating correctly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can return promises?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as an example, I would write this test to look like this:

it(`should position elements correctly: ${index}`, async () => {
  const tagCloud = new TagCloud(domNode);
  tagCloud.setData(test.data);
  tagCloud.setOptions(test.options);

   // fromNode comes from bluebird and turns tagCloud.on('renderComplete')
   // into a promise that resolves once the rendering is complete.
  await fromNode(cb => tagCloud.on('renderComplete', cb));
  
  tagCloud.removeListener('renderComplete', onRender);
  const textElements = domNode.querySelectorAll('text');
  verifyTagProperties(test.expected, textElements);
  expect(tagCloud.getStatus()).to.equal(TagCloud.STATUS.COMPLETE);
});

The same can be done with the timeouts below:

it('...', async () => {
  // ... do some setup ...

  // delay() also comes from bluebird
  await delay(200);

  // ... continue test ...
})

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can return promises?

yep!

@thomasneirynck
Copy link
Contributor Author

jenkins, test this

1 similar comment
@thomasneirynck
Copy link
Contributor Author

jenkins, test this

@thomasneirynck
Copy link
Contributor Author

jenkins, test this

11 similar comments
@thomasneirynck
Copy link
Contributor Author

jenkins, test this

@thomasneirynck
Copy link
Contributor Author

jenkins, test this

@thomasneirynck
Copy link
Contributor Author

jenkins, test this

@thomasneirynck
Copy link
Contributor Author

jenkins, test this

@thomasneirynck
Copy link
Contributor Author

jenkins, test this

@thomasneirynck
Copy link
Contributor Author

jenkins, test this

@thomasneirynck
Copy link
Contributor Author

jenkins, test this

@thomasneirynck
Copy link
Contributor Author

jenkins, test this

@thomasneirynck
Copy link
Contributor Author

jenkins, test this

@thomasneirynck
Copy link
Contributor Author

jenkins, test this

@thomasneirynck
Copy link
Contributor Author

jenkins, test this

@thomasneirynck
Copy link
Contributor Author

also got it to fail on master, with exact same errors as 5.0 and 5.x: https://kibana-ci.elastic.co/job/elastic+kibana+pull-request+multijob-intake/2286/console

@thomasneirynck
Copy link
Contributor Author

identical failtures on master as 5.x: https://kibana-ci.elastic.co/job/elastic+kibana+pull-request+multijob-intake/2292/console

Chrome 54.0.2840 (Linux 0.0.0) tag cloud should position elements correctly: test#: 0 options: {"orientation":"single","scale":"linear","minFontSize":10,"maxFontSize":36} FAILED
	Error: top boundary of tag should have been inside | bbox-of-tag: [1161.5,1300,1170.5,1313] vs
	     bbox-of-container: 512,512
	     debugInfo: {"positions":[["foo",910,1054,0],["bar",910,1054,0],["foobar",0,0,0]],"size":[512,512]}
	    at verifyBbox (http://localhost:5610/bundles/tests.bundle.js?shards=4&shard_num=4:350802:14)
	    at isInsideContainer (http://localhost:5610/bundles/tests.bundle.js?shards=4&shard_num=4:350793:6)
	    at http://localhost:5610/bundles/tests.bundle.js?shards=4&shard_num=4:350787:8
	    at Array.forEach (native)
	    at verifyTagProperties (http://localhost:5610/bundles/tests.bundle.js?shards=4&shard_num=4:350776:21)
	    at TagCloud.onRender (http://localhost:5610/bundles/tests.bundle.js?shards=4&shard_num=4:350533:12)
	    at TagCloud.EventEmitter.emit (http://localhost:5610/bundles/tests.bundle.js?shards=4&shard_num=4:242830:18)
	    at TagCloud._processQueue (http://localhost:5610/bundles/tests.bundle.js?shards=4&shard_num=4:241968:15)
	    at resolveWhenDone (http://localhost:5610/bundles/tests.bundle.js?shards=4&shard_num=4:242056:18)
	    at SVGTextElement.<anonymous> (http://localhost:5610/bundles/tests.bundle.js?shards=4&shard_num=4:242071:10)
	    at SVGTextElement.event (http://localhost:5610/bundles/tests.bundle.js?shards=4&shard_num=4:181700:43)
	    at Object.tick [as c] (http://localhost:5610/bundles/tests.bundle.js?shards=4&shard_num=4:190114:55)
	    at d3_timer_mark (http://localhost:5610/bundles/tests.bundle.js?shards=4&shard_num=4:183356:74)
	    at d3_timer_step (http://localhost:5610/bundles/tests.bundle.js?shards=4&shard_num=4:183336:16)
Chrome 54.0.2840 (Linux 0.0.0): Executed 662 of 680 (1 FAILED) (0 secs / 3.776 secs)

@thomasneirynck
Copy link
Contributor Author

jenkins, test this

@thomasneirynck thomasneirynck force-pushed the tagcloud-handle-test-failure branch 2 times, most recently from ab77cf6 to b79ec60 Compare November 30, 2016 21:42
@thomasneirynck
Copy link
Contributor Author

jenkins, test this

1 similar comment
@thomasneirynck
Copy link
Contributor Author

jenkins, test this

@thomasneirynck
Copy link
Contributor Author

jenkins, test this

3 similar comments
@thomasneirynck
Copy link
Contributor Author

jenkins, test this

@thomasneirynck
Copy link
Contributor Author

jenkins, test this

@thomasneirynck
Copy link
Contributor Author

jenkins, test this

@thomasneirynck
Copy link
Contributor Author

@spalger @ppisljar @jbudz

I would suggest this approach right here, and skip the assertion if we get into this weird layout state. I'm not sure what is causing the flipping-tests. It is annoying, and is harming our CI. But we'll also need more time to investigate what's really causing the error, and this issue may (or may not) be upstream in d3-tagcloud. I will create a separate issue for this. If we can merge this, at least other people's PR will not be affected.

@ppisljar
Copy link
Member

ppisljar commented Dec 1, 2016

I agree with Thomas, this is a good short term solution we need as this is affecting our whole CI. Investigating what exactly causes this and fixing it might require more time than it is worth.

@thomasneirynck
Copy link
Contributor Author

jenkins, test this

@jbudz
Copy link
Member

jbudz commented Dec 1, 2016

👍 on getting things green, I think this is okay until we get to the root cause.

Tests fails intermittently, and for identical reasons. When this occurs, skip the test. This only occurs in CI and cannot be reproduced locally.

Additional changes:
- Use async/await to improve legibility.
- Move async behaviour to beforeEach and keep test stubs synchronous to improve labeling of tests.
@thomasneirynck thomasneirynck merged commit 8569bd1 into elastic:master Dec 1, 2016
elastic-jasper added a commit that referenced this pull request Dec 1, 2016
Backports PR #9251

**Commit 1:**
Skip assertion when the test blips.

Tests fails intermittently, and for identical reasons. When this occurs, skip the test. This only occurs in CI and cannot be reproduced locally.

Additional changes:
- Use async/await to improve legibility.
- Move async behaviour to beforeEach and keep test stubs synchronous to improve labeling of tests.

* Original sha: d5b6879
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-29T18:32:45Z
elastic-jasper added a commit that referenced this pull request Dec 1, 2016
Backports PR #9251

**Commit 1:**
Skip assertion when the test blips.

Tests fails intermittently, and for identical reasons. When this occurs, skip the test. This only occurs in CI and cannot be reproduced locally.

Additional changes:
- Use async/await to improve legibility.
- Move async behaviour to beforeEach and keep test stubs synchronous to improve labeling of tests.

* Original sha: d5b6879
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-29T18:32:45Z
thomasneirynck pushed a commit that referenced this pull request Dec 1, 2016
Backports PR #9251

**Commit 1:**
Skip assertion when the test blips.

Tests fails intermittently, and for identical reasons. When this occurs, skip the test. This only occurs in CI and cannot be reproduced locally.

Additional changes:
- Use async/await to improve legibility.
- Move async behaviour to beforeEach and keep test stubs synchronous to improve labeling of tests.

* Original sha: d5b6879
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-29T18:32:45Z
thomasneirynck pushed a commit that referenced this pull request Dec 1, 2016
Backports PR #9251

**Commit 1:**
Skip assertion when the test blips.

Tests fails intermittently, and for identical reasons. When this occurs, skip the test. This only occurs in CI and cannot be reproduced locally.

Additional changes:
- Use async/await to improve legibility.
- Move async behaviour to beforeEach and keep test stubs synchronous to improve labeling of tests.

* Original sha: d5b6879
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-29T18:32:45Z
stacey-gammon added a commit to stacey-gammon/kibana that referenced this pull request Dec 2, 2016
Also clean up and simplify scope destroying

Fix sorting on scripted date and boolean fields (elastic#9261)

The elasticsearch API only [supports][1][2] sort scripts of type `number` and
`string`. Since dates need to be returned as millis since the epoch for
visualizations to work anyway, we can simply add a condition to send dates
as type number in the sort API. ES will cast booleans if we tell them
its a string, so we can add a similar condition there as well.

[1]: https://www.elastic.co/guide/en/elasticsearch/reference/5.0/search-request-sort.html#_script_based_sorting
[2]: https://github.com/elastic/elasticsearch/blob/aeb97ff41298e26b107a733837dfe17f123c0c9b/core/src/main/java/org/elasticsearch/search/sort/ScriptSortBuilder.java#L359

Fixes: elastic#9257

Add docs on all available console server config options (elastic#9288)

settings: do not query ES for settings in non-green status (elastic#9308)

If the ui settings status is not green, that means there is at least one
dependency (so elasticsearch at the moment) that is not met in order for
it to function correctly, so we shouldn't attempt to determine user
settings at all.

This ensures that when something like the version check fails in the
elasticsearch plugin, Kibana correctly behaves by not attempting
requests to elasticsearch, which prevents 500 errors and allows users to
see the error status on the status page.

We also now periodically check for compatible elasticsearch versions so
that Kibana can automatically recover if the elasticsearch node is
upgraded to the appropriate version.

Change loading screen background to white to make it less distracting when navigating between apps. (elastic#9313)

more refactoring

Fix sorting on scripted date and boolean fields (elastic#9261)

The elasticsearch API only [supports][1][2] sort scripts of type `number` and
`string`. Since dates need to be returned as millis since the epoch for
visualizations to work anyway, we can simply add a condition to send dates
as type number in the sort API. ES will cast booleans if we tell them
its a string, so we can add a similar condition there as well.

[1]: https://www.elastic.co/guide/en/elasticsearch/reference/5.0/search-request-sort.html#_script_based_sorting
[2]: https://github.com/elastic/elasticsearch/blob/aeb97ff41298e26b107a733837dfe17f123c0c9b/core/src/main/java/org/elasticsearch/search/sort/ScriptSortBuilder.java#L359

Fixes: elastic#9257

Add docs on all available console server config options (elastic#9288)

settings: do not query ES for settings in non-green status (elastic#9308)

If the ui settings status is not green, that means there is at least one
dependency (so elasticsearch at the moment) that is not met in order for
it to function correctly, so we shouldn't attempt to determine user
settings at all.

This ensures that when something like the version check fails in the
elasticsearch plugin, Kibana correctly behaves by not attempting
requests to elasticsearch, which prevents 500 errors and allows users to
see the error status on the status page.

We also now periodically check for compatible elasticsearch versions so
that Kibana can automatically recover if the elasticsearch node is
upgraded to the appropriate version.

Change loading screen background to white to make it less distracting when navigating between apps. (elastic#9313)

Skip assertion when the test blips. (elastic#9251)

Tests fails intermittently, and for identical reasons. When this occurs, skip the test. This only occurs in CI and cannot be reproduced locally.

Additional changes:
- Use async/await to improve legibility.
- Move async behaviour to beforeEach and keep test stubs synchronous to improve labeling of tests.

[git] ignore extra files in the root config/ directory (elastic#9296)

upgrade makelogs (elastic#9295)

build: remove deepModules hackery (elastic#9327)

The deepModules hacks in the build system were added to support the long
paths that resulted from npm2, but npm3 fundamentally addresses that
problem, so deepModules is no longer necessary. In practical terms, npm3
shouldn't ever cause path lengths to become so long that they trigger
path length problems on certain operating systems.

more cleanup and tests

Save/rename flow fix (elastic#9087)

* Save/rename flow fix

- Use auto generated ids instead of coupling the id to the title which
creates problems.
- Adjust UI to make the save flow more understandable.
- Remove confirmation on overwrite since we will now be creating
duplicate objects even if they have the same title.

* use undefined instead of null

* Change titleChanged function name

* address code review comments

* Add isSaving flag to avoid checkbox flicker, fix regression bug from refactor.
Added tests and fixed a couple bugs
Updated info message

* Update doc and nav title with new name on rename
don't hardcode Dashboard
stacey-gammon added a commit that referenced this pull request Dec 7, 2016
* make scope isolate

* Make panel scope isolate

Also clean up and simplify scope destroying

Fix sorting on scripted date and boolean fields (#9261)

The elasticsearch API only [supports][1][2] sort scripts of type `number` and
`string`. Since dates need to be returned as millis since the epoch for
visualizations to work anyway, we can simply add a condition to send dates
as type number in the sort API. ES will cast booleans if we tell them
its a string, so we can add a similar condition there as well.

[1]: https://www.elastic.co/guide/en/elasticsearch/reference/5.0/search-request-sort.html#_script_based_sorting
[2]: https://github.com/elastic/elasticsearch/blob/aeb97ff41298e26b107a733837dfe17f123c0c9b/core/src/main/java/org/elasticsearch/search/sort/ScriptSortBuilder.java#L359

Fixes: #9257

Add docs on all available console server config options (#9288)

settings: do not query ES for settings in non-green status (#9308)

If the ui settings status is not green, that means there is at least one
dependency (so elasticsearch at the moment) that is not met in order for
it to function correctly, so we shouldn't attempt to determine user
settings at all.

This ensures that when something like the version check fails in the
elasticsearch plugin, Kibana correctly behaves by not attempting
requests to elasticsearch, which prevents 500 errors and allows users to
see the error status on the status page.

We also now periodically check for compatible elasticsearch versions so
that Kibana can automatically recover if the elasticsearch node is
upgraded to the appropriate version.

Change loading screen background to white to make it less distracting when navigating between apps. (#9313)

more refactoring

Fix sorting on scripted date and boolean fields (#9261)

The elasticsearch API only [supports][1][2] sort scripts of type `number` and
`string`. Since dates need to be returned as millis since the epoch for
visualizations to work anyway, we can simply add a condition to send dates
as type number in the sort API. ES will cast booleans if we tell them
its a string, so we can add a similar condition there as well.

[1]: https://www.elastic.co/guide/en/elasticsearch/reference/5.0/search-request-sort.html#_script_based_sorting
[2]: https://github.com/elastic/elasticsearch/blob/aeb97ff41298e26b107a733837dfe17f123c0c9b/core/src/main/java/org/elasticsearch/search/sort/ScriptSortBuilder.java#L359

Fixes: #9257

Add docs on all available console server config options (#9288)

settings: do not query ES for settings in non-green status (#9308)

If the ui settings status is not green, that means there is at least one
dependency (so elasticsearch at the moment) that is not met in order for
it to function correctly, so we shouldn't attempt to determine user
settings at all.

This ensures that when something like the version check fails in the
elasticsearch plugin, Kibana correctly behaves by not attempting
requests to elasticsearch, which prevents 500 errors and allows users to
see the error status on the status page.

We also now periodically check for compatible elasticsearch versions so
that Kibana can automatically recover if the elasticsearch node is
upgraded to the appropriate version.

Change loading screen background to white to make it less distracting when navigating between apps. (#9313)

Skip assertion when the test blips. (#9251)

Tests fails intermittently, and for identical reasons. When this occurs, skip the test. This only occurs in CI and cannot be reproduced locally.

Additional changes:
- Use async/await to improve legibility.
- Move async behaviour to beforeEach and keep test stubs synchronous to improve labeling of tests.

[git] ignore extra files in the root config/ directory (#9296)

upgrade makelogs (#9295)

build: remove deepModules hackery (#9327)

The deepModules hacks in the build system were added to support the long
paths that resulted from npm2, but npm3 fundamentally addresses that
problem, so deepModules is no longer necessary. In practical terms, npm3
shouldn't ever cause path lengths to become so long that they trigger
path length problems on certain operating systems.

more cleanup and tests

Save/rename flow fix (#9087)

* Save/rename flow fix

- Use auto generated ids instead of coupling the id to the title which
creates problems.
- Adjust UI to make the save flow more understandable.
- Remove confirmation on overwrite since we will now be creating
duplicate objects even if they have the same title.

* use undefined instead of null

* Change titleChanged function name

* address code review comments

* Add isSaving flag to avoid checkbox flicker, fix regression bug from refactor.
Added tests and fixed a couple bugs
Updated info message

* Update doc and nav title with new name on rename
don't hardcode Dashboard

* namespace panel factory

cleanup

* Fix parameter name in html

* Address comments

- Get rid of factory function and Panel class.
- Rename panel.js to panel_state.js
- Rename dashboard_panel_directive to dashboard_panel

* Fix file path reference in tests.

* Panel => PanelState
elastic-jasper added a commit that referenced this pull request Dec 7, 2016
Backports PR #9335

**Commit 1:**
make scope isolate

* Original sha: c54eb3f
* Authored by Stacey Gammon <gammon@elastic.co> on 2016-11-30T20:55:28Z

**Commit 2:**
Make panel scope isolate

Also clean up and simplify scope destroying

Fix sorting on scripted date and boolean fields (#9261)

The elasticsearch API only [supports][1][2] sort scripts of type `number` and
`string`. Since dates need to be returned as millis since the epoch for
visualizations to work anyway, we can simply add a condition to send dates
as type number in the sort API. ES will cast booleans if we tell them
its a string, so we can add a similar condition there as well.

[1]: https://www.elastic.co/guide/en/elasticsearch/reference/5.0/search-request-sort.html#_script_based_sorting
[2]: https://github.com/elastic/elasticsearch/blob/aeb97ff41298e26b107a733837dfe17f123c0c9b/core/src/main/java/org/elasticsearch/search/sort/ScriptSortBuilder.java#L359

Fixes: #9257

Add docs on all available console server config options (#9288)

settings: do not query ES for settings in non-green status (#9308)

If the ui settings status is not green, that means there is at least one
dependency (so elasticsearch at the moment) that is not met in order for
it to function correctly, so we shouldn't attempt to determine user
settings at all.

This ensures that when something like the version check fails in the
elasticsearch plugin, Kibana correctly behaves by not attempting
requests to elasticsearch, which prevents 500 errors and allows users to
see the error status on the status page.

We also now periodically check for compatible elasticsearch versions so
that Kibana can automatically recover if the elasticsearch node is
upgraded to the appropriate version.

Change loading screen background to white to make it less distracting when navigating between apps. (#9313)

more refactoring

Fix sorting on scripted date and boolean fields (#9261)

The elasticsearch API only [supports][1][2] sort scripts of type `number` and
`string`. Since dates need to be returned as millis since the epoch for
visualizations to work anyway, we can simply add a condition to send dates
as type number in the sort API. ES will cast booleans if we tell them
its a string, so we can add a similar condition there as well.

[1]: https://www.elastic.co/guide/en/elasticsearch/reference/5.0/search-request-sort.html#_script_based_sorting
[2]: https://github.com/elastic/elasticsearch/blob/aeb97ff41298e26b107a733837dfe17f123c0c9b/core/src/main/java/org/elasticsearch/search/sort/ScriptSortBuilder.java#L359

Fixes: #9257

Add docs on all available console server config options (#9288)

settings: do not query ES for settings in non-green status (#9308)

If the ui settings status is not green, that means there is at least one
dependency (so elasticsearch at the moment) that is not met in order for
it to function correctly, so we shouldn't attempt to determine user
settings at all.

This ensures that when something like the version check fails in the
elasticsearch plugin, Kibana correctly behaves by not attempting
requests to elasticsearch, which prevents 500 errors and allows users to
see the error status on the status page.

We also now periodically check for compatible elasticsearch versions so
that Kibana can automatically recover if the elasticsearch node is
upgraded to the appropriate version.

Change loading screen background to white to make it less distracting when navigating between apps. (#9313)

Skip assertion when the test blips. (#9251)

Tests fails intermittently, and for identical reasons. When this occurs, skip the test. This only occurs in CI and cannot be reproduced locally.

Additional changes:
- Use async/await to improve legibility.
- Move async behaviour to beforeEach and keep test stubs synchronous to improve labeling of tests.

[git] ignore extra files in the root config/ directory (#9296)

upgrade makelogs (#9295)

build: remove deepModules hackery (#9327)

The deepModules hacks in the build system were added to support the long
paths that resulted from npm2, but npm3 fundamentally addresses that
problem, so deepModules is no longer necessary. In practical terms, npm3
shouldn't ever cause path lengths to become so long that they trigger
path length problems on certain operating systems.

more cleanup and tests

Save/rename flow fix (#9087)

* Save/rename flow fix

- Use auto generated ids instead of coupling the id to the title which
creates problems.
- Adjust UI to make the save flow more understandable.
- Remove confirmation on overwrite since we will now be creating
duplicate objects even if they have the same title.

* use undefined instead of null

* Change titleChanged function name

* address code review comments

* Add isSaving flag to avoid checkbox flicker, fix regression bug from refactor.
Added tests and fixed a couple bugs
Updated info message

* Update doc and nav title with new name on rename
don't hardcode Dashboard

* Original sha: e76f638
* Authored by Stacey Gammon <gammon@elastic.co> on 2016-12-01T18:54:50Z

**Commit 3:**
Merge branch 'master' of https://github.com/elastic/kibana into panel-refactor-cleanup

* Original sha: 82323be
* Authored by Stacey Gammon <gammon@elastic.co> on 2016-12-02T15:23:56Z

**Commit 4:**
namespace panel factory

cleanup

* Original sha: 3a09d66
* Authored by Stacey Gammon <gammon@elastic.co> on 2016-12-02T15:31:09Z

**Commit 5:**
Fix parameter name in html

* Original sha: 93afafa
* Authored by Stacey Gammon <gammon@elastic.co> on 2016-12-06T14:25:51Z

**Commit 6:**
Address comments

- Get rid of factory function and Panel class.
- Rename panel.js to panel_state.js
- Rename dashboard_panel_directive to dashboard_panel

* Original sha: aa8d6c8
* Authored by Stacey Gammon <gammon@elastic.co> on 2016-12-06T15:27:58Z

**Commit 7:**
Merge branch 'master' of https://github.com/elastic/kibana into panel-refactor-cleanup

* Original sha: cfd610a
* Authored by Stacey Gammon <gammon@elastic.co> on 2016-12-06T16:04:56Z

**Commit 8:**
Fix file path reference in tests.

* Original sha: 317e76e
* Authored by Stacey Gammon <gammon@elastic.co> on 2016-12-06T18:11:42Z

**Commit 9:**
Merge branch 'master' of https://github.com/elastic/kibana into panel-refactor-cleanup

* Original sha: a6288dd
* Authored by Stacey Gammon <gammon@elastic.co> on 2016-12-07T14:22:36Z

**Commit 10:**
Panel => PanelState

* Original sha: c87f45b
* Authored by Stacey Gammon <gammon@elastic.co> on 2016-12-07T14:32:08Z
stacey-gammon pushed a commit that referenced this pull request Dec 14, 2016
Backports PR #9335

**Commit 1:**
make scope isolate

* Original sha: c54eb3f
* Authored by Stacey Gammon <gammon@elastic.co> on 2016-11-30T20:55:28Z

**Commit 2:**
Make panel scope isolate

Also clean up and simplify scope destroying

Fix sorting on scripted date and boolean fields (#9261)

The elasticsearch API only [supports][1][2] sort scripts of type `number` and
`string`. Since dates need to be returned as millis since the epoch for
visualizations to work anyway, we can simply add a condition to send dates
as type number in the sort API. ES will cast booleans if we tell them
its a string, so we can add a similar condition there as well.

[1]: https://www.elastic.co/guide/en/elasticsearch/reference/5.0/search-request-sort.html#_script_based_sorting
[2]: https://github.com/elastic/elasticsearch/blob/aeb97ff41298e26b107a733837dfe17f123c0c9b/core/src/main/java/org/elasticsearch/search/sort/ScriptSortBuilder.java#L359

Fixes: #9257

Add docs on all available console server config options (#9288)

settings: do not query ES for settings in non-green status (#9308)

If the ui settings status is not green, that means there is at least one
dependency (so elasticsearch at the moment) that is not met in order for
it to function correctly, so we shouldn't attempt to determine user
settings at all.

This ensures that when something like the version check fails in the
elasticsearch plugin, Kibana correctly behaves by not attempting
requests to elasticsearch, which prevents 500 errors and allows users to
see the error status on the status page.

We also now periodically check for compatible elasticsearch versions so
that Kibana can automatically recover if the elasticsearch node is
upgraded to the appropriate version.

Change loading screen background to white to make it less distracting when navigating between apps. (#9313)

more refactoring

Fix sorting on scripted date and boolean fields (#9261)

The elasticsearch API only [supports][1][2] sort scripts of type `number` and
`string`. Since dates need to be returned as millis since the epoch for
visualizations to work anyway, we can simply add a condition to send dates
as type number in the sort API. ES will cast booleans if we tell them
its a string, so we can add a similar condition there as well.

[1]: https://www.elastic.co/guide/en/elasticsearch/reference/5.0/search-request-sort.html#_script_based_sorting
[2]: https://github.com/elastic/elasticsearch/blob/aeb97ff41298e26b107a733837dfe17f123c0c9b/core/src/main/java/org/elasticsearch/search/sort/ScriptSortBuilder.java#L359

Fixes: #9257

Add docs on all available console server config options (#9288)

settings: do not query ES for settings in non-green status (#9308)

If the ui settings status is not green, that means there is at least one
dependency (so elasticsearch at the moment) that is not met in order for
it to function correctly, so we shouldn't attempt to determine user
settings at all.

This ensures that when something like the version check fails in the
elasticsearch plugin, Kibana correctly behaves by not attempting
requests to elasticsearch, which prevents 500 errors and allows users to
see the error status on the status page.

We also now periodically check for compatible elasticsearch versions so
that Kibana can automatically recover if the elasticsearch node is
upgraded to the appropriate version.

Change loading screen background to white to make it less distracting when navigating between apps. (#9313)

Skip assertion when the test blips. (#9251)

Tests fails intermittently, and for identical reasons. When this occurs, skip the test. This only occurs in CI and cannot be reproduced locally.

Additional changes:
- Use async/await to improve legibility.
- Move async behaviour to beforeEach and keep test stubs synchronous to improve labeling of tests.

[git] ignore extra files in the root config/ directory (#9296)

upgrade makelogs (#9295)

build: remove deepModules hackery (#9327)

The deepModules hacks in the build system were added to support the long
paths that resulted from npm2, but npm3 fundamentally addresses that
problem, so deepModules is no longer necessary. In practical terms, npm3
shouldn't ever cause path lengths to become so long that they trigger
path length problems on certain operating systems.

more cleanup and tests

Save/rename flow fix (#9087)

* Save/rename flow fix

- Use auto generated ids instead of coupling the id to the title which
creates problems.
- Adjust UI to make the save flow more understandable.
- Remove confirmation on overwrite since we will now be creating
duplicate objects even if they have the same title.

* use undefined instead of null

* Change titleChanged function name

* address code review comments

* Add isSaving flag to avoid checkbox flicker, fix regression bug from refactor.
Added tests and fixed a couple bugs
Updated info message

* Update doc and nav title with new name on rename
don't hardcode Dashboard

* Original sha: e76f638
* Authored by Stacey Gammon <gammon@elastic.co> on 2016-12-01T18:54:50Z

**Commit 3:**
Merge branch 'master' of https://github.com/elastic/kibana into panel-refactor-cleanup

* Original sha: 82323be
* Authored by Stacey Gammon <gammon@elastic.co> on 2016-12-02T15:23:56Z

**Commit 4:**
namespace panel factory

cleanup

* Original sha: 3a09d66
* Authored by Stacey Gammon <gammon@elastic.co> on 2016-12-02T15:31:09Z

**Commit 5:**
Fix parameter name in html

* Original sha: 93afafa
* Authored by Stacey Gammon <gammon@elastic.co> on 2016-12-06T14:25:51Z

**Commit 6:**
Address comments

- Get rid of factory function and Panel class.
- Rename panel.js to panel_state.js
- Rename dashboard_panel_directive to dashboard_panel

* Original sha: aa8d6c8
* Authored by Stacey Gammon <gammon@elastic.co> on 2016-12-06T15:27:58Z

**Commit 7:**
Merge branch 'master' of https://github.com/elastic/kibana into panel-refactor-cleanup

* Original sha: cfd610a
* Authored by Stacey Gammon <gammon@elastic.co> on 2016-12-06T16:04:56Z

**Commit 8:**
Fix file path reference in tests.

* Original sha: 317e76e
* Authored by Stacey Gammon <gammon@elastic.co> on 2016-12-06T18:11:42Z

**Commit 9:**
Merge branch 'master' of https://github.com/elastic/kibana into panel-refactor-cleanup

* Original sha: a6288dd
* Authored by Stacey Gammon <gammon@elastic.co> on 2016-12-07T14:22:36Z

**Commit 10:**
Panel => PanelState

* Original sha: c87f45b
* Authored by Stacey Gammon <gammon@elastic.co> on 2016-12-07T14:32:08Z
airow pushed a commit to airow/kibana that referenced this pull request Feb 16, 2017
Backports PR elastic#9251

**Commit 1:**
Skip assertion when the test blips.

Tests fails intermittently, and for identical reasons. When this occurs, skip the test. This only occurs in CI and cannot be reproduced locally.

Additional changes:
- Use async/await to improve legibility.
- Move async behaviour to beforeEach and keep test stubs synchronous to improve labeling of tests.

* Original sha: d5b6879
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-29T18:32:45Z

Former-commit-id: 339ff4d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants