-
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
Bugfix for exception at discover context view using date_nanos #41353
Bugfix for exception at discover context view using date_nanos #41353
Conversation
💔 Build Failed |
retest |
…48-log-context-view-error
💚 Build Succeeded |
test('extract nanos of 2014-01-01T12:12:12.234123321Z', function() { | ||
expect(extractNanos('2014-01-01T12:12:12.234123321Z')).toBe('234123321'); | ||
}); | ||
}); |
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.
just a new test catching the bug
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.
I pulled in the code and ran locally in Chrome. I followed the reproducibility described in 41348 and getting an error with the date being parsed as before epoch time.
"reason":"date[1967-10-29T08:30:00Z] is before the epoch in 1970 and cannot be stored in nanosecond resolution"
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.
After setting mu OSS timezone to Vienna Europe, the fix works as expected:
However, using my local timezone (Arizona) in my OSS or Setting that to Pretoria, South Africa, causes a time parsing problem where the time is parsed as a negative offset to the current time. It looks like the date is being parsed in negative years.
…ic#41353) * Fix extracting nanos of timestamps with only dates * Add jest test catching it
…ic#41353) * Fix extracting nanos of timestamps with only dates * Add jest test catching it
… (#41555) * Fix extracting nanos of timestamps with only dates * Add jest test catching it
… (#41554) * Fix extracting nanos of timestamps with only dates * Add jest test catching it
Hi! The exact same error being faced for someone accessing it in India. Fails with the above error. But does not give that error when in America/Phoenix timezone. I am running ES 7.4.2 version. I am not clear about the fix here. |
Summary
Fix exception for Elasticsearch records with
date_nanos
fields that contain dates without seconds.So now context view works with dates like
2014-01-01
.Fixes #41348
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 IE11- [ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support- [ ] Documentation was added for features that require explanation or tutorials- [ ] This was checked for keyboard-only and screenreader accessibilityFor maintainers
- [ ] This was checked for breaking API changes and was labeled appropriately- [ ] This includes a feature addition or change that requires a release note and was labeled appropriately