Age | Commit message (Collapse) | Author |
|
This implements tooling to import a Git repository into Neo4J in
order to prototype how a query language would work with Git data and
how we'd model the data.
|
|
ci: Update to macOS M1 runners
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5881
Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Approved-by: Sami Hiltunen <shiltunen@gitlab.com>
|
|
mod: Update logrus to v1.9.3
Closes #5092
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5877
Merged-by: karthik nayak <knayak@gitlab.com>
Approved-by: Toon Claes <toon@gitlab.com>
|
|
storage: Refactor code to contain knowledge of repo paths in a single package
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5863
Merged-by: Toon Claes <toon@gitlab.com>
Approved-by: Toon Claes <toon@gitlab.com>
Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Reviewed-by: Pavlo Strokov <pstrokov@gitlab.com>
Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
|
|
objectpool: Refactor alternates file parsing
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5871
Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Reviewed-by: Justin Tobler <jtobler@gitlab.com>
Co-authored-by: Justin Tobler <jtobler@gitlab.com>
|
|
Fixed: UserMergeBranch loses error messages from the merge operation
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5777
Merged-by: James Fargher <proglottis@gmail.com>
Approved-by: James Fargher <proglottis@gmail.com>
Reviewed-by: James Fargher <proglottis@gmail.com>
Reviewed-by: OK_MF <oski.kervinen@m-files.com>
Co-authored-by: Oski Kervinen <oski.kervinen@m-files.com>
|
|
'5036-introduce-structured-error-definitions-for-gettreeentries' into 'master'
proto: Add new message `GetTreeEntriesError`
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5827
Merged-by: karthik nayak <knayak@gitlab.com>
Approved-by: Christian Couder <chriscool@tuxfamily.org>
Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Reviewed-by: karthik nayak <knayak@gitlab.com>
|
|
GitLab has recently deprecated the Intel-based macOS runners. As we are
still using them as part of our pipeline the consequence is that the
pipelines are now broken.
Fix this by updating to the new M1 runners.
|
|
With the move to M1-based macOS runners the Postgres database directory
is about to be moved. Instead of relying on any hardcoded locations,
let's convert the CI job to initialize our own database at a location
controlled by us.
|
|
The latest release of logrus (v1.9.3) contains a fix for the panic in
the Writer. Let us update to the new version.
|
|
|
|
Currently `Disconnect()` implements its own means to parse a Git
alternates file. This change refactors `Disconnect()` to use the already
existing `stats.AlternatesInfoForRepository()`, which is much more
thorough, to handle the parsing instead.
|
|
|
|
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>
|
|
Many of the tests to determine pool repositories are duplicated across
the functions to check for either a Praefect-based or Rails-based pool
path. Let's refactor them to instead test both functions from a single
set of test cases.
|
|
Same as the preceding commit, this commit moves the knowledge around
pool paths from the stats package into the storage package. This ensures
that all knowledge around repository paths is neatly contained in a
single file.
|
|
The praefectutil package contains a set of functions that compute and
classify repository paths for Praefect's rewritten replica paths. They
had to be split out into a separate package given that they're also used
by Gitaly code in order to figure out whether a repository is an object
pool or not. Furthermore, the code to figure out whether a repository is
an object pool or not is also partially contained in the stats package,
which adds even more to the confusion as it is now split up across
multiple packages.
Move the computations for Praefect paths into our storage package. This
makes for a better fit as this package should be the only source of
truth for where repositories are located anyway, and is already used by
both Praefect and Gitaly.
The next commit will also move the code from the stats package in here
to make the knowledge neatly contained in a single place.
|
|
Move the `RepoPathEqual()` helper function into the storage module. This
is a more natural fit given that the functionality acts on the storage
repository interface and contains knowledge around storage paths.
|
|
The `repository.GitRepo` interface provides a set of functions that
allow us to locate a repository in our storage. It lives in a separate
package outside of the `internal/git` module in order to avoid a set of
cyclic dependencies. The current location is kind of weird though, as
this interface is inherently tied to our storage details instead of
being a generic Git thing.
Move the definition of the interface into `internal/gitaly/storage` so
that it is defined close to where it is used. This should also be a
relatively safe location as any package that depends on the interface
should implicitly already depend on the storage package given that it
will typically be passed down into any kind of storage locator.
While at it, rename it to `storage.Repository`.
|
|
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
|
|
To provide structured errors in the GetTreeEntries RPC, we introduce a
new message `GetTreeEntriesError`. This will be used in the subsequent
commits.
We also create `PathError` as a more generic error type in
`proto/errors.proto` which allows us to define errors related to the
provided path.
|
|
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
|