Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
skill/scripts/axiom-api
Outdated
| SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
| eval "$("$SCRIPT_DIR/config" axiom "$DEPLOYMENT")" | ||
|
|
||
| # Auto-resolve edge URL for query and ingest endpoints |
There was a problem hiding this comment.
Can you explain what's going on here? Why do we need to auto-resolve anything? Why don't we use the configured axiom url directly?
There was a problem hiding this comment.
because core APIs for ingest and query will be deprecated as part of multiregion, we're moving to route those directly to the edge endpoint. This also correctly handles multi region ds, since queries go to the right regional edge
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| -H "Content-Type: application/json" \ | ||
| -d "$PAYLOAD") | ||
| if [[ "$HTTP_CODE" -ge 200 && "$HTTP_CODE" -lt 300 ]]; then | ||
| echo "$QUERY_URL" > "$LAST_EDGE_CACHE" |
There was a problem hiding this comment.
Problem: Agents can run multiple queries concurrently. This would be a race condition, this would clobber that file. We need a different solution. Is there a backend endpoint that returns the canonical edge URL for each dataset in an org? We already run the discover-axiom script, it would be ideal for that script to not only output the dataset names but which region they are in. Then the model can use the right region in the queries. We'll need to add the region flag / argument to most axiom scripts. We'll need an eval for this.

Note
Medium Risk
Updates Axiom CLI scripts to dynamically pick edge domains for queries and ingestion, adding caching and fallback logic that could change which endpoints are hit and how failures surface.
Overview
Adds automatic edge URL resolution for Axiom query/ingest traffic.
axiom-querynow calls the edge query endpoint (/v1/query/_apl) and iterates over discovered edge domains (cached, with a last-good fast path) until one succeeds.axiom-apinow detects/v1/ingest/*requests and rewrites the base URL to a dataset-specific edge domain using a newresolve-urlhelper that caches dataset→edge mappings and region metadata.Docs (
axiom.md) are updated to distinguish management vs query/ingest base URLs, document the edge query endpoint, and simplify auth guidance.Written by Cursor Bugbot for commit 80e10d3. This will update automatically on new commits. Configure here.