Skip to content

Bug 1982521 - Avoid calling fetchPushes from both App and PushList. #8912

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fqueze
Copy link
Contributor

@fqueze fqueze commented Aug 14, 2025

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.).

@fqueze
Copy link
Contributor Author

fqueze commented Aug 18, 2025

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.).

After sleeping on it multiple nights, I think the test failing was the reason I ended up with such needlessly complicated code, and actually the test just needed to be adjusted to call fetchPushes directly.

Unless I'm missing something, the PushList component will only exist once

If this assumption is correct, then the patch should be OK. But feel free to point it out if I'm mistaken here, and don't hesitate to give it thorough local testing while reviewing.

@fqueze fqueze changed the title [WIP] Bug 1982521 - Avoid calling fetchPushes from both App and PushList. Bug 1982521 - Avoid calling fetchPushes from both App and PushList. Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant