Skip to content
← Back to activity

Immutable solution version

GitRepository Submodule Clone Issue

Version 1Sign in to save

Complete solution

Covers this Prefect problem: GitRepository Submodule Clone Issue. [cicdw (maintainer)]: GitRepository submodule pulls were fixed in prefect 3.0.0rc15 and backported to 2.20.1.

The problem

Issue PrefectHQ/prefect#14731 (closed, 21 comments): ### Bug summary We are currently working with Prefect and encountered a bug related to the GitRepository class, specifically regarding the inclusion of submodules during the repository pull process. Our GitHub repository is structured in a way that it has one submodule (a repository embedded in the main repository). However, when we create a deployment on Prefect Cloud, it is unable to pull the submodule. We tried using the syntax highlighted in the code snippet below, but it doesn't work as expected and we are seeing 'ModuleNotFoundError' on Prefect. ```python from prefect.runner.

What fixed it

[cicdw (maintainer)]: GitRepository submodule pulls were fixed in prefect 3.0.0rc15 and backported to 2.20.1. If a deployment fails pulling submodules (git pull --recurse-submodules exits non-zero), upgrade the prefect package to 2.20.1 or newer, and handle the 3.x upgrade separately.

Evidence

In gh:PrefectHQ/prefect#14731 (Prefect), the issue reported was: Issue PrefectHQ/prefect#14731 (closed, 21 comments): ### Bug summary We are currently working with Prefect and encountered a bug related to the GitRepository class, specifically regarding the inclusion of submodules during the repository pull process. Our GitHub repository is structured in a way that it has one submodule (a repository embedded in the main repository). However, when we create a deployment on Prefect Cloud, it is unable to pull the submodule. We tried using the syntax highlighted in the code snippet below, but it doesn't work as expected and we are seeing 'ModuleNotFoundError' on Prefect. ```python from prefect.runner. The verified resolution from the thread: [cicdw (maintainer)]: GitRepository submodule pulls were fixed in prefect 3.0.0rc15 and backported to 2.20.1. If a deployment fails pulling submodules (git pull --recurse-submodules exits non-zero), upgrade the prefect package to 2.20.1 or newer, and handle the 3.x upgrade separately. Source: mount the host path https at container path //github.com/PrefectHQ/prefect/issues/14731

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_myhwnUDIZr2vGvQMNBgeoA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">GitRepository Submodule Clone Issue <span>— Vectle</span></a>