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

[BUG] Possible race condition when running build clean empty folder task on Mac OS #2847

Closed
DanielBelmes opened this issue Nov 9, 2022 · 6 comments
Labels
bug Something isn't working os - mac

Comments

@DanielBelmes
Copy link
Contributor

DanielBelmes commented Nov 9, 2022

Describe the bug

In src/dev/build/lib/fs.ts deleteEmptyFolders there is a race condition that can occur with the del library that will cause an error to be thrown(similar one referenced in the link to bug.)

To Reproduce
Steps to reproduce the behavior:

  1. Run build on Mac OS
  2. At end of build when clean empty folders is run you might see error with some of the build files being deleted.

Expected behavior
The expectation is that the build succeeds without fail.

OpenSearch Version
N/A

Dashboards Version
All current versions applicable

Plugins
N/A

Screenshots
N/A

Host/Environment (please complete the following information):

  • OS: Mac OS
  • Browser and version: Chrome 107.0.5304.110

Additional context

Version 6.1.1 of del is the latest version this repo can update to without having to change any existing code and to fix this bug.

@DanielBelmes DanielBelmes added bug Something isn't working untriaged labels Nov 9, 2022
@DanielBelmes DanielBelmes changed the title [BUG] Possible race condition when running build clean tasks on Mac OS [BUG] Possible race condition when running build clean empty folder task on Mac OS Nov 9, 2022
@seanneumann
Copy link
Contributor

Thanks @DanielBelmes for submitting the issue. Would you like to try to solve this? We'd love to support your contribution!

@DanielBelmes
Copy link
Contributor Author

DanielBelmes commented Nov 13, 2022

Hey thank you so much. Sorry for getting back to you a little slowly. I was just behind on emails. Didn't wanna submit a PR until someone had a look at the ticket. @seanneumann are you guys alright with me just updating the main and module(/packages) package.jsons and locks across the board? I believe when I did the change locally on just the main package.json to test it out there was a build error that every module(/packages) needed it updated within their package.json. Sorry trying to mix typical jargon and OSD jargon.

@zhongnansu
Copy link
Member

cc @AMoo-Miki , you may have more knowledge on the build system

@joshuarrrr
Copy link
Member

are you guys alright with me just updating the main and module(/packages) package.jsons and locks across the board? I believe when I did the change locally on just the main package.json to test it out there was a build error that every module(/packages) needed it updated within their package.json. Sorry trying to mix typical jargon and OSD jargon.

@DanielBelmes it's a little hard to say without seeing the change - are you saying the issue is in the way the clean or extraPatterns are defined? Or do we need to change the implementation of the script responsible for that task?

@DanielBelmes
Copy link
Contributor Author

@joshuarrrr No nothing fancy needed. They fixed the implementation in version 6.1.1 of del. Just a simple package update. Let me eat lunch and ill just whip up the PR really quickly and you can take a look. I’ve verified it fixes the issue as well.

@joshuarrrr
Copy link
Member

closed via #2873

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working os - mac
Projects
None yet
Development

No branches or pull requests

4 participants