Skip to content

[coverage] Conformance findings: CONNPOOL-009 #941

Description

@peco-engineer-bot

Summary

Surfaced by the multi-language coverage fan-out while conformance-testing these SPEC-IDs against databricks/databricks-sql-python. Each finding is committed as an expected-failure (xfail) test in the coverage PR — the test asserts the CORRECT (post-fix) behavior and stays red until THIS driver (databricks/databricks-sql-python) is fixed, then flips green as a tripwire.

Findings

  • CONNPOOL-009 [thrift, sea]: ClientContext.__init__ uses pool_maxsize or 20, so a zero per-host connection-pool cap (_pool_maxsize=0) is silently coerced to the default 20 and a session is opened, instead of being rejected with an invalid-argument error naming the option; positive values and the omitted-default path are forwarded correctly
    • failing test: test_max_connections_option_validated_and_forwarded (see the coverage PR diff under tests/)

Reproduce & Expected

CONNPOOL-009 — Verify the per-host idle-connection cap option is accepted and forwarded to HTTP config leaving other HTTP defaults intact, that the default is preserved when the option is omitted, and that zero is…

Reproduce:

SELECT 1
SELECT 1

Expected (per the shared spec):

  • A positive cap is accepted: the session opens and no error is raised.
  • SELECT 1 returns 1 row with the cap configured.
  • {'other_http_defaults_unchanged': {'knobs': ['request_timeout', 'retry_min_wait', 'retry_max_wait', 'retry_max_attempts'], 'description': 'Setting ONLY this option must leave every other HTTP knob at its\ndriver default. Where the driver exposes no config introspection,\nassert this behaviorally: request-timeout and retry behavior are\nindistinguishable from a session opened without the option.\n'}}
  • Omitting the option keeps the driver's own default cap (kernel: 100). The driver must not substitute a different value, and must not skip applying its default HTTP configuration.
  • {'error_on_invalid_value': {'value': 0, 'error_class': 'invalid_argument', 'description': 'Zero is rejected with an invalid-argument-class failure: PyO3 raises\nValueError; the C ABI setter returns InvalidArgument; other surfaces\nraise their own invalid-argument/illegal-argument equivalent. The\nmessage names the option and states it must be greater than zero.\n'}}
  • The zero case fails before any session is established — no session-open request reaches the server with a zero cap.
  • The rejected zero leaves an earlier valid value intact (C ABI: the config still holds the previously set value after the InvalidArgument).

Context

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions