-
Notifications
You must be signed in to change notification settings - Fork 13
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
Other deploy-related actions #5
Comments
Sorry for empty description @mbrevda. I think I found a way to do what I was wanting. I think was something related to update the This issue can be closed. |
@mbrevda, thanks for your feedback. We have added support for source map uploads in 2.0 release. You can find more details with example on Readme. I will be happy to hear your thoughts on it. |
Looking good, would be great to get an example of dynamic uploads (i.e. we don't know the file names in advance due to bundling/code splitting) EDIT: The idea would be to add a build directory option which would be parsed for all You might also wish to consider a. adapting the API to allow for multiple files to be uploaded in a single call (perhaps via zipping all the maps and singling as a single payload) or, at the very least, using parallel which I have seen to increase upload speed by many orders of magnitude! Here is an example based on what I do today: cd dist
ls *.js| \
parallel curl https://api.rollbar.com/api/1/sourcemap \
-F access_token=$ROLLBAR_SERVER_TOKEN \
-F version=$npm_package_gitHead \
-F minified_url=https://dynamichost/{} \
-F source_map=@{}.map -s p.s. love how this is all in bash, might be time for a proper cli app though... |
Thanks @mbrevda for your prompt response. Those are all very good suggestions. Consider this release as an initial step in that direction. We will look into how we can dynamically upload source maps. Just curious, do any other tools or actions do dynamic uploads of source maps? |
Yes. Logrocket's cli is great example |
@mbrevda, We recently released rollbar-cli with source map upload and deploy functionality. It's still prerelease so your feedback is appreciated. |
Nice! Having a quick glance through the code, am I correct that sourcemaps are uploaded serially (one at a time)? Any reason not to batch these to minimize the amount of time it takes (or even compress all the maps in one archive and upload them in in a single call)? |
@mbrevda The Rollbar API cannot handle parallel uploads at this time. Agreed there are some improvements that could be made on the API side that would enable CLI improvements as well. |
In the meantime, you might wish to implement batching client side |
Not sure I follow. The API only supports one map file per API request. |
True, but couldn't you make many concurrent requests to the singe-file api? (see my example above where I uploaded all the source maps in parallel, waiting only as long as the longest request) |
That may have succeeded for you, but in my testing many of the requests time out and fail. It depends on the size of the files, how many, and other load factors on the API at the specific time of the test. |
Understood. Hope you can update the infrastructure to overcome these things! |
Agreed! |
What other deploy-related actions are being planned for this action. E.g. uploading source maps?
The text was updated successfully, but these errors were encountered: