-
Notifications
You must be signed in to change notification settings - Fork 27
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
Errors swallowed during generateOperationFiles #46
Comments
I've also added a commit to the linked PR to improve performance a bit. For each operation it finds, it's writing out an incomplete file. Fortunately, the last one always has the rest of |
@philsturgeon @fmvilas friendly bump.... Just had one of our developers hit this issue. Looking into how to fix the max file descriptors thing on their OS, but it would be great to fix the underlying problem. If there's anything I can do to push this along, please let me know. |
I'm sorry but I'm not maintaining this library anymore since ~3 years ago. I bet @philsturgeon is also super busy so my advice is that you folks chat to discuss what's the best way forward. |
I just checked If you want, feel free to add me as a maintainer (tyler.waters@gmail.com) -- I can get this PR merged, fixed up the 26 vulns currently reported by npm audit ( 20 when showing only prod deps) -- and get a new version added to npm. I can appreciate the module hasn't been updated in many years now, and I don't imagine I'll be pumping out features or major versions -- but I'd like to get these things fixed up at least. |
I bumped into this one today. |
There's a bug here: https://github.com/openapi-contrib/openapi3-generator/blob/0.13.0/lib/generator.js#L144-L147
The outer promise here is being resolved before the
Promise.all
has a chance to finish, and if there's a rejection, it is ignored. I was running this tool from a docker container and only 75% of the expected files were being generated. I tracked it down to errors on that line not being handled properly..... With theresolve
removed, I get the error back properly:Why I'm getting that in docker and not locally is still a mystery to me... but this routine seems inefficient. As as test I logged out the name of the file that was being read here: https://github.com/openapi-contrib/openapi3-generator/blob/0.13.0/lib/generator.js#L96-L97
And I get the same file logged out a couple thousands times.... Because it's a Promise.all I imagine node will try to load all of them at the same time, and I'm guessing in my particular case, there's not enough file descriptors available and it blows up.... Further, I logged out the file path that it writes in this routine, and it's writing out the same file multiple times.... Seems like the data structure being passed generated / passed in there could do with a Sets instead to avoid duplicates?
The text was updated successfully, but these errors were encountered: