Skip to content

Docs build fails with "One or more submodule URLs are not valid." #3857

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bramwelt opened this issue Mar 26, 2018 · 2 comments
Closed

Docs build fails with "One or more submodule URLs are not valid." #3857

bramwelt opened this issue Mar 26, 2018 · 2 comments
Assignees
Labels
Bug A bug

Comments

@bramwelt
Copy link
Contributor

Details

Expected Result

Given our .gitmodules file, the build succeeds.
The last change to our .gitmodules file was 8 days ago (March 19th).

Actual Result

An error:

One or more submodule URLs are not valid.

is displayed and the build fails.

@agjohnson agjohnson added the Bug A bug label Mar 26, 2018
@agjohnson agjohnson self-assigned this Mar 26, 2018
@agjohnson
Copy link
Contributor

Confirmed this is a bug. Gitpython reports submodules like:

git.Submodule(name=docs/submodules/apex, path=docs/submodules/apex, url=../apex, branch_path=refs/heads/.)

In the case of relative URLs, git operates not as we'd expect:

is the URL of the new submodule’s origin repository. This may be either an absolute URL, or (if it begins with ./ or ../), the location relative to the superproject’s default remote repository

So for a parent project with remote origin of:
https://github.com/user/repo

And a submodule with URL of ../other-repo, the effective submodule URL is:
https://github.com/user/other-repo, not a local disk repo /path/repo/../other-repo/

agjohnson added a commit that referenced this issue Mar 26, 2018
* Add conditional logic for submodule relative urls
* Break down logic a bit more
* Add test case for relative url submodule
* Broke test case for invalid url submodule

Fixes #3857
agjohnson added a commit that referenced this issue Mar 26, 2018
* Add conditional logic for submodule relative urls
* Break down logic a bit more
* Add test case for relative url submodule
* Broke test case for invalid url submodule

Fixes #3857
@agjohnson
Copy link
Contributor

I forgot to follow up here. This fix went live on monday, so issues with relative submodule urls should be resolved.

agjohnson added a commit that referenced this issue Mar 29, 2018
* Fix up some of the logic around repo and submodule URLs

* Add conditional logic for submodule relative urls
* Break down logic a bit more
* Add test case for relative url submodule
* Broke test case for invalid url submodule

Fixes #3857

* Lint fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug
Projects
None yet
Development

No branches or pull requests

2 participants