If you are unsure about the correct group, please do not leave the issue without a group label, and refer to
GitLab's shared responsibility functionality guidelines
for more information on how to triage this kind of issue.
Chun Duchanged title from Global Service Client ruby gem is integrated in GitLab Rails to Topology Service Client ruby gem is integrated in GitLab Rails
changed title from Global Service Client ruby gem is integrated in GitLab Rails to Topology Service Client ruby gem is integrated in GitLab Rails
Chun Duchanged the descriptionCompare with previous version
My opinion is that Topology Service will have a Ruby Client to interact with Topology Service. However, I would prefer that we "vendor-in" the Gem, and keep updating it every time there's a major change (like in a protobuf).
It will be quite overhead to push the gem to RubyGems on a constant basis. We should be fine with just pushing the gem to vendor/gems/ folder.
@ayufan I don't have experience with Ruby Gems development to give an opinion Of course when I worked on the PoC, I had to change Gemfile to read from a local developed Gem
My question is: How do we keep gitlab-org/gitlab/vendor/gems folder up-to-date with the generated gem from cells/topology-service. Do we copy the files manually every time?
My question is: How do we keep gitlab-org/gitlab/vendor/gems folder up-to-date with the generated gem from cells/topology-service. Do we copy the files manually every time?
Yes, you "vendor" when you need to update it. Protobuf by design is forward/backward compatible. We can have a simple script in GitLab Rails to pull the folder.
@ayufan@tkuah my proposal for automating this is as following:
[Manual] First step. Integrate the current version of the Topology Service Gem manually. I opened an MR for this: !159778 (merged). I can submit it for review if this suggestion sounds good.
[Automation] Every time Topology Service pipeline runs on main branch. Maybe it can be a daily scheduled pipeline or on each update, it can check if the code/version is different between gitlab-org/gitlab:vendor/gems/gitlab-topology-service-client/lib and Topology Service clients/ruby. If there is a difference, then it can automatically open an MR with the diffs, and maybe close existing MR if there is an open one.
Hmm, that kind of automation seems to be more work compared to publishing a new gem using gem release CI component, then using renovate to bump in GitLab monolith.
Something manual is good to start. As we just need to cp to the vendor/gems directory. Just make sure to add some docs. We can then move towards rubygems.org/renovate automation in the future.
@tkuah True. Let's skip the automation for now then and copy the Gem manually every time the Topology Service API changes. I will add some docs to the Topology Service as well once !159778 (merged) is reviewed and merged
@OmarQunsulGitlab@tkuah I think we might have scripts/update-topology-service-client.bash that would do it, and refer in docs to do it to avoid doing manual cp.