cockroachdb / cockroachdb/cockroach-go
Custom binary - tests failure
- Dominant language
- Go
- Stars
- 169
- Forks
- 78
- PR merge metrics
- No merged PRs in 30d
Description
I'm launching a cockroachdb docker container using image from https://hub.docker.com/r/cockroachdb/cockroach.
Then i'm building and testing cockroach-go:
```
#!/bin/bash -ex
# Dependency installation
microdnf install -y git wget make gcc-c++
#Set variables
PACKAGE_URL=https://github.com/cockroachdb/cockroach-go
#PACKAGE_VERSION is configurable can be passed as an argument.
#PACKAGE_VERSION=${1:-e0a95dfd547c}
PACKAGE_VERSION=${1:-v2.2.8}
PACKAGE_NAME=cockroach-go
OS_NAME=$(cat /etc/os-release | grep ^PRETTY_NAME | cut -d= -f2)
#Install go package and update go path if not installed
GO_VERSION=1.16.1
GO_ARCH=ppc64le
if ! command -v go &> /dev/null
then
curl -O https://dl.google.com/go/go$GO_VERSION.linux-$GO_ARCH.tar.gz
tar -C /usr/local -xzf go$GO_VERSION.linux-$GO_ARCH.tar.gz
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$GOROOT/bin:$GOPATH/bin:$PATH
export GO111MODULE=auto
rm -f go$GO_VERSION.linux-$GO_ARCH.tar.gz
fi
# Check if package exists
if [ -d $PACKAGE_NAME ] ; then
rm -rf $PACKAGE_NAME
echo "$PACKAGE_NAME | $PACKAGE_VERSION | $OS_NAME | GitHub | Removed existing package if any"
fi
# Download the repos
git clone $PACKAGE_URL
# Build and Test
cd $PACKAGE_NAME
git checkout $PACKAGE_VERSION
ret=$?
if [ $ret -eq 0 ] ; then
echo "---------------------------$PACKAGE_VERSION found to checkout--------------------- "
else
echo "---------------------------$PACKAGE_VERSION not found-----------------------------"
exit
fi
# Ensure go.mod file exists
[ ! -f go.mod ] && go mod init $PACKAGE_NAME
go mod tidy
if ! go build -v ./...; then
echo "------------------$PACKAGE_NAME: build failed-------------------------"
exit 1
fi
export COCKROACH_BINARY=/cockroach/cockroach
$COCKROACH_BINARY --version
if ! go test -v ./...; then
echo "------------------$PACKAGE_NAME: test failed-------------------------"
exit 1
else
echo "$PACKAGE_NAME | $PACKAGE_VERSION | GitHub | Pass | Both_Build_and_Test_Success"
exit 0
fi
```
The tests don't pass consistently.
Similar failures are observed on ppc64le platform.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by rerunning the provided build and test script with the v2.2.8 checkout, capturing the specific failing test output and platform details. Compare results on ppc64le with another platform and inspect the affected test or package once identified; done means the test suite passes consistently with the custom CockroachDB binary.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash, docker, go
- Domain
- databases, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100