- Jan 03, 2024
-
-
Georges Racinet authored
Structured errors in `GetTreeEntries` will be a larger effort, should be done this week, though.
-
Georges Racinet authored
This brings some incrementality, provided the developper references a tracking issue. In our current case, we have to return structured errors for the first time [from RHGitaly](#156), which has to be done, but we don't have enough time to tinker with tonic builtins for that today. On the other hand, we can at least return the proper error status. Not covering the case where they are skipped, because it is meant to be exceptionally used.
-
- Jan 02, 2024
-
-
Georges Racinet authored
-
Georges Racinet authored
-
Georges Racinet authored
Done initially as an attempt to fix the `RST_STREAM` code 1 error (actually triggered by clients based on gRPC core 1.58 sending the wrong `authority` for Unix Domain Sockets), but it is an interesting update in itself, apparently bringing in rich errors capabilities that could well be the same one we will be needing in `GetTreeEntries` etc.
-
Georges Racinet authored
Normally, this version should also be compatible with Python 3.11 (supported as of 1.49), but I still could not install it in a HDK virtualenv (might be a Cython version problem, though). This brings an unexpected complication: the Python client for gRPC 1.58 sets a wrong default authority header in the case of Unix Domain Sockets (the Ruby client does the same, and possibly also the Go client). General work-arounds might be in the works at the level of the `h2` crate, but for now the rigorous Rust implementations don't accept it, so we have to fix it client-side. In this case, this was a problem in Comparison Tests only. This is well worth a minor version bump.
-
Georges Racinet authored
-
Georges Racinet authored
hgdemandimport has always been of little value for long-running processes, such as HGitaly. On the other hand, attempts to upgrade the gRPC dependencies (grpcio etc.) to 1.58 showed that it was wreaking havoc with imports between generated stub modules, with messages such as: TypeError: Couldn't build proto file into descriptor pool: Depends on file 'google/protobuf/timestamp.proto', but it has not been loaded (this one upon importing `shared_pb2`, but it does not matter).
-
- Dec 23, 2023
-
-
Georges Racinet authored
-
Georges Racinet authored
This matches the version used in Heptapod 0.40 and the future 0.41. HG: Enter commit message. Lines beginning with 'HG:' are removed. HG: Leave message empty to abort commit. HG: -- HG: user: Georges Racinet <georges.racinet@octobus.net> HG: topic 'bump-proto' HG: branch 'stable' HG: changed rust/Cargo.lock HG: changed rust/mercurial.rev
-
Georges Racinet authored
As often, it doesn't change in patch versions.
-
Georges Racinet authored
In Gitaly protocol 16.3, the `ignore_whitespace_changes` boolean disappears, being replaced with a 3-valued enum, corresponding to two levels of whitespace ignoring in Git. The disparition means that the attribute was long deprecated, and no upstream client had been using it for a while, so it was about time we implement the "new" `WhitespaceChanges` enum. Closes #137
-
- Dec 20, 2023
-
-
Georges Racinet authored
-
Georges Racinet authored
-
- Dec 19, 2023
-
-
Georges Racinet authored
The immediate goal is to stop subrepositories breaking the Project home page, see heptapod#1287. More generally, the `workdir` module now provide high-level exceptions that are easy to catch in services and will not be confused with other errors arising in Mercurial.
-
- Dec 17, 2023
-
-
Georges Racinet authored
Closes #164 In the course of implementation, we introduce the new `changeset_by_commit_id` helpers which are useful in cases where the input is expected to be a full Node ID (instead of any Git revspec) and that is to be validated (because Gitaly does). Would need their separated testing to commit them separately, too lazy today for that.
-
- Dec 19, 2023
-
-
Georges Racinet authored
All these metadata reach our code as `str` instances, this one (previously not tried from the clients) was wrongly implemented as if the incoming data were `bytes`.
-
- Dec 17, 2023
-
-
Georges Racinet authored
Will spare us and readers some repetitions.
-
Georges Racinet authored
This allows us to remove much pollution in `test_compare_squash`.
-
- Dec 14, 2023
-
-
Georges Racinet authored
The breakthrough is that HGitaly is able to control internal Git mirroring and this can be tested from HGitaly (ordinary) integration tests. The presence of the `commit_author` and `timestamp` attributes raise some questions more explicitely than it was the case in the Rails app, where the feature has been implemented long ago by spawning a Mercurial subprocess. We decided to behave identically, and in particular to postpone the question of representing the difference between committer and author to another time, as such a distinction does not exist currently in Mercurial (could be an extension around providing that, though). The `UserSquash` method in itself was only chosen because it does not have many options and is at its core very simple to implement. Closes #163
-
Georges Racinet authored
The `HGitalyServicer` base class now provides a `for_mutation_by` optional argument that triggers the setting of all needed repository config items and environment variables as already in use when spawning Mercurial subprocesses from the Rails application: repository mode (nativity, with Git mirroring or not), link to MR to allow distinguishing between merge permissions and direct pushes, etc. The acting user is part of the request message in all examples we have considered so far, hence passed down by the caller (concrete service subclass). Other metadata are expected as invocation metadata (hence HTTP/2 headers, which matches what also happens between Workhorse and the Rails aplication). We had to add invocation metadata handling to the `FakeContext` to maintain coverage. The import path from `grpc` is probably instable, but we'll live with it. WIP implement UserSquash, with Git mirroring or not Needs lint to be ok, coverage to be 100%, a decision about itering on invocation metadata so much. The breakthrough is that HGitaly is able to control internal Git mirroring and this can be tested from HGitaly (ordinary) integration tests. At this point this does not implement passing of user information to internal API (can only be tested from functional tests, as it requires a fully working Heptapod instance). The `UserSquash` method in itself was only chosen because it does not have many options and is at its core very simple to implement. WIP to fold: refactoring putting mutation metadata in repo config/environ WIP first version working in functional tests WIP some linting (grpc import in tests will be used later) WIP added tests with Gitaly Almost complete (for_mr_iid missing) except coverage when skipping Gitaly Comparison accept_mr_iid Full coverage for UserSquash
-
Georges Racinet authored
Very similar to what, e.g., mercurial-testhelpers and many similar tools do. This is as close to the CLI as possible, and suitable for methods that can be implemented in a single mutating command, as the command will typically enclose the actual mutation in its own transaction. Methods to be implemented as a succession of mutation commands should better manage a single transaction themselves, probably at the price of a greate duplication from Mercurial core.
-
- Nov 30, 2023
-
-
Georges Racinet authored
We take `UserSquash` as an example as it will be the first implemented method (see #163) because of its calling simplicity.
-
- Dec 12, 2023
-
-
Georges Racinet authored
-
Georges Racinet authored
-
- Nov 24, 2023
-
-
Georges Racinet authored
-
Georges Racinet authored
There is a compatibility problem lower level than HGitaly with the current stable Mercurial (6.6). It looks at first sight to lie in Evolve, but it could be in mercurial-testhelpers. It should not prevent us going forward with HGitaly, at least on Mercurial 6.5
-
Georges Racinet authored
With 0.42 released as part of the stable branch (Heptapod 0.40), we will need to open up 0.43 for the default branch.
-
- Nov 22, 2023
-
-
Georges Racinet authored
-
- Nov 21, 2023
-
-
Georges Racinet authored
-
Georges Racinet authored
-
Georges Racinet authored
-
- Nov 20, 2023
-
-
Georges Racinet authored
In case a project id is reused (Heptapod application context, since the repo path is derived from the project id) or a repository path is reused (e.g. in RSpec tests), it is possible that a previous failed cleanup (crash or brutal stop before the final trashed repo `rmtree) would get in the way of the removal. Unlikely, but easy to prevent by making the name in trash unique (time-based, random would also have been good).
-
Georges Racinet authored
It was a mistake to depend on `load_repo`, as it will fail if, e.g., the `.hg` sub directory does not exist (seen in Rails RSpec tests) and various corrupted cases that a *removal* should clean up. The price to pay is the transactionality of the roster, but we cannot lock it properly without a repo. In theory in should be possible to instantiate the `Vfs` separately, but it does not seem to matter so much. With this change, if removing the working directories fails, it will not prevent removing the trashed repository (but of course we risk a later collision in workdirs). Backs out in particular changeset 1c735d40cfe7
-
- Nov 18, 2023
-
-
Georges Racinet authored
-
- Nov 15, 2023
-
-
Georges Racinet authored
The error message is ``` *** failed to import extension "hgitaly": unicode '[OPTIONS]...' found in cmdtable.hgitaly-serve ``` It is completely obscure why this has not been a problem before. Got this with Mercurial 6.4.5, then 6.4 on Python 3.9 (usually running with Python 3.10 if that makes any difference).
-