Skip to content
GitLab
Next
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gitaly gitaly
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 568
    • Issues 568
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 53
    • Merge requests 53
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • gitalygitaly
  • Issues
  • #1028
Closed
Open
Issue created Feb 19, 2018 by Jacob Vosmaer@jacobvosmaer-gitlabDeveloper

Google::Protobuf classes are leaking into Gitlab::Git

One known case is Gitlab::Git::Commit#parent_ids, which should be Array but isn't.

[10] pry(main)> repo = Project.first.repository.raw_repository
<snip>
[11] pry(main)> commit = repo.commit
<snip>
[12] pry(main)> commit.parent_ids.class
=> Google::Protobuf::RepeatedField

We should look for other cases too and write tests in gitlab-ce/spec/lib/gitlab/git that assert we have the right types on our fields.


To be a little more concrete, I think we should go through gitaly-proto and look for repeated fields in (nested) response messages. Then look up where we unpack those messages in gitlab-ce, and make sure (via tests) that we turn all Google::Protobuf::RepeatedField quasi-arrays returned by Gitaly into plain Ruby arrays before returning them to the wider application.


Source: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/17035#note_59394587


Disabled Endpoints: #514 (closed) #657 (closed) #844 (closed) #518 (closed) #820 (closed) #457 (closed) #427 (closed) #459 (closed) #573 (closed)

Edited Feb 21, 2018 by Kim Carlbäcker
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking