- 05 Oct, 2016 10 commits
-
-
Fatih Acet authored
-
Rémy Coutable authored
Refactor Gitlab::Identifier ## What does this MR do? This refactors `Gitlab::Identifier` so that it: 1. Has tests 2. Caches output in an instance variable to reduce queries 3. Uses only a single query to find a user by an SSH key, instead of 2 ## Why was this MR needed? This code was untested and would execute more SQL queries than needed. See merge request !6680
-
Yorick Peterse authored
This refactors Gitlab::Identifier so it uses fewer queries and is actually tested. Queries are reduced by caching the output as well as using 1 query (instead of 2) to find a user using an SSH key.
-
Rémy Coutable authored
Update runner version only when updating contacted_at ## What does this MR do? Improves how we update runners table, especially the version. This is another round of improvements to reduce number of `ci_runners` updates. I did make `contacted_at` to be updated more often (on average every 15 minutes). We will also update version information in one go to solve: https://gitlab.com/gitlab-org/gitlab-ce/issues/22206 Improves: https://gitlab.com/gitlab-org/gitlab-ce/issues/22590 Solves: https://gitlab.com/gitlab-org/gitlab-ce/issues/22206 See merge request !6537
-
Rémy Coutable authored
Skipped jobs should be considered successful ## What does this MR do? If all jobs in previous stage are all skipped, the next stage should consider previous stage succeeded. ## Why was this MR needed? Since for now we consider all manual jobs if skipped, should not block the next stage from running. Closes #22598 See also #20342 (because this merge request conflicts with it) See merge request !6604
-
Sean McGivern authored
Fix small typo in using_docker_images.md, file is called `build_script` (using underscore) ## What does this MR do? This MR fixes a very small typo in the using_docker_images.md documentation, a space was used in the filename `build_script` while it should be an underscore. Not sure of a MR is the best way to get this changed, trying it anyway :). ## Moving docs to a new location? No See merge request !6682
-
Rémy Coutable authored
Remove lease from Event#reset_project_activity ## What does this MR do? This removes the exclusive lease used by `Event#reset_project_activity` in favour of conditional UPDATE queries. See dbcc623a901cb3fb725976217416bafad73dbf69 for more information. ## Why was this MR needed? Obtaining the lease can, for whatever reason, be _really_ slow. See https://gitlab.com/gitlab-org/gitlab-ce/issues/22473 for more information. https://gitlab.com/gitlab-org/gitlab-ce/issues/22473 See merge request !6678
-
Rémy Coutable authored
Update housekeeping docs for new GitLab UI. I spent far too much time trying to find this button. See merge request !6679
-
Rémy Coutable authored
Fix project deletion when feature visibility is set to private Projects that are destroyed are put in the pending_delete state. The ProjectDestroyWorker checks whether the current user has access, but since the ProjectFeature class uses the default scope of the Project, it will not be able to find the right project. This was a regression in 8.12 that caused the following stack trace: ``` NoMethodError: undefined method `team' for nil:NilClass from app/models/project_feature.rb:62:in `get_permission' from app/models/project_feature.rb:34:in `feature_available?' from app/models/project.rb:21:in `feature_available?' from app/policies/project_policy.rb:170:in `disabled_features!' from app/policies/project_policy.rb:29:in `rules' from app/policies/base_policy.rb:82:in `block in abilities' from app/policies/base_policy.rb:113:in `collect_rules' from app/policies/base_policy.rb:82:in `abilities' from app/policies/base_policy.rb:50:in `abilities' from app/models/ability.rb:64:in `uncached_allowed' from app/models/ability.rb:58:in `allowed' from app/models/ability.rb:49:in `allowed?' from app/services/base_service.rb:11:in `can?' from lib/gitlab/metrics/instrumentation.rb:155:in `block in can?' from lib/gitlab/metrics/method_call.rb:23:in `measure' from lib/gitlab/metrics/instrumentation.rb:155:in `can?' from app/services/projects/destroy_service.rb:18:in `execute' ``` Closes #22948 See merge request !6688
-
Stan Hu authored
Projects that are destroyed are put in the pending_delete state. The ProjectDestroyWorker checks whether the current user has access, but since the ProjectFeature class uses the default scope of the Project, it will not be able to find the right project. This was a regression in 8.12 that caused the following stack trace: ``` NoMethodError: undefined method `team' for nil:NilClass from app/models/project_feature.rb:62:in `get_permission' from app/models/project_feature.rb:34:in `feature_available?' from app/models/project.rb:21:in `feature_available?' from app/policies/project_policy.rb:170:in `disabled_features!' from app/policies/project_policy.rb:29:in `rules' from app/policies/base_policy.rb:82:in `block in abilities' from app/policies/base_policy.rb:113:in `collect_rules' from app/policies/base_policy.rb:82:in `abilities' from app/policies/base_policy.rb:50:in `abilities' from app/models/ability.rb:64:in `uncached_allowed' from app/models/ability.rb:58:in `allowed' from app/models/ability.rb:49:in `allowed?' from app/services/base_service.rb:11:in `can?' from lib/gitlab/metrics/instrumentation.rb:155:in `block in can?' from lib/gitlab/metrics/method_call.rb:23:in `measure' from lib/gitlab/metrics/instrumentation.rb:155:in `can?' from app/services/projects/destroy_service.rb:18:in `execute' ``` Closes #22948
-
- 04 Oct, 2016 30 commits
-
-
Fatih Acet authored
-
Annabel Dunstone Gray authored
Fix todos page mobile viewport layout ## What does this MR do? Fixes the todos page mobile viewport layout ## Are there points in the code the reviewer needs to double check? Shouldn't be any
👍 ## Why was this MR needed? Improve GitLab usability on mobile devices ## Screenshots (if relevant) Before: ![Simulator_Screen_Shot_Sep_13__2016__11.30.19_AM](/uploads/7053a1bb1fca6238c5f86d671bf96ff0/Simulator_Screen_Shot_Sep_13__2016__11.30.19_AM.png) After: ![Simulator_Screen_Shot_Sep_13__2016__11.30.04_AM](/uploads/a30921c1a1118655b547977872e8e1c7/Simulator_Screen_Shot_Sep_13__2016__11.30.04_AM.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 [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [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) ## What are the relevant issue numbers? Closes #22097 See merge request !6325 -
Yorick Peterse authored
Per GitLab.com's performance metrics this method could take up to 5 seconds of wall time to complete, while only taking 1-2 milliseconds of CPU time. Removing the Redis lease in favour of conditional updates allows us to work around this. A slight drawback is that this allows for multiple threads/processes to try and update the same row. However, only a single thread/process will ever win since the UPDATE query uses a WHERE condition to only update rows that were not updated in the last hour. Fixes gitlab-org/gitlab-ce#22473
-
Ruben Davila authored
-
Sean McGivern authored
Skip wiki creation when GitHub project has wiki enabled ## What does this MR do? When importing a repository from if the repository has wiki, we should not create the default wiki. Otherwise the GitHub importer will fail because the wiki repository already exist. This bug was introduced here https://gitlab.com/gitlab-org/gitlab-ce/commit/892dea67717c0efbd6a28f7639f34535ec0a8747 ## Are there points in the code the reviewer needs to double check? No. ## Why was this MR needed? GitLab fails to import GitHub Wiki. ## Screenshots (if relevant) ## Does this MR meet the acceptance criteria? - [X] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - Tests - [X] Added for this feature/bug - [ ] All builds are passing - [X] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [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) ## What are the relevant issue numbers? Fixes #22225 See merge request !6665
-
Lin Jen-Shin authored
* upstream/master: Fixed banzai test failures Removed puts code
🙈 Adds v-pre to code blocks in comments -
Jacob Schatz authored
Adds v-pre to code blocks in comments ## What does this MR do? Allows users to comment on discussions with code that contains `{{` Previously because of the discussion part being a Vue app it was being converted by Vue & therefore creating JS errors & the code not displaying correctly. This adds `v-pre` onto the code element to allow the user to write code that would contain `{{` ## What are the relevant issue numbers? Closes #22911 See merge request !6674
-
Lin Jen-Shin authored
-
Wolfgang Faust authored
-
Douglas Barbosa Alexandre authored
-
Douglas Barbosa Alexandre authored
If the GitHub project repository has wiki, we should not create the default wiki. Otherwise the GitHub importer will fail because the wiki repository already exist. This bug was introduced here https://gitlab.com/gitlab-org/gitlab-ce/commit/892dea67717c0efbd6a28f763 9f34535ec0a8747
-
Lin Jen-Shin authored
* upstream/master: (55 commits) Restrict failed login attempts for users with 2FA Update RuboCop to 0.43.0 and update configuration Use SELECT 1, instead SELECT COUNT(*) to ask for notes existency Simplify Mentionable concern instance methods Fix issues importing services via Import/Export deployment refs in own folder, new method for creating refs Update method name Save a fetchable ref per deployement GrapeDSL for Namespace endpoint Remove SCSS rules for short hex chars. Fix bug when trying to cache closed issues from external issue trackers Upgrade acts-as-taggable-on from 3.5.0 to 4.0.0. Remove useless code now that Member#add_user handles it Combine requestFileSuccess arguments into `opts` Append issue template to existing description Invert method's naming Fix a few things after the initial improvment to Members::DestroyService Improve Members::DestroyService Add Container Registry on/off status to admin area Enable Lint/StringConversionInInterpolation cop and autocorrect offenses ...
-
Rémy Coutable authored
Update RuboCop to 0.43.0 and update configuration `Style/VariableNumber` is explicitly disabled because I don't think we care if we name a variable `var_1` or `var1`. See merge request !6670
-
Phil Hughes authored
-
Fatih Acet authored
-
Rémy Coutable authored
Restrict failed login attempts from users with 2FA enabled. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/19799. See merge request !6668
-
Fatih Acet authored
-
Fatih Acet authored
-
Sean McGivern authored
Copy logic from `Devise::Models::Lockable#valid_for_authentication?`, as our custom login flow with two pages doesn't call this method. This will increment the failed login counter, and lock the user's account once they exceed the number of failed attempts. Also ensure that users who are locked can't continue to submit 2FA codes.
-
Kamil Trzciński authored
Save a fetchable ref per deployement cc @DouweM @ayufan See merge request !6618
-
Phil Hughes authored
-
Phil Hughes authored
Closes #22911
-
Fatih Acet authored
Ensure the 'fixed layout' preference is honored whenever possible ## What does this MR do? Currently, when viewing any Merge Request the user's fixed-layout preference is overridden if they have set "Side-by-Side" view as their preference when viewing diffs. This makes sense if they are currently viewing a diff, but this is confusing when their layout preference is overridden while they are on another tab (i.e. "Discussion" or "Builds"). This MR moves all responsibility for overriding the fixed layout from the Ruby page layout helper into frontend JavaScript where it is only applied when needed. ## Are there points in the code the reviewer needs to double check? Check that nothing broke for users which have their layout preference set to "Fluid" as well as those which have it set to "Fixed". I've already done this but double checking is always good idea
😄 . ## Screenshots (if relevant) ![side-by-side-toggle-fixed](/uploads/033dc73e70b73da5692b75606733c938/side-by-side-toggle-fixed.gif) ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - Tests - [ ] 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) ## What are the relevant issue numbers? Closes #22343 ## Other Notes As @lbennett noted in #22343, this is something of a band-aid. It fixed most of the issue, but we still need to have a discussion about whether or not is acceptable to override user layout preferences for "Side-by-Side" views in general. At least this MR limits the scope of this behavior to a single tab within an MR or merge conflict page. See merge request !6422 -
Robert Speicher authored
`Style/VariableNumber` is explicitly disabled because I don't think we care if we name a variable `var_1` or `var1`.
-
Sean McGivern authored
Fix bug when trying to cache closed issues from external issue trackers fixes #22446 See merge request !6619
-
Dmitriy Zaporozhets authored
Upgrade acts-as-taggable-on from 3.5.0 to 4.0.0. ## What does this MR do? Upgrades the acts-as-taggable-on gem from 3.5.0 to 4.0.0. Changelog: https://github.com/mbleigh/acts-as-taggable-on/blob/master/CHANGELOG.md#400--2016-08-08 ## Are there points in the code the reviewer needs to double check? That this works without the migrations, I don't believe the upgrade from 3.5.0 to 4.0.0 requires any migrations since [UPGRADING.md hasn't been updated since 3.5.0 was released](https://github.com/mbleigh/acts-as-taggable-on/blob/master/UPGRADING.md). It's kind of unclear, unfortunately. ## What are the relevant issue numbers? Fixes #22082. Working toward Rails 5: #14286. cc: @dzaporozhets See merge request !6660
-
Douwe Maan authored
Simplify Mentionable concern instance methods ## What does this MR do? Simplify arguments received by the instance methods on the concern so in the closer future will be easy to understand and change ## Are there points in the code the reviewer needs to double check? ## Why was this MR needed? ## 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 [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [ ] 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) ## What are the relevant issue numbers? See merge request !6596
-
Robert Speicher authored
Improve `Members::DestroyService` Part of #21979. See merge request !6267
-
Fatih Acet authored
Append issue template to existing description ## What does this MR do? When selecting an issue template after entering a description, append the template and leave the original content intact. ## Are there points in the code the reviewer needs to double check? Not that I'm aware of. ## Why was this MR needed? The issue template shouldn't override the issue content without warning. ## Screenshots ![](https://i.imgur.com/E16X2tc.gif) ## 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 [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [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` - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? https://gitlab.com/gitlab-org/gitlab-ce/issues/21733 See merge request !6149
-
Sean McGivern authored
-