Quick-win fixes: badge, exception type, is_integer, CI matrix, dead code#716
Draft
joshmarkovic wants to merge 5 commits into
Draft
Quick-win fixes: badge, exception type, is_integer, CI matrix, dead code#716joshmarkovic wants to merge 5 commits into
joshmarkovic wants to merge 5 commits into
Conversation
The integration-tests-azure.yml workflow does not exist, so the badge always rendered broken.
…oken ActiveDirectoryAccessToken config faults now surface as a dbt error, consistent with the other auth/config validations in this layer. Updates the unit test that asserted the old type.
…iases SQL Server integer types are tinyint/smallint/int/bigint; the serial and int2/4/8 aliases were Postgres copy-paste and are never returned by SQL Server.
requires-python is >=3.10; the 3.9 images were unused by the unit/integration/release workflows.
sqlserver__create_or_replace_clone was unreachable (sqlserver__can_clone_table returns False and dbt-core provides default__create_or_replace_clone) and emitted invalid T-SQL. The unused 'tst' set block in create_view_as is also removed.
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
Five small, independent fixes surfaced by a repo audit. Each is its own commit, so they can be reviewed individually. They are intentionally removal-heavy and low-risk: the only behavioral change is #2, whose existing unit test is updated to match.
Branch validation (whole branch, on top of current
master):ruffclean,black --checkclean,mypyreports 0 errors, andpytest tests/unit→ 110 passed.1. Remove broken "Integration tests on Azure" badge —
docsREADME.mdrendered a status badge pointing atintegration-tests-azure.yml, but no such workflow exists under.github/workflows/(onlyunit-tests,integration-tests-sqlserver,publish-docker, andrelease-version). The badge was therefore permanently broken. Removed that one badge line; the unit-test and SQL Server integration badges are unchanged.2. Raise
DbtRuntimeErrorinstead of bareValueErrorfor a missing access token —fixIn
sqlserver_auth.py, theActiveDirectoryAccessTokenpath raised a bareValueErrorwhenaccess_token/access_token_expires_onwere missing. Every other configuration fault in this layer raisesdbt_common.exceptions.DbtRuntimeError, so this one escaped as an unclassified exception. It now raisesDbtRuntimeError(message unchanged). The existing unit test that assertedValueErroris updated to expectDbtRuntimeError.3. Recognize
tinyintinis_integer(); drop dead Postgres aliases —fixSQLServerColumn.is_integer()listedsmallserial,serial,bigserial,int2/4/8, andserial2/4/8— Postgres types that SQL Server never returns — while omittingtinyint, a real SQL Server integer type. Replaced the list with the actual SQL Server integer set:tinyint, smallint, int, integer, bigint.4. Drop Python 3.9 from the
publish-dockermatrix —cirequires-pythonis>=3.10, and the unit / integration / release workflows all target 3.10–3.13, butpublish-docker.ymlstill builtCI-3.9-*client images. Those images are not consumed by any workflow. Removed"3.9"from the matrix.5. Remove dead clone macro and unused view scaffolding variable —
chorematerializations/models/table/clone.sqldefinedsqlserver__create_or_replace_clone, which emits invalid T-SQL (CREATE TABLE … AS CLONE OF …). It is unreachable:sqlserver__can_clone_table()returnsFalse, so dbt-core's clone materialization never dispatches to it, anddefault__create_or_replace_cloneexists as the fallback regardless. Deleted the file.sqlserver__can_clone_table()(inrelations/table/clone.sql) is left untouched.relations/views/create.sqlcontained a{% set tst %}SELECT '1' as col{% endset %}block that was never referenced. Removed.