Skip to content
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

update golangci-lint to 1.50.1 #11873

Merged
merged 1 commit into from
Dec 5, 2022

Conversation

systay
Copy link
Collaborator

@systay systay commented Dec 3, 2022

Description

I ran into an issue with the output of git diff not being parseable. That has been fixed in this new version.

Signed-off-by: Andres Taylor <[email protected]>
@systay systay merged commit de0db3f into vitessio:main Dec 5, 2022
@systay systay deleted the update-golangci-lint branch December 5, 2022 05:40
frouioui added a commit to planetscale/vitess that referenced this pull request Nov 21, 2023
…io#1625)

* Trigger OnlineDDL workflow when test data changes (#11827)

* trigger OnlineDDL workflow when test data changes

Signed-off-by: Florent Poinsard <[email protected]>

* trigger schemadiff workflows too

Signed-off-by: Florent Poinsard <[email protected]>

Signed-off-by: Florent Poinsard <[email protected]>

* BugFix: Escaping Percentage and Underscore require special handling (#11823)

* test: add failing end to end test for escaped % and _

Signed-off-by: Manan Gupta <[email protected]>

* feat: preserve escaping of \ and % in the parser

Signed-off-by: Manan Gupta <[email protected]>

* feat: add end to end test and planner test to verify that % and _ handling is correct in Vitess on vtgate level

Signed-off-by: Manan Gupta <[email protected]>

* feat: add test to evaluation engine to verify that backslash and underscore and handled correctly even when escaped

Signed-off-by: Manan Gupta <[email protected]>

* feat: remove unrequired changes

Signed-off-by: Manan Gupta <[email protected]>

Signed-off-by: Manan Gupta <[email protected]>

* Incremental logical backup and point in time recovery (#11097)

* Unexplode Backup() function, pass BackupRequest as argument

Signed-off-by: Shlomi Noach <[email protected]>

* use tabletmanagerdata.BackupRequest

Signed-off-by: Shlomi Noach <[email protected]>

* make proto

Signed-off-by: Shlomi Noach <[email protected]>

* removed duplicate tabletmanagerdata imports

Signed-off-by: Shlomi Noach <[email protected]>

* tabletmanagerdatapb

Signed-off-by: Shlomi Noach <[email protected]>

* vschemapb

Signed-off-by: Shlomi Noach <[email protected]>

* require.NoError

Signed-off-by: Shlomi Noach <[email protected]>

* proto: BackupRequest.incremental_from_pos

Signed-off-by: Shlomi Noach <[email protected]>

* pass IncrementalFromPos

Signed-off-by: Shlomi Noach <[email protected]>

* populate incremental_from_pos

Signed-off-by: Shlomi Noach <[email protected]>

* Storing ServerUUID and TabletAlias as part of backup MANIFESTO

Signed-off-by: Shlomi Noach <[email protected]>

* use IncrementalFromPos in BackupParams, populate

Signed-off-by: Shlomi Noach <[email protected]>

* executeIncrementalBackup

Signed-off-by: Shlomi Noach <[email protected]>

* add unit tests for GTID 'Contains'

Signed-off-by: Shlomi Noach <[email protected]>

* Add binlog related functions in MySQLDaemon

Signed-off-by: Shlomi Noach <[email protected]>

* More functionality in incremental backup

Signed-off-by: Shlomi Noach <[email protected]>

* add backupBinlogDir as a valid backup directory

Signed-off-by: Shlomi Noach <[email protected]>

* include FromPosition in the backup manifest. Find binlog files to backup

Signed-off-by: Shlomi Noach <[email protected]>

* complete incremental backup

Signed-off-by: Shlomi Noach <[email protected]>

* clarify the difference between user's requested position, and the FromPosition in the manifest. Add 'Incremental' (bool) to the manifest

Signed-off-by: Shlomi Noach <[email protected]>

* make vtadmin_web_proto_types

Signed-off-by: Shlomi Noach <[email protected]>

* Add Keyspace, Shard to backup manifest

Signed-off-by: Shlomi Noach <[email protected]>

* for good order, keyspace comes first

Signed-off-by: Shlomi Noach <[email protected]>

* take into account purged GTIDs. Fix value of 'incrementalBackupToGTID'

Signed-off-by: Shlomi Noach <[email protected]>

* endtoend tests for incremental backup. No restore validation as yet. Tests do not have a GitHub workflow yet.

Signed-off-by: Shlomi Noach <[email protected]>

* Adding CI shard: 'backup_pitr'

Signed-off-by: Shlomi Noach <[email protected]>

* cleanup

Signed-off-by: Shlomi Noach <[email protected]>

* backup_pitr tested via mysql80

Signed-off-by: Shlomi Noach <[email protected]>

* insert data with hint

Signed-off-by: Shlomi Noach <[email protected]>

* refactor

Signed-off-by: Shlomi Noach <[email protected]>

* FindPITRPath: find a shortest path to recover a GTID position, base on one full backup and zero or more inremental backups

Signed-off-by: Shlomi Noach <[email protected]>

* more validation

Signed-off-by: Shlomi Noach <[email protected]>

* more test cases

Signed-off-by: Shlomi Noach <[email protected]>

* RestoreFromBackupRequest: RestoreToPos

Signed-off-by: Shlomi Noach <[email protected]>

* vtctl Restore: '--restore_to_pos'

Signed-off-by: Shlomi Noach <[email protected]>

* make vtadmin_web_proto_types

Signed-off-by: Shlomi Noach <[email protected]>

* RestoreFromBackupRequest: RestoreToPos

Signed-off-by: Shlomi Noach <[email protected]>

* Unexplode: RestoreFromBackup() receives req *tabletmanagerdatapb.RestoreFromBackupRequest

Signed-off-by: Shlomi Noach <[email protected]>

* Unexplode: RestoreFromBackup() receives req *tabletmanagerdatapb.RestoreFromBackupRequest

Signed-off-by: Shlomi Noach <[email protected]>

* make vtadmin_web_proto_types

Signed-off-by: Shlomi Noach <[email protected]>

* populate restoreParams.RestoreToPos

Signed-off-by: Shlomi Noach <[email protected]>

* simplifying the logic of finding relevant backup

Signed-off-by: Shlomi Noach <[email protected]>

* fix switch/break logic

Signed-off-by: Shlomi Noach <[email protected]>

* towards a restore path

Signed-off-by: Shlomi Noach <[email protected]>

* golang version

Signed-off-by: Shlomi Noach <[email protected]>

* fix workflows ubuntu version

Signed-off-by: Shlomi Noach <[email protected]>

* skip nil manifests

Signed-off-by: Shlomi Noach <[email protected]>

* FindBackupToRestore() returns a RestorePath, which is an ordered sequence of backup manifests/handles

Signed-off-by: Shlomi Noach <[email protected]>

* linter suggestion

Signed-off-by: Shlomi Noach <[email protected]>

* fix backup time comparison logic

Signed-off-by: Shlomi Noach <[email protected]>

* vtctl Restore supports --dry_run flag

Signed-off-by: Shlomi Noach <[email protected]>

* flag --incremental-from-pos accepts the value 'auto', which takes the next incremental backup from last good backup

Signed-off-by: Shlomi Noach <[email protected]>

* make vtadmin_web_proto_types

Signed-off-by: Shlomi Noach <[email protected]>

* endtoend: validate --incremental_from_pos=auto

Signed-off-by: Shlomi Noach <[email protected]>

* towards applying binary logs: extracting onto temporary directory

Signed-off-by: Shlomi Noach <[email protected]>

* apply binary log file

Signed-off-by: Shlomi Noach <[email protected]>

* do not restore replication at end of PITR

Signed-off-by: Shlomi Noach <[email protected]>

* take dryrun into consideration

Signed-off-by: Shlomi Noach <[email protected]>

* testing restore to pos

Signed-off-by: Shlomi Noach <[email protected]>

* testing restore to pos: wait for replication, avoid bogus writes

Signed-off-by: Shlomi Noach <[email protected]>

* validating PITR path when binary logs are missing history

Signed-off-by: Shlomi Noach <[email protected]>

* full backup manifest now includes 'PurgedPosition', which is necessary to build a restore path. Now evaluated in IsValidIncrementalBakcup

Signed-off-by: Shlomi Noach <[email protected]>

* more recovery paths tests

Signed-off-by: Shlomi Noach <[email protected]>

* restrucutre tests

Signed-off-by: Shlomi Noach <[email protected]>

* log restore path

Signed-off-by: Shlomi Noach <[email protected]>

* generate CI workflows

Signed-off-by: Shlomi Noach <[email protected]>

* code comments

Signed-off-by: Shlomi Noach <[email protected]>

* code comments

Signed-off-by: Shlomi Noach <[email protected]>

* code comments

Signed-off-by: Shlomi Noach <[email protected]>

* CI 57 and 80

Signed-off-by: Shlomi Noach <[email protected]>

* flags test

Signed-off-by: Shlomi Noach <[email protected]>

* copyright year

Signed-off-by: Shlomi Noach <[email protected]>

* go version

Signed-off-by: Shlomi Noach <[email protected]>

* removed legacy mysql80 test

Signed-off-by: Shlomi Noach <[email protected]>

* PITR: stop search for possible resotre path with the first valid path, even if it's not the optimal

Signed-off-by: Shlomi Noach <[email protected]>

* support incrementally union-izing of previous-GTIDs when iterating binary logs

Signed-off-by: Shlomi Noach <[email protected]>

* removed local metadata info

Signed-off-by: Shlomi Noach <[email protected]>

* merged main, regenerated workflows

Signed-off-by: Shlomi Noach <[email protected]>

* go mod tidy

Signed-off-by: Shlomi Noach <[email protected]>

* rename conflicting variable

Signed-off-by: Shlomi Noach <[email protected]>

* refactor: const value

Signed-off-by: Shlomi Noach <[email protected]>

* dry run restore now returns with 0 exit code, no error

Signed-off-by: Shlomi Noach <[email protected]>

* release notes

Signed-off-by: Shlomi Noach <[email protected]>

Signed-off-by: Shlomi Noach <[email protected]>

* Migrate to GitHub OIDC based auth for Launchable (#11808)

This change updates the CI workflows to use the new GitHub OpenID
connect based authentication flow.

GitHub started to provide a public-key signed token that contain
pull-request data. This is commonly used as a short-lived token in the
authentication flow (Open ID Connect). Launchable recently started
supporting this. Migrate to this new method.

The permission clause added to the jobs is more restrictive than the
default access except for the "id-token: write" permission
(https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token).
This should give the e2e tests enough permissions to run. The id-token
permission is necessary to get the OIDC ID tokens as instructed by the
GitHub article
https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#adding-permissions-settings.

See
https://docs.launchableinc.com/sending-data-to-launchable/migration-to-github-oidc-auth
for the overview and the process.

Signed-off-by: Masaya Suzuki <[email protected]>

Signed-off-by: Masaya Suzuki <[email protected]>

* feat: add instructions on how to fix a self-hosted runner running out of disk space (#11839)

Signed-off-by: Manan Gupta <[email protected]>

Signed-off-by: Manan Gupta <[email protected]>

* Fix closing the body for HTTP requests (#11842)

One of the easy things to miss that can cause resource leaks is not
closing a response body for an HTTP request.

There's a linter available to make it easier to catch this, so this
enables that linter and fixes all the cases reported.

This is almost all test cases, except for one production code path case
in the throttler.

Signed-off-by: Dirkjan Bussink <[email protected]>

Signed-off-by: Dirkjan Bussink <[email protected]>

* Remove vtctld2 UI and vtctld server components that serve the app UI

Signed-off-by: notfelineit <[email protected]>

* Add back http port

Signed-off-by: notfelineit <[email protected]>

* Release notes for 15.0.1 (#11850)

Signed-off-by: Rameez Sajwani <[email protected]>

Signed-off-by: Rameez Sajwani <[email protected]>

* Release notes summary of `14.0.4` (#11849)

* Release notes for 14.0.4

Signed-off-by: Florent Poinsard <[email protected]>

* release summary for v14.0.4

Signed-off-by: Florent Poinsard <[email protected]>

Signed-off-by: Florent Poinsard <[email protected]>

* Fix deprecated usage of set-output (#11844)

The `set-output` command is deprecated and will break in the future.
This moves to the new style for all our GitHub Actions.

See also https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

Signed-off-by: Dirkjan Bussink <[email protected]>

Signed-off-by: Dirkjan Bussink <[email protected]>

* VReplication: Remove Deprecated V1 Client Commands (#11705)

* Remove SwitchReads/SwitchWrites client commands

Signed-off-by: Matt Lord <[email protected]>

* Remove Reshard/MoveTables v1 client commands

Signed-off-by: Matt Lord <[email protected]>

* Misc text clarifications

Signed-off-by: Matt Lord <[email protected]>

* Fix TestVreplicationCopyThrottling

Signed-off-by: Matt Lord <[email protected]>

* Remove DropSources

Signed-off-by: Matt Lord <[email protected]>

* Add removal info to release notes

Signed-off-by: Matt Lord <[email protected]>

* Reduce flakiness of copy_state optimization check

Signed-off-by: Matt Lord <[email protected]>

* Minor tweaks after self review

Signed-off-by: Matt Lord <[email protected]>

* De-flake sharded pitr test

Signed-off-by: Matt Lord <[email protected]>

Signed-off-by: Matt Lord <[email protected]>

* updating summary and release notes for v15.0.1 (#11852)

* updating summary and release notes for v15.0.1

Signed-off-by: Rameez Sajwani <[email protected]>

* fixing typos

Signed-off-by: Rameez Sajwani <[email protected]>

Signed-off-by: Rameez Sajwani <[email protected]>

* Simplify recursive data structure in CFC Vindex (#11843)

* fix: remove recursize data dag in CFC Vindex

Signed-off-by: Harshit Gangal <[email protected]>

* test: update test expectation

Signed-off-by: Harshit Gangal <[email protected]>

* addressed review comments

Signed-off-by: Harshit Gangal <[email protected]>

Signed-off-by: Harshit Gangal <[email protected]>

* Update throttler-topo workflow file (#11784)

Signed-off-by: Shlomi Noach <[email protected]>

Signed-off-by: Shlomi Noach <[email protected]>

* [cleanup] Explicitly include DDLStrategySetting in the sizegen target (#11857)

Closes #11856.

Signed-off-by: Andrew Mason <[email protected]>

Signed-off-by: Andrew Mason <[email protected]>

* VSCopy: Send COPY_COMPLETED events when the copy operation is done (#11740)

* VSCopy: Demonstrate to fail a test case on which the vstream API sends new events showing copy completed

Signed-off-by: yoheimuta <[email protected]>

* VSCopy: Send new events when the copy operation is done

Signed-off-by: yoheimuta <[email protected]>

* VSCopy: Fix typo

Signed-off-by: yoheimuta <[email protected]>

* Initialize new map for the 'vstream * from' vtgate sql interface. Make vtadmin web protos

Signed-off-by: Rohit Nayak <[email protected]>

* VSCopy: Make TestVStreamCopyBasic fail fast to avoid the end2end timeout out

Signed-off-by: yoheimuta <[email protected]>

* VSCopy: stop sharing the 't1' table among multiple test cases running concurrently

Signed-off-by: yoheimuta <[email protected]>

* VSCopy: refactor the function signature to be clearer

Signed-off-by: yoheimuta <[email protected]>

* VSCopy: refactor the VEvents sorter to be simpler

Signed-off-by: yoheimuta <[email protected]>

* VSCopy: refactor to stop the sorter from including a fully copied event

Signed-off-by: yoheimuta <[email protected]>

Signed-off-by: yoheimuta <[email protected]>
Signed-off-by: Rohit Nayak <[email protected]>
Co-authored-by: Rohit Nayak <[email protected]>

* add frances to maintainers (#11865)

Signed-off-by: deepthi <[email protected]>

Signed-off-by: deepthi <[email protected]>

* VReplication: Prevent Orphaned VDiff2 Jobs (#11768)

* Prevent orphaned VDiffs in two ways...

1. When opening the engine, restart any vdiffs that are in the
   started state as this indicates it did not complete and was
   unable to save the final state and must be restarted.
2. When a vdiff run fails, retry saving the error state with an
   exponential backoff until the engine shuts down. This way
   the normal retry mechanism will kick in OR #1 will kick in
   when the engine is next opened on the primary tablet.

Signed-off-by: Matt Lord <[email protected]>

* Handle failures before vdiff_table records are created

Signed-off-by: Matt Lord <[email protected]>

* Add more ephemeral client errors

Signed-off-by: Matt Lord <[email protected]>

* Show vdiff state of error even if no vdiff_table records

Signed-off-by: Matt Lord <[email protected]>

* Minor cleanup

Signed-off-by: Matt Lord <[email protected]>

* Add vdiff2 unit tests

Signed-off-by: Matt Lord <[email protected]>

* Add unit test for retry

Signed-off-by: Matt Lord <[email protected]>

* Small cleanup

Signed-off-by: Matt Lord <[email protected]>

* Addressing review comments and other improvements

Signed-off-by: Matt Lord <[email protected]>

* Use warning log for ... warnings :-)

Signed-off-by: Matt Lord <[email protected]>

* Minor touch ups

Signed-off-by: Matt Lord <[email protected]>

Signed-off-by: Matt Lord <[email protected]>

* update golangci-lint to 1.50.1 (#11873)

Signed-off-by: Andres Taylor <[email protected]>

Signed-off-by: Andres Taylor <[email protected]>

* [planner] Better AST equality (#11867)

* make it possible to do deep comparisons with custom logic

Signed-off-by: Andres Taylor <[email protected]>

* use the new EqualS function to do deep semantic equality

Signed-off-by: Andres Taylor <[email protected]>

* re gen the asthelpergen integration test data

Signed-off-by: Florent Poinsard <[email protected]>

* update equal gen comment

Signed-off-by: Florent Poinsard <[email protected]>

* test: add unit tests showing the new EqualsExpr functionality

Signed-off-by: Andres Taylor <[email protected]>

* [planner] use the semantic equality in more places

Signed-off-by: Andres Taylor <[email protected]>

* comments - update to reflect new code

Signed-off-by: Andres Taylor <[email protected]>

* small fixes around tests

Signed-off-by: Andres Taylor <[email protected]>

* update integration test build

Signed-off-by: Andres Taylor <[email protected]>

* use semantic equality for Anding together expressions

Signed-off-by: Andres Taylor <[email protected]>

* test: simplify test

Signed-off-by: Andres Taylor <[email protected]>

Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
Co-authored-by: Florent Poinsard <[email protected]>

* Parse binlog variable length encoded columns (#11871)

* Test for large table map binlog events

Signed-off-by: Dirkjan Bussink <[email protected]>

* Use variable length encoded integers for tablemap

The table map binlog event is defined as using variable integer lengths
for the number of columns and the metadata length.

This was hardcoded to using a single byte, so any lengths longer than
250 would be interpreted wrong. This was already annotated as a FIXME.

Signed-off-by: Dirkjan Bussink <[email protected]>

* Add test for large row event

Signed-off-by: Dirkjan Bussink <[email protected]>

* Use variable length encoding for binlog row events

Signed-off-by: Dirkjan Bussink <[email protected]>

* Adding endtoend vreplicatoin test that validates many columns in a table

Signed-off-by: Shlomi Noach <[email protected]>

* test that adds a column on top of many columns

Signed-off-by: Shlomi Noach <[email protected]>

Signed-off-by: Dirkjan Bussink <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Co-authored-by: Shlomi Noach <[email protected]>

* Online DDL: fix 'vtctlclient OnlineDDL' template queries (#11889)

Signed-off-by: Shlomi Noach <[email protected]>

Signed-off-by: Shlomi Noach <[email protected]>

* Fix MySQL56 GTID parsing when SID/UUID repeats (#11888)

* Fix MySQL56 GTID parsing when SID/UUID repeats

Signed-off-by: Shlomi Noach <[email protected]>

* beautify tests

Signed-off-by: Shlomi Noach <[email protected]>

Signed-off-by: Shlomi Noach <[email protected]>

* feat: fix checkMySQL and add tests and documentation (#11895)

Signed-off-by: Manan Gupta <[email protected]>

Signed-off-by: Manan Gupta <[email protected]>

* Add back tablet proxy for api, remove workflows, modify vtctld scripts to remove workflow flags

Signed-off-by: notfelineit <[email protected]>

* Add vtctld removal to release notes for 16

Signed-off-by: notfelineit <[email protected]>

* Remove traces of deleted flags

Signed-off-by: notfelineit <[email protected]>

* Make vtctld_show_topology_crud flag deprecated instead of removed

Signed-off-by: notfelineit <[email protected]>

* more unit tests for QueryMatchesTemplates() (#11894)

Signed-off-by: Shlomi Noach <[email protected]>

Signed-off-by: Shlomi Noach <[email protected]>

* sqlparser: new Equality API (#11906)

* sqlparser: use a new Equals API

Signed-off-by: Vicent Marti <[email protected]>

* tools: refactor how asthelpergen is invoked

Signed-off-by: Vicent Marti <[email protected]>

* goimports, flags and linter

Signed-off-by: Andres Taylor <[email protected]>

Signed-off-by: Vicent Marti <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
Co-authored-by: Andres Taylor <[email protected]>

* bugfix: allow predicates without dependencies with derived tables to be handled correctly (#11911)

* bugfix: allow predicates on top of derived tables to be handled without dependencies

Signed-off-by: Andres Taylor <[email protected]>

* stop normalizer from changing literals into bindvars

Signed-off-by: Andres Taylor <[email protected]>

Signed-off-by: Andres Taylor <[email protected]>

* Simplify `getPlan` and `gen4CompareV3` (#11903)

* simplify getPlan and gen4CompareV3

Signed-off-by: Florent Poinsard <[email protected]>

* fix error return in getPlan

Signed-off-by: Florent Poinsard <[email protected]>

Signed-off-by: Florent Poinsard <[email protected]>

* optimize joins, redirect dml for reference tables (#11875)

* go/vt/vtgate, proto: add "source" field to vschema

 * Add "source" field to vschema reference tables.
 * Model "source" field in go/vt/vtgate/vindexes/vschema.go.
 * Treat multiple tables in different keyspaces as unambiguous
   when all of those tables are references to or by each other.

Signed-off-by: Max Englander <[email protected]>

* go/vt/vtgate/planbuilder: plan reference joins

Given:

 * Two unsharded keyspace `k1` and sharded keyspace `k2`.
 * Source table `k1.r` and reference table `k2.r`.
 * Sharded table `k2.x`.

The previous commit adds support to globally route `r` to `k1.r`.

This means that `SELECT x JOIN r` will join `k1.r` to `x`, but what we
want is to join `k2.r`.

This commit propagates `vindexes.Table.Source` info from the
`vindexes.VSchema` into `operators.Route`, and uses that information
when planning joins.

Signed-off-by: Max Englander <[email protected]>

* go/vt/vtgate/vindexes: test reference source constraints

Signed-off-by: Max Englander <[email protected]>

* go/vt/vtgate/vindexes: FindTable unit tests for reference sources

Signed-off-by: Max Englander <[email protected]>

* go/vt/vtgate/vindexes: build keyspace allow unresolved references

Signed-off-by: Max Englander <[email protected]>

* go/vt/vtgate: executor unit test reference tables

Signed-off-by: Max Englander <[email protected]>

* go/vt/vtgate: executor unit test reference dml

Signed-off-by: Max Englander <[email protected]>

* go/vt/vtgate/vindexes: avoid bi-directional references (causes infinite loop)

Signed-off-by: Max Englander <[email protected]>

* go/test/endtoend/vtgate: test reference tables

Signed-off-by: Max Englander <[email protected]>

* tidy up

Signed-off-by: Max Englander <[email protected]>

* address pr comments round 1

Signed-off-by: Max Englander <[email protected]>

* address pr feedback round 2: dont use replicas in tests when not needed

Signed-off-by: Max Englander <[email protected]>

* address pr feedback round 2: use vterrors in vschema.go

Signed-off-by: Max Englander <[email protected]>

* fix tests

Signed-off-by: Max Englander <[email protected]>

* address pr feedback round 3: fix e2e test

Signed-off-by: Max Englander <[email protected]>

* address pr feedback round 3: optimally route dml

Signed-off-by: Max Englander <[email protected]>

* address pr feedback round 3: fix e2e & plan tests (primitive.GetTablesUsed)

Signed-off-by: Max Englander <[email protected]>

* forgot to commit these :facepalm:

Signed-off-by: Max Englander <[email protected]>

* move TablesUsed from engine => planbuilder

Signed-off-by: Max Englander <[email protected]>

* rm engine.(any).GetTablesUsed

Signed-off-by: Max Englander <[email protected]>

* rm engine.(any).MergedWith; revert engine.(*Route).TableNames => engine.(*Route).TableName

Signed-off-by: Max Englander <[email protected]>

* tidy up

Signed-off-by: Max Englander <[email protected]>

* address pr feedback round 3: redir gen4 insert to source

Signed-off-by: Max Englander <[email protected]>

* address pr feedback round 4: remove unused (vindexFunc).TableName

Signed-off-by: Max Englander <[email protected]>

Signed-off-by: Max Englander <[email protected]>

* Upgrade to `go1.19.4` (#11905)

* upgrade to go1.19.4

Signed-off-by: Florent Poinsard <[email protected]>

* use bootstrap version 14

Signed-off-by: Florent Poinsard <[email protected]>

Signed-off-by: Florent Poinsard <[email protected]>

* Add support for views in vtgate (#11195)

* feat: add view support to vtgate

Signed-off-by: Andres Taylor <[email protected]>

* feat: added views to the vschema

Signed-off-by: Andres Taylor <[email protected]>

* refactor: change the VSchemaViews to return SelectStatement

Signed-off-by: Andres Taylor <[email protected]>

* feat: hook up the new views in the vschema with the ast rewriter

Signed-off-by: Andres Taylor <[email protected]>

* feat: make it possible to find uniquely named views

Signed-off-by: Andres Taylor <[email protected]>

* fix: make sure to create new ColNames of the view AST

Signed-off-by: Andres Taylor <[email protected]>

* test: added views unit test

Signed-off-by: Harshit Gangal <[email protected]>

* test: added e2e tesT

Signed-off-by: Harshit Gangal <[email protected]>

* feat: added create view vschema ddl

Signed-off-by: Harshit Gangal <[email protected]>

* feat: implement create view vschema ddl action update

Signed-off-by: Harshit Gangal <[email protected]>

* sizegen rerun

Signed-off-by: Harshit Gangal <[email protected]>

* test: added unit test for create view vschema ddl

Signed-off-by: Harshit Gangal <[email protected]>

* feat: added replace view support in vschema ddl

Signed-off-by: Harshit Gangal <[email protected]>

* doc: view support summary notes

Signed-off-by: Harshit Gangal <[email protected]>

* feat: vschema drop view ddl support

Signed-off-by: Harshit Gangal <[email protected]>

* Revert "feat: vschema drop view ddl support"

This reverts commit 744f2e9e763d49654355340548dc8746f6c80d6a.

Signed-off-by: Harshit Gangal <[email protected]>

* Revert "feat: added replace view support in vschema ddl"

This reverts commit 5394e9b8d64f28e708591bfbb9137ddb961497e2.

Signed-off-by: Harshit Gangal <[email protected]>

* Revert "test: added unit test for create view vschema ddl"

This reverts commit 54ffe11ba96d127fe043eb9a7d379085caecce59.

Signed-off-by: Harshit Gangal <[email protected]>

* Revert "sizegen rerun"

This reverts commit 9f7ff6b31dfc32ea483f66d93a7f7d7f0239a3d6.

Signed-off-by: Harshit Gangal <[email protected]>

* Revert "feat: implement create view vschema ddl action update"

This reverts commit c0123447bf2c8b6533bc7629bc7acd176ae8c764.

Signed-off-by: Harshit Gangal <[email protected]>

* Revert "feat: added create view vschema ddl"

This reverts commit be623f935689082c3a20e8507efc3d1c5c1a245b.

Signed-off-by: Harshit Gangal <[email protected]>

* fix: e2e test

Signed-off-by: Harshit Gangal <[email protected]>

* removed views from vschema proto

Signed-off-by: Harshit Gangal <[email protected]>

* go back to using Table and not *string for uniqueTables

Signed-off-by: Andres Taylor <[email protected]>

* salvage bad merge

Signed-off-by: Andres Taylor <[email protected]>

Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Harshit Gangal <[email protected]>
Co-authored-by: Harshit Gangal <[email protected]>

* don't run test on older versions, since they fail (#11923)

Signed-off-by: Andres Taylor <[email protected]>

Signed-off-by: Andres Taylor <[email protected]>

* Better clone of the VCursor (#11926)

* Better clone of the VCursor

Signed-off-by: Florent Poinsard <[email protected]>

* Move new implementations to the proper files

Signed-off-by: Florent Poinsard <[email protected]>

* apply review suggestions

Signed-off-by: Florent Poinsard <[email protected]>

Signed-off-by: Florent Poinsard <[email protected]>

* feat: add test and fix the error of not sending a ServerLost error on server side error (#11920)

Signed-off-by: Manan Gupta <[email protected]>

Signed-off-by: Manan Gupta <[email protected]>

* Revert "Better clone of the VCursor (#11926)" (#11931)

This reverts commit 035d6b7124e4ff4a99aa87aa549cc82acc05044a.

Signed-off-by: Florent Poinsard <[email protected]>

Signed-off-by: Florent Poinsard <[email protected]>

* Correct minor inaccuracies in governing docs (#11933)

Signed-off-by: deepthi <[email protected]>

Signed-off-by: deepthi <[email protected]>

* log: also log error in DiscoverInstance when force discovery is specified (#11936)

Signed-off-by: Manan Gupta <[email protected]>

Signed-off-by: Manan Gupta <[email protected]>

* Onlineddl: formalize "immediate operations", respect `--postpone-completion` strategy flag (#11910)

* Added endtoend test to validate postponed REVERT of an ALTER VIEW statement: test indicates a bug

Signed-off-by: Shlomi Noach <[email protected]>

* ALTER VIEW now respects --postpone-completion flag

Signed-off-by: Shlomi Noach <[email protected]>

* Online DDL: formalize 'immediate operations', respect --postpone-completion

Signed-off-by: Shlomi Noach <[email protected]>

* typo

Signed-off-by: Shlomi Noach <[email protected]>

* only test instant ddl in capable versions (ie 8.0)

Signed-off-by: Shlomi Noach <[email protected]>

* more specific instant ddl capability

Signed-off-by: Shlomi Noach <[email protected]>

* Update go/vt/vttablet/onlineddl/executor.go

Co-authored-by: Deepthi Sigireddi <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>

* Update go/vt/vttablet/onlineddl/executor.go

Co-authored-by: Deepthi Sigireddi <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>

* Update go/vt/vttablet/onlineddl/executor.go

Co-authored-by: Deepthi Sigireddi <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>

Signed-off-by: Shlomi Noach <[email protected]>
Co-authored-by: Deepthi Sigireddi <[email protected]>

* add Arthur to the maintainers file (#11937)

* add Arthur to the mainternes file

Signed-off-by: Andres Taylor <[email protected]>

* add Arthur as code owner for the vtgate planbuilder

Signed-off-by: Andres Taylor <[email protected]>

* Update MAINTAINERS.md

Co-authored-by: Arthur Schreiber <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>

Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
Co-authored-by: Arthur Schreiber <[email protected]>

* Online DDL: ensure message is valid `utf8` in `updateMigrationMessage()` (#11914)

* OnlineDDL: handle binary/invalid data in updateMigrationMessage()

Signed-off-by: Shlomi Noach <[email protected]>

* Ensure error message is valid utf8

Signed-off-by: Shlomi Noach <[email protected]>

* cap length; special replacement character

Signed-off-by: Shlomi Noach <[email protected]>

* swap order, so that utf8 compliance of string is ensured

Signed-off-by: Shlomi Noach <[email protected]>

Signed-off-by: Shlomi Noach <[email protected]>

* [planner] Schema information on the information_schema views (#11941)

* add info_schema information

Signed-off-by: Andres Taylor <[email protected]>

* add SchemaInformation handling for info_schema tables

Signed-off-by: Andres Taylor <[email protected]>

* fix bad test query

Signed-off-by: Andres Taylor <[email protected]>

* add support for information_schema on mysql 5.7

Signed-off-by: Andres Taylor <[email protected]>

* columns sorted just like mysql, and tests for 5.7

Signed-off-by: Andres Taylor <[email protected]>

* test: skip test that should not run

Signed-off-by: Andres Taylor <[email protected]>

Signed-off-by: Andres Taylor <[email protected]>

* CODEOWNERS: Add vrepl team members for vtgate vstream and tablet picker (#11950)

* Add vrepl team members for vtgate vstream and tablet picker

Both vtgate components/services are related to VReplication.

Signed-off-by: Matt Lord <[email protected]>

* Add vstream endtoend tests too

Signed-off-by: Matt Lord <[email protected]>

Signed-off-by: Matt Lord <[email protected]>

* Release notes for 15.0.2 (#11963)

Signed-off-by: Florent Poinsard <[email protected]>

Signed-off-by: Florent Poinsard <[email protected]>

* update the release 15.0.2 summary doc (#11956)

Signed-off-by: Florent Poinsard <[email protected]>

Signed-off-by: Florent Poinsard <[email protected]>
Co-authored-by: Florent Poinsard <[email protected]>

* moved missed flags to pflags in vtgate (#11966)

* used pflags over flags on pending usages

Signed-off-by: Harshit Gangal <[email protected]>

* removed flags from go/vt/vtgate/endtoend package

Signed-off-by: Harshit Gangal <[email protected]>

* test: update test helper output

Signed-off-by: Harshit Gangal <[email protected]>

* addressed review comments

Signed-off-by: Harshit Gangal <[email protected]>

Signed-off-by: Harshit Gangal <[email protected]>

* Document error code in `vtgate/planbuilder` (#10738)

* Addition of fundation for new error codes

Signed-off-by: Florent Poinsard <[email protected]>

* Generate README on the stdout for error code

Signed-off-by: Florent Poinsard <[email protected]>

* Added support for more error code

Signed-off-by: Florent Poinsard <[email protected]>

* test new error code

Signed-off-by: Florent Poinsard <[email protected]>

* test remove error code

Signed-off-by: Florent Poinsard <[email protected]>

* test new error code

Signed-off-by: Florent Poinsard <[email protected]>

* addition of the error code for the planbuilder package

Signed-off-by: Florent Poinsard <[email protected]>

* Handle more errors of the vtgate package in the centralized error code

Signed-off-by: Florent Poinsard <[email protected]>

* Use error code in more places after merge

Signed-off-by: Florent Poinsard <[email protected]>

* Update code long usage

Signed-off-by: Florent Poinsard <[email protected]>

* Add cause to OurError

Signed-off-by: Florent Poinsard <[email protected]>

* update the plantest output

Signed-off-by: Florent Poinsard <[email protected]>

* Update test expectation and run make codegen

Signed-off-by: Florent Poinsard <[email protected]>

* Update test with VT05003 error

Signed-off-by: Florent Poinsard <[email protected]>

* Fix vtgate tests

Signed-off-by: Florent Poinsard <[email protected]>

* Add missing error code to doc list

Signed-off-by: Florent Poinsard <[email protected]>

* Fix test TestExecutorAddDropVindexDDL

Signed-off-by: Florent Poinsard <[email protected]>

* Fix english typo in VT03023

Signed-off-by: Florent Poinsard <[email protected]>

* Fix plan tests

Signed-off-by: Florent Poinsard <[email protected]>

* revert unwanted change

Signed-off-by: Florent Poinsard <[email protected]>

* make proto

Signed-off-by: Andres Taylor <[email protected]>

* Addition of comment to the error doc generator

Signed-off-by: Florent Poinsard <[email protected]>

* Rename OurError to VitessError

Signed-off-by: Florent Poinsard <[email protected]>

* consistent lower-case short error description

Signed-off-by: Florent Poinsard <[email protected]>

* fix VT03001 long description

Signed-off-by: Florent Poinsard <[email protected]>

* fix VT03005 short and long descriptions

Signed-off-by: Florent Poinsard <[email protected]>

* fix VT03007, VT03012 and VT03021 long descriptions

Signed-off-by: Florent Poinsard <[email protected]>

* fix VT05***, VT06001 and VT09*** descriptions

Signed-off-by: Florent Poinsard <[email protected]>

* simplify VT09008

Signed-off-by: Florent Poinsard <[email protected]>

* fix VT12*** and VT13*** long descriptions

Signed-off-by: Florent Poinsard <[email protected]>

* rename vterrors generation package to vterrorsgen instead of main

Signed-off-by: Florent Poinsard <[email protected]>

* fix error syntax for distinct checkCol bug

Signed-off-by: Florent Poinsard <[email protected]>

* fix syntax in error call

Signed-off-by: Florent Poinsard <[email protected]>

* fix syntax in error call

Signed-off-by: Florent Poinsard <[email protected]>

* fix syntax issues in error messages

Signed-off-by: Florent Poinsard <[email protected]>

* fix syntax issues in error messages

Signed-off-by: Florent Poinsard <[email protected]>

* fix syntax issues in error messages

Signed-off-by: Florent Poinsard <[email protected]>

* fix syntax based on review suggestions

Signed-off-by: Florent Poinsard <[email protected]>

* [gen4 tests] update test expectations

Signed-off-by: Andres Taylor <[email protected]>

* tests: updated more tests to use new error strings

Signed-off-by: Andres Taylor <[email protected]>

* added snippet to release notes

Signed-off-by: Andres Taylor <[email protected]>

* prepare errors so we can have more implementations

Signed-off-by: Andres Taylor <[email protected]>

* start cleaning up semantic errors

Signed-off-by: Andres Taylor <[email protected]>

* prefix unsupported errors

Signed-off-by: Andres Taylor <[email protected]>

* move more errors to structured errors

Signed-off-by: Andres Taylor <[email protected]>

* commit

Signed-off-by: Andres Taylor <[email protected]>

* moved binder to user structured errors

Signed-off-by: Andres Taylor <[email protected]>

* combine template must and parse

Signed-off-by: Florent Poinsard <[email protected]>

* humanize error in hasCodeForRow for probeTable

Signed-off-by: Florent Poinsard <[email protected]>

* humanize engine primitive errors

Signed-off-by: Florent Poinsard <[email protected]>

* go through all the unsupported errors once

Signed-off-by: Florent Poinsard <[email protected]>

* apply review suggestions

Signed-off-by: Florent Poinsard <[email protected]>

* go through error call

Signed-off-by: Florent Poinsard <[email protected]>

* add missing error in planbuilder

Signed-off-by: Florent Poinsard <[email protected]>

* fix plan tests

Signed-off-by: Florent Poinsard <[email protected]>

* fix insert E2E tests

Signed-off-by: Florent Poinsard <[email protected]>

* clean release summary file

Signed-off-by: Florent Poinsard <[email protected]>

* clean up long description for VT09006 and VT09007

Signed-off-by: Florent Poinsard <[email protected]>

* self-review PR once

Signed-off-by: Florent Poinsard <[email protected]>

* update plan test output

Signed-off-by: Florent Poinsard <[email protected]>

* update sementics package test output

Signed-off-by: Florent Poinsard <[email protected]>

* database -> keyspace in error strings

Signed-off-by: Florent Poinsard <[email protected]>

* fix plan_test output

Signed-off-by: Florent Poinsard <[email protected]>

* use same long description as the one previously written in the docs

Signed-off-by: Florent Poinsard <[email protected]>

* re generate the plan tests output

Signed-off-by: Florent Poinsard <[email protected]>

* reformat error VT09003

Signed-off-by: Florent Poinsard <[email protected]>

* remove heading line from the error code generation template

Signed-off-by: Florent Poinsard <[email protected]>

* update test expectation

Signed-off-by: Andres Taylor <[email protected]>

Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
Co-authored-by: Andres Taylor <[email protected]>

* Migrate missed vtctld flags to pflag and immediately deprecate them (#11974)

Signed-off-by: Andrew Mason <[email protected]>

Signed-off-by: Andrew Mason <[email protected]>

* Timeout Fixes and VTOrc Improvement (#11881)

* refactor: move tests out of newfeaturestest so that they run on upgrade-downgrade tests too

Signed-off-by: Manan Gupta <[email protected]>

* feat: add failing ers test for handling multiple vttablet failures with default values of flags

Signed-off-by: Manan Gupta <[email protected]>

* feat: add a new lock-timeout flag and use that instead of remote-operation-timeout

Signed-off-by: Manan Gupta <[email protected]>

* feat: augment DownPrimary test to reproduce the issue of VTOrc not handling multiple failures

Signed-off-by: Manan Gupta <[email protected]>

* feat: remove LockShardTimeout configuration from VTOrc and add parallelism to refresh of tablets

Signed-off-by: Manan Gupta <[email protected]>

* log: add more logging lines around ers in vtorc

Signed-off-by: Manan Gupta <[email protected]>

* test: get the test to work

Signed-off-by: Manan Gupta <[email protected]>

* feat: fix usage of wait for replicas timeout

Signed-off-by: Manan Gupta <[email protected]>

* test: fix flags expected output

Signed-off-by: Manan Gupta <[email protected]>

* test: fix race in test now that the function is called in parallel multiple times

Signed-off-by: Manan Gupta <[email protected]>

* feat: fix default of onCloseTimeout to 1 second

Signed-off-by: Manan Gupta <[email protected]>

* test: add failing unit test to refreshTabletsInKeyspaceShard

Signed-off-by: Manan Gupta <[email protected]>

* feat: fix vtorc to not forget a tablet which has been deleted

Signed-off-by: Manan Gupta <[email protected]>

* feat: fix backward compatibility, add tests and release notes docs

Signed-off-by: Manan Gupta <[email protected]>

* test: fix flags output

Signed-off-by: Manan Gupta <[email protected]>

* test: use disable-replication-manager instead of disable-active-reparents to allow vttablets to setup replication when restarted

Signed-off-by: Manan Gupta <[email protected]>

* test: fix flaky test by not checking for an error

Signed-off-by: Manan Gupta <[email protected]>

* feat: handle the case of empty hostname in tablet initialization

Signed-off-by: Manan Gupta <[email protected]>

* feat: update onclose timeout to 10 seconds

Signed-off-by: Manan Gupta <[email protected]>

* test: fix unit test

Signed-off-by: Manan Gupta <[email protected]>

* feat: address review comments

Signed-off-by: Manan Gupta <[email protected]>

* docs: add comments explaining the test functions

Signed-off-by: Manan Gupta <[email protected]>

* feat: add summary docs for 'lock-shard-timeout' deprecation

Signed-off-by: Manan Gupta <[email protected]>

Signed-off-by: Manan Gupta <[email protected]>

* Add manan and florent to Docker files CODEOWNERS (#11981)

Signed-off-by: Florent Poinsard <[email protected]>

Signed-off-by: Florent Poinsard <[email protected]>

* vttestserver: make tablet_refresh_interval configurable and reduce default value (#11918)

* setting up refresh_interval and check_leader_interval

Signed-off-by: Rameez Sajwani <[email protected]>

* setting default value, if not provided

Signed-off-by: Rameez Sajwani <[email protected]>

* fixing vttablet flags

Signed-off-by: Rameez Sajwani <[email protected]>

* fixing vtttestserver flags

Signed-off-by: Rameez Sajwani <[email protected]>

* adding comments and removing unwanted script

Signed-off-by: Rameez Sajwani <[email protected]>

* code review

Signed-off-by: Rameez Sajwani <[email protected]>

* removing leader Check interval

Signed-off-by: Rameez Sajwani <[email protected]>

* change to flags out put file

Signed-off-by: Rameez Sajwani <[email protected]>

* adding summary

Signed-off-by: Rameez Sajwani <[email protected]>

* code review feedback

Signed-off-by: Rameez Sajwani <[email protected]>

Signed-off-by: Rameez Sajwani <[email protected]>

* Add support for Views DDL (#11896)

* create views table and start supporting it in vtgate

Signed-off-by: Florent Poinsard <[email protected]>

* start supporting views in vttablet

Signed-off-by: Florent Poinsard <[email protected]>

* feat: add create view ddl support by inserting into _vt.views table

Signed-off-by: Harshit Gangal <[email protected]>

* feat: add support for create or replace view

Signed-off-by: Harshit Gangal <[email protected]>

* feat: on view insert failure, return view already exists error

Signed-off-by: Harshit Gangal <[email protected]>

* feat: add support for alter view ddl in vttablet

Signed-off-by: Harshit Gangal <[email protected]>

* feat: add support for drop view ddl in vttablet

Signed-off-by: Harshit Gangal <[email protected]>

* feat: add support for view ddl in vtgate

Signed-off-by: Harshit Gangal <[email protected]>

* changed error to use new vitess error code

Signed-off-by: Harshit Gangal <[email protected]>

* fix test expectation

Signed-off-by: Harshit Gangal <[email protected]>

* change flag name to queryserver-enable-views to not conflict with vtgate for vtcombo binary

Signed-off-by: Harshit Gangal <[email protected]>

* test: updated test help output

Signed-off-by: Harshit Gangal <[email protected]>

* test: add create view ddl to fakedb query expectation

Signed-off-by: Harshit Gangal <[email protected]>

* addressed review comments

Signed-off-by: Harshit Gangal <[email protected]>

Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Harshit Gangal <[email protected]>
Co-authored-by: Harshit Gangal <[email protected]>

* Add `VStreamerCount` stat to `vttablet` (#11978)

* Add `VStreamersActive` stat to `vttablet`

Signed-off-by: Tim Vaillancourt <[email protected]>

* Improve desc

Signed-off-by: Tim Vaillancourt <[email protected]>

* Add PR suggestions

Signed-off-by: Tim Vaillancourt <[email protected]>

* Move to *stats.Gauge

Signed-off-by: Tim Vaillancourt <[email protected]>

* Single defer

Signed-off-by: Tim Vaillancourt <[email protected]>

Signed-off-by: Tim Vaillancourt <[email protected]>

* VExplain statement (#11892)

* feat: ast changes for vtexplain and adding the primitive to the interfaces

Signed-off-by: Manan Gupta <[email protected]>

* feat: add planning for json output from vtexplain

Signed-off-by: Manan Gupta <[email protected]>

* test: add tests for vtexplain statements supported

Signed-off-by: Manan Gupta <[email protected]>

* feat: handle todo for converting some explain statements to vtexplain

Signed-off-by: Manan Gupta <[email protected]>

* feat: update parser after comments on rfc

Signed-off-by: Manan Gupta <[email protected]>

* feat: fix planner to align with the new input format

Signed-off-by: Manan Gupta <[email protected]>

* feat: add basic implementation for vexplain all

Signed-off-by: Manan Gupta <[email protected]>

* merge mysql and vitess primitive JSON and add E2E tests

Signed-off-by: Florent Poinsard <[email protected]>

* remove old unit test and generate new plan tests

Signed-off-by: Florent Poinsard <[email protected]>

* feat: fix todos and augment tests

Signed-off-by: Manan Gupta <[email protected]>

* refactor: reintroduce removed comments

Signed-off-by: Manan Gupta <[email protected]>

* refactor: reintroduce more removed comments

Signed-off-by: Manan Gupta <[email protected]>

* feat: add summary docs

Signed-off-by: Manan Gupta <[email protected]>

* feat: remvoe exhaustive keyword which isn't required anymore

Signed-off-by: Manan Gupta <[email protected]>

* feat: fix config.json file to point to the right folder

Signed-off-by: Manan Gupta <[email protected]>

* test: fix unit tests

Signed-off-by: Manan Gupta <[email protected]>

Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
Co-authored-by: Florent Poinsard <[email protected]>

* only expand when we have full information (#11998)

Signed-off-by: Andres Taylor <[email protected]>

Signed-off-by: Andres Taylor <[email protected]>

* remove e2e test from partial_keyspace config (#12005)

Signed-off-by: Andres Taylor <[email protected]>

Signed-off-by: Andres Taylor <[email protected]>

* remove log line (#12000)

Signed-off-by: Andres Taylor <[email protected]>

Signed-off-by: Andres Taylor <[email protected]>

* Allow override of build git env in docker/base builds (#11968)

* Pass BUILD_GIT_BRANCH and BUILD_GIT_REV env into docker build

Signed-off-by: Tim Vaillancourt <[email protected]>

* Fix bootstrap version

Signed-off-by: Tim Vaillancourt <[email protected]>

* Fix bootstrap version, again

Signed-off-by: Tim Vaillancourt <[email protected]>

* Fix ws

Signed-off-by: Tim Vaillancourt <[email protected]>

Signed-off-by: Tim Vaillancourt <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
Co-authored-by: Florent Poinsard <[email protected]>

* feat: fix vttestserver run script defaults (#12004)

Signed-off-by: Manan Gupta <[email protected]>

Signed-off-by: Manan Gupta <[email protected]>

* Fix parsing and normalization of floating point types (#12009)

* Fix parsing of float type with single length attribute

MySQL can also parse this so ensure that we're compatible here. This is
deprecated but it can still be used to create tables but in MySQL 8 this
length is ignored on the final table.

Signed-off-by: Dirkjan Bussink <[email protected]>

* Add float4 and float8 aliases for float and double

Signed-off-by: Dirkjan Bussink <[email protected]>

* Normalize floating point values according to MySQL rules

Signed-off-by: Dirkjan Bussink <[email protected]>

* Simplify parser with reuse

Signed-off-by: Dirkjan Bussink <[email protected]>

Signed-off-by: Dirkjan Bussink <[email protected]>

* feat: add vtorc port to vitess local docker run (#12001)

Signed-off-by: Manan Gupta <[email protected]>

Signed-off-by: Manan Gupta <[email protected]>

* VDiff2: Migrate VDiff1 Unit Tests (#11916)

* Initial workflow differ tests

Signed-off-by: Matt Lord <[email protected]>

* More tests

Signed-off-by: Matt Lord <[email protected]>

* Playing with vdiffEnv

Signed-off-by: Matt Lord <[email protected]>

* more vdiffEnv work

Signed-off-by: Matt Lord <[email protected]>

* Use a shard testenv as it creates a vttestserver and mysqld instanc3

Signed-off-by: Matt Lord <[email protected]>

* Add vtctl client results/report tests

Signed-off-by: Matt Lord <[email protected]>

* Add TestVDiff to test full set of queries

Signed-off-by: Matt Lord <[email protected]>

* Finish up vtctl report building unit tests

Signed-off-by: Matt Lord <[email protected]>

* Deflake the unit tests in the CI

Signed-off-by: Matt Lord <[email protected]>

* Add TestVDiff2Sharded

Signed-off-by: Matt Lord <[email protected]>

* Minor changes after self review

Signed-off-by: Matt Lord <[email protected]>

* Reduce resource usage for race condition unit tests

We were creating a somewhat crazy number of resources.

Signed-off-by: Matt Lord <[email protected]>

* Fix data race in TestVDiff

Signed-off-by: Matt Lord <[email protected]>

* Correct Wrangler semaphore usage

Signed-off-by: Matt Lord <[email protected]>

* Minor change after another self review

Signed-off-by: Matt Lord <[email protected]>

Signed-off-by: Matt Lord <[email protected]>

* mysqlctl is a command-line client so remove server flags (#12022)

* mysqlctl is a client command-line tool

So remove the [gRPC] server related flags.

[mysqlctld] is the gRPC server that can be used
instead of mysqlctl.

Signed-off-by: Matt Lord <[email protected]>

* Add release notes coverage

Signed-off-by: Matt Lord <[email protected]>

* Add section header for release notes item

Signed-off-by: Matt Lord <[email protected]>

* Remove errant flag type in list

Signed-off-by: Matt Lord <[email protected]>

Signed-off-by: Matt Lord <[email protected]>

* OnlineDDL: scheduleNextMigration() to only read reviewed migrations (#12014)

* OnlineDDL: scheduleNextMigration() to only read reviewed migrations

Signed-off-by: Shlomi Noach <[email protected]>

* reviewImmediateOperations(): do not attempt to classify a REVERT of an ALTER

Signed-off-by: Shlomi Noach <[email protected]>

Signed-off-by: Shlomi Noach <[email protected]>

* sqlparser: QueryMatchesTemplates uses canonical string (#11990)

Signed-off-by: Shlomi Noach <[email protected]>

Signed-off-by: Shlomi Noach <[email protected]>

* OnlineDDL: support --unsafe-allow-foreign-keys strategy flag (#11976)

* OnlineDDL: support --unsafe-allow-foreign-keys strategy flag

Signed-off-by: Shlomi Noach <[email protected]>

* double dashes

Signed-off-by: Shlomi Noach <[email protected]>

Signed-off-by: Shlomi Noach <[email protected]>

* BugFix: Errant GTID detection for a single replica (#12024)

* test: add failing tests

Signed-off-by: Manan Gupta <[email protected]>

* feat: fix errant gtid detection

Signed-off-by: Manan Gupta <[email protected]>

* comment: add few comments to better explain the test and the function

Signed-off-by: Manan Gupta <[email protected]>

* feat: fix ers to not fail when there is only one replica which fails to set replication source

Signed-off-by: Manan Gupta <[email protected]>

* feat: address review comments

Signed-off-by: Manan Gupta <[email protected]>

Signed-off-by: Manan Gupta <[email protected]>

* Fix rbac config in the vtop example (#12034)

* feat: fix rbac config in the operator example

Signed-off-by: Manan Gupta <[email protected]>

* feat: fix clusters value too

Signed-off-by: Manan Gupta <[email protected]>

Signed-off-by: Manan Gupta <[email protected]>

* VReplication: Test Migrations From MariaDB to MySQL (#12036)

* Add MariaDB Migration e2e Test

Signed-off-by: Matt Lord <[email protected]>

* Consolidate MariaDB Version Configs

Signed-off-by: Matt Lord <[email protected]>

* Minor changes after self review

Signed-off-by: Matt Lord <[email protected]>

* Additional MariaDB cleanup from unit test generation

Signed-off-by: Dirkjan Bussink <[email protected]>

* Small additional cleanup

Signed-off-by: Matt Lord <[email protected]>

* Use latest MariaDB LTS release as default guess from ENV

https://mariadb.com/kb/en/changes-improvements-in-mariadb-106/

Signed-off-by: Matt Lord <[email protected]>

Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Dirkjan Bussink <[email protected]>
Co-authored-by: Dirkjan Bussink <[email protected]>

* [vtctldclient|docs] apply doc feedback based on website PR feedback (#12030)

* apply doc feedback based on website PR feedback

Signed-off-by: Andrew Mason <[email protected]>

* always link to latest

Signed-off-by: Andrew Mason <[email protected]>

* update flags test data

Signed-off-by: Andrew Mason <[email protected]>

Signed-off-by: Andrew Mason <[email protected]>

* VTOrc Code Cleanup - generate_base, replace cluster_name with keyspace and shard. (#12012)

* feat: refactor generate commands of VTOrc to be in a single file

Signed-off-by: Manan Gupta <[email protected]>

* refactor: cleanup create table formatting

Signed-off-by: Manan Gupta <[email protected]>

* feat: cleanup the usage of IsSQLite and IsMySQL

Signed-off-by: Manan Gupta <[email protected]>

* feat: remove unused minimal instance

Signed-off-by: Manan Gupta <[email protected]>

* feat: remove unused table cluster_domain_name

Signed-off-by: Manan Gupta <[email protected]>

* feat: fix vtorc database to store keyspace and shard instead of cluster

Signed-off-by: Manan Gupta <[email protected]>

* feat: remove unused attributes

Signed-off-by: Manan Gupta <[email protected]>

* feat: remove unused cluster domain

Signed-off-by: Manan Gupta <[email protected]>

* feat: change GetClusterName to GetKeyspaceAndShardName

Signed-off-by: Manan Gupta <[email protected]>

* feat: fix insertion into database_instance

Signed-off-by: Manan Gupta <[email protected]>

* feat: fix SnapshotTopologies

Signed-off-by: Manan Gupta <[email protected]>

* feat: remove inject unseen primary and inject seed

Signed-off-by: Manan Gupta <[email protected]>

* feat: remove ClusterName from Instance

Signed-off-by: Manan Gupta <[email protected]>

* feat: fix Audit operations

Signed-off-by: Manan Gupta <[email protected]>

* feat: add Keyspace and Shard to cluster information to replace ClusterName

Signed-off-by: Manan Gupta <[email protected]>

* feat: fix attempt failure detection registeration

Signed-off-by: Manan Gupta <[email protected]>

* feat: fix blocked topology recoveries

Signed-off-by: Manan Gupta <[email protected]>

* feat: fix topology recovery

Signed-off-by: Manan Gupta <[email protected]>

* feat: reading recovery instances

Signed-off-by: Manan Gupta <[email protected]>

* feat: fix get replication and analysis

Signed-off-by: Manan Gupta <[email protected]>

* feat: fix bug in query

Signed-off-by: Manan Gupta <[email protected]>

* test: add tests to check that filtering by keyspace works for APIs

Signed-off-by: Manan Gupta <[email protected]>

* feat: remove remaining usages of ClusterName

Signed-off-by: Manan Gupta <[email protected]>

* refactor: fix comment explaining sleep in the test

Signed-off-by: Manan Gupta <[email protected]>

* feat: add code to prevent filtering just by shard and add tests for it

Signed-off-by: Manan Gupta <[email protected]>

Signed-off-by: Manan Gupta <[email protected]>

* Add missing backslash to run.sh script (#12033)

* Add missing backslash to run.sh script

Backslash was missing, which was causing, that --schema_dir was not applied and therefore tables in DB were not created. This will fix it

Signed-off-by: kbslvsk <[email protected]>

* Add missing backslash to run.sh script

Backslash was missing, which was causing, that --schema_dir was not applied and therefore tables in DB were not created. This will fix it

Signed-off-by: kbslvsk <[email protected]>

Signed-off-by: kbslvsk <[email protected]>

* VDiff2: Properly App…
timvaillancourt pushed a commit to slackhq/vitess that referenced this pull request Mar 15, 2024
Signed-off-by: Andres Taylor <[email protected]>

Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Tim Vaillancourt <[email protected]>
timvaillancourt added a commit to slackhq/vitess that referenced this pull request Mar 15, 2024
* go1.20.14

Signed-off-by: Tim Vaillancourt <[email protected]>

* more go-version: updates

Signed-off-by: Tim Vaillancourt <[email protected]>

* make proto w/go1.20

Signed-off-by: Tim Vaillancourt <[email protected]>

* Fix the golangci-lint config (vitessio#11812)

There's a bunch of deprecated linters that don't work anymore, so let's
remove them:

```
WARN [runner] The linter 'deadcode' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.
WARN [runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.
WARN [runner] The linter 'varcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.
WARN [linters context] structcheck is disabled because of generics. You can track the evolution of the generics support by following the golangci/golangci-lint#2649.
```

Signed-off-by: Dirkjan Bussink <[email protected]>

Signed-off-by: Dirkjan Bussink <[email protected]>

* update golangci-lint to 1.50.1 (vitessio#11873)

Signed-off-by: Andres Taylor <[email protected]>

Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Tim Vaillancourt <[email protected]>

* Add timeout to golangci-lint and bump its version (vitessio#12852) (vitessio#12853)

Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Tim Vaillancourt <[email protected]>

* Upgrade `release-16.0` to `go1.20.1` (vitessio#12398)

* Upgrade release-16.0 to go1.19.6

Signed-off-by: Florent Poinsard <[email protected]>

* upgrade to 1.20.1

Signed-off-by: Florent Poinsard <[email protected]>

* bump the golangci-lint version

Signed-off-by: Florent Poinsard <[email protected]>

* Apply linter suggestions

Signed-off-by: Florent Poinsard <[email protected]>

* Apply linter suggestions

Signed-off-by: Florent Poinsard <[email protected]>

* fix TestTLSClientVerifyIdentity

Signed-off-by: Florent Poinsard <[email protected]>

* Switch to using new Go 1.19 CRL parser (vitessio#12315)

`x509.ParseCRL` is deprecated, we should use `x509.ParseRevocationList`
instead which is new in Go 1.19.

Signed-off-by: Dirkjan Bussink <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>

* Skip TestFuzz for now

Signed-off-by: Florent Poinsard <[email protected]>

---------

Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Dirkjan Bussink <[email protected]>
Co-authored-by: Dirkjan Bussink <[email protected]>

* Remove recent golangci-lint version bump (vitessio#12909)

Signed-off-by: Florent Poinsard <[email protected]>

* Fix conflict resolution

Signed-off-by: Tim Vaillancourt <[email protected]>

* make ensure_bootstrap_version

Signed-off-by: Tim Vaillancourt <[email protected]>

* hardcode previous release

Signed-off-by: Tim Vaillancourt <[email protected]>

* Add comment for hardcoded previous release

Signed-off-by: Tim Vaillancourt <[email protected]>

---------

Signed-off-by: Tim Vaillancourt <[email protected]>
Signed-off-by: Dirkjan Bussink <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
Co-authored-by: Dirkjan Bussink <[email protected]>
Co-authored-by: Andres Taylor <[email protected]>
Co-authored-by: Florent Poinsard <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants