Age | Commit message (Collapse) | Author |
|
|
|
See https://gitlab.com/gitlab-org/gitlab/-/issues/282424
|
|
This adds an option to perform a rebase prior to performing the merge,
effectively turning it in to a semi-linear merge. This is part of
supporting semi-linear merges for merge trains.
See https://gitlab.com/gitlab-org/gitlab/-/issues/413103
Changelog: added
|
|
|
|
|
|
Implement restores in backup.Repository
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5844
Merged-by: Toon Claes <toon@gitlab.com>
Approved-by: Toon Claes <toon@gitlab.com>
Reviewed-by: Will Chandler <wchandler@gitlab.com>
Co-authored-by: James Fargher <jfargher@gitlab.com>
|
|
praefect: Migrate track-repositories sub-command
Closes #5001
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5834
Merged-by: Sami Hiltunen <shiltunen@gitlab.com>
Approved-by: Sami Hiltunen <shiltunen@gitlab.com>
Approved-by: Will Chandler <wchandler@gitlab.com>
Reviewed-by: Will Chandler <wchandler@gitlab.com>
Reviewed-by: Sami Hiltunen <shiltunen@gitlab.com>
Co-authored-by: Pavlo Strokov <pstrokov@gitlab.com>
|
|
[ci skip]
|
|
[ci skip]
|
|
tools/goimports: Update module golang.org/x/tools to v0.9.3
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5872
Merged-by: karthik nayak <knayak@gitlab.com>
Approved-by: karthik nayak <knayak@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
tools/golangci-lint: Update module golang.org/x/tools to v0.9.3
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5873
Merged-by: karthik nayak <knayak@gitlab.com>
Approved-by: karthik nayak <knayak@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
git: Wire up Git v2.41 execution environment
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5874
Merged-by: karthik nayak <knayak@gitlab.com>
Approved-by: karthik nayak <knayak@gitlab.com>
Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Co-authored-by: Justin Tobler <jtobler@gitlab.com>
|
|
[ci skip]
|
|
Wire up the Git v2.41 execution environment so that we can toggle
between the v2.40 and v2.41 release tracks.
|
|
Build and install a new bundled Git version for the v2.41 release track.
|
|
Error when double committing or rollbacking a transaction
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5841
Merged-by: Toon Claes <toon@gitlab.com>
Approved-by: Will Chandler <wchandler@gitlab.com>
Co-authored-by: Sami Hiltunen <shiltunen@gitlab.com>
|
|
template: Add template fot Git version upgrade
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5867
Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Reviewed-by: karthik nayak <knayak@gitlab.com>
Co-authored-by: Karthik Nayak <knayak@gitlab.com>
|
|
go: Update github.com/ProtonMail/go-crypto digest to 6f98819
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5849
Merged-by: Pavlo Strokov <pstrokov@gitlab.com>
Approved-by: Pavlo Strokov <pstrokov@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
go.mod: Update Badger to v4.1.0
Closes #4890
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5864
Merged-by: Sami Hiltunen <shiltunen@gitlab.com>
Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Approved-by: Sami Hiltunen <shiltunen@gitlab.com>
Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
|
|
Add a new issue template for the Git version upgrade. This should help
us streamline our Git updates more.
|
|
Apply logged pack files to repository without copying
Closes #5046
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5846
Merged-by: Sami Hiltunen <shiltunen@gitlab.com>
Approved-by: karthik nayak <knayak@gitlab.com>
Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Reviewed-by: Sami Hiltunen <shiltunen@gitlab.com>
Reviewed-by: karthik nayak <knayak@gitlab.com>
|
|
conflicts: Use resolved object IDs
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5869
Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Co-authored-by: Karthik Nayak <knayak@gitlab.com>
|
|
objectpool: Make alternates disconnection reusable
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5845
Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Reviewed-by: Justin Tobler <jtobler@gitlab.com>
Reviewed-by: karthik nayak <knayak@gitlab.com>
Co-authored-by: Justin Tobler <jtobler@gitlab.com>
|
|
Previously object pool disconnection was tested through its RPC tests.
Now that this logic has been factored out into `Disconnect()` testing
can be done at this layer. This change refactors the RPC tests to be
suitable for direct invocations of `Disconnect()`
|
|
The `DisconnectGitAlternates()` RPC handles disconnecting a repository
from an object pool. In the future, the `ReplicateRepository()` RPC will
need to also be capable of disconnecting a target repository from its
object pool when the source repository is not linked. This change
factors the object pool disconnection logic out of the RPC and moves it
into the `git/objectpool` package.
|
|
In `conflictFilesWithGitMergeTree` we replace the commit OID with the
filename. Currently we're using the OID from the request, but this could
be the shortened OID. Let's instead use the fully resolved OID.
|
|
|
|
|
|
Execution of any sub-commands should be possible to interrupt by
sending SIGINT signal to the process. It is so for all except the
'serve' command as it has its own handling mechanism.
|
|
Badger has bumped its major version from v3 series to v4. This bump is
mostly uninteresting, but there are two interesting changes in there:
- They have upgraded the minimum required Go version to 1.19. This
has kept us from upgrading Badger given that we still supported Go
1.18. This has changed with a17fb7823 (go.mod: Use Go 1.19 as
minimum required version, 2023-05-23) though, so we're unblocked
with the upgrade.
- They have changed their version schema from CalVer to SemVer,
meaning that future releases should be more indicative of real
major changes.
Other than that there are no real changes that would be interesting to
us.
|
|
|
|
Invocations of sub-command in test now use NewApp() function that has
all sub-commands registered on it and allows to verify more code for
each test.
Closes: #5001
|
|
If database close call producer an error it is now written into
App.ErrWriter instead of os.Stderr.
Part of: #5001
|
|
All sub-commands of Praefect were moved to a third party
urfave/cli/v2 library. The old helper functions and an interface
are removed as they are not used anymore.
Also, the help text generated by new library now contains information
about all sub-commands and doesn't need to be modified.
The 'serve' sub-command can now be restricted to disallow arguments
to be passed for it.
Part of: #5001
|
|
Migration of the 'track-repositories' sub-command from the old
implementation to the new approach with usage of the
third party urfave/cli/v2 third party library. The
invocation of the command remains the same, but it
has more descriptive representation when help is invoked.
Also, it is possible now to invoke help only for the
sub-command to see more details about it and its usage.
Part of: #5001
|
|
localrepo: Add tree modification helpers
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5567
Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Reviewed-by: James Fargher <proglottis@gmail.com>
Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Reviewed-by: karthik nayak <knayak@gitlab.com>
Co-authored-by: John Cai <jcai@gitlab.com>
|
|
TransactionManager is currently unpacking pack files in order to
apply them to the repository from the log. This is inefficient:
1. The objects are copied from the pack file when they are unpacked.
2. Accessing unpacked objects is less efficient than packed ones.
3. It's more work to repack the objects later.
To avoid these problems, this commit instead hard links the logged
pack files from the log to the repository. This is done as follows:
1. When staging the transaction, a pack file is computed that contains
objects that are newly reachable from the new reference tips. An
index is also computed for the pack file.
2. The pack file and its index are logged.
3. The pack file and the index are hard linked from the log directory
to the repository's 'objects/pack' directory.
The pack file and the index are logged with the name Git gives them, so
`pack-<digest>.{pack,idx}`. It would be simpler to log the files with
static names so they are always named the same for all transactions,
say `transaction.{pack,idx}`. They could then be linked to the repository's
object directory under the log entry's index, so for example
`objects/pack/<log_index>.{pack,idx}`. This would be simpler as we wouldn't
have to pipe the pack prefix through the log. The problem is that Git
doesn't seem to automatically remove these packs when it's doing a
full repack with `git repack -ad`. This would lead to the packs
accumulating in the repository. For that reason, we use the Git generated
names.
Applying pack files directly doesn't also come without downsides.
With each write resulting in an additional pack file in the repository,
looking up objects from the packs becomes slower. This is particularly
a problem if there are large number of small writes. We might want
to later have a look at using a threshold on the object count in the
pack to decide whether we apply it directly or unpack it similarly to
what Git does when receiving packs. We'll leave this for later though
once we know this is a problem.
|
|
The objects a transaction makes reachable are collected into a pack
file that then ultimately gets logged. On log applicaton that pack
file is currently unpacked into the repository. A more efficient way
to apply the pack file would be to hard link it into the repository
directly from the log to avoid copying. In order for the objects to
be available for reading, the pack file needs an index which we're
currently not computing. To prepare for linking the pack files into
place, this commit computes an index for the transaction's pack file
prior to logging the transaction. The index is already logged along
side the pack file but we don't yet make use of it.
|
|
We're soon about to write packs to the disk through index-pack. This
stores the packs with 0o444 permissions. Add a constant for the new
permission type.
|
|
Depending on the file in question, one might want to do assertions
not only based on the file's content but input. This is the case
for example when asserting pack file indexes are correct. We don't
really care about the content of the actual file but we want to make
sure it's a valid index for a given pack. Provide the path in the
ParseContent method to make it easier to distinguish which file is
being parsed.
|
|
We'll soon need to use index-pack to compute pack file indexes in
TranscationManager. Add a command description for it.
|
|
Each transaction has a staging directory where they can stage files
for commit. Currently it is used to store two things.
- stagingDir/quarantine stores the transaction's quarantine directory.
This is where all the RPC handlers write the git objects prior while
staging the transaction prior to a commit.
- stagingdir/transaction.pack is created right before committing the
transaction to create a pack file that can be logged.
The current assumption is that we're only ever logging a single file,
which is the pack file containing the transaction's objects. However,
there are other files we could want to log along the pack file. For
example, we could compute and log the pack file's index to avoid having
to do so when applying the log entry.
This commit changes the transaction.pack to be placed in
stagingDir/wal-files/transaction.pack. Instead of logging only the pack
file, we log the entire wal-files directory. This makes room for logging
other files alongside the pack file as well.
There's no changes in external behavior.
|
|
go: Update module github.com/pelletier/go-toml/v2 to v2.0.8
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5855
Merged-by: James Fargher <proglottis@gmail.com>
Approved-by: Will Chandler <wchandler@gitlab.com>
Approved-by: James Fargher <proglottis@gmail.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
Now that both backup and restore are implemented, we can move updating
server info from context to only be set on remote repositories. Since
local repositories do not connect, server info is always unused.
|
|
Now that all the required methods are implemented for restores we can
test both implementations.
|
|
In preparation for server-side backup restores here we extract the RPC
implementation of set custom hooks and additionally add a local
implementation.
|
|
In preparation for server-side backups here we extract the RPC
implementation of fetch bundle and additionally implement a local
repository fetch bundle.
|
|
In preparation for server-side backups here we extract the RPC
implementation of create repository and add a corresponding server-side
implementation.
|
|
In preparation of supporting server-side backup restores, here we add
both RPC and server-side implementations for remove repository.
|
|
For server-side backups we will need to have access to the git command
factory and transaction manager in order to restore repositories.
|