docs(distributed-query): async queries are scoped to the submitting principal - #2071
Open
lukekim wants to merge 1 commit into
Open
docs(distributed-query): async queries are scoped to the submitting principal#2071lukekim wants to merge 1 commit into
lukekim wants to merge 1 commit into
Conversation
Contributor
✅ Pull with Spice PassedPassing checks:
|
Contributor
|
🚀 deployed to https://10f273a5.spiceai-org-website.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
spiceai/spiceai#12841scoped the async queries API to the principal that submitted each query. Listing, polling, fetching results, and cancelling now reach only the caller's own queries; another principal's query reports 404 Not Found (not 403) so query IDs cannot be probed, and ownership is resolved before result expiry so a non-owner cannot distinguish an expired job from a missing one. The scope is the request's cache namespace —publicwhen unauthenticated, the principal's opaque id when authenticated, and an internalsystemscope for background runtime tasks — so it follows exactly the boundary already documented under Per-Principal Cache Isolation.The Distributed Query page documented
GET /v1/queriesas "List all queries" and said nothing about ownership on the HTTP, Arrow Flight, or CLI surfaces.Changes
public.GET /v1/queriesendpoint row: "List all queries" → "List the caller's queries".Verified against
origin/trunk, not just the merged diff:current_job_owner()(crates/runtime/src/jobs/mod.rs),PUBLIC_JOB_OWNER = "public"(crates/runtime/src/jobs/state.rs),JobExecutor::require_owner/owned_job/list_jobs(crates/runtime/src/jobs/executor.rs),QueryCancelRegistry::cancel_owned/list_for(crates/runtime-datafusion/src/query_cancel_registry.rs), and the Flight call sites incrates/runtime/src/flight/actions.rsandasync_actions.rs.Source PRs
Versioned-docs propagation
Addition — vNext only. The commit is in no release tag (
git tag --contains 8fc9cecis empty; latest isv2.1.4), soversioned_docs/version-2.1.x/correctly describes the pre-scoping behavior.Test plan
cd website && npm run buildpasses (Docusaurus throws on broken links / undefined tags)