Top Menu

Jump to content
Home
    • Projects
    • Work packages
    • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Professional support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?
      Create a new account

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
  • Roadmap
  • Work packages
  • Calendars
  • Team planners
  • Boards
  • Forums
  • Wiki
    • Table of contents
      • Expanded. Click to collapseCollapsed. Click to showDeveloper
        • Hierarchy leafAccessibility Checklist
        • Hierarchy leafCode Review Guidelines
        • Expanded. Click to collapseCollapsed. Click to showContribution
          • Hierarchy leafGit Workflow
          • Hierarchy leafTranslations
        • Expanded. Click to collapseCollapsed. Click to showDeveloping Plugins
          • Hierarchy leafDeveloping an OmniAuth Authentication Plugin
        • Hierarchy leafRelease Process
        • Hierarchy leafReport a bug
        • Hierarchy leafSecurity
        • Hierarchy leafSetting up an OpenLDAP server for testing
        • Hierarchy leafTheme Features
      • Hierarchy leafDownload
      • Expanded. Click to collapseCollapsed. Click to showFeature tour
        • Hierarchy leafRelease Notes OpenProject 30
        • Expanded. Click to collapseCollapsed. Click to showRelease Notes OpenProject 30 - Overview
          • Hierarchy leafGlossary
          • Hierarchy leafRelease Notes - Accessibility
          • Hierarchy leafRelease Notes - Accessibility changes
          • Hierarchy leafRelease Notes - Add work package queries as menu items to sidebar
          • Hierarchy leafRelease Notes - Copy projects based on Templates
          • Hierarchy leafRelease Notes - Design changes
          • Hierarchy leafRelease Notes - Fixed Bugs
          • Hierarchy leafRelease Notes - Keyboard Shortcuts
          • Hierarchy leafRelease Notes - Project settings
          • Hierarchy leafRelease Notes - Ruby&Rails Update
          • Hierarchy leafRelease Notes - Security
          • Hierarchy leafRelease Notes - Timelines
          • Hierarchy leafRelease Notes - Work packages
      • Hierarchy leafHowto create animated gifs
      • Hierarchy leafMigration Squashing
      • Hierarchy leafMod security
      • Hierarchy leafNew work package page
      • Hierarchy leafOP3 to OP4 Debian upgrade
      • Hierarchy leafOP4 Ubuntu1404 Stable with MySQL in production
      • Hierarchy leafOpenProject 40 Development Setup
      • Expanded. Click to collapseCollapsed. Click to showOpenProject Foundation
        • Hierarchy leafBoards
        • Hierarchy leafMembers
        • Hierarchy leafOPF-Meetings
        • Hierarchy leafStatutes
      • Expanded. Click to collapseCollapsed. Click to showRelease Notes
        • Hierarchy leafOpenProject released on Bitnami
      • Expanded. Click to collapseCollapsed. Click to showRelease Notes OpenProject 40 - Overview
        • Hierarchy leafRelease Notes OpenProject 40 - Accessibility improvements
        • Hierarchy leafRelease Notes OpenProject 40 - Column header functions in work package table
        • Hierarchy leafRelease Notes OpenProject 40 - Improved Design
        • Hierarchy leafRelease Notes OpenProject 40 - Integrated query title on work package page
        • Hierarchy leafRelease Notes OpenProject 40 - Integrated toolbar on work package page
        • Hierarchy leafRelease Notes OpenProject 40 - OmniAuth integration for OpenProject
        • Hierarchy leafRelease Notes OpenProject 40 - Work package details pane
      • Expanded. Click to collapseCollapsed. Click to showSecurity and privacy
        • Hierarchy leafFAQ
      • Expanded. Click to collapseCollapsed. Click to showSupport
        • Expanded. Click to collapseCollapsed. Click to showDownload and Installation
          • Hierarchy leafInstallation MacOS
          • Expanded. Click to collapseCollapsed. Click to showInstallation OpenProject 3 0
            • Hierarchy leafDebian Stable with MySQL in production
            • Hierarchy leafInstallation Ubuntu
            • Hierarchy leafInstallation Windows
            • Hierarchy leafInstallation on Centos 65 x64 with Apache and PostgreSQL 93
          • Expanded. Click to collapseCollapsed. Click to showInstallation OpenProject 40
            • Hierarchy leafOP4 Debian Stable with MySQL in production
          • Expanded. Click to collapseCollapsed. Click to showMigration paths
            • Hierarchy leafFrom Chilliproject to OpenProject
            • Hierarchy leafMigration 15 to 30
            • Hierarchy leafMigration 24 to 30
            • Hierarchy leafMigration Redmine 2x › OpenProject 30
            • Hierarchy leafOpenProject 3 Migration
          • Hierarchy leafOpenProject 40
        • Expanded. Click to collapseCollapsed. Click to showNews
          • Hierarchy leafNew OpenProject Translations Plugin
          • Hierarchy leafNew Plugin on OpenProjectorg Local Avatars
          • Hierarchy leafNew design for OpenProject
          • Hierarchy leafNews Accessibility workshop for OpenProject
          • Hierarchy leafNews Glossary for OpenProject
          • Hierarchy leafNews Heartbleed fixed
          • Hierarchy leafNews Icon Fonts
          • Hierarchy leafNews OpenProject 30 Release
          • Hierarchy leafNews Release GitHub Integration Plugin
          • Hierarchy leafNews Success Story Deutsche Telekom
          • Hierarchy leafNews Timelines
          • Hierarchy leafOpenProject 3013 released
          • Hierarchy leafOpenProject 3017 released
          • Hierarchy leafOpenProject 40 released
          • Hierarchy leafOpenProject 40 will be coming soon
          • Hierarchy leafOpenProject 405 released
          • Hierarchy leafOpenProject and pkgrio
          • Hierarchy leafOpenProject news moved to a new blog
          • Hierarchy leafOpenProjectBitnami
          • Hierarchy leafPackager version with plugins released ("Community edition")
          • Hierarchy leafRegistration OpenProject-Foundation
          • Hierarchy leafRelease OpenProject AuthPlugins
          • Hierarchy leafUpdates on OpenProject
          • Hierarchy leafWe need your feedback for the the new fullscreen view for work packages
        • Hierarchy leafOpenProject Plug-Ins
      • Hierarchy leafWiki
You are here:
  • Forums
  • Development

Content

Repositories

Added by Gabriel Mazetto almost 9 years ago

Will you consider fixing “repositories” feature and integration with openproject?

What I would like to see fixed is git support.
I’m willing to help with merge requests if you give me green light to the following proposal:

  • I will implement a way to git clone remote bare repositories to a local copy in "#{Rails.root}/repositories/#{project_id}/#{repository_id}.git
  • I will implement a worker using Sucker Punch to clone repositories (https://github.com/brandonhilkert/sucker_punch), as it’s the most portable, well written, easy to implement asynchronous processing library without requiring extra process or redis backend (but I’m willing to support sidekiq if you also send me a “go for it”.).

Here is something I don’t know yet how it should be done (maybe more then one of then):

  • Update can be a async task that is triggered by a “refresh” button
  • API endpoint to trigger it and get “last time updated value” (check progress? how?)
  • Webhook for Github, Gitlab and Bitbucket (maybe something plugable? how?)
  • Rake task (already exists, and can ben scheduled to the cron… maybe easy the process by integrating “whenever” to the project)

Extra:
I’m also interested in migrating (most if not all) git support to https://github.com/libgit2/rugged which is integrated with libgit2.


Replies (4)

RE: Repositories - Added by Martin Linkhorst almost 9 years ago

Hi Gabriel,

thanks your post and your interest in improving OpenProject on a technical level, we appriciate very much.

Our current implementation for reposititories is quite limited and although git functionality is still in the code (in lib/redmine/scm/adapters/git_adapter.rb) we don’t officially support it. Therefore, if you haven’t had a look that specific part of the source code I would suggest you do so and see whether slight modifications can solve your use case already. You’d probably also have a look at /extra/svn/reposman.rb which, despite its file location, also supports git through the —scm parameter. We would be happy to accept pull requests to fix the last pieces to make everything work smoothly. It doesn’t support fetching remote repositories, though.

In Summary, here’s what’s already there (purely for documentation puposes):

  • You can enter the path to a local bare git repository (or a “.git” folder in a full clone) and then browse the repo in OpenProject. It’s implemented through calls to the git binary on your system. Initially it can be extremely slow depending on the size of the repo.
  • There’s also a script called reposman.rb which checks whether repositories need to be created. Due to an implementation detail you can only create one type of repositories for the whole instance with it. It defaults to subversion but git can be used by specifying the “—scm git” flag. In it’s current state this is untested and not supported but from what i can see it should work.

Nevertheless, we aren’t satisfied with the current solution of our repository code and already have open requests on implementing mercurial again (https://www.openproject.org/work_packages/2291). We think, the best approach is to modularize this part of the code so each repository type could be implemented as a separate independent gem.This requires developing the supporting code first, most likely during extraction of an already implemented scm adapter like subversion. We cannot maintain all scm adapters that people might want to use and by having them in separate gems we could delegate that responsibility to motivated community members. We would just make sure that the repositories abstraction works well and provide a reference implementation. Ultimately, the approach would also lead to the possibility of having more than one adapter that implements a single scm (e.g. one by shelling out, the other by wrapping libgit2). This would ease the process of using more advanced adapters as they can just be switched out as needed.

Long story short, if you can help us implementing this kind of abtraction while implementing the libgit2 based approach, we would support it. This would also bring us closer to supporting mercurial again and still keeps the core clean of any modules that are’n required by the majority of users. Maybe you and Chris Larsen (https://www.openproject.org/work_packages/2291) are able to team up on this.

Please tell us what you think about the above and whether you find the topic interesting.

This became rather long, let me also present my thoughts on the other points you mentioned.

  • remote repositories
    Cloning remote repositories to local is not supported at the moment. but once you have it local the above applies.
  • sucker_punch
    Asynchronous processing of tasks related to repostiories is desireable. Currently async jobs are done throguh delayed_job and we would like to stick with it for the near future. As far as I can tell, sidekiq and sucker_punch use parallel threads instead of processes. As OpenProject is currently not in a thread-safe state it will be difficult to ensure there aren’t any problematic side-effects. This means, we would much more prefer asynchronous jobs written using the delayed_jobs library.
  • repo updates
    Whenever you go to the repositories#show action, the database is populated with the new commits that happenend when you hit that page the last time. it’s synchronous and not triggered by any other hooks. For remote repositories, hooks would be very desireable.
  • whenver
    A decent whenever file would be a great help for anyone that want’s to deploy OpenProject by him or herself.
  • libgit2
    Implementing the git repository adapter with libgit2 bindings is a very good idea. We would like to see that in OpenProject.

I hope, that helps you to understand the current implementation better and makes clear where we eventually want to be regarding repositories and OpenProject Core code in general.
Let’s keep this discussion going!

Best regards,
Martin

RE: Repositories - Added by Michael Hierweck over 8 years ago

Hi Martin,

Martin Linkhorst wrote:

Our current implementation for reposititories is quite limited and although git functionality is still in the code (in
lib/redmine/scm/adapters/git_adapter.rb) we don’t officially support it.

does “still” mean repository/source code integration will be dropped some time?

Michael

RE: Repositories - Added by Oliver Günther over 8 years ago

The goal is to strip the existing repository adapters in the OpenProject Core down to an abstract adapter module that is extended through plugins/gems for multiple revision control systems.
Until that abstraction is properly defined (and at least the counterparts for Subversion and Git exist in a stable version), these functionality will probably remain in the core.

You can find a relevant epic WP concerning this topic at https://www.openproject.org/work_packages/12808

Best regards,
Oliver

RE: Repositories - Added by Taras Zakharko over 8 years ago

Are there any news on this front? I would be interested in integrating Fossil (http://www.fossil-scm.org) with OpenProject, but I lack knowledge about Rails and Redmine to write up some code. If a simpler interface with clearly defined API would exist, it would certainly be a big help.

  • (1 - 4/4)
Loading...