feat: contract verify accepts dataset DQN in addition to local file#2
Merged
santiviquez merged 8 commits intomainfrom Apr 4, 2026
Merged
feat: contract verify accepts dataset DQN in addition to local file#2santiviquez merged 8 commits intomainfrom
santiviquez merged 8 commits intomainfrom
Conversation
Allows engineers to run `sodacli contract verify datasource/db/schema/table` without needing a local contract YAML file. When the argument does not end in .yml/.yaml it is treated as a DQN, the latest contract is fetched from Soda Cloud by dataset, and verification is triggered via the Runner. Refactors runContractVerify into three focused helpers: - runContractVerifyByFile: existing file push + verify path - runContractVerifyByDQN: new DQN lookup + verify path - pollAndDisplayVerification: shared poll and display logic Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Removes tuple returns — each path (YAML/DQN) owns its full flow. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Reject `--local` with a DQN argument (clear error instead of cryptic file-not-found) - Update command_tree.txt to reflect `<file|dqn>` usage - Clarify README docs comments for DQN vs file verify - Add TestContractVerifyDQN: local_rejects_dqn, nonexistent_dqn, verify_by_dqn
Collaborator
|
Awesome, thanks @adkinsty! |
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.
Summary
sodacli contract verifynow accepts a dataset DQN (datasource/db/schema/table) asan alternative to a local contract file
.yml/.yaml, it is treated as a DQN — the latestcontract is looked up in Soda Cloud and verified via the Runner, no local file needed
Motivation
Enables a clean division of labor: business users author contracts in the Soda Cloud UI,
engineers just supply the dataset DQN in their pipelines — no need to download or
maintain a local contract file.
Refactor
Extracted
runContractVerifyinto three focused helpers:runContractVerifyByFile— existing file push + verify pathrunContractVerifyByDQN— new DQN lookup + verify pathpollAndDisplayVerification— shared poll and display logicTest plan
sodacli contract verify datasource/db/schema/table— looks up contract by DQN,triggers verification, polls and displays results
sodacli contract verify my_contract.yml— existing file path still workssodacli contract verify datasource/db/schema/table --no-wait— returnsimmediately with scan ID
🤖 Generated with Claude Code