Skip to content
GitLab
Next
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    Projects Groups Snippets
  • Sign up now
  • Login
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 46,614
    • Issues 46,614
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,535
    • Merge requests 1,535
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • 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
  • GitLabGitLab
  • Issues
  • #10230
Closed
Open
Issue created Mar 06, 2019 by Francisco Javier López@fjsanpedro🔴Contributor

Apply/retrieve diff patches in the CI build mirror service

The information sent in the mirror service from the FE code are going to be diffs. We need a safe way to get and apply them from the actual repo the mirror service is watching.

We also need to test if incremental diffs are better than differential diffs (the total diff change). If we use incremental diffs we will send less information and the communication will be faster, but we'll have to deal with sync problems.

Proposal:

  • We are going to implement to main endpoints: files and repository.

  • Files endpoint will accept the following actions:

    • DELETE: although we can delete files using diff patches, the whole content of the removed file is going along with the patch. Enabling and endpoint, that can remove a file using only its relative path can speed things up.
    • PATCH: will apply the differential diff patch and also delete files. The way we are planning this is:
      • Reset the repository for any existing changes
      • Apply the patch
  • Repository endpoint. This endpoint will be used to reset the repository. It will be mainly used when the user discard all changes in the Web IDE.

Regarding incremental diffs, it is really hard to sustain them. Mainly because the user will be able to modify, at the same time, the file. The workflow, in this case, can be really complicated, and it will involve a delay in the communication workflow:

  • The web IDE sends an incremental diff
  • The service checks if it can be cleanly applied
  • If it can't be, then we need to communicate that to the web IDE.
  • The web IDE will have to send the complete diff.

For simplicity, at least for this first iteration, we're going to use differential diffs.

Edited May 23, 2019 by Francisco Javier López
Assignee
Assign to
Time tracking