From b7654aaa91b745039266a35ecb00c29d7751add8 Mon Sep 17 00:00:00 2001 From: ginokent <29125616+ginokent@users.noreply.github.com> Date: Mon, 3 Jun 2024 08:24:47 +0900 Subject: [PATCH 1/3] build(go): bump github.com/kunitsucom/util.go from 0.0.62 to 0.0.66 --- go.mod | 2 +- go.sum | 4 ++-- pkg/ddlctl/apply/ddlctl_apply.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index e8deb3e..7e3988e 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.22.3 require ( github.com/go-sql-driver/mysql v1.8.1 github.com/googleapis/go-sql-spanner v1.3.1 - github.com/kunitsucom/util.go v0.0.62 + github.com/kunitsucom/util.go v0.0.66 github.com/lib/pq v1.10.9 ) diff --git a/go.sum b/go.sum index 9aa515d..0579066 100644 --- a/go.sum +++ b/go.sum @@ -85,8 +85,8 @@ github.com/googleapis/go-sql-spanner v1.3.1 h1:SNq7uPla66H6UB2e0YR8KvFG7kPKq33qG github.com/googleapis/go-sql-spanner v1.3.1/go.mod h1:JK3o13Nt9Ov8KkNKMiMKHlQhAa05lzilABlUhKKx2Z8= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/kunitsucom/util.go v0.0.62 h1:2Ry6i4IXtDXPUu5eDMw92sNtB74pXiYTNm9xSLNI/M4= -github.com/kunitsucom/util.go v0.0.62/go.mod h1:bYFf2JvRqVF1brBtpdt3xkkTGJBxmYBxZlItrc/lf7Y= +github.com/kunitsucom/util.go v0.0.66 h1:+yVu2mXL2p7D+JjGI9RUtxyhgXcFJcE3eayUo4oDnOM= +github.com/kunitsucom/util.go v0.0.66/go.mod h1:bYFf2JvRqVF1brBtpdt3xkkTGJBxmYBxZlItrc/lf7Y= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= diff --git a/pkg/ddlctl/apply/ddlctl_apply.go b/pkg/ddlctl/apply/ddlctl_apply.go index 3276b5a..8bcda24 100644 --- a/pkg/ddlctl/apply/ddlctl_apply.go +++ b/pkg/ddlctl/apply/ddlctl_apply.go @@ -114,8 +114,8 @@ func Apply(ctx context.Context, dialect, dsn, ddlStr string) error { switch driverName { case ddlmysql.DriverName: ddls := strings.Split(ddlStr, ";\n") - retryer := retry.New(retry.NewConfig(time.Second, time.Second, retry.WithMaxRetries(len(ddls)))) - if err := retryer.Do(ctx, func(ctx context.Context) error { + retryer := retry.New(ctx, retry.NewConfig(time.Second, time.Second, retry.WithMaxRetries(len(ddls)))) + if err := retryer.Do(func(ctx context.Context) error { var outerErr error for _, q := range ddls { if len(q) == 0 { From 11c95c6ffb87b26079b1aa81689278e7d22e72f8 Mon Sep 17 00:00:00 2001 From: ginokent <29125616+ginokent@users.noreply.github.com> Date: Mon, 3 Jun 2024 08:25:01 +0900 Subject: [PATCH 2/3] ci: Fix .golangci.yml --- .golangci.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 531fadc..bceda17 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,7 +1,4 @@ run: - skip-files: - - cmd/sandbox/main.go - - internal/integrationtest/samples/.*\.go modules-download-mode: readonly allow-parallel-runners: true @@ -12,22 +9,16 @@ linters: - depguard # unnecessary - dupl # disable to avoid encouraging excessive DRY - exhaustruct # https://github.com/GaijinEntertainment/go-exhaustruct - - exhaustivestruct # https://github.com/mbilski/exhaustivestruct - gci # unnecessary - goconst # unnecessary - godox # unnecessary - - golint # deprecated https://github.com/golang/lint - gomnd # https://github.com/tommy-muehle/go-mnd - gosmopolitan # unnecessary - - ifshort # for readability - interfacebloat # unnecessary - - interfacer # deprecated https://github.com/mvdan/interfacer - lll # unnecessary - - maligned # deprecated https://github.com/mdempsky/maligned - nlreturn # ignore "return with no blank line before" - nolintlint # unnecessary - nonamedreturns # unnecessary - - nosnakecase # for environment variable key - varnamelen # unnecessary - wsl # ignore "declarations should never be cuddled" From c9ef83e5634b914d589c7a7d0c20466a82d67d69 Mon Sep 17 00:00:00 2001 From: ginokent <29125616+ginokent@users.noreply.github.com> Date: Mon, 3 Jun 2024 08:26:17 +0900 Subject: [PATCH 3/3] fix: typo --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d92ea81..15cbe9b 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,7 @@ versenv: githooks: @diff -q "${REPO_ROOT}/.githooks/pre-push" "${PRE_PUSH}" || cp -ai "${REPO_ROOT}/.githooks/pre-push" "${PRE_PUSH}" -clean: ## Clean up chace, etc +clean: ## Clean up cache, etc go clean -x -cache -testcache -modcache -fuzzcache golangci-lint cache clean