This project is mirrored from https://gitlab.com/gitlab-org/gitaly.git.
Pull mirroring updated .
- May 23, 2023
-
-
Pavlo Strokov authored
Migration of the 'sql-migrate-status' 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
-
Toon Claes authored
Roll version of Ruby in project forward to Ruby 3.1.4 to match GitLab See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5817 Merged-by:
Toon Claes <toon@gitlab.com> Approved-by:
Toon Claes <toon@gitlab.com> Co-authored-by:
Evan Read <eread@gitlab.com>
-
Patrick Steinhardt authored
Include custom hook path in a transaction's snapshot Closes #5142 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5801 Merged-by:
Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by:
Patrick Steinhardt <psteinhardt@gitlab.com> Reviewed-by:
Patrick Steinhardt <psteinhardt@gitlab.com> Reviewed-by:
Sami Hiltunen <shiltunen@gitlab.com> Co-authored-by:
Sami Hiltunen <shiltunen@gitlab.com>
-
Evan Read authored
-
Sami Hiltunen authored
TransactionManager manages custom hooks via MVCC. Custom hooks are always written into a new directory to isolate transactions from concurrent writes. When executing or reading the custom hooks, the transactions should use the custom hooks included in the snapshot. While the log index of the custom hooks is already included in the snapshot, it's not useful for integration as it doesn't yet say where exactly the custom hooks should be executed from. Solve this problem by including an absolute path to the custom hooks on the disk. This will later be used by HookManager to execute the correct custom hooks for a transaction, and GetCustomHooks to fetch the correct version of the custom hooks. Backwards compatibility logic is included to execute custom hooks from the repository if none have yet been written via WAL.
-
Sami Hiltunen authored
This commit extracts the custom hook path generation into a function. Extracting a function will later make it easier in tests to assert we have the correct path when we add the custom hook path to the transaction's snapshot. While at it, update the parent directory to be synced with the recently introduced helper designed for it.
-
Sami Hiltunen authored
This commit updates references to hooks to talk about custom hooks in TransactionManager. This makes it clearer we are talking about the custom hooks the users can write in the repository, not the shims used by git to call back to Gitaly.
-
Patrick Steinhardt authored
Bump minimum git version to 2.40 Closes #5003 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5705 Merged-by:
Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by:
Patrick Steinhardt <psteinhardt@gitlab.com> Reviewed-by:
Patrick Steinhardt <psteinhardt@gitlab.com> Co-authored-by:
John Cai <jcai@gitlab.com>
-
James Fargher authored
go.mod: Update cgroups dependency to major version 3 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5822 Merged-by:
James Fargher <proglottis@gmail.com> Approved-by:
John Cai <jcai@gitlab.com> Approved-by:
James Fargher <proglottis@gmail.com> Co-authored-by:
Patrick Steinhardt <psteinhardt@gitlab.com>
-
- May 22, 2023
-
-
Will Chandler authored
Write-ahead log repository deletions Closes #5049 and #4792 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5693 Merged-by:
Will Chandler <wchandler@gitlab.com> Approved-by:
Will Chandler <wchandler@gitlab.com> Reviewed-by:
Will Chandler <wchandler@gitlab.com> Reviewed-by:
Sami Hiltunen <shiltunen@gitlab.com> Reviewed-by:
Quang-Minh Nguyen <qmnguyen@gitlab.com> Co-authored-by:
Sami Hiltunen <shiltunen@gitlab.com>
-
John Cai authored
Git 2.40.0 includes an important update to cat-file , to add support for mailmaps when using -s and --batch-check. This will allow us to utilize mailmaps in GitLab.
-
John Cai authored
Change our CI to use 2.40 since we are about to bump the minimum git version
-
John Cai authored
Now that we have removed the flag to use 2.40 in production, stop building version 2.39.
-
Toon Claes authored
Assert vote contents in WriteRef tests See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5812 Merged-by:
Toon Claes <toon@gitlab.com> Approved-by:
James Fargher <proglottis@gmail.com> Co-authored-by:
Sami Hiltunen <shiltunen@gitlab.com>
-
karthik nayak authored
ci: Fix automatic publishing of tags See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5820 Merged-by:
karthik nayak <knayak@gitlab.com> Approved-by:
karthik nayak <knayak@gitlab.com> Co-authored-by:
Toon Claes <toon@gitlab.com>
-
Patrick Steinhardt authored
Gather coverage from all go test jobs See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5816 Merged-by:
Patrick Steinhardt <psteinhardt@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> Co-authored-by:
Sami Hiltunen <shiltunen@gitlab.com>
-
Patrick Steinhardt authored
localrepo: Add ability to read and write trees in memory See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5807 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:
John Cai <jcai@gitlab.com>
-
Patrick Steinhardt authored
Update the cgroups dependency to major version 3. This change includes a bunch of renames where upstream moved the cgroups implementations into different packages. Adapt our code accordingly.
-
Patrick Steinhardt authored
Revert "Merge branch 'renovate/github.com-getsentry-sentry-go-0.x' into 'master'" See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5818 Merged-by:
Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by:
Patrick Steinhardt <psteinhardt@gitlab.com> Co-authored-by:
Steve Azzopardi <sazzopardi@gitlab.com>
-
Toon Claes authored
When the target `build-proto-gem` runs in a clean environment, it fails because the `_build` directory does not exist yet. Fix this by creating the output directory from in the Makefile recipe.
-
Toon Claes authored
Because the Gitaly proto gem is only created and published on a git tag, it's hard to test this. This change adds a manual job to build the proto gem in CI. Although this does not test the publishing of the gem, because we don't want to litter rubygems.org with tests, it exposes the output gem as an artifact so it can be downloaded of inspection and local testing.
-
Steve Azzopardi authored
This reverts merge request !5788
-
Justin Tobler authored
go: Update github.com/ProtonMail/go-crypto digest to 7afd394 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5813 Merged-by:
Justin Tobler <jtobler@gitlab.com> Approved-by:
James Fargher <proglottis@gmail.com> Approved-by:
Justin Tobler <jtobler@gitlab.com> Co-authored-by:
GitLab Renovate Bot <gitlab-bot@gitlab.com>
-
James Fargher authored
go: Update module github.com/stretchr/testify to v1.8.3 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5811 Merged-by:
James Fargher <proglottis@gmail.com> Approved-by:
James Fargher <proglottis@gmail.com> Approved-by:
Justin Tobler <jtobler@gitlab.com> Co-authored-by:
GitLab Renovate Bot <gitlab-bot@gitlab.com>
-
- May 21, 2023
-
-
Sami Hiltunen authored
We're currently gathering coverage only from the test:coverage job. This doesn't run with Praefect nor the WAL enabled. Since the test-go target is now generating a coverage report for all of the test runs, let's upload the report from each job to get a more complete picture of the test coverage. The test:coverage job is still left in place as it parses the total test coverage percentage through the regex.
-
Sami Hiltunen authored
We're currently only generating a coverage report from the cover target. This means that we get coverage only from the basic test run without Praefect or WAL enabled. This commit changes the test-go target to generate coverage report so the other jobs that build on it will also have a coverage report generated. While the report is generated, the coverage information is not printed by default. cover target is left in place to print the coverage information after a test run.
-
Sami Hiltunen authored
test-with-praefect makefile target is defining one environment variable to enable Praefect but is otherwise the same as test-go target. Let's reuse the test-go target to share the common code.
-
Sami Hiltunen authored
Begin currently waits for the TransactionManager to initialize but it doesn't check whether the initialization was successful. As the transaction will not anyway succeed if the initialization failed, return an appropriate error from Begin instead. This way the transaction doesn't end up doing any useless work and the error message will be clearer than having a random failure at some point during the transaction.
-
Sami Hiltunen authored
Repository deletions need to be write-ahead logged as well. This ensures their atomicity and that they can be replicated later as part of the log. Once a repository deletion has been commited, all subsequent Begin and Commit calls will fail with a 'repository not found' error. The repository is logically deleted but not yet physically. The physical deletion needs to wait for open transactions to finish so we don't remove the files they are operating on. For now, it's possible to set other updates in the Transaction even if it ultimately removes the repository. Technically this is fine but it's a bit non-sensical and we don't have a use case for it in Gitaly. We'll probably later improve the interface by splitting out different transaction types so UpdateReferences() can't be called on the same transaction that deletes the repository.
-
Sami Hiltunen authored
The TransactionManager needs to keep track of open transactions in order to avoid removing data they still need. Given sequence: - *latest hooks are from index 1* - Begin TX2 - Begin TX3 - Commit TX3 storing new hooks The TransactionManager can't prune hooks from index 1 before TX2 has finished as TX2 may still read them. Once all transactions that may be reading the old version of hooks have finished, the TransactionManager should prune the old version of the hooks to ensure we don't keep filling up the disk. This commit adds a list to keep track of open transactions. This list can later be used to synchronize with open transactions and waiting until all open transactions using the data have finished prior to removing it. As Begin is now registering the transactions and thus also writing to the TransactionManager's state from a different goroutine than Run(), the mutex is changed to a normal mutex from RWMutex.
-
- May 19, 2023
-
-
Will Chandler authored
praefect: Fix flaky server factory test Closes #5137 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5796 Merged-by:
Will Chandler <wchandler@gitlab.com> Approved-by:
Justin Tobler <jtobler@gitlab.com> Approved-by:
Will Chandler <wchandler@gitlab.com> Co-authored-by:
Patrick Steinhardt <psteinhardt@gitlab.com>
-
Justin Tobler authored
Acknowledge transactions only after application See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5802 Merged-by:
Justin Tobler <jtobler@gitlab.com> Approved-by:
James Fargher <proglottis@gmail.com> Approved-by:
Justin Tobler <jtobler@gitlab.com> Reviewed-by:
James Fargher <proglottis@gmail.com> Reviewed-by:
Sami Hiltunen <shiltunen@gitlab.com> Co-authored-by:
Sami Hiltunen <shiltunen@gitlab.com>
-
Justin Tobler authored
praefect: Migrate sql-ping sub-command See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5808 Merged-by:
Justin Tobler <jtobler@gitlab.com> Approved-by:
Justin Tobler <jtobler@gitlab.com> Reviewed-by:
Pavlo Strokov <pstrokov@gitlab.com> Reviewed-by:
Justin Tobler <jtobler@gitlab.com> Co-authored-by:
Pavlo Strokov <pstrokov@gitlab.com>
-
John Cai authored
Since WriteTree() operates on trees, change it to Write() and make it a function for TreeEntry. It will do a depth first walk of all the Entries, writing new trees as necessary. If a TreeEntry's OID is empty, then Write() will attempt to write a new tree with all of its Entries.
-
John Cai authored
Currently, a TreeEntry is a flat data structure in the sense that it represents a single entry but does not have any children. A git tree object has children though. Change this by adding an Entries member to the TreeEntry struct. This way, we can represent a real tree data structure. Also, add a GetTree() function that can get an entire tree. We can consolidate ListEntries() into GetTree().
-
John Cai authored
Sometimes it's useful to quickly look up an object's info based on a revision (which can include a path).
-
Pavlo Strokov authored
Migration of the 'sql-ping' 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
-
Sami Hiltunen authored
WriteRef tests currently assert only the number of votes expected. This isn't sufficient to test that the voting logic is behaving correctly as the votes could still be in wrong order, in the wrong phase or have the wrong content. When integrating the WAL, this makes it difficult to determine whether the voting behaves still the same or not. This commit asserts the complete vote content to ensure the test catches actual regressions in the voting logic.
-
GitLab Release Tools Bot authored
[ci skip]
-
James Fargher authored
Decouple production code from test proto See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5803 Merged-by:
James Fargher <proglottis@gmail.com> Approved-by:
James Fargher <proglottis@gmail.com> Co-authored-by:
Mikhail Mazurskiy <mmazurskiy@gitlab.com>
-