-
Notifications
You must be signed in to change notification settings - Fork 8k
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
[RAM] Remove errors and warning in triggers_actions_ui jest test #144443
Conversation
const [isPopoverOpen, setIsPopoverOpen] = useState<boolean>(false); | ||
|
||
useEffect(() => { |
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.
this was causing rerenders that also caused duplicated calls to the api. Having the bug duplicated in another component meant to be calling the api 4 times
useEffect(() => { | ||
loadData(); | ||
}, [loadData, percentileOptions]); | ||
}, [loadData, refresh, percentileOptions]); |
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.
this was doing 2 api calls, joining it means only one api call
await setup(); | ||
expect(wrapper.find('EuiBasicTable')).toHaveLength(1); | ||
expect(wrapper.find('EuiTableRow')).toHaveLength(mockedRulesData.length); | ||
describe('render table of rules', () => { |
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.
instead of one test that took over 4 seconds we split into smaller tests that won't be working near the timeout limit. We avoid creating the wrapper every time by using beforeAll so there is no effective time loss
Pinging @elastic/response-ops (Team:ResponseOps) |
I don't see the |
For https://buildkite.com/elastic/kibana-pull-request/builds/85480#01844303-94db-4a41-b093-7623154677d2 The same happens for the second build you shared, but this time you'll find it here https://buildkite.com/elastic/kibana-pull-request/builds/85556#018443a0-01a4-4c7d-b67b-9b9b1c6fd136 |
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.
LGTM
@jcger thanks for pointing to those logs; I wasn't expecting the truncation to eat up the log rollups, but that makes sense |
...triggers_actions_ui/public/application/sections/rules_list/components/action_type_filter.tsx
Outdated
Show resolved
Hide resolved
It's really nice PR! 🥇 |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
Unknown metric groupsESLint disabled in files
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
Summary
Closes #144445
There are warnings/erros that are not going to be fixed here, but I've created issues for them:
In this PR we mostly improved the rule list:
It went down from rendering 17 times to 11 when no rule defined
It went down from rendering 31 times when 1 rule defined to 12
This made the tests much faster than before:
Before ~36s
![Screenshot 2022-11-04 at 15 02 11](https://user-images.githubusercontent.com/17549662/199991581-202a0258-2e4a-4467-ad1e-be6aa23eaa51.png)
After ~16s
![Screenshot 2022-11-04 at 15 02 53](https://user-images.githubusercontent.com/17549662/199992671-57a839fa-891e-43ca-ae6c-0762c97ea552.png)