Cartodb: clone with inaccessible submodule fails the clone process (cartodb-private)

Created on 14 Jan 2021  路  6Comments  路  Source: CartoDB/cartodb

I am running into problems while trying out the latest master branch due to the cartodb-private submodule's inclusion.

It breaks cloning the repository and is breaking some of our CI pipelines... could someone please enlighten me as to the purpose of having a private submodule in an open source and public repository? With an open source project you shouldn't include completely private submodules as dependencies it defeats its purpose.

Most helpful comment

@sabman, you can also run it with -n flag for a shallow copy.

upd: okay, this might not be a good solution, -n as shallow copy will basically create an empty dir

All 6 comments

Also encountered this issue from one of Dockerized carto images. Seems like this is an error, at least I hope so.

the PR that originally added the submodule is here:
https://github.com/CartoDB/cartodb/pull/16023

I am wondering if there are any ideas on a better way to manage this? For now i could either clone without the --recursive flag and also comment out the private submodule from the .submodulefile.

sed -i '.bak' 's/\[submodule "private"\]/#&/' .gitmodules
sed -i '.bak' 's/^[[:space:]]*url = [email protected]:CartoDB\/cartodb-private\.git/#&/' .gitmodules
sed -i '.bak' 's/^[[:space:]]*path = private/#&/' .gitmodules

I'm sure there's a better way though, any suggestions?

@sabman, you can also run it with -n flag for a shallow copy.

upd: okay, this might not be a good solution, -n as shallow copy will basically create an empty dir

looking more closely at the PR where private submodule was added it seems it's about the new CI. So it's possible that the tagged release will exclude the private submodule (ideally that's how it should be done).

the private submodule adds some things mostly for the CI as you said. For different business reasons we have decided not to release those in the open source version.
we are sorry for any inconveniences caused, but we considered different options and the submodule was the less intrusive one.
You will have to apply any of those workarounds for the time being. We will add a note in the README to clarify it. But unfortunately we cannot remove it, or it will break our current CI setup.

In case anyone stumble into this, here's the solution:

git clone https://github.com/cartodb/cartodb.git
cd cartodb
git rm private
git submodule update --init --recursive
Was this page helpful?
0 / 5 - 0 ratings

Related issues

javitonino picture javitonino  路  5Comments

makella picture makella  路  3Comments

atlefren picture atlefren  路  3Comments

piensaenpixel picture piensaenpixel  路  4Comments

rochoa picture rochoa  路  4Comments