summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Ensure branch cleanup regardless of whether the import process succeedsgh-branch-cleanupDouglas Barbosa Alexandre2016-06-021-2/+2
|
* Fix serious performance bug with rendering Markdown with InlineDiffFilterStan Hu2016-06-011-4/+8
| | | | | | | | | Nokogiri's `node.replace` was being unnecessarily called for every text node in the document due to a comparison bug. The code previously was comparing the HTML representation of the full document against the text node, which would always fail. Fix the comparison to just compare the modified text. Closes #18011
* Merge branch 'style/enable-semicolon-rubocop-cop' into 'master' Robert Speicher2016-06-011-1/+1
|\ | | | | | | | | | | | | | | | | Enable Style/Semicolon rubocop style cop Don't use semicolons to terminate expressions. See #17478. See merge request !4351
| * Enable Style/Semicolon rubocop style copstyle/enable-semicolon-rubocop-copGrzegorz Bizon2016-06-011-1/+1
| | | | | | | | See #17478
* | Merge branch 'separate-banzai-references' into 'master' Douwe Maan2016-06-0129-276/+596
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | Separate reference gathering from rendering This is a required step to allow batch processing when gathering references. This in turn would allow grabbing (for example) all mentioned users of an issue/merge request using a single query. cc @rspeicher @DouweM See merge request !3969
| * | Split Markdown rendering & reference gatheringYorick Peterse2016-05-2628-276/+562
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This splits the Markdown rendering and reference extraction phases into two distinct code bases. The reference extraction phase no longer relies on the html-pipeline Gem (and any related code) and allows for extracting of references from multiple HTML nodes in a single pass. This means that if you want to extract user references from 200 comments you no longer need to run 200 times N number of queries, instead only a handful of queries may be needed.
| * | Added Gitlab::LazyYorick Peterse2016-05-261-0/+34
| | | | | | | | | | | | | | | | | | | | | This class can be used to lazy-evaluate blocks of code the first time they're called. This can be useful when a method performs a certain heavy operation (e.g. a SQL query) that you only want to perform whenever the result is used for the first time.
* | | Merge branch 'current-settings-use-request-store-during-request'Douwe Maan2016-06-011-9/+13
|\ \ \
| * | | Try and use cache for application settings even when the db is not connectedcurrent-settings-use-request-store-during-requestDJ Mountney2016-05-291-2/+2
| | | |
| * | | Only use RequestStore for current_application_settings during a requestDJ Mountney2016-05-271-9/+13
| | | | | | | | | | | | | | | | | | | | This fixes an issue where the RequestStore was being populated with the settings in the unicorn master during the rails initializers. Each forked worker would then start their first request with an uncleaned RequestStore.
* | | | Merge branch 'fix-404-labels-in-todos' into 'master' Douwe Maan2016-06-011-1/+3
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix 404 page when viewing TODOs that contain milestones or labels in different projects A user viewing the TODOs page will see a 404 if there are mentioned milestones or labels in multiple different projects. This is likely a caching bug and only occurs when Markdown rendering occurs across multiple projects, which is why it's so tricky to reproduce. This is what I think is happening: 1. LabelReferenceFilter#references_in encounters label ~X for ProjectA and finds the label in the DB as id = 1. 2. LabelReferenceFilter.references_in yields [1, 'X', nil, ...] 3. Since project_ref is nil, AbstractReferenceFilter#project_from_ref_cache caches nil => ProjectA. 4. LabelReferenceFilter#references_in encounters label ~Y for ProjectB and finds the label in the DB as id = 2. 5. LabelReferenceFilter.references_in yields [2, 'Y', nil, ...] 6. AbstractReferenceFilter#project_from_ref_cache lookups nil and returns ProjectA. It was supposed to be ProjectB. 7. A is the wrong project, so the label lookup fails. This MR expands the `project_ref` to the right value as soon as we have it to avoid this caching bug. Closes #17898 See merge request !4312
| * | | | Fix 404 page when viewing TODOs that contain milestones or labels in ↵Stan Hu2016-05-311-1/+3
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | different projects A user viewing the TODOs page will see a 404 if there are mentioned labels in multiple different projects. This is likely a caching bug and only occurs when Markdown rendering occurs across multiple projects, which is why it's so tricky to reproduce. This is what I think is happening: 1. LabelReferenceFilter#references_in encounters label ~X for ProjectA and finds the label in the DB as id = 1. 2. LabelReferenceFilter.references_in yields [1, 'X', nil, ...] 3. Since project_ref is nil, AbstractReferenceFilter#project_from_ref_cache caches nil => ProjectA. 4. LabelReferenceFilter#references_in encounters label ~Y for ProjectB and finds the label in the DB as id = 2. 5. LabelReferenceFilter.references_in yields [2, 'Y', nil, ...] 6. AbstractReferenceFilter#project_from_ref_cache lookups nil and returns ProjectA. It was supposed to be ProjectB. 7. A is the wrong project, so the label lookup fails. This MR caches Markdown references if the key is present. Closes #17898
* | | | Merge branch 'issue_15557' into 'master' Rémy Coutable2016-06-012-8/+8
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix error 500 when sorting issues by milestone due date and filtering by labels fixes #15557 See merge request !4327
| * | | | Add leading comment space copissue_15557Felipe Artur2016-05-313-9/+9
| | |/ / | |/| |
* | | | Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ceDmitriy Zaporozhets2016-06-013-1/+3
|\ \ \ \ | | |/ / | |/| |
| * | | Create the specified remote directory during backuprs-create-remote-backup-folderRobert Speicher2016-05-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is idempotent, so there's no harm calling it if the directory already exists. Closes #12710
| * | | Add Application Setting to configure Container Registry token expire delay ↵Kamil Trzcinski2016-05-312-0/+2
| | | | | | | | | | | | | | | | (default 5min)
* | | | Merge branch 'data_leak' into 'master' Robert Speicher2016-05-311-1/+1
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | Confidential notes data leak Fixes part of https://gitlab.com/gitlab-org/gitlab-ee/issues/575 See merge request !1967
| * | | Confidential notes data leakValery Sizov2016-05-311-1/+1
| |/ /
* | | Merge branch 'rubocop/enable-negatedif-style-cop' into 'master' Robert Speicher2016-05-301-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable Style/NegatedIf Rubocop cop Favor `unless` over `if` for negative conditions (or control flow ||). ```ruby # bad do_something if !some_condition # bad do_something if not some_condition # good do_something unless some_condition # good some_condition || do_something ``` See #17478 See merge request !4355
| * | | Enable Style/NegatedIf Rubocop coprubocop/enable-negatedif-style-copGrzegorz Bizon2016-05-301-1/+1
| |/ / | | | | | | | | | | | | | | | | | | Favor `unless` over `if` for negative conditions (or control flow ||). See #17478
* | | Merge branch 'rubocop/enable-literal-in-condition-cop' into 'master' Robert Speicher2016-05-301-3/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable Lint/LiteralInCondition rubocop cop Detects literals used in conditions. See #17478 See merge request !4354
| * | | Enable Lint/LiteralInCondition rubocop coprubocop/enable-literal-in-condition-copGrzegorz Bizon2016-05-301-3/+2
| |/ / | | | | | | | | | | | | | | | Checks of literals used in conditions. See #17478
* | | Merge branch 'style/enable-rubocop-indent-assignment-cop' into 'master' Robert Speicher2016-05-301-7/+7
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable Style/IndentAssignment Rubocop style cop Checks the indentation of the first line of the right-hand-side of a multi-line assignment. See #17478 See merge request !4348
| * | | Enable Style/IndentAssignment Rubocop style copstyle/enable-rubocop-indent-assignment-copGrzegorz Bizon2016-05-301-7/+7
| |/ / | | | | | | | | | See #17478
* | | Merge branch 'style/enable-while-until-do-rubocop-style-cop' into 'master' Robert Speicher2016-05-301-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable Style/WhileUntilDo rubocop style cop Checks for redundant `do` after `while` or `until`. See #17478 See merge request !4350
| * | | Enable Style/WhileUntilDo rubocop style copstyle/enable-while-until-do-rubocop-style-copGrzegorz Bizon2016-05-301-1/+1
| |/ / | | | | | | | | | See #17478
* | | Merge branch 'rubocop/enable-redundant-parentheses-cop' into 'master' Robert Speicher2016-05-301-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable Style/RedundantParentheses rubocop cop Checks for parentheses that seem not to serve any purpose. See #17478 See merge request !4361
| * | | Enable Style/RedundantParentheses rubocop coprubocop/enable-redundant-parentheses-copGrzegorz Bizon2016-05-301-1/+1
| |/ / | | | | | | | | | See #17478
* | | Enable Style/SpaceBeforeComment rubocop coprubocop/enable-space-before-comment-copGrzegorz Bizon2016-05-301-1/+1
|/ / | | | | | | See #17478
* | Merge branch 'fix/gitlab-importer-issue' into 'master' Robert Speicher2016-05-261-3/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | Fix gitlab importer issue Fixed credentials not being called correctly - probably some bad refactoring or search & replace... Fixes https://gitlab.com/gitlab-org/gitlab-ee/issues/565 See merge request !4301
| * | fix bad refactoring of import data credentialsJames Lopez2016-05-261-3/+3
| |/
* | Merge branch 'measure-proxy-timing' into 'master' Yorick Peterse2016-05-261-0/+24
|\ \ | |/ |/| | | | | Measure proxy flight time See merge request !4278
| * Rename metric to 'rails queue duration'Jacob Vosmaer2016-05-261-2/+2
| |
| * Align class name with field nameJacob Vosmaer2016-05-251-1/+1
| |
| * Send data to InfluxDB instead of stdoutJacob Vosmaer2016-05-251-4/+6
| |
| * Measure proxy timing: needs influxdb codeJacob Vosmaer2016-05-241-0/+22
| |
* | Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ceDmitriy Zaporozhets2016-05-263-2/+9
|\ \
| * \ Merge branch 'updated-contrib-calendar' into 'master' Jacob Schatz2016-05-251-1/+1
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | POC: Updated contrib calendar In an effort to cut down the JS file size - i've removed the heatmap calendar used for the contributing calendar on users profiles. We already have d3 on the page so why not use it instead of using a library which uses it? ![Screen_Shot_2016-04-27_at_11.08.41](/uploads/64c40f0c766f800fd0e33ac8be7f9644/Screen_Shot_2016-04-27_at_11.08.41.png) cc. @jschatz1 See merge request !3944
| | * | Group the contributing calendar by dayPhil Hughes2016-05-161-1/+1
| | | | | | | | | | | | | | | | This aligns the boxes correctly with the day on the left side of the calendar
| * | | Merge branch 'fix/import-url-uri-issue' into 'master' Douwe Maan2016-05-251-1/+1
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix for import URL URI problem when URL contains a space Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/17559 Prevents an already encoded URL to be encoded again - preventing %20 => %25%20 See merge request !4180
| | * | | fix changelog and mergefix/import-url-uri-issueJames Lopez2016-05-231-1/+1
| | | | |
| * | | | Merge branch 'issue_10725' into 'master' Douwe Maan2016-05-251-0/+7
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix forks creation when visibility level is restricted fixes #10725 See merge request !4283
| | * | | | Fix forks creation when visibility level is restrictedissue_10725Felipe Artur2016-05-251-0/+7
| | | | | |
* | | | | | Merge branch 'fix-issue-17496' into 'master' Douwe Maan2016-05-251-2/+1
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix groups API to list only user's accessible projects Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/17496 See merge request !1966
| * | | | | Fix groups API to list only user's accessible projectsStan Hu2016-05-241-2/+1
| | |_|_|/ | |/| | | | | | | | | | | | | Closes #17496
* | | | | Merge branch 'complexity/enable-multiple-rubocop-cops-2' into 'master' Robert Speicher2016-05-251-1/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable multiple compatible Rubocop cops ## What does this MR do? This MR enables multiple Rubocop cops, that are already compatible with our codebase. See #17406. Cops enabled: ```text Style/ArrayJoin: Description: Use Array#join instead of Array#*. StyleGuide: https://github.com/bbatsov/ruby-style-guide#array-join ---------------- Style/Attr: Description: Checks for uses of Module#attr. StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr ---------------- Style/BlockComments: Description: Do not use block comments. StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-block-comments ---------------- Style/ClassMethods: Description: Use self when defining module/class methods. StyleGuide: https://github.com/bbatsov/ruby-style-guide#def-self-class-methods ---------------- Style/EndBlock: Description: Avoid the use of END blocks. StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-END-blocks ---------------- Style/EvenOdd: Description: Favor the use of Fixnum#even? && Fixnum#odd? StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods ---------------- Style/FileName: Description: Use snake_case for source file names. StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files ExpectMatchingDefinition: false ---------------- Style/FirstMethodParameterLineBreak: Description: Checks for a line break before the first parameter in a multi-line method parameter definition. ---------------- Style/FlipFlop: Description: Checks for flip flops StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-flip-flops ---------------- Style/GlobalVars: Description: Do not introduce global variables. StyleGuide: https://github.com/bbatsov/ruby-style-guide#instance-vars Reference: http://www.zenspider.com/Languages/Ruby/QuickRef.html ---------------- Style/IfWithSemicolon: Description: Do not use if x; .... Use the ternary operator instead. StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs ---------------- Style/LambdaCall: Description: Use lambda.call(...) instead of lambda.(...). StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc-call EnforcedStyle: call ---------------- Style/MethodName: Description: Use the configured style when naming methods. StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars EnforcedStyle: snake_case ---------------- Style/MultilineMethodDefinitionBraceLayout: Description: Checks that the closing brace in a method definition is symmetrical with respect to the opening brace and the method parameters. ---------------- Style/NestedModifier: Description: Avoid using nested modifiers. StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-modifiers ---------------- Style/OpMethod: Description: When defining binary operators, name the argument other. StyleGuide: https://github.com/bbatsov/ruby-style-guide#other-arg ---------------- Style/SignalException: Description: Checks for proper usage of fail and raise. StyleGuide: https://github.com/bbatsov/ruby-style-guide#prefer-raise-over-fail EnforcedStyle: only_raise ---------------- Style/SpaceAfterNot: Description: Tracks redundant space after the ! operator. StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-bang ---------------- Style/SpaceBeforeSemicolon: Description: No spaces before semicolons. ---------------- Style/SpaceInsideRangeLiteral: Description: No spaces inside range literals. StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals ---------------- Style/SpaceInsideStringInterpolation: Description: Checks for padding/surrounding spaces inside string interpolation. StyleGuide: https://github.com/bbatsov/ruby-style-guide#string-interpolation EnforcedStyle: no_space ---------------- Style/StabbyLambdaParentheses: Description: Check for the usage of parentheses around stabby lambda arguments. StyleGuide: https://github.com/bbatsov/ruby-style-guide#stabby-lambda-with-args EnforcedStyle: require_parentheses ---------------- Style/StringMethods: Description: Checks if configured preferred methods are used over non-preferred. PreferredMethods: intern: to_sym ---------------- Style/VariableInterpolation: Description: Don't interpolate global, instance and class variables directly in strings. StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate ---------------- Style/VariableName: Description: Use the configured style when naming variables. StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars EnforcedStyle: snake_case ---------------- Style/WhenThen: Description: Use when x then ... for one-line cases. StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases ---------------- Style/WhileUntilModifier: Description: Favor modifier while/until usage when you have a single-line body. StyleGuide: https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier MaxLineLength: 80 ``` Closes #17406 See merge request !4286
| * | | | | Enable multiple compatible Rubocop copscomplexity/enable-multiple-rubocop-cops-2Grzegorz Bizon2016-05-251-1/+1
| |/ / / / | | | | | | | | | | | | | | | Closes #17406
* | | | | Switch the gitlab:db:configure task to use tables.any? instead of looking ↵DJ Mountney2016-05-251-1/+1
| | | | | | | | | | | | | | | | | | | | specifically for the schema_migrations table
* | | | | Update hash syntax and add changelog for the gitlab:db:configure rake taskDJ Mountney2016-05-251-2/+1
| | | | |