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

0365 Add type assertions to painless scripts #1642

Merged
merged 1 commit into from
Sep 20, 2021

Conversation

leehinman
Copy link
Contributor

What does this PR do?

  • Adds type assertion of Map when containsKey() is used
  • Adds type assertion of List when accessing as array

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
    - [ ] If I'm introducing a new feature, I have modified the Kibana version constraint in my package's manifest.yml file to point to the latest Elastic stack release (e.g. ^7.13.0).

How to test this PR locally

elastic-package test

@elasticmachine
Copy link

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@elasticmachine
Copy link

elasticmachine commented Sep 10, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2021-09-10T20:18:01.504+0000

  • Duration: 16 min 34 sec

  • Commit: dbb7fac

Test stats 🧪

Test Results
Failed 0
Passed 26
Skipped 0
Total 26

Trends 🧪

Image of Build Times

Image of Tests

Copy link
Member

@andrewkroh andrewkroh left a comment

Choose a reason for hiding this comment

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

LGTM. Do we have any log samples to test with where the data within AlertLinks are not objects?

@leehinman
Copy link
Contributor Author

LGTM. Do we have any log samples to test with where the data within AlertLinks are not objects?

No, unfortunately I haven't gotten event.originals from the case yet. Will update with test cases when/if we get them. These changes were based off the following error.messages

dynamic method [java.lang.String, containsKey/1] not found
Provided Grok expressions do not match field value: [AB1CD23EF4567 (10.10.10.10)\r]
Attempting to address a non-array-like type [java.lang.String] as an array.

@leehinman leehinman merged commit 0477a34 into elastic:master Sep 20, 2021
@leehinman leehinman deleted the o365_pipeline_errors branch September 20, 2021 17:51
eyalkraft pushed a commit to build-security/integrations that referenced this pull request Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants