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

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

Merged
merged 1 commit into from
Aug 31, 2018

Conversation

cjcenizal
Copy link
Contributor

Fixes #22466, a regression introduced into 6.4.0 by #20497.

@cjcenizal cjcenizal added bug Fixes for quality problems that affect the customer experience :Discovery v7.0.0 v6.5.0 v6.4.1 labels Aug 30, 2018
@cjcenizal cjcenizal requested review from nreese and spalger August 30, 2018 19:19
@@ -183,17 +183,18 @@ export function CallClientProvider(Private, Promise, es) {
}
});

// If there are any errors, notify the searchRequests of them.
defer.promise.catch((err) => {
Copy link
Contributor Author

@cjcenizal cjcenizal Aug 30, 2018

Choose a reason for hiding this comment

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

By returning the original defer.promise instead of the result of calling defer.promise.catch(), we created two parallel promise chains which would both catch the same error. By returning the result of defer.promise.catch(), we preserve the single promise chain, allowing us to prevent errors from reaching the consumer (fetch_now.js). The consumer creates fatal errors in response to rejected promises.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@cjcenizal
Copy link
Contributor Author

Looks like the run:pluginFunctionalTestsRelease task failed to run.

20:55:18    │ proc [kibana]   log   [20:55:18.893] [info][status][plugin:elasticsearch@7.0.0-alpha1] Status changed from yellow to green - Ready
20:55:19    │ warn Failure loading service "remote"
20:55:19    │ERROR [POST http://localhost:9515/session / {"desiredCapabilities":{},"requiredCapabilities":{}}] unknown error: Chrome failed to start: exited abnormally
20:55:19    │        (unknown error: DevToolsActivePort file doesn't exist)
20:55:19    │        (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
20:55:19    │        (Driver info: chromedriver=2.41.578700 (2f1ed5f9343c13f73144538f15c00b370eda6706),platform=Linux 4.9.0-8-amd64 x86_64)
20:55:19    │          at Server._post (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-selenium/kibana/test/functional/services/remote/verbose_remote_logging.js:34:21)
20:55:19    │          at Server.createSession (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-selenium/kibana/node_modules/leadfoot/Server.js:362:15)
20:55:19    │          at attemptToCreateCommand (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-selenium/kibana/test/functional/services/remote/leadfoot_command.js:38:32)
20:55:19    │          at Promise.race (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-selenium/kibana/test/functional/services/remote/leadfoot_command.js:86:11)
20:55:19    │          at initLeadfootCommand (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-selenium/kibana/test/functional/services/remote/leadfoot_command.js:63:5)
20:55:19    │          at RemoteProvider (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-selenium/kibana/test/functional/services/remote/remote.js:40:29)
20:55:19    │          at <anonymous>
20:55:19    │ warn 1 processes left running, stop them with procs.stop(name): [ 'kibana' ]
20:55:19    │ info [kibana] exited with null after a minute
20:55:19 
20:55:19 Failure initializing 1 service(s)
20:55:19     at ProviderCollection.loadAll (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-selenium/kibana/src/functional_test_runner/lib/providers/provider_collection.js:71:13)
20:55:19     at <anonymous>
20:55:19     at process._tickCallback (internal/process/next_tick.js:188:7)
20:55:19 
20:55:19 Warning: non-zero exit code 1� Use --force to continue.

@cjcenizal
Copy link
Contributor Author

Retest

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@nreese nreese left a comment

Choose a reason for hiding this comment

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

Great job tracking this one down. This one has hard to pinpoint.

lgtm
code review, tested changes and verified that problem has been resolved.

Copy link
Contributor

@spalger spalger left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience v6.4.1 v6.5.0 v7.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants