Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-08-10Migrate events into a new formatYorick Peterse
This commit migrates events data in such a way that push events are stored much more efficiently. This is done by creating a shadow table called "events_for_migration", and a table called "push_event_payloads" which is used for storing push data of push events. The background migration in this commit will copy events from the "events" table into the "events_for_migration" table, push events in will also have a row created in "push_event_payloads". This approach allows us to reclaim space in the next release by simply swapping the "events" and "events_for_migration" tables, then dropping the old events (now "events_for_migration") table. The new table structure is also optimised for storage space, and does not include the unused "title" column nor the "data" column (since this data is moved to "push_event_payloads"). == Newly Created Events Newly created events are inserted into both "events" and "events_for_migration", both using the exact same primary key value. The table "push_event_payloads" in turn has a foreign key to the _shadow_ table. This removes the need for recreating and validating the foreign key after swapping the tables. Since the shadow table also has a foreign key to "projects.id" we also don't have to worry about orphaned rows. This approach however does require some additional storage as we're duplicating a portion of the events data for at least 1 release. The exact amount is hard to estimate, but for GitLab.com this is expected to be between 10 and 20 GB at most. The background migration in this commit deliberately does _not_ update the "events" table as doing so would put a lot of pressure on PostgreSQL's auto vacuuming system. == Supporting Both Old And New Events Application code has also been adjusted to support push events using both the old and new data formats. This is done by creating a PushEvent class which extends the regular Event class. Using Rails' Single Table Inheritance system we can ensure the right class is used for the right data, which in this case is based on the value of `events.action`. To support displaying old and new data at the same time the PushEvent class re-defines a few methods of the Event class, falling back to their original implementations for push events in the old format. Once all existing events have been migrated the various push event related methods can be removed from the Event model, and the calls to `super` can be removed from the methods in the PushEvent model. The UI and event atom feed have also been slightly changed to better handle this new setup, fortunately only a few changes were necessary to make this work. == API Changes The API only displays push data of events in the new format. Supporting both formats in the API is a bit more difficult compared to the UI. Since the old push data was not really well documented (apart from one example that used an incorrect "action" nmae) I decided that supporting both was not worth the effort, especially since events will be migrated in a few days _and_ new events are created in the correct format.
2017-07-05Create and use project path helpers that only need a project, no namespaceDouwe Maan
2017-05-12Consistently use monospace font for commit SHAs and branch and tag namesDouwe Maan
2016-05-26Added author to various Markdown calls in viewsYorick Peterse
This ensures all these calls have an author set, allowing the use of "all" mentions where possible.
2016-03-11Title attributes for activity feedJosh Frye
2015-10-14Use Gitlab::Markdown.render with :pipeline option rather than different methodsDouwe Maan
2015-09-03Improve paddings and set new colors for linksDmitriy Zaporozhets
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-05-15Fix push event.Douwe Maan
2015-02-14Upgrade to Rails 4.1.9Vinnie Okada
Make the following changes to deal with new behavior in Rails 4.1.2: * Use nested resources to avoid slashes in arguments to path helpers.
2014-10-10Use short_id instead of [0..N] for short version of commit shaDmitriy Zaporozhets
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-05-26links to issues on main dashboardskv
2013-11-01Show only first line of commit message on dashboardDmitriy Zaporozhets
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-09-10UI fixes for commits listsDmitriy Zaporozhets
2013-06-26Gravatar image fixes when gravatar unavailableIzaak Alpert
-Alt text to image was set to hash, which would make the page display hashes if the image/gravatar wasn't available, set the alt text to '', and made the main tool bar image follow the same or similar constraints as the other images (.avatar, .s26) Conflicts: app/assets/stylesheets/themes/ui_bb.scss app/views/snippets/_snippet.html.haml Change-Id: I42e1e86f535486fd2556d4b3e4591f3676eea033
2013-04-05Use data[:commits] hash from event to render push info on dashboardDmitriy Zaporozhets
2013-04-01Remove decorator calls and methods from views. Repalace with helper calls ↵Dmitriy Zaporozhets
when needed
2012-09-27Use Commit#show instead of Commits#show to view a single commitRobert Speicher
Commits#show (plural) is going to be for showing commit history on a specific path.
2012-09-24Working on dashboard restyle and events refactoringDmitriy Zaporozhets
2012-09-20Escape text passed directly to gfmRobert Speicher
2012-08-13Modern theme restyled. Better Profile -> Ui pageDmitriy Zaporozhets
2012-08-12Merge branch 'fix_commits_dashboard' of https://github.com/jouve/gitlabhq ↵randx
into jouve-fix_commits_dashboard Conflicts: app/views/events/_commit.html.haml
2012-08-11Fully embrace Ruby 1.9 hash syntaxRobert Speicher
Didn't bother with files in db/, config/, or features/
2012-08-10fix commit events on dashboardCyril
2012-08-02Update views for GFMRiyad Preukschas
2012-07-28Better visibility of event commit links & commits idsrandx
2012-07-25Update links in eventsRiyad Preukschas
2012-07-25Update links to commitsRiyad Preukschas
2012-07-22Update views to use CommitDecoratorRiyad Preukschas
2012-03-21Push events polishedv2.3.0Dmitriy Zaporozhets