Ben Zehavi
02/05/2024, 11:00 AMsourced_flow = flow.from_source(
source=GitLabRepository(
name="my-block",
repository="<https://gitlab.com/org/data-pipelines/prefect-pipelines.git>",
access_token=f"{{ prefect.blocks.secret.gitlab}}",
),
entrypoint="a/flows/b.py:ttt",
)
sourced_flow.deploy(
name="ttt",
work_pool_name="k8s",
# cron="0 1 * * *",
)
Marvin
02/05/2024, 11:00 AMBlockNotSavedError
you're encountering could be linked to Prefect's Blocks system, which are used for storing configuration and interfacing with external systems.
However, I couldn't find any relevant information in the available documents regarding this specific error, nor are there open issues on GitHub related to it, which means it might require some hands-on troubleshooting.
Here are a few steps you might want to consider:
1. Check if the GitLabRepository
block named "my-block" exists in your Prefect instance and has been saved correctly. The error suggests that it may not have been saved or registered successfully.
2. Ensure that the access_token
used in the block is valid and has the necessary permissions to access the specified repository on GitLab.
3. Make sure the repository URL and entrypoint are specified correctly in your deployment script.
4. If you have recently upgraded Prefect or are using an unfamiliar version, verify that this code pattern follows the guidelines for that particular version of Prefect.
5. Confirm that other Prefect configurations (e.g., work pool setup) are correctly defined and functioning.
Without specific documentation or issues to reference, this is a bit of a shot in the dark, akin to looking for a black cat in a dark room that isn't there. If these steps don't resolve the issue, I'd recommend reaching out to Prefect's support channels or community forums for more tailored assistance.