- 04 Aug, 2016 12 commits
-
-
Rémy Coutable authored
Instrument Gitlab::Highlight ## What does this MR do? This instruments the class `Gitlab::Highlight`. ## Are there points in the code the reviewer needs to double check? No. ## Why was this MR needed? This class is not instrumented. ## What are the relevant issue numbers? #18592 ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [ ] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5644
-
Achilleas Pipinellis authored
Fix confusing description of a blocked user. ## What does this MR do? Rewrite confusing description of a blocked user in admin settings. If someone is blocked, the same message is displayed as if he is unblocked. ## Are there points in the code the reviewer needs to double check? No. ## Why was this MR needed? Because it seems that this is a cosmetic bug. ## What are the relevant issue numbers? None. ## Screenshots (if relevant) ![blocked_user](/uploads/0782a82760ae19661d69c63a97daaf33/blocked_user.png) ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [x] API support added - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5582
-
Rémy Coutable authored
Improve performance of SyntaxHighlightFilter ## What does this MR do? This MR improves the performance of `Banzai::Filter::SyntaxHighlightFilter`. See e9bacc6575d0002c6cab620075dea3dc7f93f100 for more information. ## Are there points in the code the reviewer needs to double check? Styling mostly. ## Why was this MR needed? Syntax highlighting is rather slow. ## What are the relevant issue numbers? #18592 ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [x] ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~ - [x] ~~API support added~~ - Tests - [x] ~~Added for this feature/bug~~ - [ ] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [ ] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5643
-
Rémy Coutable authored
Fix Import/Export error checking versions Fixes small bug preventing the correct error message about Import/Export version being displayed. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/20536 - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5638
-
Rémy Coutable authored
Improve AutolinkFilter#text_parse performance ## What does this MR do? This MR improves the performance of `AutolinkFilter#text_parse` by using XPath queries for filtering out most text nodes. ## Are there points in the code the reviewer needs to double check? Mostly the styling of things. ## Why was this MR needed? Parsing text nodes is slow, mostly because most of this happens in Ruby. ## What are the relevant issue numbers? https://gitlab.com/gitlab-org/gitlab-ce/issues/18593 ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [x] ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~ - [x] ~~API support added~~ - Tests - [x] ~~Added for this feature/bug~~ - [ ] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5629
-
Rémy Coutable authored
Remove unused images ## What does this MR do? Remove unused images ``` bg-header.png bg_fallback.png chosen-sprite.png diff_note_add.png icon-search.png icon_sprite.png images.png move.png progress_bar.gif slider_handles.png ``` ## Are there points in the code the reviewer needs to double check? Just need to check if the images are still being used
😄 ## Why was this MR needed? To reduce the technical debt of the project ## What are the relevant issue numbers? Closes #20499 ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5601 -
Rémy Coutable authored
Fix Mystery Guest ## What does this MR do? Makes the name of the local variable more expressive rather than using a character, which is the problem of the magic variable/mystery guest. ## Are there points in the code the reviewer needs to double check? Only the partial that receives the new name of the local variable is being called. ## Why was this MR needed? Ensure that the pass of local variable don't use a magic name. ## What are the relevant issue numbers? Closes #20510. - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - Tests - [x] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5657
-
Stan Hu authored
Don't setup DB for slack notification build ## What does this MR do? Fix error with build related to slack notification: https://gitlab.com/gitlab-org/gitlab-ee/builds/2834026 ## Are there points in the code the reviewer needs to double check? ## Why was this MR needed? ## What are the relevant issue numbers? ## Screenshots (if relevant) ## Does this MR meet the acceptance criteria? - [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [ ] API support added - Tests - [ ] Added for this feature/bug - [ ] All builds are passing - [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [ ] Branch has no merge conflicts with `master` (if you do - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5661
-
Ruben Davila authored
-
Herminio Torres authored
Magic Variable - Change the name of the variable to assign the local variable for partial, rather than `i` use the `index`. Don't pass a local variable called `i` to a partial.
-
Robert Speicher authored
Fix skip_repo parameter being ignored when destroying a namespace When destroying a namespace, the `skip_repo` parameter is supposed to prevent the repository directory from being destroyed and allow the namespace after_destroy hook to run. If the namespace fails to be deleted for some reason, we could be left with repositories that are deleted with existing projects. See merge request !5654
-
Stan Hu authored
When destroying a namespace, the `skip_repo` parameter is supposed to prevent the repository directory from being destroyed and allow the namespace after_destroy hook to run. If the namespace fails to be deleted for some reason, we could be left with repositories that are deleted with existing projects.
-
- 03 Aug, 2016 26 commits
-
-
Douwe Maan authored
change the API on the merge_request_diff model from diffs -> raw_diffs ## What does this MR do? Unify diffs API ## Are there points in the code the reviewer needs to double check? ## Why was this MR needed? ## What are the relevant issue numbers? ## Screenshots (if relevant) ## Does this MR meet the acceptance criteria? - ~~[ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added~~ - ~~[ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~ - ~~[ ] API support added~~ - Tests - ~~[ ] Added for this feature/bug~~ - [ ] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5650
-
Paco Guzman authored
-
Douwe Maan authored
Speed up methods that depend on diff stats only ## What does this MR do? Speeds up and reduces memory usage of `Commit#repo_changes`loop, `Repository#expire_avatar_cache` and `IrkerWorker`. It's a WIP because it need a new version of `gitlab_git` released with [these changes](https://gitlab.com/gitlab-org/gitlab_git/merge_requests/109). ## Are there points in the code the reviewer needs to double check? N/A ## Why was this MR needed? For large files committed, this method ends up loading them in memory which can consume lots of memory. ## What are the relevant issue numbers? https://gitlab.com/gitlab-org/gitlab-ce/issues/19441#note_13425892 ## Screenshots (if relevant) N/A ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [ ] ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~ - [ ] ~~API support added~~ - ~~Tests~~ - [ ] ~~Added for this feature/bug~~ - [ ] ~~All builds are passing~~ - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5568
-
Robert Speicher authored
Update the gitlab-shell version in the tmp/tests directory to the right version Previously the gitlab-shell version would never be updated if the directory existed via the `gitlab:shell:install` Rake task. This could lead to incompatibility issues or random errors. See merge request !5646
-
Stan Hu authored
Previously the gitlab-shell version would never be updated if the directory existed via the `gitlab:shell:install` Rake task. This could lead to incompatibility issues or random errors.
-
Clement Ho authored
-
Ahmad Sherif authored
-
Stan Hu authored
-
Ahmad Sherif authored
-
Douwe Maan authored
Cache diff syntax highlighted output ## What does this MR do? Cache highlighted diffs for merge requests when they are requested for existing merge requests but after each change on the merge request diff recalculate again the cache. I've introduced the concept of SafeDiffs which are the diffs that we're going to show on the UI and will be highlighted so maybe we can extend cache capabilities to more diffs. The more problematic part is what and how we cache the highlighted lines, for the moment what I did was store in Redis as Gitlab::Diff::Line serialized as an array of json objects, similar of what we do for commits and diffs on merge request diffs. The next step can be add a new field in the merge_request_diff object if we find it worth it. But let's first confirm this is the way to go ## What are the relevant issue numbers? Closes #20034 ## Screenshots (if relevant) ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - ~~[ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~ - ~~[ ] API support added~~ - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5401
-
Douwe Maan authored
-
Yorick Peterse authored
This class does quite a few interesting things so let's instrument it so we can see how much time is being spent in this class.
-
Yorick Peterse authored
By using Rouge::Lexer.find instead of find_fancy() and memoizing the HTML formatter we can speed up the highlighting process by between 1.7 and 1.8 times (at least when measured using synthetic benchmarks). To measure this I used the following benchmark: require 'benchmark/ips' input = '' Dir['./app/controllers/**/*.rb'].each do |controller| input << <<-EOF <pre><code class="ruby">#{File.read(controller).strip}</code></pre> EOF end document = Nokogiri::HTML.fragment(input) filter = Banzai::Filter::SyntaxHighlightFilter.new(document) puts "Input size: #{(input.bytesize.to_f / 1024).round(2)} KB" Benchmark.ips do |bench| bench.report 'call' do filter.call end end This benchmark produces 250 KB of input. Before these changes the timing output would be as follows: Calculating ------------------------------------- call 1.000 i/100ms ------------------------------------------------- call 22.439 (±35.7%) i/s - 93.000 After these changes the output instead is as follows: Calculating ------------------------------------- call 1.000 i/100ms ------------------------------------------------- call 41.283 (±38.8%) i/s - 148.000 Note that due to the fairly high standard deviation and this being a synthetic benchmark it's entirely possible the real-world improvements are smaller.
-
Achilleas Pipinellis authored
Add advanced troubleshooting for debugging issues with the Docker registry See merge request !5615
-
Achilleas Pipinellis authored
[ci skip]
-
James Lopez authored
-
Fatih Acet authored
Fix filter input alignment ## What does this MR do? If you carefully observe the filter inputs on the [issues page](https://gitlab.com/gitlab-org/gitlab-ce/issues) and the [projects dashboard page](https://gitlab.com/dashboard/projects), you will notice that those input fields are actually a few pixels lower than the UI elements beside them (More so for the projects dashboard page than the issues page). This MR fixes that alignment issue so that they are aligned to the buttons on their right. ## Are there points in the code the reviewer needs to double check? Shouldn't be ## Why was this MR needed? Improves the existing UI ## What are the relevant issue numbers? Closes #20559 ## Screenshots (if relevant) Before ![Screen_Shot_2016-08-02_at_5.42.28_PM](/uploads/8530fc6c9ce20f28ae74b950bc1bd6be/Screen_Shot_2016-08-02_at_5.42.28_PM.png) After ![Screen_Shot_2016-08-02_at_5.49.28_PM](/uploads/ec20e68045c2190aec52e5f059d1a3bc/Screen_Shot_2016-08-02_at_5.49.28_PM.png) After (with color markings) ![Screen_Shot_2016-08-02_at_5.49.25_PM](/uploads/6e032b1ffb438018f6fadf294c3cebd3/Screen_Shot_2016-08-02_at_5.49.25_PM.png) Before ![Screen_Shot_2016-08-02_at_5.41.19_PM](/uploads/11a3c30d0290328bb3298bc392facf9f/Screen_Shot_2016-08-02_at_5.41.19_PM.png) After ![Screen_Shot_2016-08-02_at_5.49.47_PM](/uploads/f8e20346a19dc67cc3e54788dc0e72fb/Screen_Shot_2016-08-02_at_5.49.47_PM.png) After (with color markings) ![Screen_Shot_2016-08-02_at_5.49.58_PM](/uploads/1839d5681ab2f3518609004511af86a6/Screen_Shot_2016-08-02_at_5.49.58_PM.png) ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - Tests - [x] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5633
-
Yorick Peterse authored
By using clever XPath queries we can quite significantly improve the performance of this method. The actual improvement depends a bit on the amount of links used but in my tests the new implementation is usually around 8 times faster than the old one. This was measured using the following benchmark: require 'benchmark/ips' text = '<p>' + Note.select("string_agg(note, '') AS note").limit(50).take[:note] + '</p>' document = Nokogiri::HTML.fragment(text) filter = Banzai::Filter::AutolinkFilter.new(document, autolink: true) puts "Input size: #{(text.bytesize.to_f / 1024 / 1024).round(2)} MB" filter.rinku_parse Benchmark.ips(time: 15) do |bench| bench.report 'text_parse' do filter.text_parse end bench.report 'text_parse_fast' do filter.text_parse_fast end bench.compare! end Here the "text_parse_fast" method is the new implementation and "text_parse" the old one. The input size was around 180 MB. Running this benchmark outputs the following: Input size: 181.16 MB Calculating ------------------------------------- text_parse 1.000 i/100ms text_parse_fast 9.000 i/100ms ------------------------------------------------- text_parse 13.021 (±15.4%) i/s - 188.000 text_parse_fast 112.741 (± 3.5%) i/s - 1.692k Comparison: text_parse_fast: 112.7 i/s text_parse: 13.0 i/s - 8.66x slower Again the production timings may (and most likely will) vary depending on the input being processed.
-
Achilleas Pipinellis authored
Move markdown doc to the right location See merge request !5635
-
Achilleas Pipinellis authored
[ci skip]
-
Paco Guzman authored
So we have raw_diffs too
-
Paco Guzman authored
This object will manage Gitlab::Git::Compare instances
-
Paco Guzman authored
Instead calling diff_collection.count use diff_collection.size which is cache on the diff_collection
-
Paco Guzman authored
Introducing the concept of SafeDiffs which relates diffs with UI highlighting.
-
Jacob Schatz authored
Remove delay when hitting Reply... button on page with a lot of comments Every time the "Reply..." button was hit, a new `GLForm` was instantiated (which is fine), which would then call `GitLab.GfmAutoComplete.setup()` without specifying which textarea we needed autocompletion on, which resulted in `GitLab.GfmAutoComplete.setup` iterating through every single textarea on the page. On a page with a lot of comments, where each comment would have its own textarea that will be used to edit the comment, this would take a long time and cause the whole page to hang for 2 seconds when a "Reply..." button was clicked. See merge request !5602
-
Jacob Schatz authored
Convert image diff background image to CSS ## What does this MR do? Replaces the `trans_bg.gif` image used for image diff background image with a CSS implementation of the same background image ## Are there points in the code the reviewer needs to double check? None ## Why was this MR needed? Uses CSS to replace the use of an image so that webpage rendering is slightly improved ## What are the relevant issue numbers? Closes #20500 ## Screenshots (if relevant) Before: ![Screen_Shot_2016-08-01_at_12.29.10_PM](/uploads/8269877c561c29e6b0ca988079ff3fc6/Screen_Shot_2016-08-01_at_12.29.10_PM.png) After: ![Screen_Shot_2016-08-01_at_12.29.16_PM](/uploads/cc88848b9c0e044445d19b889fd79271/Screen_Shot_2016-08-01_at_12.29.16_PM.png) ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5598
-
- 02 Aug, 2016 2 commits
-
-
Douwe Maan authored
Add simple identifier to public SSH keys ## What does this MR do? Adds a simple identifier of user_name + hostname to public SSH keys ## Are there points in the code the reviewer needs to double check? ## Why was this MR needed? To help people identify keys when they export them ## What are the relevant issue numbers? #18866 ## Screenshots (if relevant) ## Does this MR meet the acceptance criteria? - [ x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [ -] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [ -] API support added - Tests - [ x] Added for this feature/bug - [ x] All builds are passing - [ x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [ x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [ x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) Closes #18866 See merge request !5614
-
Douwe Maan authored
Redirect to external issue tracker from `/issues` Prior, in order to display the correct link to "Issues" in the project navigation, we were performing a check against the project to see if it used an external issue tracker, and if so, we used that URL. This was inefficient. Now, we simply _always_ link to `namespace_project_issues_path`, and then in the controller we redirect to the external tracker if it's present. This also removes the need for the `url_for_issue` helper. Bonus!
🎉 See merge request !5608
-