Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cluster_endtoend_onlineddl_vrepl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
build:
timeout-minutes: 60
name: Run endtoend tests on Cluster (onlineddl_vrepl)
runs-on: gh-hosted-runners-16cores-1-24.04
runs-on: ${{ github.repository_owner == 'vitessio' && 'gh-hosted-runners-16cores-1-24.04' || 'ubuntu-24.04' }}

steps:
- name: Skip CI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
build:
timeout-minutes: 60
name: Run endtoend tests on Cluster (onlineddl_vrepl_stress)
runs-on: gh-hosted-runners-16cores-1-24.04
runs-on: ${{ github.repository_owner == 'vitessio' && 'gh-hosted-runners-16cores-1-24.04' || 'ubuntu-24.04' }}

steps:
- name: Skip CI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
build:
timeout-minutes: 60
name: Run endtoend tests on Cluster (onlineddl_vrepl_stress_suite)
runs-on: gh-hosted-runners-16cores-1-24.04
runs-on: ${{ github.repository_owner == 'vitessio' && 'gh-hosted-runners-16cores-1-24.04' || 'ubuntu-24.04' }}

steps:
- name: Skip CI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
build:
timeout-minutes: 60
name: Run endtoend tests on Cluster (onlineddl_vrepl_suite)
runs-on: gh-hosted-runners-16cores-1-24.04
runs-on: ${{ github.repository_owner == 'vitessio' && 'gh-hosted-runners-16cores-1-24.04' || 'ubuntu-24.04' }}

steps:
- name: Skip CI
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cluster_endtoend_vreplication_basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
build:
timeout-minutes: 60
name: Run endtoend tests on Cluster (vreplication_basic)
runs-on: gh-hosted-runners-16cores-1-24.04
runs-on: ${{ github.repository_owner == 'vitessio' && 'gh-hosted-runners-16cores-1-24.04' || 'ubuntu-24.04' }}

steps:
- name: Skip CI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
build:
timeout-minutes: 60
name: Run endtoend tests on Cluster (vreplication_migrate_vdiff2_convert_tz)
runs-on: gh-hosted-runners-16cores-1-24.04
runs-on: ${{ github.repository_owner == 'vitessio' && 'gh-hosted-runners-16cores-1-24.04' || 'ubuntu-24.04' }}

steps:
- name: Skip CI
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ permissions: read-all
jobs:
test:
name: Code Coverage
runs-on: gh-hosted-runners-16cores-1-24.04
runs-on: ${{ github.repository_owner == 'vitessio' && 'gh-hosted-runners-16cores-1-24.04' || 'ubuntu-24.04' }}

steps:
- name: Check out code
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker_build_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ permissions: read-all
jobs:
build_and_push_vttestserver:
name: Build and push vttestserver
runs-on: gh-hosted-runners-16cores-1-24.04
runs-on: ${{ github.repository_owner == 'vitessio' && 'gh-hosted-runners-16cores-1-24.04' || 'ubuntu-24.04' }}
if: github.repository == 'vitessio/vitess'

strategy:
Expand Down Expand Up @@ -136,7 +136,7 @@ jobs:

build_and_push_components:
name: Build and push
runs-on: gh-hosted-runners-16cores-1-24.04
runs-on: ${{ github.repository_owner == 'vitessio' && 'gh-hosted-runners-16cores-1-24.04' || 'ubuntu-24.04' }}
if: github.repository == 'vitessio/vitess' && needs.build_and_push_lite.result == 'success'
needs:
- build_and_push_lite
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/local_example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:

build:
name: Local example using ${{ matrix.topo }} on Ubuntu
runs-on: gh-hosted-runners-16cores-1-24.04
runs-on: ${{ github.repository_owner == 'vitessio' && 'gh-hosted-runners-16cores-1-24.04' || 'ubuntu-24.04' }}
strategy:
matrix:
topo: [consul,etcd,zk2]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/region_example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:

build:
name: Region Sharding example using ${{ matrix.topo }} on Ubuntu
runs-on: gh-hosted-runners-16cores-1-24.04
runs-on: ${{ github.repository_owner == 'vitessio' && 'gh-hosted-runners-16cores-1-24.04' || 'ubuntu-24.04' }}
strategy:
matrix:
topo: [etcd]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit_race.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

build:
name: Unit Test (Race)
runs-on: gh-hosted-runners-16cores-1-24.04
runs-on: ${{ github.repository_owner == 'vitessio' && 'gh-hosted-runners-16cores-1-24.04' || 'ubuntu-24.04' }}
steps:
- name: Skip CI
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit_race_evalengine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

build:
name: Unit Test (Evalengine_Race)
runs-on: gh-hosted-runners-16cores-1-24.04
runs-on: ${{ github.repository_owner == 'vitessio' && 'gh-hosted-runners-16cores-1-24.04' || 'ubuntu-24.04' }}
steps:
- name: Skip CI
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upgrade_downgrade_test_backups_e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
upgrade_downgrade_test_e2e:
timeout-minutes: 60
name: Run Upgrade Downgrade Test - Backups - E2E
runs-on: gh-hosted-runners-16cores-1-24.04
runs-on: ${{ github.repository_owner == 'vitessio' && 'gh-hosted-runners-16cores-1-24.04' || 'ubuntu-24.04' }}

steps:
- name: Skip CI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
upgrade_downgrade_test_e2e:
timeout-minutes: 60
name: Run Upgrade Downgrade Test - Backups - E2E - Next Release
runs-on: gh-hosted-runners-16cores-1-24.04
runs-on: ${{ github.repository_owner == 'vitessio' && 'gh-hosted-runners-16cores-1-24.04' || 'ubuntu-24.04' }}

steps:
- name: Skip CI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
upgrade_downgrade_test_manual:
timeout-minutes: 40
name: Run Upgrade Downgrade Test - Backups - Manual
runs-on: gh-hosted-runners-16cores-1-24.04
runs-on: ${{ github.repository_owner == 'vitessio' && 'gh-hosted-runners-16cores-1-24.04' || 'ubuntu-24.04' }}

steps:
- name: Skip CI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
upgrade_downgrade_test_manual:
timeout-minutes: 40
name: Run Upgrade Downgrade Test - Backups - Manual - Next Release
runs-on: gh-hosted-runners-16cores-1-24.04
runs-on: ${{ github.repository_owner == 'vitessio' && 'gh-hosted-runners-16cores-1-24.04' || 'ubuntu-24.04' }}

steps:
- name: Skip CI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
upgrade_downgrade_test:
timeout-minutes: 60
name: Run Upgrade Downgrade Test - Online DDL flow
runs-on: gh-hosted-runners-16cores-1-24.04
runs-on: ${{ github.repository_owner == 'vitessio' && 'gh-hosted-runners-16cores-1-24.04' || 'ubuntu-24.04' }}

steps:
- name: Skip CI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
upgrade_downgrade_test:
timeout-minutes: 60
name: Run Upgrade Downgrade Test - Query Serving (Queries)
runs-on: gh-hosted-runners-16cores-1-24.04
runs-on: ${{ github.repository_owner == 'vitessio' && 'gh-hosted-runners-16cores-1-24.04' || 'ubuntu-24.04' }}

steps:
- name: Skip CI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
upgrade_downgrade_test:
timeout-minutes: 60
name: Run Upgrade Downgrade Test - Query Serving (Queries - 2)
runs-on: gh-hosted-runners-16cores-1-24.04
runs-on: ${{ github.repository_owner == 'vitessio' && 'gh-hosted-runners-16cores-1-24.04' || 'ubuntu-24.04' }}

steps:
- name: Skip CI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
upgrade_downgrade_test:
timeout-minutes: 60
name: Run Upgrade Downgrade Test - Query Serving (Queries - 2) Next Release
runs-on: gh-hosted-runners-16cores-1-24.04
runs-on: ${{ github.repository_owner == 'vitessio' && 'gh-hosted-runners-16cores-1-24.04' || 'ubuntu-24.04' }}

steps:
- name: Skip CI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
upgrade_downgrade_test:
timeout-minutes: 60
name: Run Upgrade Downgrade Test - Query Serving (Queries) Next Release
runs-on: gh-hosted-runners-16cores-1-24.04
runs-on: ${{ github.repository_owner == 'vitessio' && 'gh-hosted-runners-16cores-1-24.04' || 'ubuntu-24.04' }}

steps:
- name: Skip CI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
upgrade_downgrade_test:
timeout-minutes: 60
name: Run Upgrade Downgrade Test - Query Serving (Schema)
runs-on: gh-hosted-runners-16cores-1-24.04
runs-on: ${{ github.repository_owner == 'vitessio' && 'gh-hosted-runners-16cores-1-24.04' || 'ubuntu-24.04' }}

steps:
- name: Skip CI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
upgrade_downgrade_test:
timeout-minutes: 60
name: Run Upgrade Downgrade Test - Query Serving (Schema) Next Release
runs-on: gh-hosted-runners-16cores-1-24.04
runs-on: ${{ github.repository_owner == 'vitessio' && 'gh-hosted-runners-16cores-1-24.04' || 'ubuntu-24.04' }}

steps:
- name: Skip CI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
upgrade_downgrade_test:
timeout-minutes: 60
name: Run Upgrade Downgrade Test - Reparent New Vtctl
runs-on: gh-hosted-runners-16cores-1-24.04
runs-on: ${{ github.repository_owner == 'vitessio' && 'gh-hosted-runners-16cores-1-24.04' || 'ubuntu-24.04' }}

steps:
- name: Skip CI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
upgrade_downgrade_test:
timeout-minutes: 60
name: Run Upgrade Downgrade Test - Reparent New VTTablet
runs-on: gh-hosted-runners-16cores-1-24.04
runs-on: ${{ github.repository_owner == 'vitessio' && 'gh-hosted-runners-16cores-1-24.04' || 'ubuntu-24.04' }}

steps:
- name: Skip CI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
upgrade_downgrade_test:
timeout-minutes: 60
name: Run Upgrade Downgrade Test - Reparent Old Vtctl
runs-on: gh-hosted-runners-16cores-1-24.04
runs-on: ${{ github.repository_owner == 'vitessio' && 'gh-hosted-runners-16cores-1-24.04' || 'ubuntu-24.04' }}

steps:
- name: Skip CI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
upgrade_downgrade_test:
timeout-minutes: 60
name: Run Upgrade Downgrade Test - Reparent Old VTTablet
runs-on: gh-hosted-runners-16cores-1-24.04
runs-on: ${{ github.repository_owner == 'vitessio' && 'gh-hosted-runners-16cores-1-24.04' || 'ubuntu-24.04' }}

steps:
- name: Skip CI
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upgrade_downgrade_test_semi_sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
upgrade_downgrade_test_e2e:
timeout-minutes: 60
name: Run Semi Sync Upgrade Downgrade Test
runs-on: gh-hosted-runners-16cores-1-24.04
runs-on: ${{ github.repository_owner == 'vitessio' && 'gh-hosted-runners-16cores-1-24.04' || 'ubuntu-24.04' }}

steps:
- name: Skip CI
Expand Down
6 changes: 6 additions & 0 deletions go/vt/dbconfigs/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,12 @@ func GetCredentialsServer() CredentialsServer {
return cs
}

// SetDbCredentialsFilePath sets the value of the `--db-credentials-file` flag.
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The comment uses backticks around the flag name, but the actual flag is '--db-credentials-file' (with double dashes). The backticks should be removed for consistency with standard Go comment conventions, or the entire flag reference should use proper markdown formatting.

Suggested change
// SetDbCredentialsFilePath sets the value of the `--db-credentials-file` flag.
// SetDbCredentialsFilePath sets the value of the --db-credentials-file flag.

Copilot uses AI. Check for mistakes.
// This should be used only for testing.
func SetDbCredentialsFilePath(path string) {
dbCredentialsFile = path
}

// FileCredentialsServer is a simple implementation of CredentialsServer using
// a json file. Protected by mu.
type FileCredentialsServer struct {
Expand Down
4 changes: 4 additions & 0 deletions go/vt/tableacl/tableacl.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ func (tacl *tableACL) init(configFile string, aclCB func()) error {
log.Infof("unable to read tableACL config file: %v Error: %v", configFile, err)
return err
}
if len(data) == 0 {
return errors.New("tableACL config file is empty")
}

config := &tableaclpb.Config{}
if err := config.UnmarshalVT(data); err != nil {
// try to parse tableacl as json file
Expand Down
14 changes: 14 additions & 0 deletions go/vt/tableacl/tableacl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"reflect"
"testing"

"github.com/stretchr/testify/require"
"google.golang.org/protobuf/proto"

"vitess.io/vitess/go/vt/tableacl/acl"
Expand Down Expand Up @@ -74,6 +75,19 @@ func TestInitWithValidConfig(t *testing.T) {
}
}

func TestInitWithEmptyConfig(t *testing.T) {
tacl := tableACL{factory: &simpleacl.Factory{}}
f, err := os.CreateTemp("", "tableacl")
require.NoError(t, err)

defer os.Remove(f.Name())
err = f.Close()
require.NoError(t, err)

err = tacl.init(f.Name(), func() {})
require.Error(t, err)
}

func TestInitFromProto(t *testing.T) {
tacl := tableACL{factory: &simpleacl.Factory{}}
readerACL := tacl.Authorized("my_test_table", READER)
Expand Down
3 changes: 3 additions & 0 deletions go/vt/vtgate/planbuilder/operators/subquery_planning.go
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,9 @@ func tryMergeSubqueryWithOuter(ctx *plancontext.PlanningContext, subQuery *SubQu
if !subQuery.IsArgument {
op.Source = newFilter(outer.Source, subQuery.Original)
}
if outer.Comments != nil {
op.Comments = outer.Comments
}
ctx.MergedSubqueries = append(ctx.MergedSubqueries, subQuery.originalSubquery)
return op, Rewrote("merged subquery with outer")
}
Expand Down
67 changes: 67 additions & 0 deletions go/vt/vtgate/planbuilder/testdata/select_cases.json
Original file line number Diff line number Diff line change
Expand Up @@ -933,6 +933,73 @@
]
}
},
{
"comment": "Comments with subquery",
"query": "select /* comment */ user.col from user where id IN (select id from user where id > 1 and id < 10)",
"plan": {
"QueryType": "SELECT",
"Original": "select /* comment */ user.col from user where id IN (select id from user where id > 1 and id < 10)",
"Instructions": {
"OperatorType": "Route",
"Variant": "Scatter",
"Keyspace": {
"Name": "user",
"Sharded": true
},
"FieldQuery": "select `user`.col from `user` where 1 != 1",
"Query": "select /* comment */ `user`.col from `user` where id in (select id from `user` where id > 1 and id < 10)",
"Table": "`user`"
},
"TablesUsed": [
"user.user"
]
}
},
{
"comment": "Comments with subquery not merged into a single route",
"query": "select /* comment */ user.col from user where foo IN (select id from user where id > 1 and id < 10)",
"plan": {
"QueryType": "SELECT",
"Original": "select /* comment */ user.col from user where foo IN (select id from user where id > 1 and id < 10)",
"Instructions": {
"OperatorType": "UncorrelatedSubquery",
"Variant": "PulloutIn",
"PulloutVars": [
"__sq_has_values",
"__sq1"
],
"Inputs": [
{
"InputName": "SubQuery",
"OperatorType": "Route",
"Variant": "Scatter",
"Keyspace": {
"Name": "user",
"Sharded": true
},
"FieldQuery": "select id from `user` where 1 != 1",
"Query": "select /* comment */ id from `user` where id > 1 and id < 10",
"Table": "`user`"
},
{
"InputName": "Outer",
"OperatorType": "Route",
"Variant": "Scatter",
"Keyspace": {
"Name": "user",
"Sharded": true
},
"FieldQuery": "select `user`.col from `user` where 1 != 1",
"Query": "select /* comment */ `user`.col from `user` where :__sq_has_values and foo in ::__sq1",
"Table": "`user`"
}
]
},
"TablesUsed": [
"user.user"
]
}
},
{
"comment": "for update",
"query": "select user.col from user join user_extra for update",
Expand Down
Loading
Loading