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

Revert "Fix circular import (#11137)" #11175

Merged
merged 1 commit into from
Dec 24, 2024
Merged

Revert "Fix circular import (#11137)" #11175

merged 1 commit into from
Dec 24, 2024

Conversation

emmyoop
Copy link
Member

@emmyoop emmyoop commented Dec 23, 2024

This reverts commit 95c090b from PR #11137

Problem

This introduced a circular import in dbt-postgres

https://github.com/dbt-labs/dbt-postgres/actions/runs/12421973228/job/34729594861

CI log

Creating environment: default
Installing project in development mode
Checking dependencies
Syncing dependencies
ImportError while loading conftest '/home/runner/work/dbt-postgres/dbt-postgres/tests/conftest.py'.
tests/conftest.py:6: in <module>
    set_from_args(Namespace(), None)
../../../.local/share/hatch/env/virtual/dbt-postgres/ogKa4-GM/dbt-postgres/lib/python3.9/site-packages/dbt/flags.py:[22](https://github.com/dbt-labs/dbt-postgres/actions/runs/12421973228/job/34729594861#step:8:23): in set_from_args
    from dbt.cli.flags import Flags, convert_config
../../../.local/share/hatch/env/virtual/dbt-postgres/ogKa4-GM/dbt-postgres/lib/python3.9/site-packages/dbt/cli/flags.py:15: in <module>
    from dbt.cli.resolvers import default_log_path, default_project_dir
../../../.local/share/hatch/env/virtual/dbt-postgres/ogKa4-GM/dbt-postgres/lib/python3.9/site-packages/dbt/cli/resolvers.py:3: in <module>
    from dbt.config.project import PartialProject
../../../.local/share/hatch/env/virtual/dbt-postgres/ogKa4-GM/dbt-postgres/lib/python3.9/site-packages/dbt/config/__init__.py:2: in <module>
    from .profile import Profile  # noqa
../../../.local/share/hatch/env/virtual/dbt-postgres/ogKa4-GM/dbt-postgres/lib/python3.9/site-packages/dbt/config/profile.py:6: in <module>
    from dbt.cli.resolvers import default_profiles_dir
E   ImportError: cannot import name 'default_profiles_dir' from partially initialized module 'dbt.cli.resolvers' (most likely due to a circular import) (/home/runner/.local/share/hatch/env/virtual/dbt-postgres/ogKa4-GM/dbt-postgres/lib/python3.9/site-packages/dbt/cli/resolvers.py)

Solution

Revery and revisit later

Checklist

  • I have read the contributing guide and understand what's expected of me.
  • I have run this code in development, and it appears to resolve the stated issue.
  • This PR includes tests, or tests are not required or relevant for this PR.
  • This PR has no interface changes (e.g., macros, CLI, logs, JSON artifacts, config files, adapter interface, etc.) or this PR has already received feedback and approval from Product or DX.
  • This PR includes type annotations for new and modified functions.

@emmyoop emmyoop requested a review from a team as a code owner December 23, 2024 15:51
@cla-bot cla-bot bot added the cla:yes label Dec 23, 2024
Copy link
Contributor

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

@emmyoop emmyoop added the Skip Changelog Skips GHA to check for changelog file label Dec 23, 2024
Copy link

codecov bot commented Dec 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.88%. Comparing base (459d156) to head (d9805d0).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11175      +/-   ##
==========================================
- Coverage   88.93%   88.88%   -0.06%     
==========================================
  Files         186      187       +1     
  Lines       24054    24057       +3     
==========================================
- Hits        21392    21382      -10     
- Misses       2662     2675      +13     
Flag Coverage Δ
integration 86.19% <100.00%> (-0.14%) ⬇️
unit 62.05% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Unit Tests 62.05% <100.00%> (+<0.01%) ⬆️
Integration Tests 86.19% <100.00%> (-0.14%) ⬇️

Copy link
Member

@aranke aranke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, ty!

@peterallenwebb
Copy link
Contributor

Close/reopen to quickly trigger re-test

@peterallenwebb peterallenwebb merged commit 0bf38ce into main Dec 24, 2024
98 of 116 checks passed
@peterallenwebb peterallenwebb deleted the er/revert-11137 branch December 24, 2024 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes Skip Changelog Skips GHA to check for changelog file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants