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

Build: Fix DLL generation race condition #9770

Merged
merged 1 commit into from Feb 6, 2020
Merged

Conversation

ndelangen
Copy link
Member

Issue: #9707

What I did

FIX it with some very funk setTimeout

@ndelangen ndelangen added maintenance User-facing maintenance tasks patch:yes Bugfix & documentation PR that need to be picked to main branch labels Feb 5, 2020
@ndelangen ndelangen self-assigned this Feb 5, 2020
@ndelangen ndelangen added this to the 5.3.x milestone Feb 5, 2020
@shilman shilman changed the title FIX https://github.com/storybookjs/storybook/issues/9707 Build: Fix DLL generation race condition Feb 5, 2020
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

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

Ugly, but I'll take it if it works. I take it you've already tried smaller timeouts (0, 1) and that wasn't enough?

@ndelangen
Copy link
Member Author

No I didn't try smaller ones, this was the first one I tried, and it worked.

Shall I lower this timeout?

@shilman
Copy link
Member

shilman commented Feb 6, 2020

Were you able to repro the problem in the first place? Like I said, I'll take it if it works.

But generally speaking the less funky stuff we have in our codebase the better. setTimeout(0) is very clear what it's doing. setTimeout(1) less clear. setTimeout(5000) seems pretty arbitrary. I'm not making a fuss, since this is a build script, but wanted to raise it. Guessing you already know all this, but it never hurts to overcommunicate. 😄

@ndelangen
Copy link
Member Author

Yes I was able to reproduce.

I tested this twice on my local machine.

A 5 second delay was arbitrary, testing takes minutes, so after finding that the 5 second timeout worked, I was happy.

@ndelangen ndelangen closed this Feb 6, 2020
@ndelangen ndelangen deleted the fix/dll-generation branch February 6, 2020 22:11
@ndelangen ndelangen merged commit 8a959de into next Feb 6, 2020
@ndelangen ndelangen restored the fix/dll-generation branch February 6, 2020 22:11
@ndelangen ndelangen deleted the fix/dll-generation branch February 6, 2020 22:12
@shilman shilman added the patch:done Patch/release PRs already cherry-picked to main/release branch label Feb 12, 2020
shilman pushed a commit that referenced this pull request Feb 12, 2020
Build: Fix DLL generation race condition
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance User-facing maintenance tasks patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants