dagster-io / dagster

An orchestration platform for the development, production, and observation of data assets.
https://dagster.io
Apache License 2.0
11.3k stars 1.43k forks source link

Missing `dagster-graphql` dependency for Dagster Insights #22237

Closed aksestok closed 2 months ago

aksestok commented 4 months ago

Dagster version

dagster, version 1.7.7

What's the issue?

We don't have a dependency on dagster-webserver in production, so we don't get the bundled dagster-graphql from there resulting in an import error.

Stacktrace:

  ...
  File "...", line ..., in <module>
    from dagster_cloud.dagster_insights import dbt_with_bigquery_insights
  File "/opt/pysetup/.venv/lib/python3.12/site-packages/dagster_cloud/dagster_insights/__init__.py", line 5, in <module>
    from .snowflake.definitions import (
  File "/opt/pysetup/.venv/lib/python3.12/site-packages/dagster_cloud/dagster_insights/snowflake/definitions.py", line 27, in <module>
    from ..metrics_utils import put_cost_information
  File "/opt/pysetup/.venv/lib/python3.12/site-packages/dagster_cloud/dagster_insights/metrics_utils.py", line 10, in <module>
    from gql import Client, gql

What did you expect to happen?

dagster-cloud (or at least the insights extra and docs should be updated) should have a dependency on dagster-graphql.

How to reproduce?

In a new virtualenv, install prerequisites:

pip install dagster dagster-cloud dagster-gcp

try to import dbt with BQ insights:

from dagster_cloud.dagster_insights import dbt_with_bigquery_insights

Deployment type

Dagster Cloud

Deployment details

No response

Additional information

No response

Message from the maintainers

Impacted by this issue? Give it a 👍! We factor engagement into prioritization.

gibsondan commented 3 months ago

Hi @aksestok - thanks for the report, we have added a fix for this in our next release.