Commit Graph

1959 Commits

Author SHA1 Message Date
Lin Jen-Shin 3ced5ae68e Save the list of handlers in a constant 2016-06-15 16:31:28 +08:00
Lin Jen-Shin 5608e1a159 Raise first like an input check 2016-06-15 16:23:41 +08:00
Lin Jen-Shin a01623882e Avoid assignment in if 2016-06-15 16:18:40 +08:00
Lin Jen-Shin fcc6a59247 Blank line for private 2016-06-15 16:18:31 +08:00
Lin Jen-Shin 3b64c4f9d6 A blank line to separate exception raising 2016-06-15 16:16:44 +08:00
Lin Jen-Shin 4c09871450 Avoid using bang bang 2016-06-15 16:15:49 +08:00
Lin Jen-Shin 72184c16ab Rename to project_path which is more accurate 2016-06-15 15:54:04 +08:00
Lin Jen-Shin cb168c347a Remove empty lines at the beginning of files 2016-06-15 15:47:40 +08:00
Lin Jen-Shin e75391889e Merge branch 'master' into new-issue-by-email
* master: (1246 commits)
  Update CHANGELOG
  Update tests to make it work with Turbolinks approach
  Use Turbolink instead of ajax
  Reinitialize checkboxes to toggle event bindings
  Turn off handlers before binding events
  Removed console.log Uses outerWidth instead of width
  Revert "Added API endpoint for Sidekiq Metrics"
  Added API endpoint for Sidekiq Metrics
  Added CHANGELOG entry for allocations Gem/name fix
  Filter out classes without names in the sampler
  Update the allocations Gem to 1.0.5
  Put all sidebar icons in fixed width container
  Instrument private/protected methods
  Fix Ci::Build#artifacts_expire_in= when assigning invalid duration
  Fix grammar and syntax
  Update CI API docs
  UI and copywriting improvements
  Factorize members mails into a new Emails::Members module
  Factorize access request routes into a new :access_requestable route concern
  Factorize #request_access and #approve_access_request  into a new AccessRequestActions controller concern
  ...
2016-06-15 15:43:12 +08:00
Yorick Peterse ab91f1226f
Filter out classes without names in the sampler
We can't do a lot with classes without names as we can't filter by them,
have no idea where they come from, etc. As such it's best to just ignore
these.
2016-06-14 18:09:06 +02:00
Yorick Peterse 0ca7b3ba37 Merge branch '18449-instrument-grape-endpoints' into 'master'
Instrument Grape API endpoints

See merge request !4587
2016-06-14 14:29:55 +00:00
Yorick Peterse f558bf0de4 Merge branch '18527-instrument-private-methods' into 'master'
Instrument private methods and instance private methods

See merge request !4639
2016-06-14 14:28:40 +00:00
Paco Guzman dadc531353 Instrument private/protected methods
By default instrumentation will instrument public,
protected and private methods, because usually
heavy work is done on private method or at least
that’s what facts is showing
2016-06-14 15:17:51 +02:00
Kamil Trzcinski 3f5819fb7a Merge remote-tracking branch 'origin/master' into artifacts-expire-date 2016-06-14 14:49:59 +02:00
Yorick Peterse 4b964011cf Merge branch '18528-cpu-time-instrumentation' into 'master'
Measure CPU time for instrumented methods

See merge request !4640
2016-06-14 11:39:19 +00:00
Paco Guzman 509082bafb Instrument Grape Endpoint with Metrics::RackMiddleware
Generating the following tags

Grape#GET /projects/:id/archive

from Grape::Route objects like

{ :path => /:version/projects/:id/archive(.:format)
  :version => “v3”,
  :method => “GET” }

Use an instance variable to cache raw_path transformations.
This variable is only going to growth to the number of 
endpoints of the API, not with exact different requests

We can store this cache as an instance variable because 
middleware are initialised only once
2016-06-14 13:06:46 +02:00
Rémy Coutable 47cdb69921 Merge branch 'refactor/ci-config-add-global-entry' into 'master'
Add global entry with before script to new CI config

## What does this MR do?

This MR adds a new entries to a new CI config class. It is next refactoring step after !4462.

See #15060

See merge request !4482
2016-06-14 10:53:26 +00:00
Paco Guzman 120fbbd487 Measure CPU time for instrumented methods 2016-06-14 12:49:31 +02:00
Grzegorz Bizon 30e946ce8a Validate ci config entry value before processing nodes 2016-06-14 11:28:20 +02:00
Grzegorz Bizon 59eeec3ff8 Make method that composes ci config entry private 2016-06-14 10:48:51 +02:00
Douwe Maan 1cbd5c6686 Merge branch 'gitlab-auth-method-names' into 'master'
Improve Gitlab::Auth method names

Auth.find was a very generic name for a very specific method.
Auth.find_in_gitlab_or_ldap was inaccurate in GitLab EE where it also
looks in Kerberos.


See merge request !4589
2016-06-13 18:05:53 +00:00
Yorick Peterse ea7ff13410
Removed old comment from update_column_in_batches 2016-06-13 11:50:27 +02:00
Yorick Peterse 9c238dc970
Update columns in batches until no rows are left
Instead of updating a fixed number of rows (based on the amount of rows
available at the start of the update) the method
"update_column_in_batches" will now continue updating rows until it runs
out of rows to process.

For a table with a high rate of inserts this may result in the migration
taking quite some time. However, the alternative is not all rows being
updated or the "change_column_null" method raising an error due to there
being NULL values.
2016-06-13 11:38:57 +02:00
Yorick Peterse b33b7be53e
Handle NULL migration errors in migration helpers
This ensures that whenever changing the NULL constraint of a column
fails we still drop the column.
2016-06-13 11:22:58 +02:00
Grzegorz Bizon ebe14437e9 Merge branch 'master' into refactor/ci-config-add-global-entry
* master: (59 commits)
  Improved SVG sanitizer specs to include smoke tests for clean.
  Refactored SVG sanitizer
  Added SVG sanitizer fix to the changelog
  Refactor SVG sanitizer and prevent `xlink:href` to refer to external resources
  Fix SVG whitelisting to allow namespaced attributes
  Fix Error 500 when using closes_issues API with an external issue tracker
  Center layout navigation and remove icons
  Fix preferences_spec test
  Add back sidebar counters and username
  Only create the backup directory if it is local
  Fix safari logo loading animation safari bug
  Revert side nav to full width; remove border under nav; remove tooltips on nav links; stop page content shifting with side nav; put project nav in container
  Update media queries
  Fix profile test
  Fix logo at all screen widths, update sidebar text
  Move tanuki icon to center of nav bar; keep nav closed by default; remove collapsed nav cookie
  Remove unused MergeRequest#gitlab_merge_status method
  Add CHANGELOG item for labels/milestones navigation change
  Render issues link on issues subnav unless you visit merge request controller
  Render only issues/mr in subnav depends on context
  ...
2016-06-13 11:14:38 +02:00
Grzegorz Bizon 11c0d02283 Simplify ci config node factory 2016-06-13 09:58:35 +02:00
Grzegorz Bizon 7c8f3b0cfc Duplicate CI config node factory on class level 2016-06-13 08:50:12 +02:00
Gabriel Mazetto a9eaa20dcb Refactored SVG sanitizer 2016-06-12 21:05:58 -04:00
Gabriel Mazetto 13791c6704 Refactor SVG sanitizer and prevent `xlink:href` to refer to external resources 2016-06-12 21:05:58 -04:00
Gabriel Mazetto 02b882418a Fix SVG whitelisting to allow namespaced attributes 2016-06-12 21:05:57 -04:00
Robert Speicher 37be2007f9 Merge branch 'workhorse-helpers' into 'master'
Add workhorse controller and API helpers

Adds `send_git_blob` and `send_git_archive` controller and API helpers to reduce duplication and make Workhorse easier for a developer to work with.

See merge request !4486
2016-06-10 16:21:26 +00:00
Jacob Vosmaer 0e896ffe4e Improve Gitlab::Auth method names
Auth.find was a very generic name for a very specific method.
Auth.find_in_gitlab_or_ldap was inaccurate in GitLab EE where it also
looks in Kerberos.
2016-06-10 14:51:16 +02:00
Grzegorz Bizon cc373a3550 Add factory for fabricating new ci config nodes 2016-06-10 14:01:07 +02:00
Douwe Maan a9a9f19b0b Merge branch 'gh-rate-limit' into 'master'
Wrap all rate limiting logic inside GitHub API client

## What does this MR do?

Move the actual rate limiting logic to GitHub API to clean the code inside the GitHub importer, and avoid code duplication.

## Are there points in the code the reviewer needs to double check?

No there aren't.

## Why was this MR needed?

Avoid code duplication to handle API rate limit in every call to the GitHub API.

## What are the relevant issue numbers?

There are none.

## Screenshots (if relevant)

Not relevant.

See merge request !4552
2016-06-10 10:34:19 +00:00
Douwe Maan 16bd4e5668 Merge branch 'master' into workhorse-helpers 2016-06-10 12:28:04 +02:00
Grzegorz Bizon 5abfc7fa71 Define ci entry accessor instead of method_missing 2016-06-10 11:32:49 +02:00
Grzegorz Bizon 12080ba150 Simplify new ci config entry class interface 2016-06-10 11:26:03 +02:00
Grzegorz Bizon 828a15bccd Rename method used to allow node in Ci config 2016-06-10 10:49:47 +02:00
Grzegorz Bizon 51046dd226 Merge branch 'master' into refactor/ci-config-add-global-entry
* master: (147 commits)
  Minor MR comment fixes.
  Update CHANGELOG for 8.8.4 and 8.8.5
  Properly quote table name in Rake task for MySQL and PostgreSQL compatibility
  Checks based on whether data is loaded not undefined
  Checks for undefined when inserting autocomplete into textarea
  Ignore frequent emojis in search.
  Fixed tests
  CHANGELOG
  Improved the UX of issue & milestone date picker
  Change date format to be non zero padded in order to fix failing test
  Update method name for better understanding
  Add tests for dates on tooltips
  Fix local timeago on user dashboard
  Update CHANGELOG
  Toggling a task in a description with mentions doesn't creates a Todo
  Update CHANGELOG
  Fixed failing label subscribe test
  Tests update
  Updated subscribe icon
  Fixed failing tests
  ...
2016-06-10 10:49:07 +02:00
Douglas Barbosa Alexandre cef3fd2899 Wrap all rate limiting logic inside GitHub API client 2016-06-09 12:43:06 -03:00
Fatih Acet d866faf251 Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into award-emoji-fixes 2016-06-09 16:11:07 +03:00
Grzegorz Bizon d7e1251161 Rename method that returns allowed nodes in Ci config 2016-06-09 14:59:59 +02:00
Grzegorz Bizon 99ee39bf6c Add comments to new CI config classes and modules 2016-06-09 13:15:54 +02:00
Douwe Maan 30ee4ea665 Merge branch 'saml-ldap-link-flow' into 'master'
Adjust the SAML control flow to allow LDAP identities to be added to an existing SAML user.

## What does this MR do?

It correctly lets an existing SAML user to add their LDAP identity automatically at login.

## Why was this MR needed?

A customer had issues with the `auto_link_ldap_user` feature. The flow was not working if there was an account with a SAML identity, but no LDAP identity. GitLab would pick up the correct LDAP person, but due to the order of the flow, that LDAP person was never associated with the user.

## What are the relevant issue numbers?

Fixes #17346 

/cc @dblessing @balameb @stanhu 

See merge request !4498
2016-06-09 10:48:31 +00:00
Grzegorz Bizon 20ccd4465b Do not require Ci config node to have a hash value 2016-06-09 12:35:24 +02:00
Grzegorz Bizon 6a319fd287 Make it possible configure Ci entry description 2016-06-09 10:53:56 +02:00
Grzegorz Bizon d9d5042fd9 Extract method that composes new Ci config entry 2016-06-09 10:28:44 +02:00
Grzegorz Bizon 33cd090b93 Move new Ci config configurable DSL to concern 2016-06-09 10:08:49 +02:00
Fatih Acet 92af60c244 Move award_menu_url variable into gon object. 2016-06-09 03:37:40 +03:00
Patricio Cano 9282810fb7 Syntax fixes and better logging around the `ldap_person` method. 2016-06-08 18:09:43 -05:00