cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
29.9k stars 3.78k forks source link

Build fails due to error while updating vendored submodule #46242

Closed amitsadaphule closed 4 years ago

amitsadaphule commented 4 years ago

Describe the problem

The build for current master (commit # b5f030223fbcf22e806c48a3c46e74a73a54f50f) fails with an error while updating submodules. It errors out for vendored submodule.

To Reproduce

  1. Install all cockroach build dependencies.
  2. cd $GOPATH/src/github.com/cockroachdb; git clone https://github.com/cockroachdb/cockroach.git
  3. cd cockroach; make -j1 build

Expected behavior The build should have started post updating all submodules.

Additional data / screenshots

Here is the relevant log:

Cloning into 'vendor'...
remote: Enumerating objects: 502, done.
remote: Counting objects: 100% (502/502), done.
remote: Compressing objects: 100% (354/354), done.
remote: Total 66149 (delta 183), reused 391 (delta 132), pack-reused 65647
Receiving objects: 100% (66149/66149), 129.82 MiB | 16.72 MiB/s, done.
Resolving deltas: 100% (31563/31563), done.
fatal: reference is not a tree: 002b8d2f136035aef972ef67cf6d546840a0e5fd
Unable to checkout '002b8d2f136035aef972ef67cf6d546840a0e5fd' in submodule path 'vendor'
GOPATH set to /root/go
gitdir=$(git rev-parse --git-dir 2>/dev/null || true); \
if test -n "$gitdir"; then \
   git submodule update --init --recursive; \
fi
fatal: reference is not a tree: 002b8d2f136035aef972ef67cf6d546840a0e5fd
Unable to checkout '002b8d2f136035aef972ef67cf6d546840a0e5fd' in submodule path 'vendor'
installing githooks/post-rewrite
installing githooks/commit-msg
installing githooks/post-checkout
installing githooks/prepare-commit-msg
installing githooks/post-merge
make: *** No rule to make target `bin/.submodules-initialized', needed by `bin/.bootstrap'.  Stop.

I also tried to manually checkout the commit # 002b8d2f136035aef972ef67cf6d546840a0e5fd by cloning cockroachdb/vendored separately. But I get the same error there too. The web url shows the code though: https://github.com/cockroachdb/vendored/tree/002b8d2f136035aef972ef67cf6d546840a0e5fd

Environment:

dt commented 4 years ago

I haven't dug into why this is happening yet, but someone else was running into this earlier and resolved it by cding into the submodule and running git fetch origin <sha that it can't find> and then back in the parent dir, submodule update started working again.

knz commented 4 years ago

I just checked on a blank environment. Did not encounter issues.

@amitsadaphule can you report which version of Git you are using (git --version) and which version of make (make --version)? Thank you

amitsadaphule commented 4 years ago

Please find the git and make version logs below: [root@p006vm30 ~]# git --version git version 1.8.3.1 [root@p006vm30 ~]# make --version GNU Make 3.82 Built for powerpc64le-redhat-linux-gnu Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

Thanks!

amitsadaphule commented 4 years ago

It seems that this was a temporary glitch. I'm unable to reproduce the issue with the latest commit on master 04b8d6597fdac127248429add1c986a03e75b318 and even with the commit b5f030223fbcf22e806c48a3c46e74a73a54f50f for which the issue was seen yesterday. Closing the issue now.

knz commented 4 years ago

@amitsadaphule that Git is seriously outdated. There were major bugs in v1 and v2.1x. The minimum version of Git we support for fetching & building (as per the doc) is v1.9, and I'm going to bump that to 2.20 now.

amitsadaphule commented 4 years ago

@knz thanks and noted!