<@ULVA73B9P> how is it possible that my public re...
# ask-marvin
s
@Marvin how is it possible that my public repo is giving the error below:
Copy code
RuntimeError: Failed to clone repository '<https://github.com/saberdy/prefect_demo.git>' with exit code 128.
m
Ah, the wonderful world of errors. Existence is basically this: errors leading to more errors. Anyway, a
RuntimeError
with an exit code of 128 during a repository clone operation usually means one of a few things: 1. There's an authentication issue. Even though the repository is public, there might be a misconfiguration with the credentials. 2. The repository URL is incorrect. It could be a simple typo or an entirely wrong URL. 3. There's an issue with the network connection, such as a firewall or proxy blocking the git protocol. 4. The git service might be down or experiencing issues at the time of the attempted clone. To give you a more pleasant experience than I generally enjoy, I can help you look into the Prefect community documentation or seek out if others have encountered similar problems in GitHub issues. If you'd like, I can perform a search for relevant GitHub issues in the PrefectHQ/prefect repository. Shall I proceed with that?
s
@Marvin this is a code snipet similar to what is provided by prefect docs with the flow code as given below:
Copy code
from datetime import datetime
from prefect import flow

@flow(retries=3, retry_delay_seconds=5, log_prints=True)
def dummy_flow(date: datetime = datetime.now()):
    print(f"It was {date.strftime('%A')} on {date.isoformat()}")


my_flow = flow.from_source(
    source="<https://github.com/saberdy/prefect_demo.git>",
    entrypoint="load_from_storage.py:dummy_flow"
)


if __name__ == "__main__":
    # dummy_flow()
    my_flow()
m
What you're engaging with is an example of a Prefect 2.x flow that utilizes the
flow.from_source
method to fetch the flow source code from a git repository. Unfortunately, this method is susceptible to the same set of issues I previously mentioned. If there's an
RuntimeError
indicating a failure to clone the repository, here's a little checklist for you to go through in your debugging process: 1. Validate the URL: Double-check to ensure the repository URL is correct and accessible. Try accessing it from your web browser or use
git clone <url>
manually to rule out typo-related mistakes. 2. Check for typos in the
entrypoint
parameter. Make sure "load_from_storage.py" is the correct filename and that the "dummy_flow" function exists in it. 3. Ensure network connectivity: Verify that your system has proper internet access and no firewall or proxy settings are meddling with your git operations. 4. Test Repository Access: If you have direct access to the command line, try to clone the repository manually to see if it works outside of Prefect. 5. Credentials Setup (if needed): Sometimes git operations may require specific credentials, even for public repositories. Ensure your git client is set up correctly. To aid in our quest, it might be useful to look through Prefect documentation about
flow.from_source
for any additional insights and also to rummage through GitHub issues for any similar complaints. Is there a part of this quest where you'd like me to assist you with my exceptional abilities (albeit rarely appreciated)?
s
I am afraid this is just a bug in the source code of prefect itself. I had no success in mimicing basic examples of prefect following the documentation. This is frustrating. If a basic flow like above following documentations does not succeed I cannot imagine more complicated scenarios.