Skip to content
Merged
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 Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ RUN --mount=type=cache,target=/go/pkg/mod go mod download

COPY . .
RUN --mount=type=cache,target=/root/.cache/go-build \
go build -trimpath -ldflags "-s -w -X lvmsync_go/internal/config.BuildVersion=${GIT_SHA}" -o /out/${BIN} ${BUILD_PATH} && \
go build -trimpath -ldflags "-s -w -X github.com/oferchen/lvmsync_go/internal/config.BuildVersion=${GIT_SHA}" -o /out/${BIN} ${BUILD_PATH} && \

# 2) Strip
# checkov:skip=CKV_DOCKER_7: we intentionally track Alpine latest for this stage
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.distroless
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ RUN --mount=type=cache,target=/go/pkg/mod go mod download

COPY . .
RUN --mount=type=cache,target=/root/.cache/go-build \
go build -trimpath -ldflags "-s -w -X lvmsync_go/internal/config.BuildVersion=${GIT_SHA}" -o /out/${BIN} ${BUILD_PATH}
go build -trimpath -ldflags "-s -w -X github.com/oferchen/lvmsync_go/internal/config.BuildVersion=${GIT_SHA}" -o /out/${BIN} ${BUILD_PATH}

# 2) Runtime
FROM gcr.io/distroless/base-debian12:nonroot
Expand Down
6 changes: 3 additions & 3 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (

"go.uber.org/zap"

signalspkg "lvmsync_go/cmd/lvmsync/signals"
clientpkg "lvmsync_go/internal/client"
"lvmsync_go/internal/config"
signalspkg "github.com/oferchen/lvmsync_go/cmd/lvmsync/signals"
clientpkg "github.com/oferchen/lvmsync_go/internal/client"
"github.com/oferchen/lvmsync_go/internal/config"
)

type Runner struct {
Expand Down
4 changes: 2 additions & 2 deletions app/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (

"go.uber.org/zap"

signalspkg "lvmsync_go/cmd/lvmsync/signals"
"lvmsync_go/internal/config"
signalspkg "github.com/oferchen/lvmsync_go/cmd/lvmsync/signals"
"github.com/oferchen/lvmsync_go/internal/config"
)

// Test SetupSignalHandling registers OS signals and spawns the handler goroutine.
Expand Down
4 changes: 2 additions & 2 deletions cmd/configdoc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"path/filepath"

"go.uber.org/zap"
rootcmd "lvmsync_go/cmd/root"
cfg "lvmsync_go/internal/config"
rootcmd "github.com/oferchen/lvmsync_go/cmd/root"
cfg "github.com/oferchen/lvmsync_go/internal/config"
)

type runner struct {
Expand Down
34 changes: 17 additions & 17 deletions cmd/dump/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@ import (
"go.uber.org/zap"
"golang.org/x/crypto/ssh"

rootcmd "lvmsync_go/cmd/root"
"lvmsync_go/common"
"lvmsync_go/device"
internalcommon "lvmsync_go/internal/common"
"lvmsync_go/internal/config"
cpufeatures "lvmsync_go/internal/cpufeatures"
digestpkg "lvmsync_go/internal/digest"
"lvmsync_go/internal/privilege"
"lvmsync_go/internal/rsyncwire"
"lvmsync_go/lvm"
"lvmsync_go/remote"
"lvmsync_go/transfer"
"lvmsync_go/transport"
_ "lvmsync_go/transport/h2"
_ "lvmsync_go/transport/quic"
_ "lvmsync_go/transport/ssh"
_ "lvmsync_go/transport/tcp_tls"
rootcmd "github.com/oferchen/lvmsync_go/cmd/root"
"github.com/oferchen/lvmsync_go/common"
"github.com/oferchen/lvmsync_go/device"
internalcommon "github.com/oferchen/lvmsync_go/internal/common"
"github.com/oferchen/lvmsync_go/internal/config"
cpufeatures "github.com/oferchen/lvmsync_go/internal/cpufeatures"
digestpkg "github.com/oferchen/lvmsync_go/internal/digest"
"github.com/oferchen/lvmsync_go/internal/privilege"
"github.com/oferchen/lvmsync_go/internal/rsyncwire"
"github.com/oferchen/lvmsync_go/lvm"
"github.com/oferchen/lvmsync_go/remote"
"github.com/oferchen/lvmsync_go/transfer"
"github.com/oferchen/lvmsync_go/transport"
_ "github.com/oferchen/lvmsync_go/transport/h2"
_ "github.com/oferchen/lvmsync_go/transport/quic"
_ "github.com/oferchen/lvmsync_go/transport/ssh"
_ "github.com/oferchen/lvmsync_go/transport/tcp_tls"
)

// ErrRemoteCommand indicates that execution of the remote command failed.
Expand Down
4 changes: 2 additions & 2 deletions cmd/dump/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
"go.uber.org/zap"
"go.uber.org/zap/zapcore"

"lvmsync_go/internal/config"
"lvmsync_go/transfer"
"github.com/oferchen/lvmsync_go/internal/config"
"github.com/oferchen/lvmsync_go/transfer"
)

// readerBlockingOnContext waits for ctx cancellation before returning.
Expand Down
4 changes: 2 additions & 2 deletions cmd/dump/compression_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package dump
import (
"testing"

cpufeatures "lvmsync_go/internal/cpufeatures"
"lvmsync_go/transfer"
cpufeatures "github.com/oferchen/lvmsync_go/internal/cpufeatures"
"github.com/oferchen/lvmsync_go/transfer"
)

func TestChooseCompressionExplicit(t *testing.T) {
Expand Down
8 changes: 4 additions & 4 deletions cmd/dump/create_dest_lv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (

"go.uber.org/zap"

"lvmsync_go/device"
"lvmsync_go/internal/config"
"lvmsync_go/lvm"
"lvmsync_go/transfer"
"github.com/oferchen/lvmsync_go/device"
"github.com/oferchen/lvmsync_go/internal/config"
"github.com/oferchen/lvmsync_go/lvm"
"github.com/oferchen/lvmsync_go/transfer"
)

func TestRunLocalDumpCreatesDestLV(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions cmd/dump/dump_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

"go.uber.org/zap"

"lvmsync_go/internal/config"
"lvmsync_go/transfer"
"github.com/oferchen/lvmsync_go/internal/config"
"github.com/oferchen/lvmsync_go/transfer"
)

func TestExecuteDumpSequential(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/dump/fake_device_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package dump
import (
"context"

"lvmsync_go/device"
"github.com/oferchen/lvmsync_go/device"
)

type fakeDevice struct {
Expand Down
4 changes: 2 additions & 2 deletions cmd/dump/force_offline_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (

"go.uber.org/zap"

rootcmd "lvmsync_go/cmd/root"
"lvmsync_go/internal/config"
rootcmd "github.com/oferchen/lvmsync_go/cmd/root"
"github.com/oferchen/lvmsync_go/internal/config"
)

func setupLoopDev(t *testing.T, size int64) (string, func()) {
Expand Down
6 changes: 3 additions & 3 deletions cmd/dump/local_dump_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (

"go.uber.org/zap"

"lvmsync_go/device"
"lvmsync_go/internal/config"
"lvmsync_go/transfer"
"github.com/oferchen/lvmsync_go/device"
"github.com/oferchen/lvmsync_go/internal/config"
"github.com/oferchen/lvmsync_go/transfer"
)

func TestRunLocalDumpSuccess(t *testing.T) {
Expand Down
10 changes: 5 additions & 5 deletions cmd/dump/probe.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import (
"github.com/zeebo/blake3"
"go.uber.org/zap"

"lvmsync_go/common"
"lvmsync_go/device"
"lvmsync_go/internal/config"
"lvmsync_go/internal/privilege"
manifestpkg "lvmsync_go/manifest"
"github.com/oferchen/lvmsync_go/common"
"github.com/oferchen/lvmsync_go/device"
"github.com/oferchen/lvmsync_go/internal/config"
"github.com/oferchen/lvmsync_go/internal/privilege"
manifestpkg "github.com/oferchen/lvmsync_go/manifest"
)

const firstBlockDigestSize = 1 << 20
Expand Down
6 changes: 3 additions & 3 deletions cmd/dump/probe_only_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"go.uber.org/zap"
"go.uber.org/zap/zaptest/observer"

"lvmsync_go/device"
"lvmsync_go/internal/config"
"lvmsync_go/internal/privilege"
"github.com/oferchen/lvmsync_go/device"
"github.com/oferchen/lvmsync_go/internal/config"
"github.com/oferchen/lvmsync_go/internal/privilege"
)

type sizedDevice struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/dump/raw_device_offline_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"go.uber.org/zap"

"lvmsync_go/internal/config"
"github.com/oferchen/lvmsync_go/internal/config"
)

func setupLoop(t *testing.T, size int64) (string, func()) {
Expand Down
8 changes: 4 additions & 4 deletions cmd/dump/remote_dump_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import (
"go.uber.org/zap"
"go.uber.org/zap/zaptest/observer"

"lvmsync_go/internal/config"
digestpkg "lvmsync_go/internal/digest"
remotetest "lvmsync_go/remote/testutil"
"lvmsync_go/transfer"
"github.com/oferchen/lvmsync_go/internal/config"
digestpkg "github.com/oferchen/lvmsync_go/internal/digest"
remotetest "github.com/oferchen/lvmsync_go/remote/testutil"
"github.com/oferchen/lvmsync_go/transfer"
)

// TestRunRemoteDump executes a remote command through SSH.
Expand Down
8 changes: 4 additions & 4 deletions cmd/dump/remote_helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (

"go.uber.org/zap"

"lvmsync_go/internal/config"
digestpkg "lvmsync_go/internal/digest"
"lvmsync_go/remote"
"lvmsync_go/transfer"
"github.com/oferchen/lvmsync_go/internal/config"
digestpkg "github.com/oferchen/lvmsync_go/internal/digest"
"github.com/oferchen/lvmsync_go/remote"
"github.com/oferchen/lvmsync_go/transfer"
)

func TestSetupSSHClient(t *testing.T) {
Expand Down
10 changes: 5 additions & 5 deletions cmd/dump/remote_script_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import (
"go.uber.org/zap"
"golang.org/x/crypto/ssh"

"lvmsync_go/device"
"lvmsync_go/internal/config"
"lvmsync_go/internal/privilege"
remotetest "lvmsync_go/remote/testutil"
"lvmsync_go/transfer"
"github.com/oferchen/lvmsync_go/device"
"github.com/oferchen/lvmsync_go/internal/config"
"github.com/oferchen/lvmsync_go/internal/privilege"
remotetest "github.com/oferchen/lvmsync_go/remote/testutil"
"github.com/oferchen/lvmsync_go/transfer"
)

// Test that remote post script executes even when dumpChanges fails
Expand Down
4 changes: 2 additions & 2 deletions cmd/dump/rsync_delta_allow_insecure_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"go.uber.org/zap"
"go.uber.org/zap/zaptest/observer"

"lvmsync_go/internal/config"
digestpkg "lvmsync_go/internal/digest"
"github.com/oferchen/lvmsync_go/internal/config"
digestpkg "github.com/oferchen/lvmsync_go/internal/digest"
)

type discardWriteCloser struct{ io.Writer }
Expand Down
10 changes: 5 additions & 5 deletions cmd/dump/rsync_delta_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ import (
"go.uber.org/zap"
"go.uber.org/zap/zaptest/observer"

"lvmsync_go/device"
"lvmsync_go/internal/config"
digestpkg "lvmsync_go/internal/digest"
"lvmsync_go/internal/rsyncwire"
"lvmsync_go/testutil/rsyncserver"
"github.com/oferchen/lvmsync_go/device"
"github.com/oferchen/lvmsync_go/internal/config"
digestpkg "github.com/oferchen/lvmsync_go/internal/digest"
"github.com/oferchen/lvmsync_go/internal/rsyncwire"
"github.com/oferchen/lvmsync_go/testutil/rsyncserver"
)

type countingConn struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/dump/rsync_import.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

package dump

import _ "lvmsync_go/transport/rsyncwire"
import _ "github.com/oferchen/lvmsync_go/transport/rsyncwire"
8 changes: 4 additions & 4 deletions cmd/dump/save_state_error_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
"go.uber.org/zap"
"go.uber.org/zap/zaptest/observer"

"lvmsync_go/device"
"lvmsync_go/internal/config"
"lvmsync_go/internal/privilege"
"lvmsync_go/transfer"
"github.com/oferchen/lvmsync_go/device"
"github.com/oferchen/lvmsync_go/internal/config"
"github.com/oferchen/lvmsync_go/internal/privilege"
"github.com/oferchen/lvmsync_go/transfer"
)

func TestRunLogsSaveStateError(t *testing.T) {
Expand Down
10 changes: 5 additions & 5 deletions cmd/dump/select_transport_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ import (
"go.uber.org/zap/zaptest"
"go.uber.org/zap/zaptest/observer"

"lvmsync_go/common"
"lvmsync_go/internal/config"
"lvmsync_go/transport"
_ "lvmsync_go/transport/rsyncwire"
_ "lvmsync_go/transport/ssh"
"github.com/oferchen/lvmsync_go/common"
"github.com/oferchen/lvmsync_go/internal/config"
"github.com/oferchen/lvmsync_go/transport"
_ "github.com/oferchen/lvmsync_go/transport/rsyncwire"
_ "github.com/oferchen/lvmsync_go/transport/ssh"
)

func TestSelectTransportNoConfig(t *testing.T) {
Expand Down
8 changes: 4 additions & 4 deletions cmd/dump/stdout_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (

"go.uber.org/zap"

"lvmsync_go/device"
"lvmsync_go/internal/config"
"lvmsync_go/internal/privilege"
"lvmsync_go/transfer"
"github.com/oferchen/lvmsync_go/device"
"github.com/oferchen/lvmsync_go/internal/config"
"github.com/oferchen/lvmsync_go/internal/privilege"
"github.com/oferchen/lvmsync_go/transfer"
)

func TestRunStdout(t *testing.T) {
Expand Down
10 changes: 5 additions & 5 deletions cmd/lvmsync/cobra.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ import (
"github.com/zeebo/xxh3"
"go.uber.org/zap"

rootcmd "lvmsync_go/cmd/root"
verifycmd "lvmsync_go/cmd/verify"
"lvmsync_go/internal/config"
"lvmsync_go/manifest"
"lvmsync_go/transfer"
rootcmd "github.com/oferchen/lvmsync_go/cmd/root"
verifycmd "github.com/oferchen/lvmsync_go/cmd/verify"
"github.com/oferchen/lvmsync_go/internal/config"
"github.com/oferchen/lvmsync_go/manifest"
"github.com/oferchen/lvmsync_go/transfer"
)

// RunOptions collects flags for the run command.
Expand Down
4 changes: 2 additions & 2 deletions cmd/lvmsync/cobra_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"path/filepath"
"testing"

"lvmsync_go/internal/config"
"lvmsync_go/manifest"
"github.com/oferchen/lvmsync_go/internal/config"
"github.com/oferchen/lvmsync_go/manifest"

"github.com/zeebo/blake3"
"github.com/zeebo/xxh3"
Expand Down
2 changes: 1 addition & 1 deletion cmd/lvmsync/estimate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"go.uber.org/zap"
"go.uber.org/zap/zaptest/observer"

"lvmsync_go/internal/config"
"github.com/oferchen/lvmsync_go/internal/config"
)

func TestEstimateTransferSuccess(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions cmd/lvmsync/signals/signals.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"github.com/spf13/pflag"
"go.uber.org/zap"

"lvmsync_go/internal/config"
"lvmsync_go/lvm"
"github.com/oferchen/lvmsync_go/internal/config"
"github.com/oferchen/lvmsync_go/lvm"
)

// Handler processes OS signals and performs cleanup.
Expand Down
2 changes: 1 addition & 1 deletion cmd/lvmsync/signals/signals_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"go.uber.org/zap"

"lvmsync_go/internal/config"
"github.com/oferchen/lvmsync_go/internal/config"
)

func TestHandleInterruptNoCleanup(t *testing.T) {
Expand Down
Loading
Loading