Skip to content
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

Suspend incomplete requests #9636

Open
wants to merge 8 commits into
base: v2
Choose a base branch
from
Open

Suspend incomplete requests #9636

wants to merge 8 commits into from

Conversation

benjervis
Copy link
Contributor

Some investigations during a previous PR (#9633) revealed that the long standing DevDepRequest error might be caused by a worker farm-related race condition.

As a possible fix for it, we've added a registry of incomplete requests where we suspend the processing of runRequest until the details have been returned from worker land.

It's currently locked behind a feature flag until we've done a bit more testing in the wild.

Copy link
Contributor

@marcins marcins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to me, especially behind an FF so we can validate if that's the cause of our issues.

Note though you have a Flow error that'll prevent merging.

for (let filePath of nullthrows(
devDepRequest.invalidateOnFileChange,
'DevDepRequest missing invalidateOnFileChange',
)) {
api.invalidateOnFileUpdate(filePath);
api.invalidateOnFileDelete(filePath);
}

for (let invalidation of nullthrows(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably look at adding a lint rule to ensure nullthrows always has a description

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could just change the type definition. It'd be a bit of work though 😅

@@ -1029,6 +1031,10 @@ export default class RequestTracker {
options: ParcelOptions;
signal: ?AbortSignal;
stats: Map<RequestType, number> = new Map();
incompleteRequests: Map<
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have RequestGraph#incompleteNodeIds and also incompleteNodePromises. Could you use those here?

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.

None yet

5 participants