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

PROD-1698 Download Errors with Spaces in Spaces #526

Merged
merged 2 commits into from
Apr 1, 2020
Merged

Conversation

jameskerr
Copy link
Member

First I caught an exception that was not being handled so that if an error occurs in the same place, it will at least be shown in the UI.

Screen Shot 2020-03-31 at 2 21 05 PM

Then I fixed the error that was throwing that exception. It turns out that the node http module does not encode the URI components that we pass to it. This must be done ourselves. By contrast, the browser fetch API encodes for us.

MnXYnNMfYV

SIDE DISCOVERY

I also discovered some code on stack overflow that will allow us to use the browser fetch API and stream the response to the node fs module which writes to the file system. When we implement the packet download api call in zealot, I recommend doing this.

https://stackoverflow.com/a/44695617/3499804

The browser fetch api does this for us, but the node http.request
module that we use here does not. One more reason for switching
soon to the zealot client completly.
@jameskerr jameskerr requested a review from a team March 31, 2020 21:35
Copy link
Contributor

@mason-fish mason-fish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@jameskerr jameskerr merged commit 93156bf into master Apr 1, 2020
@jameskerr jameskerr deleted the spaces-error branch April 1, 2020 01:24
brim-bot pushed a commit that referenced this pull request May 20, 2020
…attnibs

This is an auto-generated commit with a zq dependency update. The zq PR
brimdata/zed#802, authored by @mattnibs,
has been merged.

Initial commit of zapi cli with info command

Adds a barebones version of zapi: A simple cli for interacting with
zqd servers.

To reduce burden on reviewers the scope has been limited to and single
command: info (additionally the stock charm help command also works).
Future functionality will eventually cover the entirety of the zqd
api including the ability to create, update, remove, post data to
spaces.

The info commands allows user to view information on space(s). The
space(s) can be queried by using either the global space selection
flags (i.e. -n or -id) or by use one or more globbed enhanced arguments.

part of #526
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

Successfully merging this pull request may close these issues.

2 participants