Commit Graph

1802 Commits

Author SHA1 Message Date
Kamil Trzciński 6017e3b90d Merge branch 'fix/gb/fix-head-pipeline-when-pipeline-has-errors' into 'master'
Fix merge request head pipeline when pipeline has errors

Closes #36657

See merge request !13664
2017-08-21 11:58:41 +00:00
Sean McGivern fa293df2b7 Merge branch '35343-inherit-milestones-and-labels' into 'master'
copy milestones and labels from issue when using create merge request button

Closes #35343

See merge request !13461
2017-08-21 10:10:49 +00:00
Michael Kozono bd578d96b4 Add namespace errors from User#after_update 2017-08-18 10:31:59 -07:00
haseeb 539694a383 [skip ci] changelog and minor style changes added 2017-08-18 20:04:26 +05:30
Grzegorz Bizon 22f1b04637 Update merge request pipeline even if if has errors 2017-08-18 14:12:40 +02:00
Grzegorz Bizon accaf7eaf2 Make create pipeline service specs more readable 2017-08-18 13:53:11 +02:00
haseeb d368b2d202 moved merge parms to service 2017-08-17 20:14:37 +05:30
Robert Speicher ec34b2d051 Merge branch 'dm-gpg-signature-performance' into 'master'
Only create commit GPG signature when necessary

See merge request !13561
2017-08-16 18:34:55 +00:00
Douwe Maan ba7251fefd Only create commit GPG signature when necessary 2017-08-16 18:57:50 +02:00
Rémy Coutable 7b68bdce15 Merge branch 'rs-trailingwhitespace-cop' into 'master'
Enable Layout/TrailingWhitespace cop and auto-correct offenses

See merge request !13573
2017-08-16 10:27:46 +00:00
Jarka Kadlecova 04ee970cc1 Don't create event in Merge Request Create Service 2017-08-16 09:41:52 +00:00
Robert Speicher 4edfad9678 Enable Layout/TrailingWhitespace cop and auto-correct offenses 2017-08-15 13:44:37 -04:00
Douwe Maan e645ab2233 Merge branch 'forks-count-cache' into 'master'
Cache the number of forks of a project

See merge request !13535
2017-08-15 08:13:01 +00:00
Robert Speicher 87bd9c56cc Merge branch '36378-error-raising-expectation-in-spec-fix' into 'master'
Fix positive raise_error expectation without specifying the error type expected…

Closes #36378

See merge request !13542
2017-08-14 20:39:31 +00:00
Tiago Botelho 9371cf3acf Fix positive raise_error expectation without specifying the error type expected in Project::DestroyService specs 2017-08-14 19:37:22 +01:00
Yorick Peterse aef9f1eb94
Cache the number of forks of a project
The number of forks of a project doesn't change very frequently and
running a COUNT(*) every time this information is requested can be quite
expensive. We also end up running such a COUNT(*) query at least twice
on the homepage of a project.

By caching this data and refreshing it when necessary we can reduce
project homepage loading times by around 60 milliseconds (based on the
timings of https://gitlab.com/gitlab-org/gitlab-ce).
2017-08-14 18:00:28 +02:00
Lin Jen-Shin 349db4802b Merge remote-tracking branch 'upstream/master' into 36089-handle-ref-failure-better
* upstream/master: (47 commits)
  Update CHANGELOG.md for 9.4.5
  Update charlock_holmes
  add a changelog entry
  switch to multi-line before block
  restructure the #new_key notification spec
  don't send devise notifications to the ghost user
  reset_delivered_emails before testing #new_key
  skip the :read_project check for new_project_member
  move the member spec to be with the other ones
  add a spec for new_group_member
  add a spec for never emailing the ghost user
  rubocop fix
  a membership with no user is always notifiable
  check notifiability for more emails
  add Member#notifiable?(type, opts)
  make NotificationRecipient a little more customizable
  Add notes about database performance for MySQL
  fix confidential border issue as well as confidential styles leaking on new MR
  Migrate force push check to Gitaly
  Add option to disable project export on instance
  ...
2017-08-14 19:33:35 +08:00
http://jneen.net/ d1c1a1ead6 switch to multi-line before block 2017-08-11 16:02:12 -07:00
http://jneen.net/ 02b5d359b5 restructure the #new_key notification spec 2017-08-11 16:02:11 -07:00
http://jneen.net/ cc4f77c632 reset_delivered_emails before testing #new_key
since the mere act of creating the key sends an email :|
2017-08-11 16:02:09 -07:00
http://jneen.net/ 4a3b18cbd8 move the member spec to be with the other ones
and add one
2017-08-11 16:02:07 -07:00
http://jneen.net/ b0600b0156 add a spec for new_group_member 2017-08-11 16:02:06 -07:00
http://jneen.net/ b5809822b1 add a spec for never emailing the ghost user 2017-08-11 16:02:06 -07:00
http://jneen.net/ 0268fc2ffc check notifiability for more emails 2017-08-11 16:02:03 -07:00
Sean McGivern e80a893ff0 Merge branch 'split-events-into-push-events' into 'master'
Use a separate table for storing push events

See merge request !12463
2017-08-11 14:40:03 +00:00
Lin Jen-Shin 3b0dcbf235 Merge remote-tracking branch 'upstream/master' into 36089-handle-ref-failure-better
* upstream/master:
  Fix merge request diff deserialisation when too_large was absent
  Bumps omniauth-ldap gem version to 2.0.4
  Remove an unnecessary `let` in spec/features/projects/user_edits_files_spec.rb
  Remove documentation about rules that are now enforced by RuboCop
  Enable the RSpec/HookArgument cop and auto-correct offenses
2017-08-11 20:30:14 +08:00
Lin Jen-Shin e04c1ae7c7 Merge remote-tracking branch 'upstream/master' into 36089-handle-ref-failure-better
* upstream/master: (62 commits)
  Update gitlab.po: Missing 'r' in "Fouché" that comes from "Fourcher" verb.
  Docs: update user docs index
  Fix minor typos in views
  Fix Layout/SpaceBeforeBlockBraces violation in bin/changelog_spec
  Merge branch 'rs-alphanumeric-ssh-params' into 'security-9-4'
  Merge branch 'import-symlinks-9-3' into 'security-9-3'
  Fix wrong method call on prometheus histogram
  Document new all-in-one Helm chart - docs
  Fix 404 on link path
  Fix line numbers not matching up to code in code viewer.
  Hide overflow-x on collapsed sidebar
  removed global use of breakpoint checker
  Increase performance of the breakpoint size checker
  Filter sensitive query string parameters from NGINX access logs
  Added a template for database changes
  Render new issue link in failed job as a regular link instead of a UJS one
  Include RE2 in the upgrade docs
  Remove affix plugin from issuable sidebar with new navigation
  Fix linter error
  alternative route for download archive
  ...
2017-08-11 19:15:35 +08:00
Lin Jen-Shin ae7c52a060 Fix more tests 2017-08-11 17:54:34 +08:00
Robert Speicher c8b802471b Enable the RSpec/HookArgument cop and auto-correct offenses 2017-08-10 19:29:42 -04:00
haseeb 59d7ffad06 tests for inheriting milestones and labels 2017-08-11 00:14:15 +05:30
Yorick Peterse 0395c47193
Migrate events into a new format
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-08-10 17:45:44 +02:00
Lin Jen-Shin 412db1874f Fix some tests and report the error message 2017-08-09 21:41:45 +08:00
Rémy Coutable c946ee1282
Enable the Layout/SpaceBeforeBlockBraces cop
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-08-09 11:52:22 +02:00
blackst0ne 98535fc12c Add checks for branch existence before changing HEAD 2017-08-08 12:10:55 +11:00
Sean McGivern 5f30350c5b Merge branch '35761-convdev-perc' into 'master'
Store & use ConvDev percentages returned by Version app

Closes #35761

See merge request !13217
2017-08-07 20:25:32 +00:00
Robert Speicher dd3d422193 Merge branch 'github' into 'master'
Improve GitHub importer

Closes #27429

See merge request !12886
2017-08-07 19:27:42 +00:00
Sean McGivern 4c8b666893 Merge branch 'zj-project-templates' into 'master'
Allow projects to be started from a template

Closes #32420

See merge request !13108
2017-08-07 19:24:14 +00:00
Robert Speicher 4e2b630df7 Merge branch 'group-milestone-references-system-notes' into 'master'
Support group milestone references

Closes #34778

See merge request !13289
2017-08-07 19:22:41 +00:00
Jarka Kadlecova 0f9bde41fc Store & use ConvDev percentages returned by Version app 2017-08-07 20:52:08 +02:00
Robert Speicher f8d34ab5ab Merge branch 'wiki_title' into 'master'
add feature rename wiki title

Closes #27800

See merge request !10069
2017-08-07 16:37:44 +00:00
Douglas Barbosa Alexandre 517a9f97c7 Does not fetch repository when importing from GitHub on import service 2017-08-07 13:06:13 -03:00
Rémy Coutable 66e7b4cd07 Merge branch 'add-star-for-action-scope' into 'master'
add star for action scope, in order to delete image from registry

Closes #26465

See merge request !13248
2017-08-07 15:39:19 +00:00
Z.J. van de Weg 2e6aa4f25e
After merge cleanup 2017-08-07 15:09:14 +02:00
Mehdi Lahmam 5ad9d94d8e Add `/assign me` alias support for assigning issuables to oneself
Currently, when a user wants to assign an issue/MR to himself, he needs
to type his full username or select it from the suggested ones in the
dropdown list.
This commits suggest a faster solution which is typing `/assign me`

Closes #35304.
2017-08-07 14:40:33 +02:00
Sean McGivern 76b80d6e96 Show group milestones in autocomplete 2017-08-07 11:55:01 +01:00
Sean McGivern ca923d4899 Create system notes for group milestone changes 2017-08-07 11:55:00 +01:00
Filipa Lacerda 3b9012871d Merge branch 'master' into zj-project-templates
* master: (623 commits)
  Fix issues with pdf-js dependencies
  fix missing changelog entries for security release on 2017-01-23
  Update top bar issues icon
  Fix pipeline icon in contextual nav for projects
  Since mysql is not a priority anymore, test it less
  Fix order of CI lint ace editor loading
  Add container registry and spam logs icons
  Fix different Markdown styles
  Backport to CE for:
  Make new dropdown dividers full width
  Fix spec
  Fix spec
  Fix spec
  Bump GITLAB_SHELL_VERSION and GITALY_VERSION to support unhiding refs
  Add changelog
  Install yarn via apt in update guides
  Use long curl options
  fix
  Add a spec for concurrent process
  Remove monkey-patched Array.prototype.first() and last() methods
  ...
2017-08-07 11:09:50 +01:00
Lin Jen-Shin 64aa9e21b2 Rename user_can_admin? because it's more accurate
Also fix the test because we no longer have :empty_project,
just use :project is the same as before
2017-08-07 17:29:34 +08:00
Lin Jen-Shin b9a8147333 Merge remote-tracking branch 'upstream/master' into add-star-for-action-scope
* upstream/master: (184 commits)
  Fix issues with pdf-js dependencies
  fix missing changelog entries for security release on 2017-01-23
  Update top bar issues icon
  Fix pipeline icon in contextual nav for projects
  Since mysql is not a priority anymore, test it less
  Fix order of CI lint ace editor loading
  Add container registry and spam logs icons
  Fix different Markdown styles
  Backport to CE for:
  Make new dropdown dividers full width
  Fix spec
  Fix spec
  Fix spec
  Bump GITLAB_SHELL_VERSION and GITALY_VERSION to support unhiding refs
  Add changelog
  Install yarn via apt in update guides
  Use long curl options
  fix
  Add a spec for concurrent process
  Remove monkey-patched Array.prototype.first() and last() methods
  ...
2017-08-07 16:19:28 +08:00
Sean McGivern ee908e2382 Merge branch 'refactor.notification-recipient-builders' into 'master'
Refactor.notification recipient builders

See merge request !13197
2017-08-04 09:54:52 +00:00