-
Notifications
You must be signed in to change notification settings - Fork 444
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
[O365] Check contentExpiration timestamp before requesting contents #9477
Conversation
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
( | ||
request("GET", l1.contentUri).do_request().as(content_resp, | ||
(has(content_resp.StatusCode) && content_resp.StatusCode == 200) ? | ||
( |
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.
Indent this block one level.
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.
indented the block
) | ||
) | ||
: | ||
{ |
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.
Indent this block one level.
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.
indented the block
"next_page": ( | ||
(has(list_contents_resp.Header) && has(list_contents_resp.Header.NextPageUri) ) ? | ||
list_contents_resp.Header.NextPageUri[0] | ||
: (has(list_contents_resp.Header) && has(list_contents_resp.Header.Nextpageuri)) ? | ||
list_contents_resp.Header.Nextpageuri[0] | ||
: | ||
"" |
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.
Since we are now on 8.12.
"next_page": ( | |
(has(list_contents_resp.Header) && has(list_contents_resp.Header.NextPageUri) ) ? | |
list_contents_resp.Header.NextPageUri[0] | |
: (has(list_contents_resp.Header) && has(list_contents_resp.Header.Nextpageuri)) ? | |
list_contents_resp.Header.Nextpageuri[0] | |
: | |
"" | |
"next_page": list_contents_resp.?Header.NextPageUri.orValue(list_contents_resp.?Header.Nextpageuri).orValue(""), |
(we can probably get nice cleanup throughout by using these, but lets do that in another PR, rather than in a bugfix)
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.
Agreed. I was thinking of the same in another PR.
"events_per_content_type": [], | ||
"content_type": content_type, | ||
"content_created_at": {"temp": list_contents_resp_body}.collate("temp.contentCreated").max().as(temp_max, temp_max.parse_time(time_layout.RFC3339) > (now - duration("167h55m")) ? temp_max : (now - duration("167h55m")).format(time_layout.RFC3339)), | ||
"next_page": ( |
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.
See comment below for use of optional types.
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.
Will do the optional types conversion in another PR 👍🏼
💚 Build Succeeded
History
|
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
Package o365 - 2.3.1 containing this change is available at https://epr.elastic.co/search?package=o365 |
Proposed commit message
now
as the minimumkibana.version
is already updated to8.12
(now - duration("167h55m"))
Checklist
changelog.yml
file.How to test this PR locally
elastic-package stack down && elastic-package build && elastic-package stack up -d -v && eval "$(elastic-package stack shellinit)" && elastic-package test system --generate -v