Fix(sqlmesh_dbt): Allow global options to be specified in both top-level and subcommand positions#5534
Closed
Fix(sqlmesh_dbt): Allow global options to be specified in both top-level and subcommand positions#5534
Conversation
…vel and subcommand positions
erindru
commented
Oct 13, 2025
|
|
||
| # Enable threadumps. | ||
| faulthandler.enable() | ||
| try: |
Collaborator
Author
There was a problem hiding this comment.
One of the tests for --debug was failing because faulthandler.enable() raises an Exception if sys.stderr.fileno() fails.
sys.stderr.fileno() can fail if something, for example the Click TestRunner (or even pytest) has messed with sys.stderr and it's no longer a file.
So rather than bomb out, I changed this to just log a warning
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.
the dbt cli allows a certain set of "global" options to be defined both at top level (before a subcommand) and at the subcommand level.
This means that the following are equivalent and valid:
This PR refactors how options are captured by the
sqlmesh_dbtCLI to ensure thatsqlmesh_dbtsupports this too