Inspect changes in Gitaly 4dd176cbbace0b22872fd82e94ea56713f8304ea
Upstream merge commit 1c75e5db185a changes Gitaly server version from 26f9b86f5d59e643b719b5ff15bb8e57d8ba599f to 4dd176cbbace0b22872fd82e94ea56713f8304ea, with changes in protocol or one of the source subtrees currently under watch.
To further inspect, go to an up to date Gitaly source clone and run
diff 26f9b86f5d59e643b719b5ff15bb8e57d8ba599f..4dd176cbbace0b22872fd82e94ea56713f8304ea -- proto/*.proto internal/backup
. Here is a preview, truncated at 500 lines:
diff --git a/internal/backup/backup.go b/internal/backup/backup.go
index 24843c534..cb02b31ca 100644
--- a/internal/backup/backup.go
+++ b/internal/backup/backup.go
@@ -12,6 +12,7 @@ import (
"gitlab.com/gitlab-org/gitaly/v16/internal/git/catfile"
"gitlab.com/gitlab-org/gitaly/v16/internal/git/localrepo"
"gitlab.com/gitlab-org/gitaly/v16/internal/gitaly/storage"
+ "gitlab.com/gitlab-org/gitaly/v16/internal/gitaly/storage/counter"
"gitlab.com/gitlab-org/gitaly/v16/internal/gitaly/transaction"
"gitlab.com/gitlab-org/gitaly/v16/proto/go/gitalypb"
)
@@ -153,6 +154,7 @@ func NewManagerLocal(
gitCmdFactory git.CommandFactory,
catfileCache catfile.Cache,
txManager transaction.Manager,
+ repoCounter *counter.RepositoryCounter,
) *Manager {
return &Manager{
sink: sink,
@@ -161,7 +163,7 @@ func NewManagerLocal(
repositoryFactory: func(ctx context.Context, repo *gitalypb.Repository, server storage.ServerInfo) (Repository, error) {
localRepo := localrepo.New(storageLocator, gitCmdFactory, catfileCache, repo)
- return newLocalRepository(storageLocator, gitCmdFactory, txManager, localRepo), nil
+ return newLocalRepository(storageLocator, gitCmdFactory, txManager, repoCounter, localRepo), nil
},
}
}
diff --git a/internal/backup/backup_test.go b/internal/backup/backup_test.go
index b6c0e6ab8..30184d771 100644
--- a/internal/backup/backup_test.go
+++ b/internal/backup/backup_test.go
@@ -20,6 +20,7 @@ import (
"gitlab.com/gitlab-org/gitaly/v16/internal/gitaly/config"
"gitlab.com/gitlab-org/gitaly/v16/internal/gitaly/service/setup"
"gitlab.com/gitlab-org/gitaly/v16/internal/gitaly/storage"
+ "gitlab.com/gitlab-org/gitaly/v16/internal/gitaly/storage/counter"
"gitlab.com/gitlab-org/gitaly/v16/internal/gitaly/transaction"
"gitlab.com/gitlab-org/gitaly/v16/internal/helper/perm"
"gitlab.com/gitlab-org/gitaly/v16/internal/testhelper"
@@ -69,6 +70,7 @@ func TestManager_Create(t *testing.T) {
cfg.SocketPath = testserver.RunGitalyServer(t, cfg, setup.RegisterAll)
ctx := testhelper.Context(t)
+ repoCounter := counter.NewRepositoryCounter()
for _, managerTC := range []struct {
desc string
@@ -98,7 +100,7 @@ func TestManager_Create(t *testing.T) {
tb.Cleanup(catfileCache.Stop)
txManager := transaction.NewTrackingManager()
- return backup.NewManagerLocal(sink, locator, storageLocator, gitCmdFactory, catfileCache, txManager)
+ return backup.NewManagerLocal(sink, locator, storageLocator, gitCmdFactory, catfileCache, txManager, repoCounter)
},
},
} {
@@ -228,6 +230,7 @@ func TestManager_Create_incremental(t *testing.T) {
cfg.SocketPath = testserver.RunGitalyServer(t, cfg, setup.RegisterAll)
ctx := testhelper.Context(t)
+ repoCounter := counter.NewRepositoryCounter()
for _, managerTC := range []struct {
desc string
@@ -257,7 +260,7 @@ func TestManager_Create_incremental(t *testing.T) {
tb.Cleanup(catfileCache.Stop)
txManager := transaction.NewTrackingManager()
- return backup.NewManagerLocal(sink, locator, storageLocator, gitCmdFactory, catfileCache, txManager)
+ return backup.NewManagerLocal(sink, locator, storageLocator, gitCmdFactory, catfileCache, txManager, repoCounter)
},
},
} {
@@ -374,6 +377,7 @@ func TestManager_Restore_latest(t *testing.T) {
cfg := testcfg.Build(t)
testcfg.BuildGitalyHooks(t, cfg)
cfg.SocketPath = testserver.RunGitalyServer(t, cfg, setup.RegisterAll)
+ repoCounter := counter.NewRepositoryCounter()
for _, managerTC := range []struct {
desc string
@@ -403,7 +407,7 @@ func TestManager_Restore_latest(t *testing.T) {
tb.Cleanup(catfileCache.Stop)
txManager := transaction.NewTrackingManager()
- return backup.NewManagerLocal(sink, locator, storageLocator, gitCmdFactory, catfileCache, txManager)
+ return backup.NewManagerLocal(sink, locator, storageLocator, gitCmdFactory, catfileCache, txManager, repoCounter)
},
},
} {
@@ -652,6 +656,7 @@ func TestManager_Restore_specific(t *testing.T) {
cfg := testcfg.Build(t)
testcfg.BuildGitalyHooks(t, cfg)
cfg.SocketPath = testserver.RunGitalyServer(t, cfg, setup.RegisterAll)
+ repoCounter := counter.NewRepositoryCounter()
for _, managerTC := range []struct {
desc string
@@ -681,7 +686,7 @@ func TestManager_Restore_specific(t *testing.T) {
tb.Cleanup(catfileCache.Stop)
txManager := transaction.NewTrackingManager()
- return backup.NewManagerLocal(sink, locator, storageLocator, gitCmdFactory, catfileCache, txManager)
+ return backup.NewManagerLocal(sink, locator, storageLocator, gitCmdFactory, catfileCache, txManager, repoCounter)
},
},
} {
diff --git a/internal/backup/repository.go b/internal/backup/repository.go
index 942e5b5dd..e93eaa00f 100644
--- a/internal/backup/repository.go
+++ b/internal/backup/repository.go
@@ -12,6 +12,7 @@ import (
"gitlab.com/gitlab-org/gitaly/v16/internal/git/localrepo"
"gitlab.com/gitlab-org/gitaly/v16/internal/gitaly/repoutil"
"gitlab.com/gitlab-org/gitaly/v16/internal/gitaly/storage"
+ "gitlab.com/gitlab-org/gitaly/v16/internal/gitaly/storage/counter"
"gitlab.com/gitlab-org/gitaly/v16/internal/gitaly/transaction"
"gitlab.com/gitlab-org/gitaly/v16/internal/helper/chunk"
"gitlab.com/gitlab-org/gitaly/v16/internal/structerr"
@@ -267,6 +268,7 @@ type localRepository struct {
locator storage.Locator
gitCmdFactory git.CommandFactory
txManager transaction.Manager
+ repoCounter *counter.RepositoryCounter
repo *localrepo.Repo
}
@@ -274,12 +276,14 @@ func newLocalRepository(
locator storage.Locator,
gitCmdFactory git.CommandFactory,
txManager transaction.Manager,
+ repoCounter *counter.RepositoryCounter,
repo *localrepo.Repo,
) *localRepository {
return &localRepository{
locator: locator,
gitCmdFactory: gitCmdFactory,
txManager: txManager,
+ repoCounter: repoCounter,
repo: repo,
}
}
@@ -348,7 +352,7 @@ func (r *localRepository) CreateBundle(ctx context.Context, out io.Writer, patte
// Remove removes the repository. Does not return an error if the repository
// cannot be found.
func (r *localRepository) Remove(ctx context.Context) error {
- err := repoutil.Remove(ctx, r.locator, r.txManager, r.repo)
+ err := repoutil.Remove(ctx, r.locator, r.txManager, r.repoCounter, r.repo)
switch {
case status.Code(err) == codes.NotFound:
return nil
@@ -365,6 +369,7 @@ func (r *localRepository) Create(ctx context.Context) error {
r.locator,
r.gitCmdFactory,
r.txManager,
+ r.repoCounter,
r.repo,
func(repository *gitalypb.Repository) error { return nil },
); err != nil {
diff --git a/proto/diff.proto b/proto/diff.proto
index 85ad1a3d9..585d6f4ba 100644
--- a/proto/diff.proto
+++ b/proto/diff.proto
@@ -77,8 +77,7 @@ message CommitDiffRequest {
// WhiteSpaceChanges states which whitespace changes we should ignore. These options correlate to
// the ones present in git-diff(1).
enum WhitespaceChanges {
- // WHITESPACE_CHANGES_UNSPECIFIED is used to not ignore any whitespace changes. This also defaults
- // to the value in the deprecated field `ignore_whitespace_change` to stay backward compatible.
+ // WHITESPACE_CHANGES_UNSPECIFIED is used to not ignore any whitespace changes.
WHITESPACE_CHANGES_UNSPECIFIED = 0;
// WHITESPACE_CHANGES_IGNORE specifies to use the `--ignore-space-change` flag of git-diff(1).
// Only changes in amount of whitespace are ignored.
@@ -95,7 +94,8 @@ message CommitDiffRequest {
// This comment is left unintentionally blank.
string right_commit_id = 3;
// This field is deprecated, use the `whitespace_changes` field instead.
- bool ignore_whitespace_change = 4 [deprecated=true];
+ reserved "ignore_whitespace_change";
+ reserved 4;
// This comment is left unintentionally blank.
repeated bytes paths = 5;
// This comment is left unintentionally blank.
A merge request may have already been submitted, check that on [merge commit commit](1c75e5db185a, as usually changes in Gitaly are not breaking, compliance becoming mandatory in the following development cycles.