Граф коммитов

189 Коммитов

Автор SHA1 Сообщение Дата
Florent Poinsard f183ac72ca
Upgrade golang.org deps (#12405)
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
2023-02-28 16:00:27 +02:00
Dirkjan Bussink c1d8c14a7f
Release-15: Cherry pick vtorc no cgo (#12223)
* Move vtorc from go-sqlite3 to modernc.org/sqlite (#12214)

* Move vtorc from go-sqlite3 to modernc.org/sqlite

This moves vtorc from the go-sqlite3 library that uses CGO, to use
modernc.org/sqlite which is a pure Go implementation.

vtorc is the only component we have to build with CGO but it's causing
pain for releases since we need to build it against an old Linux for
linking against glibc.

Using modernc.org/sqlite allows for using Go only again and makes all
Vitess components buildable without CGO.

In
https://datastation.multiprocess.io/blog/2022-05-12-sqlite-in-go-with-and-without-cgo.html
someone ran some basic benchmarks. It shows that the pure Go version can
be twice as slow, but the usage of vtorc is very limited and we operate
on small datasets, so I think the performance impact purely of a
somewhat slower sqlite implementation is negligable.

None of this is in a hot query serving path or anything like that, so I
have little concern performance wise.

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>

* Fix error handling in RowToArray

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>

---------

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>

* empty-commit

Signed-off-by: Manan Gupta <manan@planetscale.com>

* Run go mod tidy

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>

---------

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
Co-authored-by: Manan Gupta <manan@planetscale.com>
2023-02-06 10:26:07 +01:00
vitess-bot[bot] e3b2ce5905
[release-15.0] update jsonparser dependency (#11694) (#11696)
* update jsonparser dependency

Signed-off-by: deepthi <deepthi@planetscale.com>

* small change to PR template

Signed-off-by: deepthi <deepthi@planetscale.com>

Signed-off-by: deepthi <deepthi@planetscale.com>
Co-authored-by: deepthi <deepthi@planetscale.com>
2022-11-13 11:18:28 -08:00
vitess-bot[bot] 5836995a8b
[deps] go get golang.org/x/text && go mod tidy (#11467)
This is to pick up the fix for https://github.com/golang/go/issues/56152.

Signed-off-by: Andrew Mason <andrew@planetscale.com>

Signed-off-by: Andrew Mason <andrew@planetscale.com>
Co-authored-by: Andrew Mason <andrew@planetscale.com>
2022-10-12 11:36:46 +02:00
Manan Gupta afda8928cd
VTOrc Standardisation and Cleanup (#11416)
* feat: remove unused package

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: replace usage of external test package with require

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: replace using external copied dependency with actual dependency

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: remove unused external package

Signed-off-by: Manan Gupta <manan@planetscale.com>

Signed-off-by: Manan Gupta <manan@planetscale.com>
2022-10-03 11:57:44 +05:30
Manan Gupta e7f98f859c
VTOrc Cleanup - Configs, APIs and old UI (#11356)
* feat: remove configurations that aren't needed like raft and initialization of database

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: use waitreplicastimeout for all timeouts related to waiting for execution on a replica

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: remove agents in vtorc since we don't use them

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: remove more unused configurations

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: cleanup post and pre processes that VTOrc doesn't intend to support

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: remove unused code and config for shell process

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: remove unused configurations

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: convert flags to pflag architecture

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: remove cli flags which aren't required

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: remove more unused configs

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: remove the old UI of orchestrator and cleanup app and http packages

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: remove web/vtorc files and fix Dockerfiles to not try to copy them

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: fix all the examples to not pass in the ListenAddress and not export port for the old UI

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: remove raft code and command applier

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: remove unused code and configs

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: remove more unused code

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: remove http configs that are no longer required

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: remove more unused configs and dead code

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: remove more unused configs

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: remove access tokens since they are unused

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: remove RecoveryPeriodBlockMinutes which was only for backward compatibility

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: remove unused package

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: remove replicas in instance since they weren't used anywhere

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: copy over vtorc things that vtgr was using to remove vtgr's dependency on vtorc package

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: change restart function to use tmc rpc calls

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: remove detection queries for vtorc since we read these from topo-server

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: improve read topology test to also verify the errantGTID set

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: use internal function to find difference in gtid sets instead of using the MySQL connection

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: remove population of group replication information

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: remove configs related to connecting to MySQL instances since it is no longer required

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: remove code to connect to MySQL backend since VTOrc now only uses SQLite3

Signed-off-by: Manan Gupta <manan@planetscale.com>

* cleanup: go mod tidy

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: remove unused/redundant flags, we are down to 0 :)

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: remove filtering configs

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: remove write buffering and associated config parameters

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: remove more miscellaneous configs

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: remove one more rejection parameter

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: move discovery queue parameters to be constants

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: move some more configs to be constants

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: add flags for all the configurations we have kept

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: fix imports in main.go

Signed-off-by: Manan Gupta <manan@planetscale.com>

* test: fix vtorc test output after so many changes

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: add release-notes docs for config changes

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: remove index definitions for tables that are already deleted

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: add API removal documentation as well to release notes

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: remove duplication of debug pages in release notes

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: use some flags in e2e test to verify they work

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: use sliceVar for the flag definition of cluster_to_watch

Signed-off-by: Manan Gupta <manan@planetscale.com>

Signed-off-by: Manan Gupta <manan@planetscale.com>
2022-09-30 22:11:02 +05:30
Phani Raj bccab3777b
Allow non-SSL callers of VTGate RPC APIs to specify group information for the CallerID (#11260)
* Add Groups to vtrpc.CallerID

Signed-off-by: phanatic <phanatic@github.com>

* fix formatting

Signed-off-by: phanatic <phanatic@github.com>

* update vtadmin proto

Signed-off-by: phanatic <phanatic@github.com>

* Add end-to-end test

Signed-off-by: phanatic <phanatic@github.com>

* remove comment formatting

Signed-off-by: phanatic <phanatic@github.com>

* add release notes

Signed-off-by: phanatic <phanatic@github.com>

* fix code formatting

Signed-off-by: phanatic <phanatic@github.com>

* fix vtgate help text

Signed-off-by: phanatic <phanatic@github.com>
Signed-off-by: <phanatic@github.com>

* refactor tests

Signed-off-by: phanatic <phanatic@github.com>

* run go mod tidy

Signed-off-by: phanatic <phanatic@github.com>

* bring back comment changes

Signed-off-by: phanatic <phanatic@github.com>

* rename flag to use dashes instead of underscore

Signed-off-by: Phani Raj <phani@planetscale.com>

* undo comment formatting by make proto

Signed-off-by: Phani Raj <phani@planetscale.com>

* fix formatting

Signed-off-by: Phani Raj <phani@planetscale.com>

* fix help text fixture

Signed-off-by: Phani Raj <phani@planetscale.com>

Signed-off-by: phanatic <phanatic@github.com>
Signed-off-by: <phanatic@github.com>
Signed-off-by: Phani Raj <phani@planetscale.com>
Co-authored-by: phanatic <phanatic@github.com>
2022-09-29 14:08:45 +05:30
Dirkjan Bussink a56442af5c
Cleanup usage of go.rice in favor of go:embed (#10956)
* Cleanup usage of go.rice in favor of go:embed

The usage of go.rice predates the availability of go:embed, but we
should switch to using go:embed instead to ship specific assets like
config files that we need.

go.rice is also incompatible with Go 1.19 and while it might see a fix
in the future, it seems better to go with the recommended Go approach
that is available these days.

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>

* Move vtctld to also use `go embed` instead of go.rice

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>

* Remove last rice-box related comments

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>

* Remove config moving

This right now breaks building the actual tests since the tests might
also end up loading the regular code which has a `go embed` and refers
to the package with the config embeds.

This doesn't mean that the config isn't properly included in the
binaries. Also with using `go embed` we have a build time dependency on
the files and we always know the latest is included, so we don't have
the issue of potentially outdated files either.

All in all, it seems simplest to remove this logic and trust that Go
itself works as advertised.

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
2022-08-09 14:15:19 +05:30
Dirkjan Bussink ca73fbc79c
Cleanup the go-sqlite3 workaround (#10884)
Newer versions don't have the compile issue anymore (see the upstream
issue), so we can update and clean this up.

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
2022-08-01 09:49:22 +02:00
Andrew Mason 429f5f3b2f
[vtctldclient] Add autodoc tool for generating website docs (#10635)
* Update docs for keyspace commands

Signed-off-by: Andrew Mason <andrew@planetscale.com>

* fixup! Update docs for keyspace commands

Signed-off-by: Andrew Mason <andrew@planetscale.com>

* Initial autodoc generation

Signed-off-by: Andrew Mason <andrew@planetscale.com>

* Fix linking

Signed-off-by: Andrew Mason <andrew@planetscale.com>

* Extract common docgen logic for later reuse

Signed-off-by: Andrew Mason <andrew@planetscale.com>

* run `go mod tidy` again

Signed-off-by: Andrew Mason <andrew@planetscale.com>
2022-07-25 15:02:45 -07:00
Andres Taylor 5c29d25050
Update how table uses are reported (#10598)
* refactor: move out plan into its own file

Signed-off-by: Andres Taylor <andres@planetscale.com>

* refactor: wrap primitive in a PlanResult struct

Signed-off-by: Andres Taylor <andres@planetscale.com>

* test: cleanup tests to move to using assert package

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: add a tablesUsed field to logstats and use it in the output

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: wireup the tables used from the planning phase to log stats

Signed-off-by: Manan Gupta <manan@planetscale.com>

* test: make sure to keep escapes in json strings

Signed-off-by: Andres Taylor <andres@planetscale.com>

* feat: add tables used field to the plan output

Signed-off-by: Andres Taylor <andres@planetscale.com>

* feat: add tables used to more plan types

Signed-off-by: Andres Taylor <andres@planetscale.com>

* refactor: move logstats to it's own package

Signed-off-by: Andres Taylor <andres@planetscale.com>

* chore: updated to newest version of cmp

Signed-off-by: Andres Taylor <andres@planetscale.com>

* test: refactor

Signed-off-by: Andres Taylor <andres@planetscale.com>

* feat: simplify logstats printing

Signed-off-by: Andres Taylor <andres@planetscale.com>

* feat: add tables used for INSERT queries

Signed-off-by: Andres Taylor <andres@planetscale.com>

* feat: add ks for dual queries

Signed-off-by: Andres Taylor <andres@planetscale.com>

* comment: add deprecation warning to logstats fields

Signed-off-by: Andres Taylor <andres@planetscale.com>

* docs: add deprecation warning

Signed-off-by: Andres Taylor <andres@planetscale.com>

Co-authored-by: Manan Gupta <manan@planetscale.com>
2022-07-21 11:16:06 +02:00
Rameez Sajwani 3256526782
Backup/Restore: add support for external compressors and decompressors (#10558)
* change to support an external decompressor

Signed-off-by: Renan Rangel <renan@slack-corp.com>
Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* add external compressor support + builtin additional compressors

Signed-off-by: Renan Rangel <renan@slack-corp.com>
Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* wrap external compressor/decompressor

Signed-off-by: Renan Rangel <renan@slack-corp.com>
Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* go mod tidy + comments

Signed-off-by: Renan Rangel <renan@slack-corp.com>
Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* add copyright notices

Signed-off-by: Renan Rangel <renan@slack-corp.com>
Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* add support for builtin engine

Signed-off-by: Renan Rangel <rrangel@slack-corp.com>
Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* Adding test case for buckup compression

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* Fixing unit test and run mod tidy

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* Removing unwanted unit tests

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* Increase timeout of backup tests

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* fixing linter errors

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* Change test logic to accomodate running selective tests

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* removing lint warning

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* fixing test failure

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* Removing un-necessary test

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* Fixing code review feeback

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* Change builtinEngine to consider 'auto' decompressor

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* fixing Upgrade/Downgrade test

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* Fix type & add summary under release notes

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* Fixing typos in summary

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* Fixing flag name typos

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

Co-authored-by: Renan Rangel <rrangel@slack-corp.com>
Co-authored-by: Renan Rangel <renan@slack-corp.com>
2022-07-07 12:16:07 -07:00
Harshit Gangal 3f79a0ea50
fix: build (#10647)
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
2022-07-07 16:21:50 +05:30
Tanjin Xu 9452a031cd
upgrade versions of crypto/net/serf (#10272)
Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>

Co-authored-by: Tanjin Xu <tanjin.xu@slack-corp.com>
2022-07-07 10:47:57 +02:00
Harshit Gangal c43a162ea5
refactor: removed context from part of vcursor struct (#10632)
* refactor: removed context from part of vcursor struct, made an explicit parameter

Signed-off-by: Harshit Gangal <harshit@planetscale.com>

* refactor: added context to all vindex apis

Signed-off-by: Harshit Gangal <harshit@planetscale.com>

* addressed review comments and removed context from various VCursor interface implementations

Signed-off-by: Harshit Gangal <harshit@planetscale.com>

* refactor: removed unused sync go module

Signed-off-by: Harshit Gangal <harshit@planetscale.com>

* review comments

Signed-off-by: Harshit Gangal <harshit@planetscale.com>
2022-07-07 13:52:46 +05:30
Rohit Nayak e8c2cc088c
Vdiff2: initial release (#10382)
* VDiff2: rearchitect VDiff to run on tablets

Signed-off-by: Rohit Nayak <rohit@planetscale.com>

* Improve show summary output and add 'show last'

Signed-off-by: Rohit Nayak <rohit@planetscale.com>

* Improve e2e test

Signed-off-by: Rohit Nayak <rohit@planetscale.com>

* go mod tidied

Signed-off-by: Rohit Nayak <rohit@planetscale.com>

* regenerate vtadmin protos

Signed-off-by: Rohit Nayak <rohit@planetscale.com>

* Minor tweaks/improvements to the e2e test

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Another round of minor tweaks

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Use UUID types directly and remove string literals

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Another round of minor tweaks

Signed-off-by: Matt Lord <mattalord@gmail.com>

* You guessed it!! More minor tweaks

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Improve handling of last and all with no results

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Remove double printing for show all output

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Return empty json array for empty show all results

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Add vdiff2 test to CI

Signed-off-by: Rohit Nayak <rohit@planetscale.com>

* Trigger rebuild

Signed-off-by: Rohit Nayak <rohit@planetscale.com>

* Another round of tweaks during review

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Final round of code tweaks

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Correct has_mismatch handling

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Adjust reporting for extra/mismatched row samples

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Use proto.Clone to copy VStreamRowsResponse

And use small vstream_packet_size in e2e test.

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Refactor tests. Call VDiff2 side by side with all VDiff1s. Currently failing m2m3 test workflow.

Signed-off-by: Rohit Nayak <rohit@planetscale.com>

* Add doc.go to package and use a const for trunctated notation

And rename readme.md to README.md so that it is listed first
in lexicographical order.

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Correct year in header for new doc.go file 🤦

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Fix bug where we were not using in_keyrange() for filtering from source. Change logic to update table level mismatch flag to post-reconciliation of extra rows. Enhance vdiff2 test to include split/merge and full merge (working, but needs code refactoring).

Signed-off-by: Rohit Nayak <rohit@planetscale.com>

* Use unbuffered channels in VDiff2 goroutine comms

TL;DR — I think it was because we were using buffered channels in the table
differ. So the order was not guaranteed and could be off by 1. I suspect the
deep copy synchronized things as a side effect.

I think it may also explain why even after the previous test correction
to return in the wait after sending true to the results channel, vtctlclient
would sometimes get another result after things were torn down. Because the
channels were buffered, where the comment says that we block, we didn’t
until there was 1+1 messages sent to the channel and the order was not
enforced between the goroutines.

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Increase vdiff timeout

Signed-off-by: Matt Lord <mattalord@gmail.com>

* VDiff2 does not support inter cluster diffs today

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Go back to using buffered chans for the vstreams

Added a comment explaining why we *want* to do the Clone here.

If we need other synchronization points in the code paths then we
can handle that independently.

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Refactor vdiff2 tests

Signed-off-by: Rohit Nayak <rohit@planetscale.com>

* Minor tweaks after final review

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Correct test config after merging main branch

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Add VDiff2 to the v14 release notes summary

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Help output should not show --v2 as defaulting to true

And add note about how to use VDiff2 with example usage to the
release notes summary.

Signed-off-by: Matt Lord <mattalord@gmail.com>

Co-authored-by: Matt Lord <mattalord@gmail.com>
2022-06-07 11:54:18 +02:00
Dirkjan Bussink 623ba3e4ab
Structured schemadiff errors (#10356)
* Move error definitions to separate file

This starts the refactoring for more structured errors by moving it into
a separate file first.

Also removes a few unused error types.

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>

* Update single usage of github.com/pkg/errors to errors

This moves the single usage of the github.com/pkg/errors package to use
regular errors.

The rest is all in schemadiff and will be cleaned up with structured
errors. It removes the package as a direct dependency (but still other
Vitess dependencies pull it in).

The usage here does not need the package features at all.

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>

* Move column level errors to use structured errors

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>

* Move all apply style errors to structured errors

This moves over all the Apply style errors to be using a structured
version of the error instead.

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>

* More structured errors for parsing failures

This adds a few more structured errors, for example for when we fail to
parse things or handle unknown table options.

Also adds a few more table options the parser knows about but that we
can ignore otherwise but don't want to error on.

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>

* Always check complete parsing before other operations

It was still possible to use `NewSchemaFromStatements` to trigger a
panic since it would try to normalize without checking if the statement
was fully parsed.

This moves the check into the helper function used for create new
statements for schemadiff and always ensures we check parse status
before we try to normalize.

Also parse everywhere including in tests with strict mode to show errors
as soon as possible.

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>

* Move all to regular errors package

Now that all specific usage for github.com/pkg/errors is removed, let's
remove the package usage and only use regular errors. We don't need it
anymore.

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
2022-05-23 13:17:41 +03:00
Dirkjan Bussink eb07fa2090
Remove usage of additional uuid package (#10307)
This removes using an additional UUID package. This was the only place
this package was used, everywhere else uses github.com/google/uuid. Even
this library uses that package as a dependency.

Fewer dependencies is better and also updating github.com/google/uuid
while I was at it.

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
2022-05-15 08:46:54 +02:00
Shlomi Noach f598b14857
Using LCS to achieve shortest column reordering list (#10184)
* resolve merge conflict

Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>

* fix comment

Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>

* added more reorder test case

Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
2022-05-02 11:29:38 +03:00
Vicent Marti 54184ebbfb gomod: tidy
Signed-off-by: Vicent Marti <vmg@strn.cat>
2022-04-12 15:17:04 +02:00
Vicent Marti 21a204223b makefile: bump vtprotobuf
Signed-off-by: Vicent Marti <vmg@strn.cat>
2022-04-12 15:13:21 +02:00
Vicent Marti 44c2924f61 deps: upgrade grpc and protobuf
Signed-off-by: Vicent Marti <vmg@strn.cat>
2022-04-04 11:45:50 +02:00
Vicent Marti af20621065 tools: rename interface{} to any in codegen
Signed-off-by: Vicent Marti <vmg@strn.cat>
2022-03-22 09:39:55 +01:00
Vicent Marti 307866eba4 ci: upgrade to Go 1.18
Signed-off-by: Vicent Marti <vmg@strn.cat>
2022-03-17 10:40:20 +01:00
Shlomi Noach 04f8b19926 Online DDL -declarative: use schemadiff logic and remove tengo dependency
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
2022-02-17 09:42:35 +02:00
Shlomi Noach cc4b0e8ad9 update tengo
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
2022-02-10 06:39:20 +02:00
Shlomi Noach 61d44a247c updated tengo version
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
2022-02-02 06:58:56 +02:00
Shlomi Noach 2ede2d3458 towards OnlineDDL support for Views
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
2022-02-01 10:33:54 +02:00
Shlomi Noach 5bb990b3da update tengo tag
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
2022-02-01 07:22:04 +02:00
Shlomi Noach 3e31712604 latest planetscale/tengo; go mod tidy
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
2022-01-30 17:18:47 +02:00
Florent Poinsard 1d63908725
chore: upgraded go-proxyproto to v0.6.1
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
2021-12-20 09:59:44 -03:00
Rohit Nayak dd042cf467
Address review comments
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
2021-12-09 11:38:32 +01:00
Deepthi Sigireddi cef013f73f
Merge pull request #9166 from planetscale/containerd-cve-update-1-5-7
go dependency: updated containerd to 1.5.7
2021-11-11 14:47:06 -08:00
Vicent Martí 5b8a37c2af
Merge pull request #9146 from vmg/collations-1.5
collations: cleanup all data generation
2021-11-10 15:07:25 +01:00
Vicent Marti 84f3da813c gomod: tidy
Signed-off-by: Vicent Marti <vmg@strn.cat>
2021-11-10 14:05:10 +01:00
Shlomi Noach dc14a4ac8e merged main; resolved conflict
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
2021-11-10 08:13:06 +02:00
Shlomi Noach ed25a39ce0 utilizing v0.10.3-ps.v1-vitess
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
2021-11-10 08:11:41 +02:00
FlorentP 517ef2a1e1
Merge pull request #9159 from AdamKorcz/fuzz25
Fuzzing: Upgrade go-fuzz-headers
2021-11-09 07:59:20 +01:00
Shlomi Noach cb4151f732 go dependency: updated containerd to 1.5.7
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
2021-11-09 08:48:48 +02:00
AdamKorcz 1be7623c6d Fuzzing: Upgrade go-fuzz-headers
Signed-off-by: AdamKorcz <adam@adalogics.com>
2021-11-08 12:46:19 +00:00
Andrew Mason d488cb2081 go mod tidy
Signed-off-by: Andrew Mason <amason@slack-corp.com>
2021-11-06 09:30:15 -04:00
Vicent Marti 32e316ba35 collations: cleanup all data generation
Signed-off-by: Vicent Marti <vmg@strn.cat>
2021-11-04 17:19:56 +01:00
Dirkjan Bussink 78249a0ce3
Update to the latest Tengo version
This updates to Tengo which is based on latest upstream which includes a
fix for MySQL8 & handling of utf8 (mb3) collations.

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
2021-10-29 09:44:43 +02:00
Deepthi Sigireddi be861d541e
Merge pull request #8762 from planetscale/jw-update-k8s-client
Upgrade to k8s 1.18 client
2021-09-13 14:41:19 -07:00
Andrew Mason 932b1737e3 Remove consul-api usage in favor of official consul/api
Signed-off-by: Andrew Mason <amason@slack-corp.com>
2021-09-09 16:05:49 -04:00
Andrew Mason ece3f11d72 Upgrade consul api: `go get github.com/hashicorp/consul/api@v1.10.1`
Signed-off-by: Andrew Mason <amason@slack-corp.com>
2021-09-08 19:05:41 -04:00
John Watson 0b743cede0 Uprade to k8s 1.18 client
Signed-off-by: John Watson <johnw@planetscale.com>
2021-09-02 17:56:54 -07:00
Dirkjan Bussink 5cf3795ab4
Move to non deprecated API for terminal check
Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
2021-08-26 20:49:23 +02:00
Dirkjan Bussink b53756cd2d
Update golang/x dependencies
This includes specifically an update to x/sys which is needed because
otherwise it can cause crashes on MacOS with Go 1.17.

See https://github.com/golang/go/issues/47776 for more details.

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
2021-08-26 20:49:22 +02:00
Deepthi Sigireddi 6614030493
Merge pull request #8640 from planetscale/update-go-1-17
Upgrade to Go 1.17
2021-08-25 14:18:57 -07:00