Repository navigation
Conversation
…ITL-1457) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
|
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
…L-1457) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…raldb-sources-repeat-service-calls-x
…lf (ITL-1457) Only the SDK client is shared now. A source given a connector gets its own schema-table state, so it makes every call and check a source that makes its own connector makes: a connector that already read a version of the schema table no longer skips that version's schema() and scan, and a refusal of either (a 403 on the same snapshot) is raised at construction as without a connector. The docs, the docstring and the changelog no longer promise one read per version across sources. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Closing: replaced by #682, which shares the SDK client without a new public argument. Every source of one address and sign-in in a process uses one client, so the Posted by a Claude Code agent on behalf of @eywalker. |
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.
Part of ITL-1457. Independent of the drafts #553 and #554, and replaces what they tried.
What it does. Sources of one project and dataset that are given one connector use its SDK client: they sign in once. Only the client is shared: each source reads the dataset's schema table and makes every other call as a source that makes its own connector does. Without the argument nothing changes.
What it does not do. Nothing is global, guessed, kept or parallel. Every read and check makes main's calls in main's order in the calling thread: open by name,
schema(), the schema table's current version, then the count and the scan, on a table opened for it. No identity, hash, config or stored path holds the connector; a saved source makes its own. Nothing about the sign-in is read.Rules. The connector must be of the source's project, dataset and service address (
ValueError), aSpiralDBConnector(TypeError), open and of this process (RuntimeError). The source holds its own reference: closing the connector, the source or another source affects no other, and the last one releases the client. What one source counted is not taken as counted by another.What differs for a caller who passes one (stated in the docs, or tested as named):
Second decisionsettled (coordinator, on the developer's behalf): reuse may save calls, never an access check. Since 43005fa a source given a connector has its own schema-table state, so a connector that already read a version skips no call and no refusal of it (test_a_warm_connector_skips_no_check_of_the_schema_table: a 403 or a 500 on the snapshot'sschema()or scan is raised by a fresh source and by one on a warm connector, at construction, with the same text and notes).where()copies.Tests (
tests/test_core/sources/test_spiraldb_given_connector.py) compare a source given a connector that others use with one that makes its own: outcome, error text and notes, warnings and their lines, and the ordered SDK calls, over 12 changes between reads x 8 reads x plain/where/chainedwherex 2 arrangements; 5 sets of options;asof; and a failure at each of 6 calls, with and without a withdrawn schema table.test_a_schema_table_changed_during_the_call_before_it_is_refused_by_that_read,test_a_table_changed_between_readstest_an_account_is_never_guessedtest_checks_look_at_one_source_after_anothertest_a_failing_call(equal calls: none is made after the failing one)test_checks_look_at_one_source_after_another(thread-bound lookup)test_threads_that_meet_a_new_version_all_refuse_or_all_read(no promise of one read)schema()test_a_failing_call[schema-...],test_each_read_looks_at_everything_againtest_a_read_that_races_a_check_reads_its_own_version,test_an_older_versiontest_an_account_reads_nothing_through_anothertest_rows_given_before_a_failing_batch_are_the_same,test_a_failing_call[later batch-...]test_a_connector_subclass_keeps_its_own_methodstest_a_preview_whose_count_fails_leaves_nothing_behindoverrides, andto_config()returns a copy)test_the_address_that_is_read_is_the_one_checked_and_savedtest_a_warm_connector_skips_no_check_of_the_schema_tableAlso: closed (
test_closing_one_...), forked with locks held, threads, asyncio and cancellation, expired sign-in (test_a_failing_call, with recovery), two accounts, saved configs, jobs sync and async. All on the fake; no real credential expiry is tested.No golden value moves.
🤖 Generated with Claude Code