https://dagster.io/ logo
Title
m

Max Teiger

05/22/2023, 8:05 AM
Hello ! (cc @Justin Albinet) While trying to access our assets metadata, we ran into this error :
Operation name: AssetEventsQuery

Message: Cannot return null for non-nullable field Run.mode.

Path: ["assetOrError","assetObservations",0,"runOrError","mode"]

Locations: [{"line":47,"column":7}]

Stack Trace:
  File "/usr/local/lib/python3.7/site-packages/graphql/execution/execute.py", line 541, in execute_field
    return_type, field_nodes, info, path, result
  File "/usr/local/lib/python3.7/site-packages/graphql/execution/execute.py", line 621, in complete_value
    "Cannot return null for non-nullable field"
We deployed Dagster stack using Helm, and everything else seems to work fine. I deployed the database inside the cluster, since, for now I don’t want to make my infrastructure more complicated. Tell me if I’m wrong, but the problem is likely that I misconfigured the postgres Database, or at least how the dagster should access it. I used default values in your
values.yml
file:
global:
  postgresqlSecretName: "dagster-postgresql-secret"

...

####################################################################################################
# PostgreSQL: Configuration values for postgresql
#
# <https://github.com/kubernetes/charts/blob/master/stable/postgresql/README.md>
#
# A PostgreSQL database is required to run Dagster on Kubernetes. If postgresql.enabled is marked as
# false, the PG credentials specified here will still be used, and should point to an external PG
# database that is accessible from this chart.
####################################################################################################
postgresql:
  # set postgresql.enabled to be false to disable deploy of a PostgreSQL database and use an
  # existing external PostgreSQL database
  enabled: true

  # Used by init container to check that db is running. (Even if enabled:false)
  image:
    repository: "library/postgres"
    tag: "14.6"
    pullPolicy: IfNotPresent

  # set this PostgreSQL hostname when using an external PostgreSQL database
  postgresqlHost: ""

  postgresqlUsername: test

  # Note when changing this password (e.g. in test) that credentials will
  # persist as long as the PVCs do -- see:
  # <https://github.com/helm/charts/issues/12836#issuecomment-524552358>
  postgresqlPassword: test

  postgresqlDatabase: test

  # set postgresql parameter keywords for the connection string.
  # see: <https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS>
  postgresqlParams: {}

  # When set, overrides the default `postgresql` scheme for the connection string.
  # (e.g., set to `postgresql+pg8000` to use the `pg8000` library).
  # See: <https://docs.sqlalchemy.org/en/13/dialects/postgresql.html#dialect-postgresql>
  postgresqlScheme: ""

  service:
    port: 5432

# Whether to generate a secret resource for the PostgreSQL password. Useful if
# global.postgresqlSecretName is managed outside of this helm chart.
generatePostgresqlPasswordSecret: true
But it deploys two secrets (cf screenshot) with different name which contains the same value
postgresql-password
Do you have an idea on how I can modify the deployment
d

daniel

05/22/2023, 5:29 PM
Hi Max - I think this a bug that will go away if you upgrade your helm chart to the latest version
m

Max Teiger

05/22/2023, 7:20 PM
Thanks ! I’ll try that tomorrow 🙂
j

Justin Albinet

05/24/2023, 1:55 PM
Thank you @daniel it's working way better now ! I don't know if it's a similar error but once a job running all my assets is finished I cannot re-materialize an asset because it's gonna run the error
[Errno 2] No such file or directory: '/opt/dagster/dagster_home/storage/previousAsset'
with
previousAsset
an asset that's needed to rematerialize my asset Is k8s restarting the docker after the end of each job ?
d

daniel

05/24/2023, 2:04 PM
Glad that it’s working - would you mind making a new post for the new issue so that we can route it appropriately?
👍 1