comfy-cli icon indicating copy to clipboard operation
comfy-cli copied to clipboard

Submodules not included in published archive

Open ssitu opened this issue 8 months ago • 4 comments
trafficstars

Is there currently a way for a node creator to have submodules downloaded with the original repo?

Nodes that depend on submodules are typically cloned using git clone <url> --recursive so that the submodules are cloned as well.

What seemed like a solution was to add submodules: true in the github action for publishing the node as seen in this commit, but it does not seem to have worked because the directory for the submodule remains empty when downloading the .zip from the registry website.

Further discussion here: https://github.com/ssitu/ComfyUI_UltimateSDUpscale/pull/140#issuecomment-2702000406

ssitu avatar Mar 05 '25 20:03 ssitu

Hey @ssitu! 👋 I'm here to help you with bug fixes, questions, and contributing while you wait for a human maintainer. Let's squash those bugs together!

The submodules: true setting in GitHub Actions is intended to ensure that submodules are included when the repository is checked out during the workflow. However, this setting only affects the cloning process within the GitHub Actions environment and does not impact the contents of the .zip file generated by GitHub when downloading the repository from the registry. The .zip file does not include submodules by default, as it is a snapshot of the repository's main content without submodules.

To include submodules in the published archive, you might need to create a custom script within your GitHub Actions workflow that manually initializes and updates the submodules after checking out the repository. This can be done using the following commands:

git submodule init
git submodule update

After ensuring the submodules are included, you can package the repository and its submodules into a .zip file or another archive format for distribution. This approach requires additional steps in your workflow to handle the packaging process.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

dosubot[bot] avatar Mar 05 '25 20:03 dosubot[bot]

A possible workaround for those who will struggle with the same issue can be found here: 142

bigcat88 avatar Mar 06 '25 17:03 bigcat88

@ssitu sorry for late reply. seems like you already solved the problem. Did you have multiple layers of submodules to include?

Future viewers can use this as a sample: https://github.com/ssitu/ComfyUI_UltimateSDUpscale/pull/140

robinjhuang avatar Mar 12 '25 02:03 robinjhuang

Yes, we found a solution to upload the submodule to the registry. We also download the submodule if it somehow isn't found in the designated folder.

I don't think I have multiple layers of submodules. The recursive flag is just for brevity.

ssitu avatar Mar 12 '25 02:03 ssitu