Repository navigation
Provide the connection id to the integration tests as a project variable - #9
Merged
Merged
Conversation
The id was a real-looking value copied into the golden files and the README. Now:
- integration_tests/dbt_project.yml reads SIGMA_CONNECTION_ID with an all-zeros placeholder default.
- Golden files store <connectionId>; check_golden.py normalizes that field on both sides.
- assert_workbooks checks every warehouse source carries var('sigma_connection_id'), and the test
script re-runs it under a --vars override to prove nothing is baked in.
- The README example uses a placeholder.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
What this changes
The Sigma connection id used by the integration tests was a real-looking value, copied into the three golden files (17 places) and the README example. It was already a project var, but its value was baked in everywhere the output was recorded. Now it is provided by the integration tests' project variable and appears nowhere else.
integration_tests/dbt_project.yml:sigma_connection_idreadsSIGMA_CONNECTION_IDand otherwise defaults to an all-zeros placeholder, so no real id lives in the repo and a maintainer can still supply theirs (for example beforeexport_workbooks.py --push --dry-run).<connectionId>.check_golden.pyreplacesconnectionIdvalues with that placeholder on both sides and writes goldens the same way, so the suite passes whatever id is supplied. OnlyconnectionIdis normalized; every other value, includingfolderId, is still compared exactly.assert_workbooksnow checks that every warehouse source carries exactlyvar('sigma_connection_id').assert_workbooksunder a--varsoverride, which passes only if the id flows from the var and is not baked into the macros or tests.dbt_project.ymlexample uses<your-sigma-connection-id>.Verification
connectionIdlines changed and nothing else, and the old id appears nowhere in the repo (excluding build output).--warn-errorand on dbt 2.x with the default placeholder, and on dbt 1.x withSIGMA_CONNECTION_IDset to a different value with no golden churn. 30 negative cases; 35 Python tests (4 new for the normalization, including one that fails if a real connection id is committed into a golden file).warehouse_tablefailsassert_workbookswith "carries the sigma_connection_id project var, not a hardcoded id".Not changed
sigma_folder_idand the data model id in the same file are also environment-style values and are still committed as-is; they were outside this request. The same approach would apply if you want them handled too.🤖 Generated with Claude Code