Skip to content

consume any-sdk v0.5.3-alpha08 (casing + schema_driven_xml) + robot coverage#678

Merged
jeffreyaven merged 15 commits into
mainfrom
feature/stackql-updates
Jul 2, 2026
Merged

consume any-sdk v0.5.3-alpha08 (casing + schema_driven_xml) + robot coverage#678
jeffreyaven merged 15 commits into
mainfrom
feature/stackql-updates

Conversation

@jeffreyaven

@jeffreyaven jeffreyaven commented Jun 28, 2026

Copy link
Copy Markdown
Member

Summary

Consumes any-sdk v0.5.3-alpha08 and adds two user-facing capabilities plus functional
coverage. Bumps github.com/stackql/any-sdk v0.5.3-alpha05 -> v0.5.3-alpha08
(PR 106 query-option push-down + pagination, PR 107 casing engine + schema_driven_xml).

go build and the full go test ./... suite are green; golangci-lint (v2.5.0) reports
no new issues. A new no-auth stackql_native_test provider + native_test flask mock
(registry-rewrite default port 1070) back all new functional suites.

Features

OData query-option push-down (issue 659)

Wires the public formulation.ApplyPushdown helper into the REST acquire path. A SELECT's
projection / WHERE / ORDER BY / LIMIT / OFFSET / COUNT(*) are translated to
$select/$filter/$orderby/$top/$skip/$count and merged onto the outgoing request:

  • WHERE col = 'v' -> $filter=col eq 'v'; WHERE col LIKE 'A%' -> startswith(col,'A')
    (eq/ne/gt/ge/lt/le supported; AND-conjoined predicates combined; OR / non-prefix LIKE
    stay client-side residual).
  • LIMIT/OFFSET -> $top/$skip; ORDER BY -> $orderby; explicit projection ->
    $select; COUNT(*) -> $count.
  • Activated only when the method/resource carries a queryParamPushdown config, and only
    for single-table selects (a join could under-fetch). Push-down is an optimisation:
    stackql's client-side WHERE/projection/LIMIT remain authoritative, so a partial or
    absent translation cannot change results. Unblocks the entra_id provider.

GraphQL completion (issue 677)

  • --http.log.enabled now emits the GraphQL wire request + raw response (alpha08
    graphql.ContextWithHTTPLogger), mirroring the REST acquire path.
  • SQL LIMIT N is pushed into the GraphQL query variables as limit, so a query template
    referencing {{ .limit }} (e.g. first: {{ .limit }}) bounds the page size.
  • Cursor pagination (any-sdk cursor_after) and response.transform already consume
    alpha08; GraphQL errors now surface instead of returning empty rows (auto-consumed).

Tests

  • internal/stackql/execution/odata_pushdown_test.go - 7 unit tests for AST -> intent
    (operators, LIKE->startswith, COUNT, SELECT *, join guard, OR residual).
  • test/robot/functional/stackql_odata_pushdown.robot - 8 cases asserting each pushed
    OData option (the mock echoes the decoded query) and that client-side filtering remains
    authoritative.
  • test/robot/functional/stackql_graphql_pagination.robot - 3 cases: multi-page cursor
    pagination, LIMIT -> first: 3 in the wire query (via --http.log.enabled), cursor follow.
  • Plus the casing + schema_driven_xml suites from the first batch.

Test plan

  • go test -timeout 1200s --tags "sqlite_stackql" ./... - green, no regression.
  • golangci-lint run - clean.
  • python cicd/python/build.py --robot-test - new functional suites pass (21/21 locally).

Known any-sdk gaps (tracked upstream, not blocking)

snake_case_aliases multi-word value mapping and request.nativeCasing reverse-resolution
are deferred to any-sdk (issues filed); the OData push-down test provider therefore uses
wire-name columns.

jeffreyaven and others added 15 commits June 28, 2026 17:55
Consumes any-sdk v0.5.3-alpha10, which makes ColumnDescriptor.GetName()
return the display name consistently across the resource-schema and
response/select-items-schema paths (wire name only via GetWireName).

Fixes the postgres backend regression where materialized table/view
columns were named by the wire name while SELECT projected the display
name, so a case-sensitive backend rejected them (42703) - covering the
xml:name, snake_case_aliases and request.nativeCasing triggers.

Verified on a real postgres backend: #108 multi-word values populate,
SELECT * no longer errors, #109 snake WHERE resolves, #105 OData
push-down intact. No stackql source change required.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
any-sdk keys the row payload by the schema property key. That key equals
GetWireName when the wire name carries the case difference (snake_case_aliases:
display cidr_block over wire cidrBlock) but equals GetName when the display name
does (an xml:name override: display AvailabilityZone over wire availabilityZone).

The #108 change extracted solely by GetWireName, which fixed the snake_case case
but regressed the xml:name case (e.g. aws.ec2.volumes AvailabilityZone) to NULL on
alpha10 - visible only on a case-sensitive backend once alpha10 fixed the column
name. Try GetWireName first, then fall back to GetName, so both resolve their
value. Undecorated columns have GetWireName == GetName, so they are unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Reverts next commit. Emits DRMDBG to stderr (captured by the robot exec keyword ->
output.xml) with the column GetName/GetWireName and the actual payload keys when a
value cannot be extracted, so we can see what key the plain-XML objectKey walker used
for aws.ec2.volumes AvailabilityZone (misses both GetName and GetWireName).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The prior debug logged on every value-extraction miss, including genuinely-null
JSON columns, which flooded stderr and broke the Go integration tests (go test) in
the Build step - blocking the downstream Test jobs (robot) we need for the aws line.

Now it only logs when the column is decorated (GetName != GetWireName, i.e.
snake_case_aliases or an xml:name override) AND still misses. Undecorated columns
(all JSON providers) never log, so go test / Build pass and the robot Test jobs run,
emitting DRMDBG for aws.ec2.volumes AvailabilityZone. Reverted with the fix.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds actions/upload-artifact steps after the mocked functional robot runs (winbuild
native + docker postgres_tcp) so output.xml / log.html / report.html survive the
runner. This lets us inspect the exec stderr (e.g. the temporary DRMDBG payload-key
dump) after a run instead of losing it when the runner is torn down. if: always() so
it uploads on failure too. Temporary aid for the aws.ec2.volumes value diagnosis.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Root cause of the CI "Server Parameter in Select Star" failure was a stale test
expectation, not a stackql defect. The aws.ec2.volumes AvailabilityZone column
carries an allOf-nested `xml: name: availabilityZone` alias; the drm value
extraction now keys the response payload by GetWireName (1d97800), so the column
correctly projects `ap-southeast-1a`. The test at line 2362 still asserted the old
pre-fix `null`. The snake-aliased sibling views (volumes_presented / _naively_ /
_poorly_) already expect `ap-southeast-1a`, corroborating the correct value.

- stackql_mocked_from_cmd_line.robot: AvailabilityZone null -> ap-southeast-1a (both rows).
- drm_cfg.go: revert the temporary payload-key debug (6cdafd8, 5734373) back to the
  clean GetWireName-then-GetName extraction.
- build.yml: revert the temporary robot-report upload-artifact steps.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jeffreyaven jeffreyaven merged commit b51c514 into main Jul 2, 2026
21 checks passed
@jeffreyaven jeffreyaven deleted the feature/stackql-updates branch July 2, 2026 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants