- 27 Jun, 2016 3 commits
-
-
Robert Speicher authored
-
Connor Shea authored
Add max-height to prevent images from displaying larger than the provided screen size. Also fix a failing test and add a new one.
-
Z.J. van de Weg authored
-
- 24 Jun, 2016 1 commit
-
-
Yorick Peterse authored
This commit changes the way certain documents are rendered (currently only Notes) and how documents are redacted. Previously both rendering and redacting would run on a per document basis. The result of this was that for every document we'd have to run countless queries just to figure out if we could display a set of links or not. This commit changes things around so that redacting Markdown documents is no longer tied into the html-pipeline Gem. This in turn allows it to redact multiple documents in a single pass, thus reducing the number of queries needed. In turn rendering issue/merge request notes has been adjusted to take advantage of this new setup. Instead of rendering Markdown somewhere deep down in a view the Markdown is rendered and redacted in the controller (taking the current user and all that into account). This has been done in such a way that the "markdown()" helper method can still be used on its own. This particular commit also paves the way for caching rendered HTML on object level. Right now there's an accessor method Note#note_html which is used for setting/getting the rendered HTML. Once we cache HTML on row level we can simply change this field to be a column and call a "save" whenever needed and we're pretty much done.
-
- 23 Jun, 2016 2 commits
-
-
Paco Guzman authored
-
James Lopez authored
-
- 22 Jun, 2016 1 commit
-
-
Drew Blessing authored
-
- 21 Jun, 2016 3 commits
-
-
Yorick Peterse authored
In the past this class would use Project#get_issue to retrieve an issue by its ID. This method would automatically determine whether to return an Issue or ExternalIssue. This commit changes IssueReferenceFilter to handle external issues again and in a somewhat more explicit manner than before. Fixes gitlab-org/gitlab-ce#18827
-
Alejandro Rodríguez authored
A lot of git operations were being repeated, for example, to build a url you would ask if the path was a Tree, which would call a recursive routine in Gitlab::Git::Tree#where, then ask if the path was a Blob, which would call a recursive routine at Gitlab::Git::Blob#find, making reference to the same git objects several times. Now we call Rugged::Tree#path, which allows us to determine the type of the path in one pass. Some other minor improvement added, like saving commonly used references instead of calculating them each time.
-
Kamil Trzcinski authored
-
- 20 Jun, 2016 1 commit
-
-
ZJ van de Weg authored
-
- 18 Jun, 2016 2 commits
-
-
Stan Hu authored
When using #XYZ in Markdown text, if XYZ exceeds the maximum value of a signed 32-bit integer, we get an exception when the Markdown render attempts to run `where(iids: XYZ)`. Introduce a method that will throw out out-of-bounds values. Closes #18777
-
Timothy Andrew authored
1. An exception would be raised if the filter was called with an invalid URI. Mainly because we weren't catching the `Addressable` exception. 2. This commit fixes it and adds a spec for the filter.
-
- 17 Jun, 2016 8 commits
-
-
Yorick Peterse authored
Previously we'd create a separate Metric instance for every method call that would exceed the method call threshold. This is problematic because it doesn't provide us with information to accurately get the _total_ execution time of a particular method. For example, if the method "Foo#bar" was called 4 times with a runtime of ~10 milliseconds we'd end up with 4 different Metric instances. If we were to then get the average/95th percentile/etc of the timings this would be roughly 10 milliseconds. However, the _actual_ total time spent in this method would be around 40 milliseconds. To solve this problem we now create a single Metric instance per method. This Metric instance contains the _total_ real/CPU time and the call count for every instrumented method.
-
Paco Guzman authored
-
Grzegorz Bizon authored
-
Grzegorz Bizon authored
-
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4669Kamil Trzcinski authored
When requesting tags a `application/json` is used.
-
Grzegorz Bizon authored
This follows a standard `ActiveModel` pattern of creating a custom validators. We use `ActiveModel::EachValidator` here that reuses methods provided by `LegacyValidationHelpers`. We will remove `LegacyValidationHelpers` on some point in the future, at the later stages of CI configuration refactoring. It may be possible to rewrite custom validators to use format like: `validates :config, array_of: String`
-
Kamil Trzcinski authored
Currently the RegexpError can be raised when processing next stage which leads to 500 in different places of code base. This adds early check that regexps used in only and except are valid.
-
Grzegorz Bizon authored
-
- 16 Jun, 2016 6 commits
-
-
Grzegorz Bizon authored
This makes use of `ActiveModel::Validations` encapsulated in a separate class that is accessible from a node object.
-
Paco Guzman authored
-
Yorick Peterse authored
This reduces the number of queries executed in IssueReferenceFilter by retrieving the various projects/issues that may be referenced in batches _before_ iterating over all the HTML nodes. A chunk of the logic resides in AbstractReferenceFilter so it can be re-used by other filters in the future.
-
James Lopez authored
This reverts commit 13e37a3e.
-
James Lopez authored
-
Paco Guzman authored
-
- 15 Jun, 2016 7 commits
-
-
Ilan Shamir authored
-
Yorick Peterse authored
This ensures that whatever locks are acquired aren't held onto until the end of the transaction (= after _all_ rows have been updated). Timing wise there's also no difference between using a transaction and not using one.
-
Yorick Peterse authored
By passing a block to update_column_in_batches() one can now customize the queries executed. This in turn can be used to only update a specific set of rows instead of simply all the rows in the table.
-
Grzegorz Bizon authored
-
Kamil Trzcinski authored
-
James Lopez authored
-
James Lopez authored
-
- 14 Jun, 2016 6 commits
-
-
Yorick Peterse authored
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.
-
Paco Guzman authored
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
-
Paco Guzman authored
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
-
Kamil Trzcinski authored
-
Paco Guzman authored
-
Grzegorz Bizon authored
-