-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[Security Solution][Defend Workflows] Fix type errors indicated by TS 4.7.4. #163066
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
Merged
gergoabraham
merged 13 commits into
elastic:main
from
gergoabraham:chore/defend-workflows-fix-ts-4.7.4-type-errors
Sep 18, 2023
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
8723cbe
fix type errors for `pipeRun`
gergoabraham 76b6a06
fix type errors in detection engine api integration test
gergoabraham 2c16145
remove unnecessary check and add a spinner instead
gergoabraham d484b5a
remove unnecessary check
gergoabraham 8a4b0d6
Revert "fix type errors for `pipeRun`"
gergoabraham 6f76946
Merge branch 'main' into chore/defend-workflows-fix-ts-4.7.4-type-errors
kibanamachine 13cfd99
Merge branch 'main' into chore/defend-workflows-fix-ts-4.7.4-type-errors
kibanamachine dac76a5
remove browser filter from osquery cy tests
gergoabraham cf43db4
Revert "remove browser filter from osquery cy tests"
gergoabraham fa5836f
Merge branch 'main' into chore/defend-workflows-fix-ts-4.7.4-type-errors
kibanamachine 6ef6e1a
Merge branch 'main' into chore/defend-workflows-fix-ts-4.7.4-type-errors
kibanamachine 44daf46
Merge branch 'main' into chore/defend-workflows-fix-ts-4.7.4-type-errors
kibanamachine 8be2f2c
Merge branch 'main' into chore/defend-workflows-fix-ts-4.7.4-type-errors
kibanamachine File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this 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.
@gergoabraham I remember we had some issues here (not typescript but how it works). Are you sure this change preserves the behavior?
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 am mostly sure, yes...
OsqueryFormcomes fromuseKibana().services.osquery.OsqueryResponseActionTypeForm, which got its value during plugin start, and its value is the return value ofgetLazyOsqueryResponseActionTypeForm(), which - independently of the lazy load - returns a function component which itself is never falsy, so based on this, I believe there should be no problem....but...
I'm happy to test it if you can help what should be tested here. I did some basic tests (i.e. tried to use this component, by throttling network connection so it loads slowly) and there were no issues.
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 remember there was some strange behaviour that is why I made this OqueryForm check. I'll test it manually to see if this is not broken now. I am saying this just because there is a strange behavior in the test. It's not succesful - it's pending...

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 tested this manually and I think it still works as expected, thanks!
However - can you please do me a favor and remove the browser filter from here? Lets see if this make the test run then. https://github.com/elastic/kibana/blob/4180a1a105053e5579e6852082bdeaa06f019cd3/x-pack/plugins/osquery/cypress/e2e/all/alerts_response_actions_form.cy.ts#L33C16-L33C16
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.
thank you for testing it!
removed the browser filters, let's see what happens: dac76a5
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 think something is broken, moreover the artifacts are not build. Feel free to revert this commit and just ship your changes. I'll take care of osquery testing in a separate PR. How does this sound?
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.
revert is done, thanks for the help, @tomsonpl!
cf43db4