-
Notifications
You must be signed in to change notification settings - Fork 26
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
[to #295] Speed up cdc integrated tests #294
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
57ec242
speed up integrated tests
pingyu c7d8f2b
Merge branch 'main' into speed-up-it
pingyu bc6199a
wip
pingyu 93ce7eb
update release version; add usage comment for up.sh
pingyu 2090175
print more debug info
pingyu c153cd3
fix fmt
pingyu 4bab44e
add shellcheck
pingyu e1f3b0a
fix CI error
pingyu 9ab6c93
remove "br" in comment
pingyu 405c41e
Merge branch 'main' into speed-up-it
pingyu addf175
remove useless cdc target
pingyu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright 2020 PingCAP, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Clone from https://github.com/pingcap/tidb/blob/master/br/tests/_utils/run_curl | ||
|
||
# Usage: run_curl https://url '{"json":"data"}' | ||
|
||
set -eu | ||
|
||
CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) | ||
TLS_DIR=$(cd $CUR/../_certificates && pwd) | ||
|
||
if [ -z "${2-}" ]; then | ||
POST_ARGS= | ||
else | ||
POST_ARGS="--post-data $2" | ||
fi | ||
|
||
# FIXME: use `wget` instead of `curl` because the latter rejects ECC certs on our CI. | ||
# CentOS is re~~ally old. | ||
wget -q -O - \ | ||
--ca-certificate="$TLS_DIR/ca.pem" \ | ||
--certificate="$TLS_DIR/server.pem" \ | ||
--private-key="$TLS_DIR/server-key.pem" \ | ||
$POST_ARGS "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Copy from deployments/tikv-cdc/docker/integration-test.Dockerfile, | ||
# but use local files other than COPY | ||
# amd64 only | ||
FROM amd64/centos:centos7 as downloader | ||
|
||
USER root | ||
WORKDIR /root/download | ||
|
||
# Download go into /usr/local dir. | ||
ENV GOLANG_VERSION 1.18.5 | ||
ENV GOLANG_DOWNLOAD_URL https://dl.google.com/go/go${GOLANG_VERSION}.linux-amd64.tar.gz | ||
ENV GOLANG_DOWNLOAD_SHA256 9e5de37f9c49942c601b191ac5fba404b868bfc21d446d6960acc12283d6e5f2 | ||
RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \ | ||
&& echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \ | ||
&& tar -C /usr/local -xzf golang.tar.gz \ | ||
&& rm golang.tar.gz | ||
|
||
FROM amd64/centos:centos7 | ||
|
||
USER root | ||
WORKDIR /root | ||
|
||
# Installing dependencies. | ||
RUN yum install -y \ | ||
git \ | ||
bash-completion \ | ||
wget \ | ||
which \ | ||
gcc \ | ||
make \ | ||
curl \ | ||
tar \ | ||
psmisc \ | ||
mysql | ||
|
||
RUN wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm | ||
RUN yum install -y epel-release-latest-7.noarch.rpm | ||
RUN yum --enablerepo=epel install -y s3cmd jq | ||
|
||
COPY --from=downloader /usr/local/go /usr/local/go | ||
ENV GOPATH /go | ||
ENV GOROOT /usr/local/go | ||
ENV PATH $GOPATH/bin:$GOROOT/bin:$PATH | ||
|
||
WORKDIR /cdc | ||
|
||
ENTRYPOINT ["/bin/bash"] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What to copy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
tidb-server
,tikv-server
, etc., which are downloaded by./scripts/download-integration-test-binaries.sh
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now
make integration_test_build
will not download these binaries, we should callmake prepare_test_binaries
to download these binaries.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The binaries are prepared at the beginning. See line 8 here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it