Saurav Mittal
07/12/2022, 5:40 PMrunLauncher
, deployments
)
I am doing this so dagster refers to python file in the volume, giving me flexibility to add more files for new user code deployments without docker build (directly uploading files into volumes and pointing the file in the pod by updating workspace.yaml file in volume as well)
But I am getting this error (Looks like dagster grpc is not able to locate the file, while I can see the file mounted in the user-code pod)
FileNotFoundError: [Errno 2] No such file or directory: '/example_project/example_repo/repo-2.py'
File "/usr/local/lib/python3.7/site-packages/dagster/grpc/impl.py", line 81, in core_execute_run
recon_pipeline.get_definition()
File "/usr/local/lib/python3.7/site-packages/dagster/core/definitions/reconstruct.py", line 172, in get_definition
defn = self.repository.get_definition().get_pipeline(self.pipeline_name)
File "/usr/local/lib/python3.7/site-packages/dagster/core/definitions/reconstruct.py", line 81, in get_definition
return repository_def_from_pointer(self.pointer)
File "/usr/local/lib/python3.7/site-packages/dagster/core/definitions/reconstruct.py", line 648, in repository_def_from_pointer
target = def_from_pointer(pointer)
File "/usr/local/lib/python3.7/site-packages/dagster/core/definitions/reconstruct.py", line 569, in def_from_pointer
target = pointer.load_target()
File "/usr/local/lib/python3.7/site-packages/dagster/core/code_pointer.py", line 176, in load_target
module = load_python_file(self.python_file, self.working_directory)
File "/usr/local/lib/python3.7/site-packages/dagster/core/code_pointer.py", line 75, in load_python_file
os.stat(python_file)
Happy to share values.yaml file and other details on DM! thankyoudaniel
07/13/2022, 4:27 PMSaurav Mittal
07/13/2022, 4:41 PM0.14.15
This is my deployment dict
dagster-user-deployments:
deployments:
- dagsterApiGrpcArgs:
- --python-file
- /example_project/example_repo/repo-2.py
env:
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION: python
envSecrets:
- name: dagster-aws-access-key-id
- name: dagster-aws-secret-access-key
image:
pullPolicy: Always
repository: my-image-name
tag: latest
includeConfigInLaunchedRuns:
enabled: true
name: k8s-example-user-code-2
port: 3030
resources:
limits:
cpu: 250m
memory: 500Mi
requests:
cpu: 250m
memory: 500Mi
volumeMounts:
- mountPath: /example_project
name: my-volume-dagster
readOnly: false
volumes:
- name: my-volume-dagster
persistentVolumeClaim:
claimName: my-nfs
enabled: true
pipelineRun:
image:
repository: my-image-name
tag: latest
pullPolicy: Always
env:
DAGSTER_K8S_PIPELINE_RUN_IMAGE: my-image-name
runLauncher:
type: K8sRunLauncher
config:
image:
repository: my-image-name
tag: latest
pullPolicy: Always
envVars:
- "DAGSTER_K8S_PIPELINE_RUN_IMAGE"
k8sRunLauncher:
envSecrets:
- name: dagster-aws-access-key-id
- name: dagster-aws-secret-access-key
volumeMounts:
- mountPath: /example_project
name: my-volume-dagster
readOnly: false
volumes:
- name: my-volume-dagster
persistentVolumeClaim:
claimName: my-nfs
daniel
07/13/2022, 4:42 PMkubectl describe
the pod, are the volumes and volume mounts what you would expect?Saurav Mittal
07/13/2022, 4:56 PMdaniel
07/13/2022, 4:57 PMSaurav Mittal
07/13/2022, 4:58 PMdaniel
07/13/2022, 5:00 PMSaurav Mittal
07/13/2022, 5:03 PMdaniel
07/13/2022, 5:03 PMSaurav Mittal
07/13/2022, 5:04 PMdaniel
07/13/2022, 5:05 PMSaurav Mittal
07/13/2022, 5:05 PMdaniel
07/13/2022, 5:06 PMSaurav Mittal
07/13/2022, 5:06 PMdaniel
07/13/2022, 5:06 PMSaurav Mittal
07/13/2022, 5:06 PMdaniel
07/13/2022, 5:06 PMSaurav Mittal
07/13/2022, 5:07 PMdaniel
07/13/2022, 5:09 PMk8sRunLauncher:
envSecrets:
- name: dagster-aws-access-key-id
- name: dagster-aws-secret-access-key
volumeMounts:
- mountPath: /example_project
name: my-volume-dagster
readOnly: false
volumes:
- name: my-volume-dagster
persistentVolumeClaim:
claimName: my-nfs
in your post, do you want
k8sRunLauncher:
envSecrets:
- name: dagster-aws-access-key-id
- name: dagster-aws-secret-access-key
volumeMounts:
- mountPath: /example_project
name: my-volume-dagster
readOnly: false
volumes:
- name: my-volume-dagster
persistentVolumeClaim:
claimName: my-nfs
includeConfigInLaunchedRuns:
enabled: true
Saurav Mittal
07/13/2022, 5:11 PMdaniel
07/13/2022, 5:18 PMSaurav Mittal
07/13/2022, 6:56 PM