Nicolas Huray
02/13/2023, 9:12 PMdagster-user-deployments
. Should we manage it outside that Helm chart ?Andrea Giardini
02/13/2023, 10:16 PMNicolas Huray
02/14/2023, 2:58 AMNicolas Huray
02/14/2023, 3:02 AMNicolas Huray
02/14/2023, 3:03 AM$DAGSTER_HOME/storage
into the pod created by the Kubernetes Job.Nicolas Huray
02/14/2023, 3:03 AMAndrea Giardini
02/14/2023, 8:31 AMvolumes:
is mentioned multiple times in the values.yaml file
Anyway, I think that might give you a volume on the user-code-deployments, but not in the jobs you run. I believe IOmanagers are the best way to solve this issue, both in terms of scalability and complexity.Nicolas Huray
02/14/2023, 2:36 PMNicolas Huray
02/14/2023, 2:39 PM@asset
def cereals():
"""All Cereals"""
response = requests.get("<https://docs.dagster.io/assets/cereal.csv>")
lines = response.text.split("\n")
return [row for row in csv.DictReader(lines)]
@asset
def nabisco_cereals(cereals):
"""Cereals manufactured by Nabisco"""
return [row for row in cereals if row["mfr"] == "N"]
but we don’t specifically define an IOManager, Dagster use a default one. I guess by default data are persisted on disk because the error message I got is Not such file or directory
Nicolas Huray
02/14/2023, 2:42 PMcereals
a Kubernetes Job gonna start a pod and store on disk the asset materialized. If we materialize in a second run nabisco_cereals
the second pod gonna try to read the cereals
assets from the disk BUT because it’s a different pod WITHOUT persistent volume it can’t find the cereals
assetsNicolas Huray
02/14/2023, 2:44 PMNicolas Huray
02/14/2023, 2:45 PMdagster-user-deployements
chart allows to mount volume BUT does not allow to create volume using a PersistentVolumeClaim.Nicolas Huray
02/14/2023, 2:48 PMAndrea Giardini
02/14/2023, 2:55 PMNicolas Huray
02/14/2023, 2:57 PMdagster-user-deployments
chart for volume mounts in that case.Nicolas Huray
02/14/2023, 2:59 PMdagster-user-deployments
chart) ?Andrea Giardini
02/14/2023, 3:12 PMAndrea Giardini
02/14/2023, 3:13 PMBut I don’t understand what might be the usage in theWell a volume can also be a configmap or a secret! 🙂chart for volume mounts in that casedagster-user-deployments
Nicolas Huray
02/14/2023, 3:13 PMNicolas Huray
02/14/2023, 3:14 PMAndrea Giardini
02/14/2023, 3:16 PMNicolas Huray
02/14/2023, 3:18 PMNicolas Huray
02/14/2023, 3:19 PMAndrea Giardini
02/14/2023, 3:21 PMNicolas Huray
02/14/2023, 3:23 PM@asset
def asset1():
# create df ...
return df
@asset
def asset2(asset1):
return df[:5]
@repository
def repo():
return with_resources(
[asset1, asset2],
resource_defs={
"io_manager": gcs_pickle_io_manager.configured(
{"gcs_bucket": "my-cool-bucket", "gcs_prefix": "my-cool-prefix"}
),
"gcs": gcs_resource,
},
)
)
Nicolas Huray
02/14/2023, 3:23 PMDefinitions
?Andrea Giardini
02/14/2023, 3:24 PMNicolas Huray
02/14/2023, 3:25 PMAndrea Giardini
02/14/2023, 3:26 PMNicolas Huray
02/14/2023, 3:26 PMAndrea Giardini
02/14/2023, 3:29 PMNicolas Huray
02/14/2023, 3:31 PMNicolas Huray
02/14/2023, 3:31 PMAndrea Giardini
02/14/2023, 3:33 PMNicolas Huray
02/14/2023, 3:35 PMAndrea Giardini
02/14/2023, 3:37 PMNicolas Huray
02/14/2023, 3:37 PMAndrea Giardini
02/14/2023, 3:38 PMNicolas Huray
02/14/2023, 3:38 PMNicolas Huray
02/14/2023, 3:38 PM