Loading
Commits on Source 12
-
GitLab Release Tools Bot authored
-
Patrick Steinhardt authored
The README file located with our generated Ruby Protobuf code still provides information of the old times where Protobuf definitions were living in their own `gitaly-proto` repository. These times have long gone by, and I doubt anybody still tries to search for that repository. Remove the README. This also prepares for us dropping the generated Ruby code from our tree altogether.
-
Patrick Steinhardt authored
We've got multiple scripts that are required to generate Ruby code from our Protobuf definitions in the `_support` directory. This has multiple smells: - It's out-of-line with all the other tools, which nowadays are located in the `tools` directory. - It's hard to discover and find out which parts logically form a unit. - We are reusing the Gemfile of the Ruby sidecar to pin the `grpc-tools` dependency to a specific version. Move the tooling into its own `tools/protogem` directory that's got its own Gemfile to fix these points. This also allows us to auto-update dependencies via the Renovate bot like we do for our other tools. -
Patrick Steinhardt authored
The `generate-proto-ruby` script assumes a specific output directory that's always fixed at `ruby/proto`. We're about to drop our in-tree copy of generated Ruby code in favor of using the `gitaly` Gem, which will require us to generate the code in a temporary directory. Refactor the code to be less dependent on the output directory. Like this we can easily change the location where we generate the code into. Right now the location is unchanged though, which also demonstrates that there is no change in the generated code.
-
Patrick Steinhardt authored
On every version bump the GitLab Release Tools bot updates the version in two different files: first in our top-level `VERSION` file, and second in the Ruby Protobuf files at `ruby/proto/version.rb`. Both files basically contain the same information, but serve different purposes. We're about to drop our generated Ruby Protobuf code though in favor of creating the Protobuf Gem ad-hoc. This also means it doesn't make a whole lot of sense anymore to carry around the version file in our tree. Consequentially, we've adjusted the Release Tools bot to stop writing the `version.rb` file completely. Instead, we now generate the file via the information we already have in our `VERSION` file.
-
Patrick Steinhardt authored
The Ruby sidecar is slowly nearing its end: right now, it only implements a single RPC that is in the process of being migrated to Go. This means we'll start to soon remove all the Ruby infrastructure in the Gitaly project. Part of the infrastructure is the Ruby code generated from our Protobuf definitions. And while we won't need that code ourselves anymore, it is important for clients written in Ruby that want to interface with us. As such, the Gitaly project still has to release the `gitaly` Gem. In the past, we built the Gem by simply soaking up the code in `ruby/proto`. But as it does not make any sense for us to keep the Ruby code around anymore this strategy will fail once we have removed it. Merge the `generate-proto-ruby` any `publish-gem` scripts into a single script that: 1. Generates all required Ruby sources into a temporary directory. 2. Writes the `gitaly.gemspec` file into the same directory. 3. Builds the Gitaly Gem from those temporary files. Like this, all code is generated ad-hoc and doesn't need to be committed to the repository anymore. Change the Makefile's `proto` target to not generate Ruby code anymore. Instead, there are two new Makefile targets `build-proto-gem` and `publish-proto-gem` that are responsible for building and publishing the Gem, respecfively. The generated Ruby code is thus stale now and will be removed in a subsequent commit. -
Patrick Steinhardt authored
The `generate-proto-ruby` script is not only generating the Ruby sources anymore, but also builds the `gitaly` Gem. It wasn't renamed in the preceding commit though as Git doesn't detect the rename by default, which would have made the diff hard to read. Rename the file now to the more fitting `build-proto-gem`.
-
Patrick Steinhardt authored
The helper functions in `run.rb` had in the past been used by multiple different scripts. Nowadays there is only a single user though, so let's inline it.
-
Patrick Steinhardt authored
Now that we stopped updating our Ruby code generated from the Protobuf definitions in favor of ad-hoc generating it when building a new Gem it does not make sense to carry these files around anymore: - They are stale and will not be updated anymore. - Most of these files are unused anyway. - It is not expected that there will be any changes in the generated code that is relevant to our Ruby sidecar anymore. There is only a single RPC served by it nowadays which is in the process of being migrated to Go. Remove the Protobuf definitions and use the `gitaly` Gem instead. -
Quang-Minh Nguyen (Ex-GitLab) authored
Generate Ruby's Protobuf sources ad-hoc when building Gem and drop generated code (v15.5 backport) See merge request gitlab-org/gitaly!5008 Merged-by:
Quang-Minh Nguyen <qmnguyen@gitlab.com>
Approved-by:
Quang-Minh Nguyen <qmnguyen@gitlab.com>
Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
-
GitLab Release Tools Bot authored
[ci skip]
-
GitLab Release Tools Bot authored
[ci skip]