fix(dlt): surface underlying error and hint when attaching to pipeline fails#5836
fix(dlt): surface underlying error and hint when attaching to pipeline fails#5836nkwork9999 wants to merge 5 commits into
Conversation
2dccf58 to
7eccb31
Compare
|
@nkwork9999 Thanks for this PR! Some feedback:
Suggest aligning this doc with the new help text — e.g. "pipelines working directory" and clarifying it stores pipeline state, not scripts. Another one is updating Let me know if I'm missing anything! |
|
Thanks for the reply and review! I updated I also aligned the Verified with:
Please check it! |
…e fails When `sqlmesh init -t dlt --dlt-path <path>` could not attach to the pipeline, the underlying dlt error was swallowed and replaced with an uninformative message. `--dlt-path` points to dlt's pipelines working directory (by default ~/.dlt/pipelines), not the directory containing the pipeline scripts, which is a common source of confusion. Now the error includes the original dlt exception, the directory that was searched, and a hint to omit `--dlt-path` when the pipeline exists in the default working directory. Also clarifies the `--dlt-path` help text and docstring accordingly. Fixes SQLMesh#5660. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: nk <nkwork1234@gmail.com>
Signed-off-by: nk <nkwork1234@gmail.com>
88f5b3a to
a439ef6
Compare
Signed-off-by: nk <nkwork1234@gmail.com>
Signed-off-by: nk <nkwork1234@gmail.com>
|
I also looked into the failing dbt-version CI jobs. The previous run was failing for both dbt 1.6 and 1.7 when importing Snowflake pulled in an incompatible pyOpenSSL/cryptography combination and raised I added Verified locally with:
The latest GitHub Actions runs are currently showing Please check it! |
Signed-off-by: nk <nkwork1234@gmail.com>
|
@nkwork9999 oh thanks so much for looking into the dbt ci jobs error! I just ran the workflows |
|
@nkwork9999 Oh wait actually, somebody else merged a PR that had these fixes. Once rebase it should work just fine |
Description
Fixes #5660.
When
sqlmesh init -t dlt --dlt-path <path>cannot attach to the pipeline, the underlying dlt error is swallowed and replaced with an uninformativeCould not attach to pipeline <name>message.The root cause of the confusion in #5660 is that
--dlt-pathmust point to dlt's pipelines working directory (where pipeline state is stored, by default~/.dlt/pipelines), not the directory containing the pipeline scripts — and both the help text and the swallowed error gave the user no way to discover that.This PR:
--dlt-pathwhen a pipeline with the given name exists in the default pipelines working directory (the exact scenario in [bug] DLT Error: Could not attach to pipeline #5660).--dlt-pathhelp text, docstring, and CLI docs.Before:
After:
Test Plan
uv run --extra dev --extra web --extra slack --extra dlt --extra lsp make styleuv run --extra dev --extra web --extra slack --extra dlt --extra lsp pytest tests/cli/test_cli.py -q(the one failure,test_plan_very_verbose, also fails onmainin my environment and is unrelated)test_dlt_pipelinetest to assert that the error reports the searched directory and the--dlt-pathhint.Checklist
make styleand fixed any issues