-
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
Support streamed download to a path #94
Comments
This is a really neat trick, and actually close to something I implemented internally for this type of use case. I agree that we should do this. In Caracara, we just call the endpoint directly in FalconPy -- https://github.com/CrowdStrike/caracara/blob/3cf2e49440b6ea2d05dc2a9a65b3e8052de144b8/caracara/modules/rtr/get_file.py#LL72C66-L76C66 @jshcodes is this something that we can build into FalconPy? Otherwise, I could short-circuit FalconPy here and perform this request manually, but obviously we would like API operations to be handled natively by FalconPy where possible to take advantage of the abstraction layer there. It might be that you'll need to return a request object back directly, or at least enable |
Also, ahem, https://eu-1.ideas.crowdstrike.com/ideas/IDEA-I-10248 , there's no support for the If you know anyone that might be able to take a look at this, feel free to share the concern :D I am really surprised we only get 1 try to download 4GB files, and then have to start over from offset=0 if the VPN gods decide to banish a socket into the void. |
@59e5aaf4 This is great feedback. I have posed the question over to the RTR team to see what they say. I suspect it could require a few teams to get involved, but I'll keep tabs on it internally. For now, I think getting the chunking support provided first party would be an important first step. I am speaking with @jshcodes on the side to figure out which code should own this functionality, and will update this ticket once we figure out the best place for this to live. |
Providing support for the Content-Length will require a bit more effort, but it makes sense and we should support it if we can. FalconPy v1.2.16 development will start here soon, this enhancement has been added to the punch list. 👊 |
Awesome, thanks @jshcodes! Once 1.2.16 is launched, we can figure out the best way to expose this to Caracara users in a way that makes the most sense. Ultimately this SDK is about doing as much for users as possible, so I'm open to taking something more raw from FalconPy, or perhaps we can get FalconPy to perform the download and move the chunking there? |
Hey, @ChristopherHammond13 and @jshcodes , is this still on your radars? |
FYI, Windows now ships sftp.exe natively, and it accepts ecdsa keys. The way friends of mine do it is plant an ecdsa key, build base64'd parameters to start-process and have |
Definitely still on our radar! |
There is currently no way either in falconpy or caracara to stream a file down to the disk. That causes 4GB requests to be entirely loaded in memory at some point.
We're using ugly hacks to pass
stream=True
to a rawrequests.request
and call it a day, so that we can stream a large file to disk chunk by chunk.Could this be done natively by caracara ? I'm no asyncio expert but there's some http + file magic to be done here imo.
Thanks !
The text was updated successfully, but these errors were encountered: