Fixes #39018 - Fix infinite loop on job invocations page#1019
Conversation
4adf5f5 to
4ac2676
Compare
MariaAga
left a comment
There was a problem hiding this comment.
The fix works, thanks. Left comments for the tests
webpack/react_app/components/TargetingHosts/__tests__/WrappedTargetingHosts.test.js
Outdated
Show resolved
Hide resolved
| jest.clearAllMocks(); | ||
| }); | ||
|
|
||
| it('should render without infinite loop', () => { |
There was a problem hiding this comment.
Tests pass even with the infinite loop
|
Addressed your feedback:
You were right that the tests weren't actually validating the infinite loop fix - with a mock store, we can't simulate the Redux state changes that would trigger it. |
webpack/react_app/components/TargetingHosts/__tests__/WrappedTargetingHosts.test.js
Outdated
Show resolved
Hide resolved
|
@MariaAga Updated, removed the enzyme test and replaced it with a react-testing-library test. However I still can't get it to actually fail with the old code, so do you think we should remove it or keep it? |
|
If they dont fail with the old code I dont think they are relevant to this PR then, and shouldnt be included in here |
|
ok, removed the test |
MariaAga
left a comment
There was a problem hiding this comment.
LGTM, tested with packit as well.
@jeremylenz Could you squash the commits?
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
6524546 to
03c445b
Compare
|
squashed |
Summary
/legacy/job_invocations/:iduseEffecthook creating a feedback loop with Redux statestatusFilterchanges (chart clicks) and removed dependencies that caused the loopTest plan
/legacy/job_invocations/:idin the browser and verify the page loads without freezingnpm test -- WrappedTargetingHosts.test.js🤖 Generated with Claude Code