Closed mmarchetti closed 3 days ago
This PR implements a recursive option to the POST /api/inspect endpoint.
Part of https://github.com/posit-dev/publisher/issues/1850
Walk the tree, inspecting every directory we find. The built-in exclusions are applied to avoid excess directory traversals.
Currently, performance is not great. On my machine, running in this source repo:
entrypoint=simple.py
There are no tests for this endpoint yet; that needs to change.
$(just executable-path) ui -vv --listen=localhost:9001 & curl -s -XPOST -d '{}' 'localhost:9001/api/inspect?recursive=true&dir=test/sample-content' | jq curl -s -XPOST -d '{}' 'localhost:9001/api/inspect?recursive=true' | jq curl -s -XPOST -d '{}' 'localhost:9001/api/inspect?recursive=true&dir=test/sample-content&entrypoint=simple.py' | jq
My timings (intel Mac) are similar:
While bad, I think it would still be acceptable for now.
Intent
This PR implements a recursive option to the POST /api/inspect endpoint.
Part of https://github.com/posit-dev/publisher/issues/1850
Type of Change
Approach
Walk the tree, inspecting every directory we find. The built-in exclusions are applied to avoid excess directory traversals.
Currently, performance is not great. On my machine, running in this source repo:
entrypoint=simple.py
: 8 seconds to return 2 configurationsentrypoint=simple.py
: 2 seconds to return 2 configurationsAutomated Tests
There are no tests for this endpoint yet; that needs to change.
Directions for Reviewers