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

Other deploy-related actions #5

Open
mbrevda opened this issue May 18, 2020 · 14 comments
Open

Other deploy-related actions #5

mbrevda opened this issue May 18, 2020 · 14 comments

Comments

@mbrevda
Copy link

mbrevda commented May 18, 2020

What other deploy-related actions are being planned for this action. E.g. uploading source maps?

@TiagoGouvea
Copy link
Contributor

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 status directly from the Action status, but I did it "manually".

This issue can be closed.

@mrunalk
Copy link
Contributor

mrunalk commented Jun 17, 2020

@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.

@mbrevda
Copy link
Author

mbrevda commented Jun 17, 2020

We have added support for source map uploads in 2.0 release

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 *.map files (hint: don't forget about subdirectories!). These could be uploaded with no further information required by setting minified_url=https://dynamichost/{}, making this check both redundant and incorrect.

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...

@mrunalk
Copy link
Contributor

mrunalk commented Jun 18, 2020

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?

@mbrevda
Copy link
Author

mbrevda commented Jun 18, 2020

Yes. Logrocket's cli is great example

@mrunalk
Copy link
Contributor

mrunalk commented Sep 30, 2020

@mbrevda, We recently released rollbar-cli with source map upload and deploy functionality. It's still prerelease so your feedback is appreciated.

@mbrevda
Copy link
Author

mbrevda commented Sep 30, 2020

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)?

@waltjones
Copy link

@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.

@mbrevda
Copy link
Author

mbrevda commented Sep 30, 2020

In the meantime, you might wish to implement batching client side

@waltjones
Copy link

Not sure I follow. The API only supports one map file per API request.

@mbrevda
Copy link
Author

mbrevda commented Sep 30, 2020

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)

@waltjones
Copy link

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.

@mbrevda
Copy link
Author

mbrevda commented Sep 30, 2020

Understood. Hope you can update the infrastructure to overcome these things!

@waltjones
Copy link

Agreed!

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

No branches or pull requests

4 participants