-
-
Notifications
You must be signed in to change notification settings - Fork 297
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
Jobs.downloadSingleArtifactFile
can no longer be piped
#338
Comments
hmm, not off the top of my head :( but i can tinker with it this weekend. I've been meaning to fix some streaming problems in #297. I did make a modification to ky to allow for streaming functionality but its possible im not handling it correctly. The area where this should happen is in the KyRequester. I think the response variable would be a stream, but id have to verify! |
Slightly embarrassing confession: I was using That said, I changed over to Two other things:
|
🤣 Yea I noticed that as well, i think i just implemented it incorrectly. Maybe if i fix that returnable streams will be possible? Let me try that first and see what comes back. |
I tinkered with this over the weekend but kept running into road blocks locally. Ill try and devise another way of figuring this out later this week. Tonight is a write off #WeTheNorth 😂 |
Thanks for looking into it! Go 🦖! |
I think i implemented the streaming capability incorrectly, and/or its not supported how i believed it was. I |
So apparently the streaming functionality isn't supported by ky, but could be with a PR. So I may fork it and submit a PR with the functionality. I'm the mean time ill remove it from the exposed API to avoid confusion :( |
Is there a reason you're using
If there is a reason for using |
The only reason we moved to ky/universal-ky was the promise of a cross platform solution which seemed to not be fully the case (especially with regards to the streaming support). The main options are to:
I REALLY don't want to do 2. since it would result in a split of support for the library, but i also don't have the time to tackle 1. :/ |
Should be pipeable now with the stream option. See latest release @gitbeaker/node |
Description
With v4.5.1 we'd been using
Jobs.downloadSingleArtifactFile
andnode-unzipper
to extract artifacts files like this:This was working splendidly. Since updating to v6.0.0 it no longer works. I get this error:
Upon digging in and doing quite a bit of debugging, this appears to be a result of the change to
ky
fromgot
. The streamed response structure has changed completely, from a full-on GL Request object like this:To this:
I've tried various things to get the zip written out and opened, but it's just not cooperating. Any ideas?
The text was updated successfully, but these errors were encountered: