Skip to content

"from" robot scan with URL fails with "super db" #7282

Description

@philrz

With a simple HTTP server running:

$ echo '{"greeting":"hello"}' > data.json &&
  python3 -m http.server 8080

This attempted robot scan fails:

$ super -version &&
  super db -db mydb init &&
  super db -db mydb -s -c "values 'http://localhost:8080/data.json' | from f'{this}'"

Version: v0.3.0-372-g217a042d8
database created: file:///Users/phil/work/newbug/mydb

http://localhost:8080/data.json: cannot open in a database environment

Details

Repro is with super commit 217a042.

Starting when robot scan functionality was first added in #5437, there's been a comment in the code indicating the limitation indicated by the error message above was intentional, but implied the limitation was focused on pools. In the current vector implementation that's at:

// This check for attached database will be removed when we add support for pools here.

However, as the repro above shows, robot scans targeting URLs are currently being affected by this limitation as well.

Of course constant URLs work fine under super db today.

$ super db -db mydb -s -c "from 'http://localhost:8080/data.json'"
{greeting:"hello"}

An advisor that's prototyping a "paged API" use case bumped into the limitation with URL robot scan. To unblock the advisor's work, I had Claude craft an interim bug fix that's part of the auth-demo-prototype-2 at commit b9b1d0b, so please take a look if it helps at all in working toward a fix on main.

Here it is succeeding on that branch:

$ super -version &&
  super db -db mydb init &&
  super db -db mydb -s -c "values 'http://localhost:8080/data.json' | from f'{this}'"

Version: v0.3.0-363-gb9b1d0be9
database created: file:///Users/phil/work/newbug/mydb

{greeting:"hello"}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions