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

Describe of Zed with statements causes "unsupported source type *dag.Scope" #5153

Closed
philrz opened this issue Jun 28, 2024 · 1 comment · Fixed by #5152
Closed

Describe of Zed with statements causes "unsupported source type *dag.Scope" #5153

philrz opened this issue Jun 28, 2024 · 1 comment · Fixed by #5152
Assignees

Comments

@philrz
Copy link
Contributor

philrz commented Jun 28, 2024

tl;dr

$ curl -X POST -H "content-type: application/json" -d '{"query":"type socket = {addr:ip,port:port=uint16}\nfrom sample.zng","head":null}' http://localhost:9867/query/describe
{"type":"Error","kind":"invalid operation","error":"unsupported source type *dag.Scope"}

Details

Repro is with GA Zui tagged v1.16.0.

The high-level symptom was reported by a zync community user that was running Zui Insiders. Via binary search I've confirmed the problem started to appear at Zui commit 21abbf6 which is associated with the changes in brimdata/zui#3085. In essence, a Zed program with a leading statement such as type produces an error and no query output.

image

Studying packet captures reveals that what's being shown is from an HTTP 400 response on the "describe" endpoint, which can be reproduced at the shell.

$ curl -X POST -H "content-type: application/json" -d '{"query":"type socket = {addr:ip,port:port=uint16}\nfrom sample.zng","head":null}' http://localhost:9867/query/describe
{"type":"Error","kind":"invalid operation","error":"unsupported source type *dag.Scope"}

At prior Zui commits, it appears that response was effectively being ignored. But since the query is valid, it does seem the fix should come from the Zed side.

@philrz
Copy link
Contributor Author

philrz commented Jun 28, 2024

Verified with Zui commit 39550b3 which uses Zed commit ab603fa.

Now that the API sends a non-error response, the query output is visible.

image

Thanks @mattnibs!

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 a pull request may close this issue.

2 participants