Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-01-22cleanup: Add RewriteHistory RPCWill Chandler
Historically we have advised users who need to rewrite history to do so locally and force push their change to Gitlab. However, upcoming changes may prevent a user from pushing in scenarios where they need to remove a large blob from their repository's history. To handle this scenario, we introduce a new `RewriteHistory` RPC which will invoke git-filer-repo(1) on the target repository. filter-repo has a large number of options, but we will support only two: --strip-blogs-with-ids Given a file containing a list of newline-delimited object ids, rewrite history to remove them from all commits. --replace-text Given a file of literals and patterns, replace all matching instances in history with '***REMOVED***'. filter-repo works by fetching the repository contents via git-fast-export(1), making the requested changes, and writing the changes back via git-fast-import(1). As filter-repo uses the '--force' flag[0] the repository must be made read-only before calling this RPC. filter-repo is currently incompatible with SHA256 repositories. [0] https://git-scm.com/docs/git-fast-import#_parallel_operation Changelog: added
2023-10-05proto: Add linter rules for commentsKarthik Nayak
Currently we don't have any linting rules for comments in proto files. This has led to various styled being used in the comments and lack of consistency. Enforce the styling for comments in proto files. This commit also includes manual changes to comments in proto files to adhere to these new rules. The changes are lazy in nature, mostly minimal changes to simply conform to the new rules. This is to reduce review load and also writing good comments is out of the purpose of this commit.
2023-10-05proto: Convert comments to small-caseKarthik Nayak
Convert all comments to small-case using a simple fish shell script: for field in (cat log | grep -v Enum | grep Field | cut -d " " -f 3 | uniq | cut -d "\"" -f 2) set -l pascal (echo $field | sed -r 's/(^|_)([a-z])/\U\2/g') find . -type f -name "*.proto" | xargs sed -i "s/\/\/ $pascal/\/\/ $field/g" end This does produce some unwanted changes where fields which were expected to be captial are reduced to smallcase, but reduces the overall surface are for manual editing.
2023-10-05proto: Replace all "This comment ..." linesKarthik Nayak
We want to add some linting rules to our proto files, but it seems like there are a bunch of comments which use the filler line "// This comment is left unintentionally blank.". Let's use a python script to replace them with the field, message, rpc, service or enum name. Script: import re import sys import os from glob import glob result = [y for x in os.walk(".") for y in glob(os.path.join(x[0], '*.proto'))] for filename in result: print("doing", filename) file = open(filename, "r") lines = file.readlines() for i, line in enumerate(lines): if "// This comment is left unintentionally blank." in line: next_line = lines[i+1] sub = "" if re.search("^\s*rpc", next_line): x = re.findall(r"rpc (\w*)\s?\(", next_line) if len(x) != 1: print("error finding rpc name:", next_line, "match:", x) sys.exit() sub = x[0] elif re.search("^\s*message", next_line): x = re.findall(r"message (\w*)\s?\{", next_line) if len(x) != 1: print("error finding message name:", next_line, "match:", x) sys.exit() sub = x[0] elif re.search("^\s*service", next_line): x = re.findall(r"service (\w*)\s?\{", next_line) if len(x) != 1: print("error finding service name:", next_line, "match:", x) sys.exit() sub = x[0] elif re.search("^\s*enum", next_line): x = re.findall(r"enum (\w*)\s?\{", next_line) if len(x) != 1: print("error enum service name:", next_line, "match:", x) sys.exit() sub = x[0] else: x = re.findall(r"([\w_]*) = \d+", next_line) if len(x) != 1: print("error finding field name:", next_line, "match:", x) sys.exit() sub = x[0] lines[i] = line.replace("This comment is left unintentionally blank.", sub + " ...") file.close() file = open(filename, "w") file.writelines(lines) file.close()
2023-05-10go: Bump module version from v15 to v16Patrick Steinhardt
We're about to release Gitaly v16.0. As we've landed a bunch of previously announced removals it's thus time to bump our Go module version from v15 to v16.
2022-05-20Update go package name from v14 to v15John Cai
This commit changes the major version in the package name from v14 to v15 Updating go.mod & go.sum with new module name v15 Update Makefile to bump major version to v15 Update the gitaly package name in the Makefile. Also update gitaly-git2go-v14 -> gitaly-git2go-v15. We need to keep gitaly-git2go-v14 for a release however, for zero downtime upgrades. This pulls directly from a sha that is v14. Update package name from v14->v15 for auth, client, cmd, internal packages This commit changes the package name from v14 to v15 in go and proto files in the internal, auth, client, cmd packages. proto: Update major package number in package name tools: Change major version number in package name from v14 to v15 gitaly-git2go: Change the package name from v14 to v15 update module updater for v15 Update the documentation for the module updater to reflect v15
2022-05-09proto: Enforce comment-linting for message fieldsPatrick Steinhardt
Enforce that message fields must have a comment and add a placeholder for all instances where such a comment is missing.
2022-05-09proto: Enforce comment-linting for message definitionsPatrick Steinhardt
Enforce that message definitions must have a comment and add a placeholder for all instances where such a comment is missing.
2022-05-09proto: Enforce comment-linting for RPC definitionsPatrick Steinhardt
Enforce that RPC definitions must have a comment and add a placeholder for all instances where such a comment is missing.
2022-05-09proto: Enforce comment-linting for servicesPatrick Steinhardt
Enforce that services must have a comment and add a placeholder for all instances where such a comment is missing.
2022-04-29Automatically lint proto filesJames Fargher
2021-05-27Create module v14 gitaly versionPavlo Strokov
The new "v14" version of the Gitaly module is named to match the next GitLab release. The module versioning is needed in order to pull gitaly as a dependency in other projects. The change updates all imports to include v14 version. The go.mod file was modified as well after go mod tidy execution. And the changes in dependency licenses are reflected in the NOTICE file. Part of: https://gitlab.com/gitlab-org/gitaly/-/issues/3177
2020-03-10Task proto has dependency to already generated source code.Pavlo Strokov
Extracting lint-related stuff into separate proto file. It is required in order to have proper working proto-linter. Previously it was using compiled files for verification and it fails in some cases (https://gitlab.com/gitlab-org/gitaly/-/jobs/459024976). lint.proto extracted from shared.proto and contains lint-related declarations. New task `proto-lint` added to compile source code that is required by `protoc-gen-gitaly`. `protoc-gen-gitaly` fixed to use proper proto source data. Regeneration of all proto-related files.
2020-02-06Use field annotation for target and additional repositoryMateusz Nowotyński
Instead of setting OID in the RPC method use annotation in the field (`target_repository` and `additional_repository`). Having only this 2 annotations created a problem with messages that can be either target or additional repository (for example `ObjectPool`). Those are marked with `repository` annotation and `target_repository` and `additional_repository` are used in the parent messages. Signed-off-by: Mateusz Nowotyński <maxmati4@gmail.com> Signed-off-by: jramsay <maxmati4@gmail.com>
2019-10-17Remove deprecated ApplyBfgObjectMapZeger-Jan van de Weg
The RPC got replaced by a version that's streaming the input. Which allows us to remove this RPC, as it's unused for multiple releases. Closes: https://gitlab.com/gitlab-org/gitaly/issues/2094
2019-09-19CloseSession: Remove unused protoZeger-Jan van de Weg
Initially this RPC was supposed to hand off control to a cat-file being closed to a caller. This decision got reverted and now this RPC can be removed. Closes https://gitlab.com/gitlab-org/gitaly/issues/1810
2019-07-05Start preparation for migrating .proto filesJacob Vosmaer