Ana
10/24/2023, 9:51 AMmy-project
└── important_directory
├── flow.py
└── prefect.yaml
How should I fill prefect.yaml to update code from gitlab storage, given that my-project
is a git repo?
I've tried a lot of stuff but nothing worked, flow runs fail with file not found error
Last attempt was:
pull:
- prefect.deployments.steps.set_working_directory:
directory: /home/user/my-project/
- prefect.deployments.steps.git_clone:
repository: <https://gitlab.sth.com/my-project.git>
branch: main
# the deployments section allows you to provide configuration for deploying flows
deployments:
- name: my-deployment
entrypoint: important_directory/flow.py:my_method
GitLab blocks are installed; prefect version 2.13.1Serina
10/24/2023, 1:18 PMgit_clone
step, like so:
pull:
- prefect.deployments.steps.git_clone:
repository: <https://github.com/org/repo.git>
credentials: "{{ prefect.blocks.gitlab-credentials.my-credentials }}"
But you also mentioned that it’s actually failing on a file not found error. The output to the error would be useful. Also, I don’t believe there is a need for the set_working_directory
step prior to git_clone
but I may be missing something about your setup.Ana
10/24/2023, 1:27 PMAna
10/24/2023, 1:31 PMSerina
10/24/2023, 1:38 PMAna
10/24/2023, 1:39 PMsqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked
[SQL: INSERT INTO worker (name, last_heartbeat_time, heartbeat_interval_seconds, work_pool_id, id, created, updated) VALUES (:name, :last_heartbeat_time, :heartbeat_interval_seconds, :work_pool_id, :id, :created, :updated) ON CONFLICT (work_pool_id, name) DO UPDATE SET last_heartbeat_time = :param_1, heartbeat_interval_seconds = :param_2]
[parameters: {'name': 'ProcessWorker 06ec47b8-bf47-4deb-9d23-aeb9da2e3dbb', 'last_heartbeat_time': '2023-10-24 13:07:38.895798', 'heartbeat_interval_seconds': 30, 'work_pool_id': '7a172727-f6fd-45a7-ae05-fde389bec150', 'id': '58a9f905-a7cc-4b77-bda3-d0ff6f2c141e', 'created': '2023-10-24 13:07:38.896628', 'updated': '2023-10-24 13:07:38.896639', 'param_1': '2023-10-24 13:07:38.895798', 'param_2': 30}]
Ana
10/24/2023, 1:40 PM