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

[8.7] Add date_nanos support to Time field (#151374) #151724

Merged
merged 1 commit into from
Feb 21, 2023

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.7:

Questions ?

Please refer to the Backport tool documentation

Fixes: elastic#145855

`Time field` in rule update/create forms shows only the fields with
`date` data type. This PR adds `date_nanos` type as well.

## To verify:

- Create an index that has fields with `date` and `date_nanos` types.
```
PUT test-index-date
{
  "mappings": {
    "properties": {
      "date": {
        "type": "date"
      },
      "timestamp": {
        "type": "date_nanos"
      }
    }
  }
}
```
- Add data with `date` and `date_nanos` data types
Note: You can use
https://www.site24x7.com/tools/time-stamp-converter.html address to
generate date_nanos timestamps with a date you desired.
```
PUT test-index-date/_bulk?refresh
{ "index" : { "_id" : "1" } }
{ "date": "2023-02-15T18:00:00.000Z", "timestamp": 1676480400000}
{ "index" : { "_id" : "2" } }
{ "date": "2023-02-15T18:00:00.000Z", "timestamp": 1676480400000 }
```
- Open a Rule create form and select `Elasticsearch query`
- Select `Query DSL`
- Click on `select an index`
- Type the above index name (test-index-date) in `Indices to query`
input
- Select `timestamp` from time field
- Click on `Test Query` button and expect to see `Query matched 2
documents in the last 5m.`

(cherry picked from commit 58204cf)
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
stackAlerts 80.3KB 80.3KB +49.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
triggersActionsUi 123.4KB 123.4KB +23.0B

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @ersin-erdal

@kibanamachine kibanamachine merged commit b4c69c4 into elastic:8.7 Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants