Age | Commit message (Collapse) | Author |
|
In order to improve developers experience in using Gitaly
the new 'validate-configuration' is added. The purpose of
it to validate provided configuration before starting
the service. The output lists all the problems of the
configuration in JSON format into STDOUT. The structure
of object includes 'key' which is a path to the field
where the problem detected and the 'message' with an
explanation of the problem.
Changelog: added
Part of: https://gitlab.com/gitlab-org/gitaly/-/issues/4650
|
|
Tests for the 'check' sub-command now runs in parallel.
|
|
Call for 'testhelper.Run()' moved into a new testhelper_test.go
file as it is in most other cases.
|
|
The 'configurePackObjectsCache()' method now returns
'ValidationErrors'.
|
|
The 'validateCgroups()' method now returns 'ValidationErrors'.
The check for the CPUShares of the repository was mixed with
'MemoryBytes > 0' condition. It is fixed now and the test data
adjusted to catch such an issues in the future.
|
|
The 'validateMaintenance()' method now returns 'ValidationErrors'.
The 'name' is added into some test cases where it was missing.
|
|
The 'validateRuntimeDir()' method now returns 'ValidationErrors'.
|
|
The 'validateBinDir()' method now returns 'ValidationErrors'.
|
|
The 'ConfigureRuby()' method now returns 'ValidationErrors'.
The check were re-arrange a bit to group them together.
Also, the type of the 'MaxRSS' and 'NumWorkers' changed
to accept only unsigned values as negative values are not
allowed for these settings. And the checks for the duration
were added for 'GracefulRestartTimeout' and 'RestartDelay'.
|
|
The folder existence check replaced with an existing
'validateIsDirectory()' function to reduce code duplication
and re-use error messages as well.
|
|
The 'validateShell()' method now returns ValidationErrors.
Because it depends on the another method 'validateIsDirectory()'
it was refactored as well and all the call sites of the last.
|
|
The 'validateGit()' method now returns 'ValidationErrs'.
The double quotes were replaced with single quotes as it
would help to present message in JSON format in more readable
form.
|
|
The 'validateStorages()' method now returns 'ValidationErrors'.
It also executes all possible checks before return and reports
all found issues.
Missing toml tags were added to the fields of the Storage struct.
|
|
The 'validateListeners()' method now returns 'ValidationErrors'
in case of an error.
|
|
We want to make errors of configuration validation more verbose
and flexible to operate with. The idea is to produce a machine
friendly output that is why the ValidationError structure is defined.
The next steps are to refactor existing validation methods to return
errors as instances of the ValidationError combined with
ValidationErrors.
|
|
RemoveAll RPC
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5291
Merged-by: James Fargher <proglottis@gmail.com>
Approved-by: Sami Hiltunen <shiltunen@gitlab.com>
Reviewed-by: Sami Hiltunen <shiltunen@gitlab.com>
Reviewed-by: Justin Tobler <jtobler@gitlab.com>
Co-authored-by: James Fargher <jfargher@gitlab.com>
|
|
[ci skip]
|
|
|
|
go: Update github.com/ProtonMail/go-crypto digest to d1d05f4
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5369
Merged-by: James Fargher <proglottis@gmail.com>
Approved-by: karthik nayak <knayak@gitlab.com>
Approved-by: James Fargher <proglottis@gmail.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
This RPC is unusual in that it needs to erase a lot of repositories in
bulk. We are not expecting to route and replicate the changes as we
would for a typical repository operation. To accommodate this we
intercept the call in order to bulk update the database.
|
|
The RPC will eventually want to bulk erase all repositories from the
praefect DB, as well as telling each gitaly to remove the physical
storage.
|
|
The gitaly implementation here simply removes the entire contents of the
storage directory, hence removing all repositories. It's unlikely that
this RPC will ever be atomic because that would require enough storage
for all the repositories deleted plus all the repositories restored.
Changelog: added
|
|
This RPC is designed to clear a storage before starting a full restore.
The prevents a certain class of bug where if repositories are created
after a backup is taken, then a full restore from backup takes place,
gitlab can no longer creates projects. This is because restore only
removes repositories that it is about to restore, and this eventually
clashes with the repositories created after the backup is taken.
|
|
template: Add flaky test issue template
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5373
Merged-by: John Cai <jcai@gitlab.com>
Approved-by: John Cai <jcai@gitlab.com>
Co-authored-by: Andras Horvath <ahorvath@gitlab.com>
Co-authored-by: Justin Tobler <jtobler@gitlab.com>
|
|
dnsresolver: Support DNS scheme in client dial functions
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5367
Merged-by: John Cai <jcai@gitlab.com>
Approved-by: John Cai <jcai@gitlab.com>
Approved-by: karthik nayak <knayak@gitlab.com>
Co-authored-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
|
|
|
|
go: Update grpc to v1.53.0
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5372
Merged-by: Justin Tobler <jtobler@gitlab.com>
Approved-by: Justin Tobler <jtobler@gitlab.com>
Co-authored-by: Will Chandler <wchandler@gitlab.com>
|
|
go: Update module github.com/getsentry/sentry-go to v0.18.0
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5370
Merged-by: Justin Tobler <jtobler@gitlab.com>
Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Approved-by: Justin Tobler <jtobler@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
In order to standardize the creation of flaky test issues, a new issue
template has been added. This template ensures that the appropriate
labels are applied automatically and tracks whether the flaky test has
been quarantined.
|
|
Update grpc-go to v1.53.0. This requires a small adjustment to
`TestDialNodes` as the error message format for failed connections has
changed slightly.
|
|
testhelper: Skip quarantined tests
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5362
Merged-by: John Cai <jcai@gitlab.com>
Approved-by: Will Chandler <wchandler@gitlab.com>
Approved-by: Toon Claes <toon@gitlab.com>
Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Reviewed-by: John Cai <jcai@gitlab.com>
Co-authored-by: Justin Tobler <jtobler@gitlab.com>
|
|
grpc-proxy: Fix flake caused by race between serving and stopping
Closes #4595
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5366
Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Approved-by: Pavlo Strokov <pstrokov@gitlab.com>
Reviewed-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
|
|
housekeeping: Unconditionally write bitmap lookup tables
Closes #4744
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5343
Merged-by: Toon Claes <toon@gitlab.com>
Approved-by: Toon Claes <toon@gitlab.com>
Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
|
|
Change dir to SOURCE_DIR prior to go build
Closes #4645
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5363
Merged-by: Sami Hiltunen <shiltunen@gitlab.com>
Approved-by: Sami Hiltunen <shiltunen@gitlab.com>
Co-authored-by: john.mcdonnell <jmcdonnell@gitlab.com>
|
|
datastore: Increase timeout for storage cleanup test
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5364
Merged-by: Sami Hiltunen <shiltunen@gitlab.com>
Approved-by: Sami Hiltunen <shiltunen@gitlab.com>
Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
|
|
Extract file and executable permissions to perm package
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5359
Merged-by: Sami Hiltunen <shiltunen@gitlab.com>
Approved-by: karthik nayak <knayak@gitlab.com>
Reviewed-by: karthik nayak <knayak@gitlab.com>
Co-authored-by: James Fargher <jfargher@gitlab.com>
|
|
git: Fix race between cancelling git-version(1) and reading its output
Closes #4740
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5344
Merged-by: Toon Claes <toon@gitlab.com>
Approved-by: Pavlo Strokov <pstrokov@gitlab.com>
Approved-by: Toon Claes <toon@gitlab.com>
Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
|
|
These files are only written once and must only be read by gitaly.
|
|
Bulk update all file and executable permissions to use the new perm
package.
Strictly speaking changing os.ModePerm to perm.PublicFile is a
permission change (it goes from executable to normal), but since
ModePerm is only used in tests this should be safe.
|
|
This is in preparation for a bulk permission replace.
|
|
Since these function calls were using untyped constants, the compiler
hadn't picked up that the order of the parameters is wrong. This wont
work once we start using typed permission constants.
|
|
655 is executable by group and other but not user. This doesn't
make a lot of sense. So we change it here to non-executable-shared.
|
|
These directory permissions were missed in the previous MR.
|
|
These "group private executable" permissions are only used in this test.
Instead of creating a constant for this, we just convert it to a more
common permission.
|
|
Onboarding Issue Template: Add PTO Calendar Integration
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5244
Merged-by: John Cai <jcai@gitlab.com>
Approved-by: Andras Horvath <ahorvath@gitlab.com>
|
|
go: Update module github.com/rubenv/sql-migrate to v1.3.1
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5355
Merged-by: Justin Tobler <jtobler@gitlab.com>
Approved-by: Pavlo Strokov <pstrokov@gitlab.com>
Approved-by: Justin Tobler <jtobler@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
ssh: Refactor tests for SSHReceivePack
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5358
Merged-by: Justin Tobler <jtobler@gitlab.com>
Approved-by: James Fargher <proglottis@gmail.com>
Approved-by: Justin Tobler <jtobler@gitlab.com>
Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
|
|
'renovate-tools/golangci-lint/github.com-golangci-golangci-lint-1.x' into 'master'
tools/golangci-lint: Update module github.com/golangci/golangci-lint to v1.51.1
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5337
Merged-by: Justin Tobler <jtobler@gitlab.com>
Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Approved-by: Justin Tobler <jtobler@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
Currently the `TestReplicateRepository_BadRepository/target_invalid`
test is flaky during execution and causes frequent failure in the CI
pipelines. This change quarantines the test so that it is skipped during
test execution.
|
|
Currently there is not a standardized approach to quarantining flaky
tests. This change implements `testhelper.SkipQuarantinedTest` which can
be invoked to skip specified tests during execution.
|