Bug 1982521 - Avoid calling fetchPushes from both App and PushList. #8912
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.
When loading the treeherder jobs view with the "fromchange" parameter specified in the url, sometimes the parameter is respected, sometimes it isn't. That's due to a race between the fetchPushes() call made by App.jsx (since 9375945) and the fetchPushes call from PushList.jsx.
In that commit I tried to add a pre-fetch without removing the fetch that was triggered from the PushList component, but now I wonder why I made it so complicated. Unless I'm missing something, the PushList component will only exist once, so it shouldn't need to fetch again.
My confidence level in this PR isn't very high. It fixes the bug locally, but I'm not convinced yet it doesn't cause other regressions (and there's at least the tests/ui/job-view/PushList_test.jsx test that fails, not sure if it needs to be adjusted or if it's catching regressions. That test might actually be the reason why I kept both fetchPushes calls in the previous PR.).