Age | Commit message (Collapse) | Author |
|
As the metrics detected by Prometheus in cgroups V1 and V2
are basically the same but slightly different, the initialization
of all V1/V2 metrics is put into metrics.go. This makes the
code cleaner and easier to observe the differences between
the detection meterics of V1 and V2.
Signed-off-by: ZheNing Hu <adlternative@gmail.com>
|
|
Due to the lack of cgroup V2 support in Gitaly, some operating systems
that use cgroup V2 may not be able to use cgroups in Gitaly properly.
Therefore, this patch adds support for cgroup V2 in Gitaly, which maintains
a similar interface to cgroup V1 but removes the
"gitaly_cgroup_memory_reclaim_attempts_total" metric and modifies the label
of the "gitaly_cgroup_procs_total" metric compared to V1.
Signed-off-by: ZheNing Hu <adlternative@gmail.com>
|
|
We're preparing to add V2 implementation for cgroup. Since
cgroup V1 and V2 have similar implementation logic, we've
extracted the common logic into the cgroupHandler interface,
and implemented CGroupManager that satisfies the original
Manager interface, which internally uses the cgroupHandler
interface. Currently, only V1 implementation is available.
To be compatible with non-Linux environments, we've added
a Noop CgroupManger implementation in manager.go by specifying
a build tag for non-Linux operating systems. We've also
ensured that the existing multiple test files can only run
on Linux by specifying the linux operating system in the build tags.
Signed-off-by: ZheNing Hu <adlternative@gmail.com>
|
|
Use HeadReference instead of GetDefaultBranch
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5988
Merged-by: Justin Tobler <jtobler@gitlab.com>
Approved-by: Justin Tobler <jtobler@gitlab.com>
Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Reviewed-by: Justin Tobler <jtobler@gitlab.com>
Co-authored-by: James Fargher <jfargher@gitlab.com>
|
|
operations: Replace git2go merge in squash with git-merge-tree
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5985
Merged-by: Justin Tobler <jtobler@gitlab.com>
Approved-by: Justin Tobler <jtobler@gitlab.com>
Reviewed-by: Justin Tobler <jtobler@gitlab.com>
Reviewed-by: karthik nayak <knayak@gitlab.com>
Co-authored-by: John Cai <jcai@gitlab.com>
|
|
go: Update module github.com/urfave/cli/v2 to v2.25.7
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5942
Merged-by: Sami Hiltunen <shiltunen@gitlab.com>
Approved-by: Sami Hiltunen <shiltunen@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
UserSquash only contains one git2go call, a merge. We already have
a helper function merge() that uses Git plumbing commands. Use a feature
flag to gate switching the merge over to the git plumbing commands to
remove all Git2Go usage in this RPC.
|
|
merge-tree: Fix length checking for conflict parsing
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5992
Merged-by: karthik nayak <knayak@gitlab.com>
Approved-by: karthik nayak <knayak@gitlab.com>
Reviewed-by: karthik nayak <knayak@gitlab.com>
Co-authored-by: Xing Xin <xingxin.xx@bytedance.com>
|
|
Implement RestoreRepository RPC
Closes #4939
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5968
Merged-by: Sami Hiltunen <shiltunen@gitlab.com>
Approved-by: karthik nayak <knayak@gitlab.com>
Approved-by: Sami Hiltunen <shiltunen@gitlab.com>
Reviewed-by: Sami Hiltunen <shiltunen@gitlab.com>
Reviewed-by: karthik nayak <knayak@gitlab.com>
Co-authored-by: James Fargher <jfargher@gitlab.com>
|
|
praefect: Introduce `GetObjectPoolHandler()`
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5928
Merged-by: Sami Hiltunen <shiltunen@gitlab.com>
Approved-by: Sami Hiltunen <shiltunen@gitlab.com>
Reviewed-by: Sami Hiltunen <shiltunen@gitlab.com>
Co-authored-by: Justin Tobler <jtobler@gitlab.com>
|
|
featureflag: Remove Git v2.41 flag
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5976
Merged-by: karthik nayak <knayak@gitlab.com>
Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Approved-by: karthik nayak <knayak@gitlab.com>
Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Reviewed-by: Justin Tobler <jtobler@gitlab.com>
Co-authored-by: Justin Tobler <jtobler@gitlab.com>
|
|
The length checking for conflicting file parsing can not protect us from
a out-of-range panic if we received malformed output from git, though it
can hardly happen.
Signed-off-by: Xing Xin <xingxin.xx@bytedance.com>
|
|
Bump Go to 1.20.5
Closes #5416
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5987
Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Approved-by: Will Chandler <wchandler@gitlab.com>
Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Co-authored-by: Robert Marshall <rmarshall@gitlab.com>
|
|
|
|
The restore logic itself is already tested with backup.Manager. The
tests here are only smoke tests and to ensure that the vanity repository
works through praefect.
|
|
|
|
Add an RPC that restores a repository server-side, directly from
object-storage. Object storage must be configured in
config.backup.go_cloud_url
Changelog: added
|
|
The vanity repository allows using a different repository to calculate
repository paths from the repository that is being restored. This will
be used for praefect requests where the repository being restored gets
rewritten. So for praefect we accept the original, not rewritten
repository, such that backups are stored based on the praefect path, and
use the rewritten repository to access the git repository.
|
|
Now that we have a precise way to read HEAD from repositories, there is
no need to use the GetDefaultBranch heuristic.
|
|
Now that we have a precise way to read HEAD from repositories, there is
no need to use the GetDefaultBranch heuristic.
|
|
Now that we have a precise method to read HEAD, there is no need to use
the heuristic in GetDefaultBranch in tests.
|
|
HeadReference is a replacement for GetDefaultBranch. The intention
is to replace and remove the default branch heuristic that
GetDefaultBranch uses and instead rely solely on HEAD.
This could have been implemented as a parameter on GetDefaultBranch but
this requires modifying all call sites and localrepo already has a
method called HeadReference for this purpose.
|
|
The `GetObjectPool()` RPC should return object pool information that can
be consumed by the client. When this Gitaly RPC is executed behind
Praefect, the replica path is returned instead of the relative path. The
replica path is an implementation detail of Praefect and not useful to
the client which really wants the relative path.
This change implements a `GetObjectPoolHandler()` to explicitly handle
the `GetObjectPool()` RPC in Praefect instead of relying on the
`UnknownServiceHandler` to proxy the RPC. This enables the RPC's
response replica path to be reversed by Praefect to the appropriate
relative path and storage the client expects.
|
|
In a future commit, a Praefect stream handler will be registered for the
`GetObjectPool()` RPC. This handler will need to use `praefect.Router`
to handle routing the RPC to the appropriate node.
Make the necessary adjustments to wire `praefect.Router` to
`NewGRPCServer()` where the new stream handler will be registered in the
future.
|
|
With the feature flag now removed, update the Makefile's default Git
version from v2.40 to v2.41.
|
|
Now that Git v2.41 is the default bundled execution environment, remove
Git v2.40.
|
|
Add @gerardo to Gitaly support request template
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5994
Merged-by: Mark Wood <mwood@gitlab.com>
Approved-by: Mark Wood <mwood@gitlab.com>
Co-authored-by: Andras Horvath <ahorvath@gitlab.com>
|
|
|
|
|
|
|
|
|
|
hooks: Default-enable synchronized hook executions
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5989
Merged-by: Pavlo Strokov <pstrokov@gitlab.com>
Approved-by: Pavlo Strokov <pstrokov@gitlab.com>
Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
|
|
praefect/coordinator: Unify ErrRepositoryNotSet errors with Gitaly
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5975
Merged-by: Pavlo Strokov <pstrokov@gitlab.com>
Approved-by: Pavlo Strokov <pstrokov@gitlab.com>
Reviewed-by: karthik nayak <knayak@gitlab.com>
Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
|
|
|
|
|
|
|
|
Extend GetCommitSignatures to return Signer
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5961
Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Reviewed-by: Igor Drozdov <idrozdov@gitlab.com>
Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Reviewed-by: Will Chandler <wchandler@gitlab.com>
Co-authored-by: Igor Drozdov <idrozdov@gitlab.com>
|
|
In 38e01406b (gitaly/hook: Fix packed-refs lock contention by
synchronizing hooks, 2023-06-13), we have added logic to synchronize the
execution of hooks across the primary and secondary Gitaly nodes. This
is required in order to avoid locking references on the secondaries
while the primary is still busy executing the hook logic.
We have rolled out this change into production systems without any
observed issues so far. Given that this feature flag concerns voting
logic that needs to be the same across all Gitaly nodes we cannot remove
the feature flag immediately though. Instead, we have to release it as
default-enabled first before we can actually remove the flag altogether.
Like this, Praefect continues to decide whether the new voting logic is
being used as it will inject the current flag value into all RPC calls
to Gitaly nodes.
|
|
|
|
We're about to default-enable transactional synchronization of hook
executions, which will cause both primary and secondary to cast an
additional vote after hooks have been executed by the primary node. This
will cause one of our tests in `cmd/gitaly-hooks` to fail because it
ain't got a transaction manager set up.
Prepare for this change by explicitly testing transactional logic, too.
|
|
template: Update `Rollout Git version` template
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5981
Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Co-authored-by: Justin Tobler <jtobler@gitlab.com>
|
|
This field indicates whether the commit signature has
been signed by a user or by the system
|
|
This function verifies the signature and checks whether it's
been signed by the signing key
|
|
|
|
go: Update module github.com/hashicorp/golang-lru/v2 to v2.0.4
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5983
Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Approved-by: John Cai <jcai@gitlab.com>
Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
|
|
go: Update module github.com/opencontainers/runtime-spec to v1.1.0-rc.3
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5940
Merged-by: John Cai <jcai@gitlab.com>
Approved-by: karthik nayak <knayak@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
go: Update module github.com/rubenv/sql-migrate to v1.5.0
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5965
Merged-by: John Cai <jcai@gitlab.com>
Approved-by: Christian Couder <chriscool@tuxfamily.org>
Approved-by: John Cai <jcai@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
go: Update golang.org/x/exp digest to 97b1e66
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5977
Merged-by: John Cai <jcai@gitlab.com>
Approved-by: Justin Tobler <jtobler@gitlab.com>
Approved-by: John Cai <jcai@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
go: Update module github.com/jackc/pgx/v5 to v5.4.1
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5967
Merged-by: Will Chandler <wchandler@gitlab.com>
Approved-by: John Cai <jcai@gitlab.com>
Approved-by: Will Chandler <wchandler@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|