-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[task-manager] Improve messaging on error due to inline scripts being disabled #49860
[task-manager] Improve messaging on error due to inline scripts being disabled #49860
Conversation
…nd make error clearer
Pinging @elastic/kibana-stack-services (Team:Stack Services) |
💚 Build Succeeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM; made some comments, think it is good for 7.5, maybe a bit log spammy, assuming that sort of thing would get fixed in a later release.
return docs; | ||
} catch (ex) { | ||
if (identifyEsError(ex).includes('cannot execute [inline] scripts')) { | ||
logger.warn( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we end up seeing this message over and over? Seems like since it only logs a warning in this case, and then ends up returning []
, we'll see this every interval. Should it set some state variable somewhere to indicate "it's never going to work" so we just don't ever try? I guess that doesn't make sense, if they fix ES and start again with Kibana still running. hmmm ...
I guess I woulda expected it to still throw after writing the message, rather than soldier on and return []
. Perhaps that a bit fatal-y and we don't want that either?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will appear on every poll, but throwing won't prevent that.
My thinking is that throwing will result in polluting the log with both the messaging and the error... feels better to just message what the issue is, no?
As for a global state thing... like you said, it could cause other issues such as ES being sorted but Kibana thinking it can't use TM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, seems in line with what others are doing.
💚 Build Succeeded |
…ng disabled (elastic#49860) This PR detects when claiming tasks fails due to inline scripts being disabled in Elasticsearch and improves the message reported in the Kibana log.
…ng disabled (elastic#49860) This PR detects when claiming tasks fails due to inline scripts being disabled in Elasticsearch and improves the message reported in the Kibana log.
addresses #49853, but doesn't resolve it completely as further mitigation may very likely be required.
Summary
This PR detects when claiming tasks fails due to inline scripts being disabled in Elasticsearch and improves the message reported in the Kibana log.
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.This was checked for cross-browser compatibility, including a check against IE11Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n supportDocumentation was added for features that require explanation or tutorialsThis was checked for keyboard-only and screenreader accessibilityFor maintainers