Merge branch 'main' into nicktobey/json

This commit is contained in:
Nick Tobey
2024-01-02 17:14:09 -08:00
4 changed files with 16 additions and 19 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ require (
github.com/cespare/xxhash v1.1.0
github.com/creasty/defaults v1.6.0
github.com/dolthub/flatbuffers/v23 v23.3.3-dh.2
github.com/dolthub/go-mysql-server v0.17.1-0.20240102195312-24799a08207a
github.com/dolthub/go-mysql-server v0.17.1-0.20240102214603-370a08737bbb
github.com/dolthub/swiss v0.1.0
github.com/goccy/go-json v0.10.2
github.com/google/go-github/v57 v57.0.0
+2 -2
View File
@@ -183,8 +183,8 @@ github.com/dolthub/fslock v0.0.3 h1:iLMpUIvJKMKm92+N1fmHVdxJP5NdyDK5bK7z7Ba2s2U=
github.com/dolthub/fslock v0.0.3/go.mod h1:QWql+P17oAAMLnL4HGB5tiovtDuAjdDTPbuqx7bYfa0=
github.com/dolthub/go-icu-regex v0.0.0-20230524105445-af7e7991c97e h1:kPsT4a47cw1+y/N5SSCkma7FhAPw7KeGmD6c9PBZW9Y=
github.com/dolthub/go-icu-regex v0.0.0-20230524105445-af7e7991c97e/go.mod h1:KPUcpx070QOfJK1gNe0zx4pA5sicIK1GMikIGLKC168=
github.com/dolthub/go-mysql-server v0.17.1-0.20240102004327-8814e66a2544 h1:VhMewBcV6VAIkE88Muo/gmAKrtD12NjBweDoNRSIj3Q=
github.com/dolthub/go-mysql-server v0.17.1-0.20240102004327-8814e66a2544/go.mod h1:sMn7PQPkwZ2ZNic9146aoNRFR87js4V/q414UIta+ks=
github.com/dolthub/go-mysql-server v0.17.1-0.20240102214603-370a08737bbb h1:xJEeOuFu9VbMveGOXWAJeZpq8wf+d1kNj6T6Q09l9mU=
github.com/dolthub/go-mysql-server v0.17.1-0.20240102214603-370a08737bbb/go.mod h1:sMn7PQPkwZ2ZNic9146aoNRFR87js4V/q414UIta+ks=
github.com/dolthub/ishell v0.0.0-20221214210346-d7db0b066488 h1:0HHu0GWJH0N6a6keStrHhUAK5/o9LVfkh44pvsV4514=
github.com/dolthub/ishell v0.0.0-20221214210346-d7db0b066488/go.mod h1:ehexgi1mPxRTk0Mok/pADALuHbvATulTh6gzr7NzZto=
github.com/dolthub/jsonpath v0.0.2-0.20230525180605-8dc13778fd72 h1:NfWmngMi1CYUWU4Ix8wM+USEhjc+mhPlT9JUR/anvbQ=
+7 -3
View File
@@ -101,12 +101,16 @@ func DoPush(ctx context.Context, pushMeta *env.PushOptions, progStarter ProgStar
for _, targets := range pushMeta.Targets {
err = push(ctx, pushMeta.Rsr, pushMeta.TmpDir, pushMeta.SrcDb, pushMeta.DestDb, pushMeta.Remote, targets, progStarter, progStopper)
if err == nil {
if targets.HasUpstream {
// TODO: should add commit hash info for branches with upstream set
// (e.g. 74476cf38..080b073e7 branch1 -> branch1)
// TODO: we don't have sufficient information here to know what actually happened in the push. Supporting
// git behavior of printing the commit ids updated (e.g. 74476cf38..080b073e7 branch1 -> branch1) isn't
// currently possible. We need to plumb through results in the return from the Push(). Having just an error
// response is not sufficient, as there are many "success" cases that are not errors.
if targets.SrcRef == ref.EmptyBranchRef {
successPush = append(successPush, fmt.Sprintf(" - [deleted] %s", targets.DestRef.GetPath()))
} else {
successPush = append(successPush, fmt.Sprintf(" * [new branch] %s -> %s", targets.SrcRef.GetPath(), targets.DestRef.GetPath()))
}
} else if errors.Is(err, doltdb.ErrIsAhead) || errors.Is(err, ErrCantFF) || errors.Is(err, datas.ErrMergeNeeded) {
failedPush = append(failedPush, fmt.Sprintf(" ! [rejected] %s -> %s (non-fast-forward)", targets.SrcRef.GetPath(), targets.DestRef.GetPath()))
continue
@@ -557,11 +557,7 @@ GRANT CLONE_ADMIN ON *.* TO clone_admin_user@'localhost';
run dolt push origin --user $SQL_USER :new_branch
[[ "$status" -eq 0 ]] || false
# TODO - verify output. Currently we always print "new branch"
# To https://doltremoteapi.dolthub.com/dolthub/macneale-remote-test
# * [new branch] HEAD -> main
# [[ "$output" =~ "[deleted] new_branch" ]] || false
[[ "$output" =~ "- [deleted] new_branch" ]] || false
cd ../remote
run dolt branch -a
@@ -593,12 +589,9 @@ GRANT CLONE_ADMIN ON *.* TO clone_admin_user@'localhost';
[[ "$status" -ne 0 ]] || false
[[ "$output" =~ "target has uncommitted changes. --force required to overwrite" ]] || false
dolt push origin --force --user $SQL_USER :new_branch
# TODO - verify output. Currently we always print "new branch"
# To https://doltremoteapi.dolthub.com/dolthub/macneale-remote-test
# * [new branch] HEAD -> main
# [[ "$output" =~ "[deleted] new_branch" ]] || false
run dolt push origin --force --user $SQL_USER :new_branch
[[ "$status" -eq 0 ]] || false
[[ "$output" =~ "- [deleted] new_branch" ]] || false
cd ../remote
run dolt branch -a
@@ -628,11 +621,11 @@ GRANT CLONE_ADMIN ON *.* TO clone_admin_user@'localhost';
run dolt push nodb --user $SQL_USER main:new_branch
[[ "$status" -ne 0 ]] || false
[[ "$output" =~ "database not found: nodb" ]] || false # NM4
[[ "$output" =~ "database not found: nodb" ]] || false
run dolt push --force nodb --user $SQL_USER main:new_branch
[[ "$status" -ne 0 ]] || false
[[ "$output" =~ "database not found: nodb" ]] || false # NM4
[[ "$output" =~ "database not found: nodb" ]] || false
}
@test "sql-server-remotesrv: create remote branch from remotesapi port as super user" {