Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Slack sync upstream 2019 11 09.r0 #142

Merged
merged 604 commits into from
Dec 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
604 commits
Select commit Hold shift + click to select a range
f3396bf
migrater: make the test framework generic
sougou Sep 7, 2019
381c193
stream_migrater: initial test
sougou Sep 7, 2019
1e82f70
migrater: improved tests
sougou Sep 8, 2019
f51a02a
migrater: tweaks to code and tests
sougou Sep 8, 2019
7dba011
stream_migrater: tests for non-error flows
sougou Sep 9, 2019
95456a2
stream_migrater: rest of the tests added
sougou Sep 16, 2019
0f10b1a
stream_migrater: address review comments
sougou Oct 8, 2019
7918d1b
Make DemoteMaster idempotent. (#5293)
enisoc Oct 12, 2019
639f1e3
unit tests for shard watch
deepthi Oct 12, 2019
214d7ea
use mutex properly to control access to _shardSyncChan and _shardSync…
deepthi Oct 12, 2019
a205ed3
update license header in java/ tools/ travis/ test.go files
tanjunchen Oct 12, 2019
27b5aae
treat the route of sql with pseudo table as SelectReference
Oct 6, 2019
352d31d
fix doc comment
deepthi Oct 14, 2019
75f5471
Merge branch 'master' into reparent-refactor
enisoc Oct 14, 2019
aca1024
Added support for CHECK in Parser
saifalharthi Oct 14, 2019
b43e6f5
Merge pull request #5292 from planetscale/ds-ter-tests
deepthi Oct 15, 2019
2491da0
Split tests into unit and endtoend(e2e). Speed up backup test
deepthi Oct 15, 2019
810a919
Less output from Maven
systay Oct 14, 2019
edd5d18
Merge pull request #5304 from planetscale/ds-split-tests
systay Oct 15, 2019
ee9f1ce
Merge pull request #5299 from systay/less-mvn-output
deepthi Oct 15, 2019
0e78d81
Merge branch 'master' into reparent-refactor
deepthi Oct 15, 2019
c0aa781
Correct transaction pool timeouts
dasl- Sep 26, 2019
6abaa03
Merge pull request #5296 from planetscale/ds-shard-watch-tests
deepthi Oct 15, 2019
1bab089
Make SetMaster idempotent. (#5300)
enisoc Oct 15, 2019
e68bf30
Merge pull request #5301 from planetscale/sa-drop-check
sougou Oct 15, 2019
a715872
Merge pull request #5297 from tanjunchen/update-lisence-header-java-d…
sougou Oct 16, 2019
3256c81
add License in /py folder
yuxiaobo96 Oct 16, 2019
ee45f28
split unit and unit_race between different shards, reduce load on sha…
deepthi Oct 16, 2019
8cdd456
Merge pull request #5312 from planetscale/ds-rebalance-travis
deepthi Oct 16, 2019
0806bf1
Allow vtbackup to run as a daemon
systay Oct 16, 2019
74ca3b1
Merge pull request #5194 from planetscale/ss-vrepl-reshard-migrate
sougou Oct 16, 2019
b824be8
migrater: table migrate should not shard migrate
sougou Sep 18, 2019
cac575b
stream_migrater: vschema to identify ref tables
sougou Sep 22, 2019
191d5e5
Merge branch 'master' into reparent-refactor
enisoc Oct 16, 2019
d7b4109
Remove binlog statement format config setting
henders Oct 16, 2019
618c141
Allow vtcl to detach from the terminal
systay Oct 17, 2019
c41d395
Merge pull request #5309 from henders/henders/remove_statement_binlog…
sougou Oct 17, 2019
63fef10
Merge pull request #5310 from yuxiaobo96/vitess-py
sougou Oct 17, 2019
48137d0
Make tests pass for now
J0 Oct 17, 2019
d200c23
Merge branch 'master' into reparent-refactor
enisoc Oct 17, 2019
d0bdde7
Restored a sample docker-compose for beginners, added more to the REA…
JavierR14 Oct 15, 2019
df72490
Update README
jawabuu Oct 17, 2019
6b7a92e
Update README
jawabuu Oct 17, 2019
78bd62b
Make docker-compose compatible wit vttablet-up.sh
jawabuu Oct 17, 2019
02ea7b3
Update vttablet script to work with vtcompose and beginners docker-co…
jawabuu Oct 17, 2019
ccbede5
Disable mysqldump for faster startup
jawabuu Oct 17, 2019
3ab6c9b
Add convenience mysql script
jawabuu Oct 17, 2019
7dc5bce
Include mysql helper script in README
jawabuu Oct 17, 2019
4815094
Add read-only security_policy to block admin HTTP endpoints.
enisoc Oct 17, 2019
e14e34c
exec vtctl helper script to avoid relaunching consul containers
jawabuu Oct 18, 2019
ca932d9
Implement healthchecks to only run schemaload once master tablets are…
jawabuu Oct 18, 2019
d7be234
Update schemaload to execute SetReadWrite on master tablets
jawabuu Oct 18, 2019
8ff4416
Populate TARGETTAB from cell variable
jawabuu Oct 18, 2019
db519ae
Cat error log when mysqld fails to start
morgo Oct 18, 2019
9cb12cf
Initial draft of division functions
J0 Oct 18, 2019
2fea538
Add additional division function to adjust for non-commutativity
J0 Oct 18, 2019
de27f61
Added foreign_key_checks to ignored set
saifalharthi Oct 18, 2019
9b7907c
Set ReadWrite on master tablets after SchemaLoad
jawabuu Oct 18, 2019
2ddcf6f
Set flag keyspaces to keyspaceData in vtcompose to remove confusion
jawabuu Oct 18, 2019
bdbb94a
Update README
jawabuu Oct 18, 2019
82f5f27
Update README
jawabuu Oct 18, 2019
836ca34
Update beginners docker-compose to align with vtcompose
jawabuu Oct 18, 2019
16393b5
Add external_db example for compose
jawabuu Oct 19, 2019
775ea34
Add README for external_db example
jawabuu Oct 19, 2019
9636095
Fix relative links in README
jawabuu Oct 19, 2019
a71f389
Format relative links in README
jawabuu Oct 19, 2019
a6a8c21
Update instructions in README to reflect new workflow
jawabuu Oct 19, 2019
583a824
Update default credentials in README
jawabuu Oct 19, 2019
8c55c7a
Update conatainer name in depends_on
jawabuu Oct 19, 2019
5c33daf
Add healthcheck to replica and rdonly containers
jawabuu Oct 19, 2019
3dd7da0
Add timestamp to schemaload output
jawabuu Oct 19, 2019
105758d
Remove workaraound for applying vschema in unsharded keyspace
jawabuu Oct 19, 2019
9279160
Update README to reflect AppplyVschema fix for unsharded db
jawabuu Oct 19, 2019
26de57b
Add schemaload to beginners compose yml
jawabuu Oct 19, 2019
aa64538
Clean up vschema generation for external db
jawabuu Oct 19, 2019
a4e98d1
Fix line endings in compose file
jawabuu Oct 19, 2019
9737587
Fix default base_vshema file path reference
jawabuu Oct 19, 2019
460db56
Format compose file
jawabuu Oct 19, 2019
f7585a3
Pipe file content to -vschema because of possible bug in -vshemafile
jawabuu Oct 19, 2019
8b3d8bd
Add a default vschema file
jawabuu Oct 19, 2019
c5aa440
Add schemaload container to beginners compose file
jawabuu Oct 19, 2019
2d7b15d
Add a template env file
jawabuu Oct 19, 2019
22ebe19
Add instructions to generate .env file
jawabuu Oct 19, 2019
7eac0c0
Add a link to README
jawabuu Oct 19, 2019
7b4b62f
Pipe sql to ApplySchema if there is an error reading file
jawabuu Oct 19, 2019
f4ed463
Update vttablet host ports
jawabuu Oct 19, 2019
d6257da
Merge pull request #5321 from planetscale/acl-read-only
sougou Oct 19, 2019
1f44e7c
Merge pull request #5324 from planetscale/sa-ignore-foriegn-check
sougou Oct 19, 2019
4aa1cb4
stream_migrater: address review comments
sougou Oct 19, 2019
5666850
Merge pull request #5314 from systay/vtbackup-daemon
sougou Oct 19, 2019
655de99
Merge pull request #5306 from JavierR14/javier/beginner-friendly-dock…
sougou Oct 19, 2019
0e561f8
Merge pull request #5263 from planetscale/framework_parse_test
sougou Oct 19, 2019
f3c63a1
Merge pull request #5238 from dasl-/begin-timeout
sougou Oct 19, 2019
590a06f
Merge pull request #5315 from planetscale/ss-vrepl-handle-ref
sougou Oct 19, 2019
ed1a7b6
migrater: more solidification
sougou Sep 22, 2019
b812705
migrater: reverse replication before journaling
sougou Sep 23, 2019
9ae46a8
migrater: more resilient cancel on failure
sougou Sep 23, 2019
f515306
migrater: use keyranges instead of shard names
sougou Sep 23, 2019
70c1e30
migrater: handle frozen state
sougou Sep 23, 2019
17ca09d
migrater: startReverseVReplication
sougou Sep 23, 2019
001ec07
set the type of 'dual' table as 'TypeReference'
Oct 20, 2019
c04045b
Fix protoc dependency issue for arm.
jiameixie Oct 11, 2019
f285a5f
Fix etcd dependency issue for arm.
jiameixie Oct 11, 2019
86125be
Fix consul dependency issue for arm.
jiameixie Oct 11, 2019
f886cc2
add license in helm/misc/proto
yuxiaobo96 Oct 21, 2019
03e83d6
add license in /go file
yuxiaobo96 Oct 21, 2019
0584291
Remove SSLv3 Support
morgo Oct 21, 2019
8670439
add license in /go file
yuxiaobo96 Oct 21, 2019
e126e77
add license in the rest of /go files
yuxiaobo96 Oct 21, 2019
6d42b80
Add new mysql80 reserved keywords
saifalharthi Oct 21, 2019
9291a67
Add new mysql80 non-reserved keywords
saifalharthi Oct 21, 2019
28ecc0b
Cleanup some left over code from previous changes
morgo Oct 21, 2019
4c5006e
revert this change for now
morgo Oct 21, 2019
234ed87
Add extra MySQL/MariaDB flavor
morgo Oct 21, 2019
408fde0
Merge overlapping unsigned/signed division cases
J0 Oct 21, 2019
ebea1dc
Post gofmt
J0 Oct 21, 2019
ff0d02b
test: update license
hwdef Oct 22, 2019
7819747
update license in example/ config/ data/ doc/ docker/
tanjunchen Oct 22, 2019
c6d48c7
add license in /misc file
yuxiaobo96 Oct 22, 2019
57a6f48
store master_term_start_time in tablet record. InitTablet should not …
deepthi Oct 18, 2019
e847d5e
shard_sync should check for nil MasterAlias, which can happen when st…
deepthi Oct 18, 2019
67d2921
vtctl InitTablet should set tablet.MasterTermStartTime under all
deepthi Oct 22, 2019
69f2523
InitTablet: only set MasterTermStartTime on tablet record if it is no…
deepthi Oct 22, 2019
431e352
Fix Naming of variables
J0 Oct 23, 2019
da9bfed
Simplify replication lag selection logic
sayap Oct 22, 2019
fc168b6
Merge branch 'master' into reparent-refactor
enisoc Oct 23, 2019
7a15014
Incorporate feedback from review
morgo Oct 23, 2019
f7a4b86
Remove added space
morgo Oct 23, 2019
57975f8
Remove TODO
J0 Oct 23, 2019
7a5a602
Remove unused function, add comment
J0 Oct 23, 2019
17c0ada
Reorder and rename test cases
J0 Oct 23, 2019
d6a03b8
Merge branch 'master' of https://github.com/vitessio/vitess into j0_d…
J0 Oct 23, 2019
8b6cca0
set masterTermStartTime on tablet correctly whenever tablet type changes
deepthi Oct 24, 2019
afc4954
Merge pull request #5343 from yuxiaobo96/vitess-license7
sougou Oct 24, 2019
12c0676
Merge pull request #5341 from tanjunchen/update-license
sougou Oct 24, 2019
db2449f
Merge pull request #5340 from hwdef/test-add-license
sougou Oct 24, 2019
3725ed3
Merge pull request #5338 from planetscale/j0_division
sougou Oct 24, 2019
8d64d53
Merge pull request #5337 from planetscale/morgo-cleanup
sougou Oct 24, 2019
127b481
Merge pull request #5336 from planetscale/sa-add-mysql8-keywords
sougou Oct 24, 2019
87cb8bb
Merge pull request #5334 from yuxiaobo96/vitess-license4
sougou Oct 24, 2019
6228dab
Merge pull request #5333 from yuxiaobo96/vitess-license3
sougou Oct 24, 2019
650b6cd
Merge pull request #5332 from planetscale/morgo-remove-sslv3
sougou Oct 24, 2019
f2567cf
Merge pull request #5331 from yuxiaobo96/vitess-license2
sougou Oct 24, 2019
20a5455
Merge pull request #5330 from yuxiaobo96/vitess-license
sougou Oct 24, 2019
3317e20
Merge pull request #5329 from jiameixie/consul
sougou Oct 24, 2019
ba3b6cb
Merge pull request #5328 from jiameixie/etcd
sougou Oct 24, 2019
3ef22e7
Merge pull request #5327 from jiameixie/protoc
sougou Oct 24, 2019
92e5665
migrater: address review comments
sougou Oct 24, 2019
67fa436
Merge pull request #5268 from tinyblink/handle-sql-with-pseudo-table-…
sougou Oct 24, 2019
4754ecb
Merge pull request #5251 from bukalapak/replication-lag-selection-logic
rafael Oct 24, 2019
16e07b8
Merge pull request #5325 from planetscale/ss-vrepl-reverse
sougou Oct 24, 2019
6d821f9
Address PR Feedback
morgo Oct 24, 2019
8f1b946
Address PR Feedback
morgo Oct 24, 2019
ec34ce1
Merge pull request #5323 from planetscale/morgo-explain-failed-mysqld
sougou Oct 24, 2019
f6efaad
migrater: option to cancel
sougou Sep 23, 2019
662b242
migrater: tests for unsharded tables
sougou Sep 24, 2019
0d2934f
migrater: cancel skips checking of stopped streams
sougou Sep 24, 2019
7006212
fix tests
deepthi Oct 24, 2019
e805648
Clean up temp dir after xtrabackup restore
deepthi Oct 24, 2019
6547b99
examples/local/401_teardown start from any point
morgo Oct 24, 2019
e551368
compute total size of files to be backed up and use that for xtrabackup
deepthi Oct 24, 2019
5e57501
ChangeType should not update tablet if nothing changed
deepthi Oct 24, 2019
f2b8269
changes from review
deepthi Oct 24, 2019
3c6fec0
add comments clarifying the changes to AddFile
deepthi Oct 25, 2019
d5b5236
log error from deleting tempDir
deepthi Oct 25, 2019
44d26bb
update license
hwdef Oct 25, 2019
bfcf8a6
vttablet-up and vtgate-up to block until ready
morgo Oct 25, 2019
3f3ca25
Examples: search for mysqld instead of mysqld_safe
morgo Oct 25, 2019
2f3a76f
refactored local example to be identical to docs
morgo Oct 25, 2019
25e574d
clean up ChangeType to avoid 2 topo calls, and to adhere to contract …
deepthi Oct 25, 2019
b397610
Add client_test as separate test
morgo Oct 25, 2019
d040899
Empty commit
morgo Oct 25, 2019
d9fa8cd
Merge pull request #5316 from planetscale/ds-init-tablet-master-ts
deepthi Oct 25, 2019
3874fb2
Merge pull request #5348 from planetscale/ds-xb-rm-tmpdir
deepthi Oct 26, 2019
d26b6c7
Merge pull request #5351 from planetscale/ds-xb-s3partsize
deepthi Oct 26, 2019
1bb4776
empty push
morgo Oct 26, 2019
76947c4
add license in other files
yuxiaobo96 Oct 27, 2019
4ae9c03
Implement a small subset of config file refactor
morgo Oct 27, 2019
3a786ef
Merge pull request #5349 from planetscale/morgo-update-tutorial
sougou Oct 28, 2019
9238e40
Merge pull request #5353 from hwdef/add-license1
sougou Oct 28, 2019
e5d11b8
Merge pull request #5360 from planetscale/morgo-block-until-ready
sougou Oct 28, 2019
70d21bb
Merge pull request #5361 from planetscale/morgo-example-mysqld-safe
sougou Oct 28, 2019
39e45a6
Merge pull request #5364 from yuxiaobo96/vitess-license9
sougou Oct 28, 2019
7fe2a70
Merge pull request #5366 from planetscale/morgo-small-config-refactor
sougou Oct 28, 2019
7a6f6b7
migrater: address review comments
sougou Oct 28, 2019
4198bee
Merge pull request #5347 from planetscale/ss-vrepl-cancel-migrate
sougou Oct 28, 2019
789a0e3
EmergencyReparentShard does not need to update shard master, new mast…
deepthi Oct 28, 2019
fed4854
Bump flask from 0.12.3 to 1.0 in /test/cluster/keytar
dependabot[bot] Oct 29, 2019
d6b3300
Merge pull request #5370 from vitessio/dependabot/pip/test/cluster/ke…
sougou Oct 29, 2019
210bfd3
Bump flask from 0.12.3 to 1.0 in /examples/kubernetes/guestbook
dependabot[bot] Oct 29, 2019
bd1e876
Merge pull request #5372 from vitessio/dependabot/pip/examples/kubern…
sougou Oct 29, 2019
6aeb071
Don't set RestorePosition in local_metadata. (#5379)
enisoc Oct 30, 2019
e8dd5a4
Merge branch 'master' into reparent-refactor
enisoc Oct 30, 2019
6c6a70a
Change local_metadata.value to MEDIUMBLOB to accomodate long replicat…
deepthi Oct 30, 2019
0603e64
Merge pull request #5380 from planetscale/ds-repl-pos-len
deepthi Oct 31, 2019
5f5e33b
Fix usage of arch to work on OSX
Oct 31, 2019
9a09f82
PlannedReparentShard: Fix more known-recoverable problems. (#5376)
enisoc Oct 31, 2019
7afc5ee
Merge pull request #5391 from vitessio/reparent-refactor
sougou Nov 3, 2019
2083ace
mysqlctl: GetSchema also returns field info
sougou Sep 27, 2019
ee052a5
vdiff: planbuilder initial cut
sougou Sep 29, 2019
8b6eb63
vdiff: add a test
sougou Sep 29, 2019
cd858ac
vdiff: resultStreamer
sougou Sep 29, 2019
0f608e9
vdiff: resultStreamer test
sougou Oct 14, 2019
c6994e5
vdiff: stopTargetStreams, waitForSourceStreams
sougou Oct 6, 2019
c581f0e
discovery: move tabletpicker from vreplication
sougou Oct 6, 2019
c6b7e30
vreplication: use discovery.TabletPicker
sougou Oct 6, 2019
d6063d9
discovery: refactor TabletPicker
sougou Oct 6, 2019
3bdafde
discovery: improve TabletPicker algorithm
sougou Oct 19, 2019
297c5d1
vdiff: new data structures
sougou Oct 6, 2019
2ef2962
tabletmanager: WaitForPosition
sougou Oct 7, 2019
ea2a5c0
vdiff: selectTablets
sougou Oct 7, 2019
d37fd4f
vdiff: streamFromSources
sougou Oct 7, 2019
3a9aa89
vdiff: syncTargets and restartTargets
sougou Oct 8, 2019
51ce2c5
vdiff: resultReader that uses engine.MergeSort
sougou Oct 10, 2019
798fedb
vdiff: diff function
sougou Oct 12, 2019
8e231da
vdiff: main function and start of testing
sougou Oct 13, 2019
65a0051
vdiff: all plan builder tests
sougou Oct 13, 2019
38c2ae9
vdiff: test framework with a basic test
sougou Oct 14, 2019
7139502
vdiff: rest of the tests
sougou Oct 14, 2019
3891247
vdiff: filteredReplicationWaitTime
sougou Oct 16, 2019
78babdd
vdiff: vtctl command
sougou Oct 16, 2019
98429a9
vdiff: fix two bugs
sougou Oct 17, 2019
357d070
vdiff: handle aggregates
sougou Oct 19, 2019
81afa30
vreplication: re-introduce healthcheck timeouts
sougou Oct 28, 2019
7d8a08d
vdiff: post-rebase fix
sougou Nov 3, 2019
1b8bece
vdiff: fix broken tabletmanagerdata_pb2.py
sougou Nov 3, 2019
2111a70
Merge pull request #5367 from planetscale/ss-vrepl-vdiff
sougou Nov 3, 2019
501862a
mysql: handle db name correctly
sougou Nov 3, 2019
92f7d54
Merge pull request #5398 from planetscale/ss-use
sougou Nov 3, 2019
018ddae
Merge pull request #5384 from BenMusch/benmusch/bootstrap-script-osx
morgo Nov 5, 2019
cd1ec3e
VStreams should respect FieldEventMode
msolters Nov 5, 2019
738c917
Don't recheck mysqld port if it was provided explicitly. (#5383)
enisoc Nov 5, 2019
1720940
vindex: remove IsFunctional
sougou Oct 28, 2019
b1289a0
engine: simplify bind var initialization
sougou Oct 30, 2019
3e61e14
vindex: introduce MultiColumn interface
sougou Oct 31, 2019
20a9dc0
vindex: geo_experimental
sougou Nov 1, 2019
052042c
vindex: geo_experimental insert tests
sougou Nov 1, 2019
0af4d02
vindex: geo_experimental: fix v3 test
sougou Nov 1, 2019
a21c5ed
vindex: geo_experimental->region_experimental
sougou Nov 1, 2019
3c9262f
Stop nagging about where go is installed
morgo Nov 5, 2019
e5ecb45
Merge pull request #5404 from msolters/patch-2
deepthi Nov 5, 2019
65728ca
Merge pull request #5407 from planetscale/morgo-fix-git-check
morgo Nov 5, 2019
8de7237
Merge pull request #5390 from planetscale/ss-vindex
deepthi Nov 6, 2019
f46bff0
Add GitHub action for local example
morgo Nov 6, 2019
79933cf
Merge pull request #5414 from planetscale/morgo-gh-action
morgo Nov 7, 2019
f05799c
Add stronger protection against running as root
morgo Nov 7, 2019
542b9e1
AWS max retries option added
Oct 25, 2019
006a557
Merge pull request #5419 from planetscale/morgo-exit-when-root
morgo Nov 8, 2019
e72b6ae
Merge pull request #5354 from RicardoLorenzo/aws_backup_retries
rafael Nov 9, 2019
9b5de39
Merge commit 'e72b6ae'
Nov 22, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
173 changes: 173 additions & 0 deletions .github/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
#!/bin/bash
# shellcheck disable=SC2164

# Copyright 2019 The Vitess Authors.
#
# 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.

# This is a next-gen bootstrap which skips Python and Java tests,
# and does not use the VTROOT/VTTOP layout.
#
# My original intention was to use the same bootstrap.sh and gate
# for new features, but it has turned out to be difficult to do,
# due to the way that Docker cache works in the CI environment.

function fail() {
echo "ERROR: $1"
exit 1
}

[[ "$(dirname "$0")" = "." ]] || fail "bootstrap.sh must be run from its current directory"

# Create main directories.

VTROOT="$PWD"

mkdir -p dist
mkdir -p bin
mkdir -p lib
mkdir -p vthook

source ./dev.env

go version &>/dev/null || fail "Go is not installed or is not on \$PATH"
goversion_min 1.12 || fail "Go is not version 1.12+"

# Set up required soft links.
# TODO(mberlin): Which of these can be deleted?
ln -snf "$VTROOT/py" "$VTROOT/py-vtdb"
ln -snf "$VTROOT/go/vt/zkctl/zksrv.sh" "$VTROOT/bin/zksrv.sh"
ln -snf "$VTROOT/test/vthook-test.sh" "$VTROOT/vthook/test.sh"
ln -snf "$VTROOT/test/vthook-test_backup_error" "$VTROOT/vthook/test_backup_error"
ln -snf "$VTROOT/test/vthook-test_backup_transform" "$VTROOT/vthook/test_backup_transform"

# git hooks are only required if someone intends to contribute.

echo "creating git hooks"
mkdir -p "$VTROOT/.git/hooks"
ln -sf "$VTROOT/misc/git/pre-commit" "$VTROOT/.git/hooks/pre-commit"
ln -sf "$VTROOT/misc/git/commit-msg" "$VTROOT/.git/hooks/commit-msg"
git config core.hooksPath "$VTROOT/.git/hooks"

# install_dep is a helper function to generalize the download and installation of dependencies.
#
# If the installation is successful, it puts the installed version string into
# the $dist/.installed_version file. If the version has not changed, bootstrap
# will skip future installations.
function install_dep() {
if [[ $# != 4 ]]; then
fail "install_dep function requires exactly 4 parameters (and not $#). Parameters: $*"
fi
local name="$1"
local version="$2"
local dist="$3"
local install_func="$4"

version_file="$dist/.installed_version"
if [[ -f "$version_file" && "$(cat "$version_file")" == "$version" ]]; then
echo "skipping $name install. remove $dist to force re-install."
return
fi

echo "installing $name $version"

# shellcheck disable=SC2064
trap "fail '$name build failed'; exit 1" ERR

# Cleanup any existing data and re-create the directory.
rm -rf "$dist"
mkdir -p "$dist"

# Change $CWD to $dist before calling "install_func".
pushd "$dist" >/dev/null
# -E (same as "set -o errtrace") makes sure that "install_func" inherits the
# trap. If here's an error, the trap will be called which will exit this
# script.
set -E
$install_func "$version" "$dist"
set +E
popd >/dev/null

trap - ERR

echo "$version" > "$version_file"
}


#
# 1. Installation of dependencies.
#

# Wrapper around the `arch` command which plays nice with OS X
function get_arch() {
case $(uname) in
Linux) arch;;
Darwin) uname -m;;
esac
}

# Install protoc.
function install_protoc() {
local version="$1"
local dist="$2"

case $(uname) in
Linux) local platform=linux;;
Darwin) local platform=osx;;
esac

case $(get_arch) in
aarch64) local target=aarch_64;;
x86_64) local target=x86_64;;
*) echo "ERROR: unsupported architecture"; exit 1;;
esac

wget https://github.com/protocolbuffers/protobuf/releases/download/v$version/protoc-$version-$platform-${target}.zip
unzip "protoc-$version-$platform-${target}.zip"
ln -snf "$dist/bin/protoc" "$VTROOT/bin/protoc"
}
protoc_ver=3.6.1
install_dep "protoc" "$protoc_ver" "$VTROOT/dist/vt-protoc-$protoc_ver" install_protoc

# Download and install etcd, link etcd binary into our root.
function install_etcd() {
local version="$1"
local dist="$2"

case $(uname) in
Linux) local platform=linux; local ext=tar.gz;;
Darwin) local platform=darwin; local ext=zip;;
esac

case $(get_arch) in
aarch64) local target=arm64;;
x86_64) local target=amd64;;
*) echo "ERROR: unsupported architecture"; exit 1;;
esac

download_url=https://github.com/coreos/etcd/releases/download
file="etcd-${version}-${platform}-${target}.${ext}"

wget "$download_url/$version/$file"
if [ "$ext" = "tar.gz" ]; then
tar xzf "$file"
else
unzip "$file"
fi
rm "$file"
ln -snf "$dist/etcd-${version}-${platform}-${target}/etcd" "$VTROOT/bin/etcd"
}
install_dep "etcd" "v3.3.10" "$VTROOT/dist/etcd" install_etcd

echo
echo "bootstrap finished"
41 changes: 41 additions & 0 deletions .github/workflows/local-example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Local Example
on: [push, pull_request]
jobs:

build:
name: Build
runs-on: ubuntu-latest
steps:

- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.13

- name: Check out code
uses: actions/checkout@v1

- name: Get dependencies
run: |
sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget
sudo service mysql stop
sudo service etcd stop
sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
go mod download

- name: Run bootstrap.sh
run: |
echo "Copying new bootstrap over location of legacy one."
cp .github/bootstrap.sh .
./bootstrap.sh

- name: Build
run: |
GOBIN=$PWD/bin make build

- name: Run Local Example
run: |
export PATH=$PWD/bin:$PATH
VTDATAROOT=/tmp/vtdataroot VTTOP=$PWD VTROOT=$PWD test/local_example.sh

2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#
# Open TODOs:
# - Re-add travis/check_make_proto.sh, ideally as part of test/config.json.
# - Add a presubmit which checks that vendor/vendor.json is the same as in the Docker image. This will prevent people from making changes to it without pushing new bootstrap Docker images.
# - Add a presubmit which checks that if bootstrap has changed, and docker image is out of date.

# sudo is required because we run Docker in our builds.
# See: https://docs.travis-ci.com/user/docker/
Expand Down
8 changes: 7 additions & 1 deletion ADOPTERS.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
This is an alphabetical list of known adopters of Vitess. Some have already gone into production, and others are at various stages of testing.

* [YouTube](https://youtube.com)
* [Axon](https://axon.com)
* [BetterCloud](https://bettercloud.com)
* [CloudSigma](https://www.cloudsigma.com/)
* [FlipKart](https://flipkart.com)
* [GitHub](http://github.com/)
* [HubSpot](https://product.hubspot.com/)
* [JD](https://jd.com/)
* [New Relic](https://newrelic.com)
* [Nozzle](https://nozzle.io)
* [opensooq.com](https://www.opensooq.com/)
* [Peak Games](https://peak.com/)
* [Pinterest](https://pinterest.com)
* [Pixel Federation](https://pixelfederation.com)
* [Quiz of Kings](https://quizofkings.com)
* [Slack](https://slack.com)
* [Square](https://square.com)
* [Stitch Labs](https://stitchlabs.com)
* [Weave](https://www.getweave.com)
* [YouTube](https://youtube.com)
5 changes: 1 addition & 4 deletions GOVERNANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Users who continue to engage with the project and its community will often becom

## Contributors

Contributors will be added to the [Collaborators list](https://github.com/vitessio/vitess/settings/collaboration).
Contributors will be added to the [Contributors list](https://github.com/vitessio/vitess/graphs/contributors).

Contributors are community members who contribute in concrete ways to the project. Anyone can become a contributor. There is no expectation of commitment to the project, no specific skill requirements and no selection process.

Expand All @@ -42,7 +42,6 @@ Contributors engage with the project through the issue tracker, mailing list, th
As contributors gain experience and familiarity with the project, their profile within, and commitment to, the community will increase. At some stage, they may find themselves being nominated for committership.

## Committers
Committers will be added to the [committers list](https://github.com/orgs/youtube/teams/vitess-committers) and the [pullapprove list](https://github.com/vitessio/vitess/blob/master/.pullapprove.yml).

Committers are community members who have shown that they are committed to the continued development of the project through ongoing engagement with the community. Committership allows contributors to more easily carry on with their project related activities by giving them direct access to the project’s resources. That is, they can make changes directly to project outputs, without having to submit changes via patches.

Expand All @@ -66,8 +65,6 @@ A committer who shows an above-average level of contribution to the project, par

## Project management committee

PMC members will be added to the [list of administrators](https://github.com/orgs/youtube/teams/vitess-admin).

The current list of PMC members and their github handles are:

* Alain Jobart (alainjobart)
Expand Down
17 changes: 10 additions & 7 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ This page lists all active maintainers and their areas of expertise. This can be

The following is the full list, alphabetically ordered.

* Andres Taylor ([systay](https://github.com/systay)) antaylor@squareup.com
* Anthony Yeh ([enisoc](https://github.com/enisoc)) enisoc@planetscale.com
* Dan Kozlowski ([dkhenry](https://github.com/dkhenry)) koz@planetscale.com
* David Weitzman ([dweitzman](https://github.com/dweitzman)) dweitzman@pinterest.com
* Deepthi Sigireddi ([deepthi](https://github.com/deepthi)) deepthi@planetscale.com
Expand All @@ -11,28 +13,29 @@ The following is the full list, alphabetically ordered.
* Leo X. Lin ([leoxlin](https://github.com/leoxlin)) llin@hubspot.com
* Michael Demmer ([demmer](https://github.com/demmer)) mdemmer@slack-corp.com
* Michael Pawliszyn ([mpawliszyn](https://github.com/mpawliszyn)) mikepaw@squareup.com
* Morgan Tocker ([morgo](https://github.com/morgo)) morgan@planetscale.com
* Rafael Chacon ([rafael](https://github.com/rafael)) rchacon@slack-corp.com
* Sugu Sougoumarane ([sougou](https://github.com/sougou)) sougou@planetscale.com

## Areas of expertise

### General Vitess
sougou, demmer, rafael, dweitzman, tirsen
sougou, demmer, rafael, dweitzman, tirsen, morgo, enisoc

### Builds
dkhenry
dkhenry, morgo

### Resharding
sougou, rafael, tirsen, dweitzman
sougou, rafael, tirsen, dweitzman, systay

### Parser
sougou, dweitzman, deepthi
sougou, dweitzman, deepthi, systay

### Backups
deepthi, rafael
### Cluster Management
deepthi, rafael, enisoc

### Java
mpawliszyn, leoxlin, harshit-gangal

### Kubernetes
derekperkins, dkhenry
derekperkins, dkhenry, enisoc
25 changes: 11 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2017 Google Inc.
# Copyright 2019 The Vitess Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -18,7 +18,7 @@ MAKEFLAGS = -s
# Since we are not using this Makefile for compilation, limiting parallelism will not increase build time.
.NOTPARALLEL:

.PHONY: all build build_web test clean unit_test unit_test_cover unit_test_race integration_test proto proto_banner site_test site_integration_test docker_bootstrap docker_test docker_unit_test java_test reshard_tests
.PHONY: all build build_web test clean unit_test unit_test_cover unit_test_race integration_test proto proto_banner site_test site_integration_test docker_bootstrap docker_test docker_unit_test java_test reshard_tests e2e_test e2e_test_race

all: build

Expand Down Expand Up @@ -81,18 +81,17 @@ cleanall:
# directories created by bootstrap.sh
# - exclude vtdataroot and vthook as they may have data we want
rm -rf ../../../../bin ../../../../dist ../../../../lib ../../../../pkg
# keep the vendor.json file but nothing else under the vendor directory as it's not actually part of the Vitess repo
rm -rf vendor/cloud.google.com vendor/github.com vendor/golang.org vendor/google.golang.org vendor/gopkg.in
# other stuff in the go hierarchy that is not under vendor/
rm -rf ../../../golang.org ../../../honnef.co
rm -rf ../../../github.com/golang ../../../github.com/kardianos ../../../github.com/kisielk
# Remind people to run bootstrap.sh again
echo "Please run bootstrap.sh again to setup your environment"

unit_test: build
echo $$(date): Running unit tests
go test $(VT_GO_PARALLEL) ./go/...

e2e_test: build
echo $$(date): Running endtoend tests
go test $(VT_GO_PARALLEL) ./go/.../endtoend/...

# Run the code coverage tools, compute aggregate.
# If you want to improve in a directory, run:
# go test -coverprofile=coverage.out && go tool cover -html=coverage.out
Expand All @@ -102,6 +101,9 @@ unit_test_cover: build
unit_test_race: build
tools/unit_test_race.sh

e2e_test_race: build
tools/e2e_test_race.sh

.ONESHELL:
SHELL = /bin/bash

Expand All @@ -115,13 +117,9 @@ site_integration_test:

java_test:
go install ./go/cmd/vtgateclienttest ./go/cmd/vtcombo
mvn -f java/pom.xml clean verify
mvn -f java/pom.xml -B clean verify

# TODO(mberlin): Remove the manual copy once govendor supports a way to
# install vendor'd programs: https://github.com/kardianos/govendor/issues/117
install_protoc-gen-go:
mkdir -p $${GOPATH}/src/github.com/golang/
cp -a vendor/github.com/golang/protobuf $${GOPATH}/src/github.com/golang/
go install github.com/golang/protobuf/protoc-gen-go

# Find protoc compiler.
Expand Down Expand Up @@ -173,7 +171,7 @@ docker_bootstrap_test:
flavors='$(DOCKER_IMAGES_FOR_TEST)' && ./test.go -pull=false -parallel=2 -flavor=$${flavors// /,}

docker_bootstrap_push:
for i in $(DOCKER_IMAGES); do echo "pushing boostrap image: $$i"; docker push vitess/bootstrap:$$i || exit 1; done
for i in $(DOCKER_IMAGES); do echo "pushing bootstrap image: $$i"; docker push vitess/bootstrap:$$i || exit 1; done

# Use this target to update the local copy of your images with the one on Dockerhub.
docker_bootstrap_pull:
Expand Down Expand Up @@ -268,7 +266,6 @@ rebalance_tests:

# Release a version.
# This will generate a tar.gz file into the releases folder with the current source
# as well as the vendored libs.
release: docker_base
@if [ -z "$VERSION" ]; then \
echo "Set the env var VERSION with the release version"; exit 1;\
Expand Down
Loading