Skip to content

Resolve opendbt_docs_projects Variable dynamically + sqlglot v30 fix - #114

Open
LexxaRRioo wants to merge 3 commits into
memiiso:mainfrom
LexxaRRioo:fix/dynamic-variable-resolution
Open

Resolve opendbt_docs_projects Variable dynamically + sqlglot v30 fix#114
LexxaRRioo wants to merge 3 commits into
memiiso:mainfrom
LexxaRRioo:fix/dynamic-variable-resolution

Conversation

@LexxaRRioo

@LexxaRRioo LexxaRRioo commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Dynamic Variable resolution: DBTDocsView.projects is now a @property that calls get_projects() per request, so changes to the Airflow Variable opendbt_docs_projects take effect immediately without restarting the webserver.
  • sqlglot v30 compatibility: from sqlglot import Expression -> from sqlglot.expressions import Expression (sqlglot v30 moved it to the submodule).
  • Init order fix: _static_project_paths is set before super().__init__() because BaseView.__init__ triggers property access.

Test plan

  • Verify dbt docs page loads after deployment
  • Change opendbt_docs_projects Variable in Airflow UI -> verify new project appears without restart
  • Verify opendbt imports cleanly with sqlglot >= 30

LexxaRRioo and others added 3 commits April 24, 2026 16:29
Previously projects were read once at plugin init (webserver startup),
requiring a restart to pick up Variable changes. Now DBTDocsView.projects
is a @Property that calls get_projects() per request.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
BaseView.__init__ triggers property access, so the attribute
must exist before the parent constructor runs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant