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

rename module #671

Closed
wants to merge 3 commits into from
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
20 changes: 10 additions & 10 deletions .github/workflows/integrate-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ jobs:
${{ runner.os }}-go-

# This step only runs when the event type is a pull_request
- name: Integrate Test
if: ${{ github.event_name == 'pull_request' }}
run: |
chmod +x integrate_test.sh && [[ -n "${{github.event.pull_request.head.repo.full_name}}" ]] && [[ -n "${{github.event.pull_request.head.sha}}" ]] && [[ -n "${{github.base_ref}}" ]] && ./integrate_test.sh ${{github.event.pull_request.head.repo.full_name}} ${{github.event.pull_request.head.sha}} ${{github.base_ref}}

# This step only runs when the event type is a push
- name: Integrate Test
if: ${{ github.event_name == 'push' }}
run: |
chmod +x integrate_test.sh && ./integrate_test.sh $GITHUB_REPOSITORY $GITHUB_SHA $GITHUB_BASE_REF
# - name: Integrate Test
# if: ${{ github.event_name == 'pull_request' }}
# run: |
# chmod +x integrate_test.sh && [[ -n "${{github.event.pull_request.head.repo.full_name}}" ]] && [[ -n "${{github.event.pull_request.head.sha}}" ]] && [[ -n "${{github.base_ref}}" ]] && ./integrate_test.sh ${{github.event.pull_request.head.repo.full_name}} ${{github.event.pull_request.head.sha}} ${{github.base_ref}}
#
# # This step only runs when the event type is a push
# - name: Integrate Test
# if: ${{ github.event_name == 'push' }}
# run: |
# chmod +x integrate_test.sh && ./integrate_test.sh $GITHUB_REPOSITORY $GITHUB_SHA $GITHUB_BASE_REF
6 changes: 3 additions & 3 deletions coverage.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
mode: atomic
github.com/seata/seata-go/pkg/rm/tcc/tcc_resource.go:20.51,22.2 1 0
github.com/seata/seata-go/pkg/rm/tcc/tcc_resource.go:24.46,26.2 1 0
github.com/seata/seata-go/pkg/rm/tcc/tcc_resource.go:28.56,30.2 1 0
github.com/apache/seata-go/pkg/rm/tcc/tcc_resource.go:20.51,22.2 1 0
github.com/apache/seata-go/pkg/rm/tcc/tcc_resource.go:24.46,26.2 1 0
github.com/apache/seata-go/pkg/rm/tcc/tcc_resource.go:28.56,30.2 1 0
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/seata/seata-go
module github.com/apache/seata-go

go 1.18

Expand Down
2 changes: 1 addition & 1 deletion goimports.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

# format go imports style
go install golang.org/x/tools/cmd/goimports
goimports -local github.com/seata/seata-go -w .
goimports -local github.com/apache/seata-go -w .

# format licence style
go install github.com/apache/skywalking-eyes/cmd/license-eye@latest
Expand Down
4 changes: 2 additions & 2 deletions integrate_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ echo "github pull request base branch -> $3"
echo "github pull request head branch -> ${GITHUB_HEAD_REF}"

echo "use seata-go-samples $3 branch for integration testing"
git clone https://github.com/seata/seata-go-samples samples && cd samples
git clone https://github.com/apache/seata-go-samples samples && cd samples

# update seata-go to current commit id

go mod edit -replace=github.com/seata/seata-go=github.com/"$1"@"$2"
go mod edit -replace=github.com/apache/seata-go=github.com/"$1"@"$2"

go mod tidy

Expand Down
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ LICENSE_DIR = /tmp/tools/license
# format import code
format-import:
go get -d github.com/dubbogo/tools/cmd/imports-formatter
imports-formatter -path . -module github.com/seata/seata-go -bl false
imports-formatter -path . -module github.com/apache/seata-go -bl false

unit-test:
go test ./pkg/... -coverprofile=coverage.txt -covermode=atomic
Expand Down
24 changes: 12 additions & 12 deletions pkg/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ package client
import (
"sync"

"github.com/seata/seata-go/pkg/datasource"
at "github.com/seata/seata-go/pkg/datasource/sql"
"github.com/seata/seata-go/pkg/datasource/sql/exec/config"
"github.com/seata/seata-go/pkg/discovery"
"github.com/seata/seata-go/pkg/integration"
remoteConfig "github.com/seata/seata-go/pkg/remoting/config"
"github.com/seata/seata-go/pkg/remoting/getty"
"github.com/seata/seata-go/pkg/remoting/processor/client"
"github.com/seata/seata-go/pkg/rm"
"github.com/seata/seata-go/pkg/rm/tcc"
"github.com/seata/seata-go/pkg/tm"
"github.com/seata/seata-go/pkg/util/log"
"github.com/apache/seata-go/pkg/datasource"
at "github.com/apache/seata-go/pkg/datasource/sql"
"github.com/apache/seata-go/pkg/datasource/sql/exec/config"
"github.com/apache/seata-go/pkg/discovery"
"github.com/apache/seata-go/pkg/integration"
remoteConfig "github.com/apache/seata-go/pkg/remoting/config"
"github.com/apache/seata-go/pkg/remoting/getty"
"github.com/apache/seata-go/pkg/remoting/processor/client"
"github.com/apache/seata-go/pkg/rm"
"github.com/apache/seata-go/pkg/rm/tcc"
"github.com/apache/seata-go/pkg/tm"
"github.com/apache/seata-go/pkg/util/log"
)

// Init seata client client
Expand Down
18 changes: 9 additions & 9 deletions pkg/client/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ import (
"github.com/knadh/koanf/parsers/yaml"
"github.com/knadh/koanf/providers/rawbytes"

"github.com/seata/seata-go/pkg/discovery"

"github.com/seata/seata-go/pkg/datasource/sql"
"github.com/seata/seata-go/pkg/datasource/sql/undo"
remoteConfig "github.com/seata/seata-go/pkg/remoting/config"
"github.com/seata/seata-go/pkg/rm"
"github.com/seata/seata-go/pkg/rm/tcc"
"github.com/seata/seata-go/pkg/tm"
"github.com/seata/seata-go/pkg/util/flagext"
"github.com/apache/seata-go/pkg/discovery"

"github.com/apache/seata-go/pkg/datasource/sql"
"github.com/apache/seata-go/pkg/datasource/sql/undo"
remoteConfig "github.com/apache/seata-go/pkg/remoting/config"
"github.com/apache/seata-go/pkg/rm"
"github.com/apache/seata-go/pkg/rm/tcc"
"github.com/apache/seata-go/pkg/tm"
"github.com/apache/seata-go/pkg/util/flagext"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion pkg/compressor/deflate_compress.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"compress/flate"
"io"

"github.com/seata/seata-go/pkg/util/log"
"github.com/apache/seata-go/pkg/util/log"
)

type DeflateCompress struct{}
Expand Down
2 changes: 1 addition & 1 deletion pkg/datasource/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package datasource

import (
"github.com/seata/seata-go/pkg/datasource/sql"
"github.com/apache/seata-go/pkg/datasource/sql"
)

func Init() {
Expand Down
12 changes: 6 additions & 6 deletions pkg/datasource/sql/async_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ import (
"flag"
"time"

"github.com/seata/seata-go/pkg/rm"
"github.com/apache/seata-go/pkg/rm"

"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"

"github.com/seata/seata-go/pkg/datasource/sql/datasource"
"github.com/seata/seata-go/pkg/datasource/sql/undo"
"github.com/seata/seata-go/pkg/protocol/branch"
"github.com/seata/seata-go/pkg/util/fanout"
"github.com/seata/seata-go/pkg/util/log"
"github.com/apache/seata-go/pkg/datasource/sql/datasource"
"github.com/apache/seata-go/pkg/datasource/sql/undo"
"github.com/apache/seata-go/pkg/protocol/branch"
"github.com/apache/seata-go/pkg/util/fanout"
"github.com/apache/seata-go/pkg/util/log"
)

type phaseTwoContext struct {
Expand Down
12 changes: 6 additions & 6 deletions pkg/datasource/sql/at_resource_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ import (

"github.com/prometheus/client_golang/prometheus"

"github.com/seata/seata-go/pkg/datasource/sql/datasource"
"github.com/seata/seata-go/pkg/datasource/sql/types"
"github.com/seata/seata-go/pkg/datasource/sql/undo"
"github.com/seata/seata-go/pkg/protocol/branch"
"github.com/seata/seata-go/pkg/rm"
serr "github.com/seata/seata-go/pkg/util/errors"
"github.com/apache/seata-go/pkg/datasource/sql/datasource"
"github.com/apache/seata-go/pkg/datasource/sql/types"
"github.com/apache/seata-go/pkg/datasource/sql/undo"
"github.com/apache/seata-go/pkg/protocol/branch"
"github.com/apache/seata-go/pkg/rm"
serr "github.com/apache/seata-go/pkg/util/errors"
)

func InitAT(cfg undo.Config, asyncCfg AsyncWorkerConfig) {
Expand Down
6 changes: 3 additions & 3 deletions pkg/datasource/sql/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (
"context"
"database/sql/driver"

"github.com/seata/seata-go/pkg/datasource/sql/exec"
"github.com/seata/seata-go/pkg/datasource/sql/types"
"github.com/seata/seata-go/pkg/datasource/sql/util"
"github.com/apache/seata-go/pkg/datasource/sql/exec"
"github.com/apache/seata-go/pkg/datasource/sql/types"
"github.com/apache/seata-go/pkg/datasource/sql/util"
)

// Conn is a connection to a database. It is not used concurrently
Expand Down
8 changes: 4 additions & 4 deletions pkg/datasource/sql/conn_at.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import (
gosql "database/sql"
"database/sql/driver"

"github.com/seata/seata-go/pkg/datasource/sql/exec"
"github.com/seata/seata-go/pkg/datasource/sql/types"
"github.com/seata/seata-go/pkg/tm"
"github.com/seata/seata-go/pkg/util/log"
"github.com/apache/seata-go/pkg/datasource/sql/exec"
"github.com/apache/seata-go/pkg/datasource/sql/types"
"github.com/apache/seata-go/pkg/tm"
"github.com/apache/seata-go/pkg/util/log"
)

// ATConn Database connection proxy object under XA transaction model
Expand Down
10 changes: 5 additions & 5 deletions pkg/datasource/sql/conn_at_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ import (
"github.com/google/uuid"
"github.com/stretchr/testify/assert"

"github.com/seata/seata-go/pkg/datasource/sql/exec"
"github.com/seata/seata-go/pkg/datasource/sql/mock"
"github.com/seata/seata-go/pkg/datasource/sql/types"
"github.com/seata/seata-go/pkg/protocol/branch"
"github.com/seata/seata-go/pkg/tm"
"github.com/apache/seata-go/pkg/datasource/sql/exec"
"github.com/apache/seata-go/pkg/datasource/sql/mock"
"github.com/apache/seata-go/pkg/datasource/sql/types"
"github.com/apache/seata-go/pkg/protocol/branch"
"github.com/apache/seata-go/pkg/tm"
)

func TestMain(m *testing.M) {
Expand Down
8 changes: 4 additions & 4 deletions pkg/datasource/sql/conn_xa.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ import (
"fmt"
"time"

"github.com/seata/seata-go/pkg/datasource/sql/types"
"github.com/seata/seata-go/pkg/datasource/sql/xa"
"github.com/seata/seata-go/pkg/tm"
"github.com/seata/seata-go/pkg/util/log"
"github.com/apache/seata-go/pkg/datasource/sql/types"
"github.com/apache/seata-go/pkg/datasource/sql/xa"
"github.com/apache/seata-go/pkg/tm"
"github.com/apache/seata-go/pkg/util/log"
)

var xaConnTimeout time.Duration
Expand Down
10 changes: 5 additions & 5 deletions pkg/datasource/sql/conn_xa_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ import (
"github.com/google/uuid"
"github.com/stretchr/testify/assert"

"github.com/seata/seata-go/pkg/datasource/sql/exec"
"github.com/seata/seata-go/pkg/datasource/sql/mock"
"github.com/seata/seata-go/pkg/datasource/sql/types"
"github.com/seata/seata-go/pkg/protocol/branch"
"github.com/seata/seata-go/pkg/tm"
"github.com/apache/seata-go/pkg/datasource/sql/exec"
"github.com/apache/seata-go/pkg/datasource/sql/mock"
"github.com/apache/seata-go/pkg/datasource/sql/types"
"github.com/apache/seata-go/pkg/protocol/branch"
"github.com/apache/seata-go/pkg/tm"
)

type mysqlMockRows struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/datasource/sql/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

"github.com/go-sql-driver/mysql"

"github.com/seata/seata-go/pkg/datasource/sql/types"
"github.com/apache/seata-go/pkg/datasource/sql/types"
)

type seataATConnector struct {
Expand Down
8 changes: 4 additions & 4 deletions pkg/datasource/sql/connector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ import (
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"

"github.com/seata/seata-go/pkg/datasource/sql/mock"
"github.com/seata/seata-go/pkg/datasource/sql/types"
"github.com/seata/seata-go/pkg/protocol/branch"
"github.com/seata/seata-go/pkg/util/reflectx"
"github.com/apache/seata-go/pkg/datasource/sql/mock"
"github.com/apache/seata-go/pkg/datasource/sql/types"
"github.com/apache/seata-go/pkg/protocol/branch"
"github.com/apache/seata-go/pkg/util/reflectx"
)

type initConnectorFunc func(t *testing.T, ctrl *gomock.Controller) driver.Connector
Expand Down
2 changes: 1 addition & 1 deletion pkg/datasource/sql/datasource/base/meta_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"sync"
"time"

"github.com/seata/seata-go/pkg/datasource/sql/types"
"github.com/apache/seata-go/pkg/datasource/sql/types"
)

type (
Expand Down
6 changes: 3 additions & 3 deletions pkg/datasource/sql/datasource/datasource_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"fmt"
"sync"

"github.com/seata/seata-go/pkg/datasource/sql/types"
"github.com/seata/seata-go/pkg/protocol/branch"
"github.com/seata/seata-go/pkg/rm"
"github.com/apache/seata-go/pkg/datasource/sql/types"
"github.com/apache/seata-go/pkg/protocol/branch"
"github.com/apache/seata-go/pkg/rm"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions pkg/datasource/sql/datasource/mysql/meta_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"sync"
"time"

"github.com/seata/seata-go/pkg/datasource/sql/datasource/base"
"github.com/seata/seata-go/pkg/datasource/sql/types"
"github.com/apache/seata-go/pkg/datasource/sql/datasource/base"
"github.com/apache/seata-go/pkg/datasource/sql/types"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions pkg/datasource/sql/datasource/mysql/trigger.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (

"github.com/pkg/errors"

"github.com/seata/seata-go/pkg/datasource/sql/types"
"github.com/seata/seata-go/pkg/datasource/sql/undo/executor"
"github.com/apache/seata-go/pkg/datasource/sql/types"
"github.com/apache/seata-go/pkg/datasource/sql/undo/executor"
)

type mysqlTrigger struct {
Expand Down
14 changes: 7 additions & 7 deletions pkg/datasource/sql/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ import (
"fmt"
"sync"

"github.com/seata/seata-go/pkg/datasource/sql/datasource"
"github.com/seata/seata-go/pkg/datasource/sql/types"
"github.com/seata/seata-go/pkg/datasource/sql/undo"
"github.com/seata/seata-go/pkg/datasource/sql/util"
"github.com/seata/seata-go/pkg/datasource/sql/xa"
"github.com/seata/seata-go/pkg/protocol/branch"
"github.com/seata/seata-go/pkg/util/log"
"github.com/apache/seata-go/pkg/datasource/sql/datasource"
"github.com/apache/seata-go/pkg/datasource/sql/types"
"github.com/apache/seata-go/pkg/datasource/sql/undo"
"github.com/apache/seata-go/pkg/datasource/sql/util"
"github.com/apache/seata-go/pkg/datasource/sql/xa"
"github.com/apache/seata-go/pkg/protocol/branch"
"github.com/apache/seata-go/pkg/util/log"
)

type dbOption func(db *DBResource)
Expand Down
12 changes: 6 additions & 6 deletions pkg/datasource/sql/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ import (

"github.com/go-sql-driver/mysql"

"github.com/seata/seata-go/pkg/datasource/sql/datasource"
mysql2 "github.com/seata/seata-go/pkg/datasource/sql/datasource/mysql"
"github.com/seata/seata-go/pkg/datasource/sql/types"
"github.com/seata/seata-go/pkg/datasource/sql/util"
"github.com/seata/seata-go/pkg/protocol/branch"
"github.com/seata/seata-go/pkg/util/log"
"github.com/apache/seata-go/pkg/datasource/sql/datasource"
mysql2 "github.com/apache/seata-go/pkg/datasource/sql/datasource/mysql"
"github.com/apache/seata-go/pkg/datasource/sql/types"
"github.com/apache/seata-go/pkg/datasource/sql/util"
"github.com/apache/seata-go/pkg/protocol/branch"
"github.com/apache/seata-go/pkg/util/log"
)

const (
Expand Down
8 changes: 4 additions & 4 deletions pkg/datasource/sql/driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ import (
"reflect"
"testing"

"github.com/seata/seata-go/pkg/rm"
"github.com/apache/seata-go/pkg/rm"

"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"

"github.com/seata/seata-go/pkg/datasource/sql/mock"
"github.com/seata/seata-go/pkg/protocol/branch"
"github.com/seata/seata-go/pkg/util/reflectx"
"github.com/apache/seata-go/pkg/datasource/sql/mock"
"github.com/apache/seata-go/pkg/protocol/branch"
"github.com/apache/seata-go/pkg/util/reflectx"
)

func initMockResourceManager(branchType branch.BranchType, ctrl *gomock.Controller) *mock.MockDataSourceManager {
Expand Down
Loading
Loading