Recently Upgraded prefect from 2.9.0 to 2.10.1. Ev...
# prefect-community
f
Recently Upgraded prefect from 2.9.0 to 2.10.1. Everything was working fine before with 2.9.0 but now getting error. <FileNotFoundError: [Errno 2] No such file or directory: '/opt/prefect/src/downloader_0.8.py'>. The code is stored in the root directory . Using docker container. Code stored on minio bucket.
โœ… 1
z
Hm 2.10.1 is ~2 lines of code different than 2.10.0 and I donโ€™t think it would cause that error
Can you share a traceback?
f
sorry my bad, it's 2.9.0 to 2.10.1. I have updated my question
c
Could you share your deployment configuration? specifically your storage block setup
f
prefect deployment build src/downloader_0.8.py:main_downloader --name downloader_0.8 --tag dev --work-queue q1 --output deployments/downloader_0.8.yaml -sb remote-file-system/minio1 -ib docker-container/docker-custom-image
prefect deployment apply deployments/downloader_0.8.yaml
๐Ÿ‘ 1
Note: code.py is referring to downloader_0.8.py
name: downloader_0.8
description: null
version: 94d93d577332f48f00736e5e7c038598
# The work queue that will handle this deployment's runs
work_queue_name: q1
work_pool_name: default-agent-pool
tags:
- dev
parameters: {}
schedule: null
is_schedule_active: true
infra_overrides: {}
###
### DO NOT EDIT BELOW THIS LINE
###
flow_name: Main downloader
manifest_path: null
infrastructure:
type: docker-container
env: {}
labels: {}
name: null
command: null
image: prefect2
image_pull_policy: NEVER
image_registry: null
networks:
- prefect-server
network_mode: null
auto_remove: true
volumes:
- /home/dev/projects/SDA-Rail-0.4/flows:/flows
- /home/dev/Sharedstorage/mnt/logs:/data_source/logs
stream_output: true
memswap_limit: null
mem_limit: null
privileged: false
_block_document_id: edbdb1ba-1d3e-4c14-b70a-f57fb0a3794b
_block_document_name: docker-custom-image
_is_anonymous: false
block_type_slug: docker-container
_block_type_slug: docker-container
storage:
basepath: <s3://prefect-flows1/>
settings:
use_ssl: false
key: abc
secret: abc
client_kwargs:
endpoint_url: <http://minio:9000>
_block_document_id: 09f7e8f0-dc8a-4f03-86c1-f837b5bc8384
_block_document_name: minio1
_is_anonymous: false
block_type_slug: remote-file-system
_block_type_slug: remote-file-system
path: ''
entrypoint: src/downloader_0.8.py:main_downloader
parameter_openapi_schema:
title: Parameters
type: object
properties: {}
required: null
definitions: null
timestamp: '2023-04-07T03:53:07.772296+00:00'
c
There are no references to
code.py
in your
deployment.yaml
so I don't think this is coming from within Prefect's engine
f
I have edited the original question. please check the screen snaps as well
๐Ÿ‘ 1
Whole error log
Same error for other flow:
c
What exactly did you upgrade from 2.9 to 2.10.1 - was it your agent, your local environment, the prefect installation within your docker image, or some combination?
None of this logic should be different though between versions, so I'm not totally sure what could be causing this
f
I am running prefect in docker contailers; prefect server, and agent both are running in separate docker containers using the same official prefect image, which I have customized.
I think there must be some kind of bug as instead of looking for the code in "src/downloader_0.8.py" prefect is looking for the code in '/opt/prefect/src/downloader_0.8.py'.
The code location is clearly defined in the deployment configuration and also the same location('/src/downloader_0.8.py') on minio storage.
c
So Iโ€™m guessing your Docker image is the one you upgraded? Can you confirm that downgrading prefect within the image resolves the issue?
Assuming thatโ€™s the case could you open an issue for this? I can investigate tomorrow
๐Ÿ‘ 1
f
I redownloaded the prefect image(2.10.1) and customized it, instead of upgrading my old image. Anyway I will roll back to prefect 2.9.0 until this issue is resolved.
๐Ÿ‘ 1
c
@Faheem Khan this issue should now be fixed in 2.10.2
๐Ÿ™Œ 1
โค๏ธ 1
f
Thanks, confirmed it's running without any issue
๐Ÿ™Œ 2