Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use .parsed_*_path to allow str | Path #618

Closed
wants to merge 1 commit into from

Conversation

fritz-astronomer
Copy link
Contributor

Description

Broken DAG: [/usr/local/airflow/dags/telescope/telescope_reporting.py] Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/cosmos/airflow/task_group.py", line 26, in __init__
    DbtToAirflowConverter.__init__(self, *args, **specific_kwargs(**kwargs))
  File "/usr/local/lib/python3.11/site-packages/cosmos/converter.py", line 109, in __init__
    dbt_root_path = project_config.dbt_project_path.parent
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'parent'
DbtTaskGroup(
        ...,
        project_config=ProjectConfig(
            project_name="telescope_reporting",
            # dbt_project_path=Path("/usr/local/airflow/dags/dbt/"),  # no parse error
            dbt_project_path="/usr/local/airflow/dags/dbt/",  # parse error
        )
    )

Checklist

  • I have made corresponding changes to the documentation (if required)
  • I have added tests that prove my fix is effective or that my feature works

@fritz-astronomer fritz-astronomer requested a review from a team as a code owner October 21, 2023 00:50
@fritz-astronomer fritz-astronomer requested a review from a team October 21, 2023 00:50
@netlify
Copy link

netlify bot commented Oct 21, 2023

👷 Deploy Preview for amazing-pothos-a3bca0 processing.

Name Link
🔨 Latest commit 612a73a
🔍 Latest deploy log https://app.netlify.com/sites/amazing-pothos-a3bca0/deploys/6533203e76928a0008e73f21

@fritz-astronomer fritz-astronomer temporarily deployed to external October 21, 2023 00:50 — with GitHub Actions Inactive
@fritz-astronomer
Copy link
Contributor Author

I haven't tested this and am not familiar enough with the code to know if this is the right change - but it seems right

@codecov
Copy link

codecov bot commented Oct 23, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b7381c8) 93.28% compared to head (612a73a) 93.28%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #618   +/-   ##
=======================================
  Coverage   93.28%   93.28%           
=======================================
  Files          54       54           
  Lines        2116     2116           
=======================================
  Hits         1974     1974           
  Misses        142      142           
Files Coverage Δ
cosmos/converter.py 97.10% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tatiana tatiana added this to the 1.2.1 milestone Oct 23, 2023
@tatiana
Copy link
Collaborator

tatiana commented Oct 23, 2023

Hey @fritz-astronomer , thanks for making a PR to fix the issue #601
I'm closing this since it is a subset of a previous PR that solves the issue, is more complete, and has tests: #605
This change will be released as part of Cosmos 1.2.1.

@tatiana tatiana closed this Oct 23, 2023
@tatiana
Copy link
Collaborator

tatiana commented Oct 25, 2023

@fritz-astronomer fritz-astronomer deleted the patch-1 branch October 26, 2023 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants