@datarails-ai/dr-cli 1.6.113 → 1.6.115
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/scopes-map.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1,
|
|
3
|
-
"cliVersion": "1.6.
|
|
3
|
+
"cliVersion": "1.6.115",
|
|
4
4
|
"_contract": "Resolve a command path through `aliases` (canonical prefix + alias segment -> canonical path) before any lookup. A path listed in `pendingCommands`, or whose first segment is a key of `pending`, is UNDECIDED, not unrestricted: fail closed or skip it, and never read a path's absence from `commands` as 'no requirement'. An entry carrying `denied` is UNAVAILABLE to any AGENT-SCOPED credential — one whose `scopes` claim carries at least one `resource:action` entry; a claim that is absent, empty, capability-only or wholly unparseable is UNRESTRICTED, and this mark does not apply to it — whatever else that entry says: it is not a ceiling and it is not always-available, its `denied.reason` says why and `denied.until` names the ticket that lifts it, and the absence of `requires` on it must NEVER be read as 'no requirement'. Only an entry in `commands` with an empty `requires` means always-available.",
|
|
5
5
|
"commands": {
|
|
6
6
|
"login": {
|
|
@@ -1923,6 +1923,66 @@
|
|
|
1923
1923
|
"until": "DR-53511"
|
|
1924
1924
|
}
|
|
1925
1925
|
},
|
|
1926
|
+
"connectors poll enable": {
|
|
1927
|
+
"denied": {
|
|
1928
|
+
"reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
|
|
1929
|
+
"until": "DR-53511"
|
|
1930
|
+
}
|
|
1931
|
+
},
|
|
1932
|
+
"connectors poll set": {
|
|
1933
|
+
"denied": {
|
|
1934
|
+
"reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
|
|
1935
|
+
"until": "DR-53511"
|
|
1936
|
+
}
|
|
1937
|
+
},
|
|
1938
|
+
"connectors poll disable": {
|
|
1939
|
+
"denied": {
|
|
1940
|
+
"reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
|
|
1941
|
+
"until": "DR-53511"
|
|
1942
|
+
}
|
|
1943
|
+
},
|
|
1944
|
+
"connectors poll get": {
|
|
1945
|
+
"denied": {
|
|
1946
|
+
"reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
|
|
1947
|
+
"until": "DR-53511"
|
|
1948
|
+
}
|
|
1949
|
+
},
|
|
1950
|
+
"connectors poll run": {
|
|
1951
|
+
"denied": {
|
|
1952
|
+
"reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
|
|
1953
|
+
"until": "DR-53511"
|
|
1954
|
+
}
|
|
1955
|
+
},
|
|
1956
|
+
"connectors poll resume": {
|
|
1957
|
+
"denied": {
|
|
1958
|
+
"reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
|
|
1959
|
+
"until": "DR-53511"
|
|
1960
|
+
}
|
|
1961
|
+
},
|
|
1962
|
+
"connectors poll items": {
|
|
1963
|
+
"denied": {
|
|
1964
|
+
"reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
|
|
1965
|
+
"until": "DR-53511"
|
|
1966
|
+
}
|
|
1967
|
+
},
|
|
1968
|
+
"connectors poll retry": {
|
|
1969
|
+
"denied": {
|
|
1970
|
+
"reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
|
|
1971
|
+
"until": "DR-53511"
|
|
1972
|
+
}
|
|
1973
|
+
},
|
|
1974
|
+
"connectors poll skip": {
|
|
1975
|
+
"denied": {
|
|
1976
|
+
"reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
|
|
1977
|
+
"until": "DR-53511"
|
|
1978
|
+
}
|
|
1979
|
+
},
|
|
1980
|
+
"connectors poll seed": {
|
|
1981
|
+
"denied": {
|
|
1982
|
+
"reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
|
|
1983
|
+
"until": "DR-53511"
|
|
1984
|
+
}
|
|
1985
|
+
},
|
|
1926
1986
|
"filebox list": {
|
|
1927
1987
|
"requires": [
|
|
1928
1988
|
{
|
|
@@ -2055,6 +2115,14 @@
|
|
|
2055
2115
|
}
|
|
2056
2116
|
]
|
|
2057
2117
|
},
|
|
2118
|
+
"filebox set-version-label": {
|
|
2119
|
+
"requires": [
|
|
2120
|
+
{
|
|
2121
|
+
"resource": "fileboxes",
|
|
2122
|
+
"action": "write"
|
|
2123
|
+
}
|
|
2124
|
+
]
|
|
2125
|
+
},
|
|
2058
2126
|
"filebox set-version-workflow": {
|
|
2059
2127
|
"requires": [
|
|
2060
2128
|
{
|
|
@@ -547,6 +547,9 @@ operator JWT: `dr connectors query repoint <queryId> --artifact-version vN --ser
|
|
|
547
547
|
VPN's TLS-inspection cert isn't trusted by Node: set `NODE_EXTRA_CA_CERTS` to the gateway CA (do NOT
|
|
548
548
|
port-forward as a workaround, and never `NODE_TLS_REJECT_UNAUTHORIZED=0`). `dr filebox`/`dr integrations`
|
|
549
549
|
working while `dr connectors` fails is expected — those hit the public monolith, not the internal CP.
|
|
550
|
+
Repoint, create and delete are scoped to the caller's org, so an operator login (not `login-as`) gets
|
|
551
|
+
`403`. A repoint to an artifact of a **different flavor** must pass `--runtime-flavor <new flavor>` in
|
|
552
|
+
the same command, or it gets `422`.
|
|
550
553
|
|
|
551
554
|
## 3. Datasource + filebox (monolith, via dr-cli)
|
|
552
555
|
|
|
@@ -763,8 +766,22 @@ dr connectors connector create --secret-ref <datasource_id> --json $ACC # ad
|
|
|
763
766
|
# key — no uuid->id resolver on the monolith). It's the same <filebox_id> used in steps 3a/5.
|
|
764
767
|
dr connectors query create --connector-id <id> --filebox-uuid <uuid> --filebox-id <filebox_id> \
|
|
765
768
|
--artifact-name "<vendor>__<dq>" --artifact-version "<ver>" \
|
|
766
|
-
--runtime-flavor
|
|
769
|
+
--runtime-flavor <flavor> --query-config '{"base_url":"https://api.vendor.com","max_mb":30}' --json $ACC
|
|
767
770
|
```
|
|
771
|
+
**`--runtime-flavor` must be the artifact's flavor**: the `RUNTIME_FLAVOR` constant in the
|
|
772
|
+
connector's `connection.py` (`base`, `bigquery`, `redshift`, `ibmiodbc`, `sftp`, …). It picks the runner queue
|
|
773
|
+
the jobs go to. Always pass it, even for `base`. The flag defaults to `base`, and the control-plane
|
|
774
|
+
rejects a mismatch with `422 runtime_flavor must be the pinned artifact's (<flavor>)`. Before that
|
|
775
|
+
check existed, a non-base connector bound without the flag silently ran on the base runner,
|
|
776
|
+
which does not have the flavor's packages.
|
|
777
|
+
|
|
778
|
+
The control-plane also checks two more things on `query create`:
|
|
779
|
+
- **Org:** the caller's JWT org must be the connector's org (`403`). This is why `$ACC` must be the
|
|
780
|
+
`dr login-as` customer identity.
|
|
781
|
+
- **Filebox:** it asks the monolith, with the caller's token, whether the caller can see the filebox.
|
|
782
|
+
`403` means the caller can't see it, `422` means `--filebox-id` and `--filebox-uuid` name different
|
|
783
|
+
fileboxes, and `503` means the monolith couldn't answer.
|
|
784
|
+
|
|
768
785
|
Both need `NODE_EXTRA_CA_CERTS` (VPN CA) like every `dr connectors` call. Verify with
|
|
769
786
|
`dr connectors binding get <filebox_uuid> --json $ACC` (secret_ref + artifact + query_config resolve).
|
|
770
787
|
The connector's `req.config` = `public_config` ∪ `query_config` ∪ the data-query's sync_query (its
|
|
@@ -871,7 +888,10 @@ unmerged connector has no version to ingest, bind, or run.
|
|
|
871
888
|
| `dr filebox data-query get`/`versions --json` shows `'` (or `"`) in config strings | The monolith serializer HTML-escapes string values on **read**; the DB stores raw quotes. | Cosmetic/display only — placeholder rendering still works. Don't "fix" the stored value; if you need the true string, HTML-unescape the output. |
|
|
872
889
|
| New artifact code doesn't run even after publish | The runtime resolves the **active-version pointer** (`connector`+`org`), not your latest publish. | `dr connectors publish <dq.py>` then `dr connectors promote <name> --artifact-version vN` (both need `NODE_EXTRA_CA_CERTS`). Confirm: in-cluster `GET /internal/connectors/<name>/active?org_id=<org>`. |
|
|
873
890
|
| `dr filebox get` never shows the filebox `uuid` | Not exposed by that command. | Read `filebox_uuid` from the `sync.requested` event (`datarails-connect-inngest`), or capture it from `dr filebox create --json`. |
|
|
874
|
-
| Creating a binding via `curl localhost:8000/connectors` (or `/connector-queries`) → `401` / SPA HTML | Those POSTs are **authenticated** now; the port-forward serves the SPA. There is no unauthenticated create path. | Use the dr-cli (carries the JWT): `dr connectors connector create --secret-ref <ds>` then `dr connectors query create --connector-id <id> --filebox-uuid <uuid> --artifact-name … --artifact-version … --query-config '{…}'`. See step 4. |
|
|
891
|
+
| Creating a binding via `curl localhost:8000/connectors` (or `/connector-queries`) → `401` / SPA HTML | Those POSTs are **authenticated** now; the port-forward serves the SPA. There is no unauthenticated create path. | Use the dr-cli (carries the JWT): `dr connectors connector create --secret-ref <ds>` then `dr connectors query create --connector-id <id> --filebox-uuid <uuid> --filebox-id <filebox_id> --artifact-name … --artifact-version … --runtime-flavor <flavor> --query-config '{…}'`. See step 4. |
|
|
892
|
+
| `query create` / `query repoint` → `422 runtime_flavor must be the pinned artifact's (<flavor>)` | `--runtime-flavor` was left at its `base` default for a non-base artifact. Or a repoint moved to an artifact of another flavor without changing the binding's flavor. | Pass `--runtime-flavor` = the connector's `RUNTIME_FLAVOR`, in the same command as the artifact change. |
|
|
893
|
+
| `query create` / `query repoint` / `query delete` → `403`, and the control-plane logs `cross_org_denied` | The CLI identity is the operator (`@datarails.com`), whose JWT org is not the connector's org. These routes are org-scoped. | `dr login-as <customer-user-email> --server <X>` and use that `--account` (see *Identity*). |
|
|
894
|
+
| `query create`, or a repoint that changes the filebox → `403 the filebox is not one the caller can see`, `422 … name different fileboxes`, or `503 the monolith could not confirm the filebox` | The control-plane checks with the monolith, using the caller's token, that the caller can see the filebox. `403`: wrong org or wrong id. `422`: `--filebox-id` and `--filebox-uuid` come from two different fileboxes. `503`: the monolith was unreachable. | Use the `uuid` and numeric id from the same `dr filebox create --json` output, under the customer identity. On `503`, retry. |
|
|
875
895
|
| Connector's own `log.info(...)` lines never appear in the runner logs / Groundcover (but `dr.runner` INFO does) | The hook runs in a **sandbox whose root logger has no handler**, so bare `logging` is dropped (only WARNING+ via lastResort, and even that may not surface). | Use `kit.logging.get_logger("<vendor>__<dq>")`: a stdout handler with a `[<vendor>__<dq>]` prefix, so lines are greppable in the shared `connectors-runner` pod. Never hand-roll a `StreamHandler` helper. Log auth (never the secret), the window, per-page progress, row count. |
|
|
876
896
|
| A credential reaches Groundcover through a log line that logs no secret | The connector logged the raw `base_url`. It is **operator-supplied binding config**, so it can carry `user:pass@` userinfo or a credential in the query string — and the runner log is a shared multi-tenant stream. 24 connectors in dr-connectors currently do this (harmless for the keyless public sources, not for the credentialed ones). | Log only the hostname: `urlsplit(base_url).hostname` drops userinfo, port, path and query, which is all a log line needs to identify the environment. `samples/sample_streaming_fanout/` and the databricks connections model this. `kit.http.client`'s retry and error lines already name only `METHOD scheme://host[:port]/path`, and `kit.redact.safe_snippet` redacts credential-shaped vendor text. |
|
|
877
897
|
| `get_query_class` receives `None` / multi-dataset connector raises "unknown objectType" / wrong dataset runs | `objectType` was placed at the data-query **config top level** instead of **inside `config.query`**. The runtime reads `dq["query"].get("objectType")` with **no top-level fallback**, so it comes through as `None`. | Put `objectType` inside the Sync-query, which is JSON **text**: `config.query = '{"objectType":"<dataset>"}'` (drop any top-level `objectType`). `dr connectors dev-fetch` warns when it's missing. Single-dataset connectors survive via their default; multi-dataset ones fail. |
|
|
@@ -62,8 +62,9 @@ per server can be logged in at once.
|
|
|
62
62
|
credential file when one is in use (see below).
|
|
63
63
|
- `dr login --api-key --server US` — save a user-bound **API key** instead of a
|
|
64
64
|
browser session. The key is read from a hidden prompt, or from stdin when
|
|
65
|
-
piped (`printf '%s\n' "$KEY" | dr login --api-key -s
|
|
66
|
-
|
|
65
|
+
piped (`printf '%s\n' "$KEY" | dr login --api-key -s <KEY>`, with the server
|
|
66
|
+
the key was issued on; piped, `-s` is required unless a credential file
|
|
67
|
+
already names the server, and a different `-s` is refused; don't run the
|
|
67
68
|
piped form under shell tracing or command logging). Never pass the key as an
|
|
68
69
|
argument or paste it into chat. `dr` exchanges it for a JWT itself, so no
|
|
69
70
|
re-login is ever needed while the key is live — and `login --api-key` does that
|
|
@@ -108,7 +109,9 @@ exchange response does not carry it and `login --api-key` does not set it, so
|
|
|
108
109
|
update it in the file alongside the key, or the warning keeps naming the old
|
|
109
110
|
one.
|
|
110
111
|
|
|
111
|
-
`--server <KEY>` is **required on every command that hits an API
|
|
112
|
+
`--server <KEY>` is **required on every command that hits an API — unless a
|
|
113
|
+
credential file is in use**, which already names the server: omit it then (a
|
|
114
|
+
different key is refused as not matching the credentials). Valid keys:
|
|
112
115
|
`US`, `US2`, `UK`, `CA`, `EU`, `STUDIO`, `DEV`, `DEV-1`, `TEST`, `TEST-1`, `TEST-2`, `TEST-3`, `TEST-4`, `TEST-5`, `TEST-6`, `TEST-7`, `DEMO` (case-insensitive).
|
|
113
116
|
|
|
114
117
|
You can also pass a full **`https://<host>.datarails.com` URL** instead of a
|
|
@@ -282,7 +285,7 @@ area's gotchas.
|
|
|
282
285
|
|
|
283
286
|
**Fileboxes & documents** → [reference/filebox-documents.md](reference/filebox-documents.md)
|
|
284
287
|
- `filebox list|get|versions|tags|sheets|preview|create|upload|upload-version|update|download` (alias `fileboxes`)
|
|
285
|
-
- `filebox archive|archive-version|restore-version|set-version-include|set-version-date-tag|set-version-workflow|set-version-file-status|set-version-cycle`
|
|
288
|
+
- `filebox archive|archive-version|restore-version|set-version-include|set-version-date-tag|set-version-label|set-version-workflow|set-version-file-status|set-version-cycle`
|
|
286
289
|
- _archived versions (opt-in; defaults unchanged): `versions --archived|--all` to discover them; `archive-version`/`restore-version` also take `--doc` + `--version-number <n>` or `--latest-archived`/`--latest-active`_
|
|
287
290
|
- _include in database: `versions --included` lists the versions whose `include_file` flag is on (intent, not delivered rows); `set-version-include <vid> --include on|off` writes the flag (two-step confirm both ways — off deletes the version's table rows, on queues an ETL scan). `--doc <id> --all-except-latest` is the bulk cleanup; it never targets the latest, and warns in the plan if the latest is itself excluded_
|
|
288
291
|
- `filebox share|shares|set-option|set-tag-config|set-parent|lock|unlock|lock-date-tag|unlock-date-tag|locked-date-tags`
|
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
`filebox sheets`, `filebox preview`, `filebox shares <doc_id>` (current user +
|
|
7
7
|
group shares). Names are HTML-decoded before render.
|
|
8
8
|
|
|
9
|
-
`filebox versions <doc_id>` lists **active** versions by default (unchanged)
|
|
9
|
+
`filebox versions <doc_id>` lists **active** versions by default (unchanged);
|
|
10
|
+
the table includes each version's `LABEL` (blank when unset; control characters
|
|
11
|
+
show as escapes such as `\n`).
|
|
10
12
|
To see archived (auto_save) versions, pass `--archived` (archived only) or
|
|
11
13
|
`--all` (active + archived); both add an `ARCHIVED` column. This is the only
|
|
12
14
|
way to discover an archived version's id from the CLI — archived rows are
|
|
@@ -33,7 +35,10 @@ set-version-include` (below).
|
|
|
33
35
|
- `filebox upload-version <id>` — push a new version. Accepts `--date <date>
|
|
34
36
|
--scenario <name>` to validate-then-tag at upload time in one call (planning
|
|
35
37
|
fileboxes — same validation and read-back confirmation as
|
|
36
|
-
`set-version-cycle`).
|
|
38
|
+
`set-version-cycle`). `--label <text>` labels the new version after the upload
|
|
39
|
+
and any cycle tag (validated first, so a bad label uploads nothing). If the
|
|
40
|
+
label write fails the command exits non-zero naming the new version id, and
|
|
41
|
+
`--json` reports `label_error` instead of `label`.
|
|
37
42
|
- `filebox download` — download document content.
|
|
38
43
|
|
|
39
44
|
## Filebox — update / config
|
|
@@ -114,6 +119,17 @@ set-version-include` (below).
|
|
|
114
119
|
- `filebox set-version-date-tag <vid> --doc <id> --month|--quarter|--day|--year|--week …
|
|
115
120
|
[--json]` — set the date tag on one version (resolves the tag id from the doc's
|
|
116
121
|
config; other tags untouched).
|
|
122
|
+
- `filebox set-version-label <vid> --label "<text>" | --clear [--json]` — set or
|
|
123
|
+
remove a version's free-text label; name, date and dimension tags are
|
|
124
|
+
untouched, and a locked date tag does not block it. No confirm step. Address it
|
|
125
|
+
like `archive-version` (global id, or `--doc <doc_id>` with `--version-number
|
|
126
|
+
<n>` / `--latest-active`; a tie on the highest number is refused — pass the
|
|
127
|
+
global id). The version is loaded first, so a bad id fails without writing,
|
|
128
|
+
and the label is read back after the write. `--json` returns `version_id`,
|
|
129
|
+
`doc_id`, `version`, `label` and `previous_label`. At most 256 characters, no
|
|
130
|
+
control characters, and not `auto-calculated` (reserved by the server for
|
|
131
|
+
versions it generates); pass the label as one quoted argument. Needs change
|
|
132
|
+
rights on the filebox or to be the version's uploader (HTTP 405 otherwise).
|
|
117
133
|
- `filebox set-version-workflow <vid> --doc <id> --status <Not Started|In Progress|Pending|Approved|Rejected>`
|
|
118
134
|
— set the workflow LIST-tag value (setting `Approved` requires `approve_workflow`).
|
|
119
135
|
- `filebox set-version-file-status <vid> --doc <id> --status <Draft|Final> [--json]`
|