Commit Graph

1016 Commits

Author SHA1 Message Date
GitLab Bot fe25c98fa8 Add latest changes from gitlab-org/gitlab@master 2020-07-01 21:08:51 +00:00
GitLab Bot ae1efa2e1d Add latest changes from gitlab-org/gitlab@master 2020-07-01 15:08:45 +00:00
GitLab Bot b1c4066c6b Add latest changes from gitlab-org/gitlab@master 2020-06-30 21:09:47 +00:00
GitLab Bot a0b26c6df5 Add latest changes from gitlab-org/gitlab@master 2020-06-29 12:09:20 +00:00
GitLab Bot c59765a50a Add latest changes from gitlab-org/gitlab@master 2020-06-24 18:09:03 +00:00
GitLab Bot 5eeb391043 Add latest changes from gitlab-org/gitlab@master 2020-06-23 15:08:41 +00:00
GitLab Bot e829ca213b Add latest changes from gitlab-org/gitlab@master 2020-06-22 15:09:27 +00:00
GitLab Bot 60082b335c Add latest changes from gitlab-org/gitlab@master 2020-06-19 21:08:32 +00:00
GitLab Bot ce493944f4 Add latest changes from gitlab-org/gitlab@master 2020-06-19 18:08:39 +00:00
GitLab Bot 8eef083ccd Add latest changes from gitlab-org/gitlab@master 2020-06-18 12:09:25 +00:00
GitLab Bot e8d7ac4f14 Add latest changes from gitlab-org/gitlab@master 2020-06-16 03:08:24 +00:00
GitLab Bot 23ff717a29 Add latest changes from gitlab-org/gitlab@master 2020-06-10 09:08:35 +00:00
GitLab Bot 3d04746954 Add latest changes from gitlab-org/gitlab@master 2020-06-09 18:08:28 +00:00
GitLab Bot 7258040618 Add latest changes from gitlab-org/gitlab@master 2020-06-09 00:08:47 +00:00
GitLab Bot 86e1f47cd1 Add latest changes from gitlab-org/gitlab@master 2020-06-05 15:08:23 +00:00
GitLab Bot c4844aea3f Add latest changes from gitlab-org/gitlab@master 2020-06-03 00:08:38 +00:00
GitLab Bot eea1fbf9f9 Add latest changes from gitlab-org/gitlab@master 2020-06-02 15:08:24 +00:00
GitLab Bot 1f1e53f43f Add latest changes from gitlab-org/gitlab@master 2020-05-28 15:08:02 +00:00
GitLab Bot a83a97f604 Add latest changes from gitlab-org/gitlab@master 2020-05-28 12:08:10 +00:00
GitLab Bot c9d79ef3b5 Add latest changes from gitlab-org/gitlab@master 2020-05-26 15:08:17 +00:00
GitLab Bot 27c6c4bf06 Add latest changes from gitlab-org/gitlab@master 2020-05-26 09:08:06 +00:00
GitLab Bot b5249f2d99 Add latest changes from gitlab-org/gitlab@master 2020-05-25 12:08:23 +00:00
GitLab Bot 59accb4c47 Add latest changes from gitlab-org/gitlab@master 2020-05-20 00:08:20 +00:00
GitLab Bot f2151c65d5 Add latest changes from gitlab-org/gitlab@master 2020-05-19 15:08:04 +00:00
GitLab Bot 1b9a2ce278 Add latest changes from gitlab-org/gitlab@master 2020-05-18 09:08:12 +00:00
GitLab Bot 927df95cc4 Add latest changes from gitlab-org/gitlab@master 2020-05-15 12:08:28 +00:00
GitLab Bot 1e9d859394 Add latest changes from gitlab-org/gitlab@master 2020-05-15 06:08:40 +00:00
GitLab Bot 0df696c5f7 Add latest changes from gitlab-org/gitlab@master 2020-05-12 21:08:14 +00:00
GitLab Bot 636eb69592 Add latest changes from gitlab-org/gitlab@master 2020-05-11 18:09:55 +00:00
GitLab Bot 6217d19741 Add latest changes from gitlab-org/gitlab@master 2020-05-11 15:09:37 +00:00
GitLab Bot 17c8111494 Add latest changes from gitlab-org/gitlab@master 2020-05-07 21:09:26 +00:00
GitLab Bot b6a92c969b Add latest changes from gitlab-org/gitlab@master 2020-05-07 06:09:38 +00:00
GitLab Bot 2e26679b96 Add latest changes from gitlab-org/gitlab@master 2020-05-07 03:09:46 +00:00
GitLab Bot d4f8f25db6 Add latest changes from gitlab-org/gitlab@master 2020-05-07 00:11:11 +00:00
GitLab Bot 37ae6b54ba Add latest changes from gitlab-org/gitlab@master 2020-04-28 15:09:29 +00:00
GitLab Bot 56df7f06f1 Add latest changes from gitlab-org/gitlab@master 2020-04-28 00:09:33 +00:00
GitLab Bot cfc6fe5100 Add latest changes from gitlab-org/gitlab@master 2020-04-24 21:09:48 +00:00
GitLab Bot 22e60f1c61 Add latest changes from gitlab-org/gitlab@master 2020-04-22 21:10:00 +00:00
GitLab Bot e33f87ac0f Add latest changes from gitlab-org/gitlab@master 2020-04-21 15:21:10 +00:00
GitLab Bot cf97983af8 Add latest changes from gitlab-org/gitlab@master 2020-04-16 00:09:22 +00:00
GitLab Bot 09093c1278 Add latest changes from gitlab-org/gitlab@master 2020-04-15 18:09:36 +00:00
GitLab Bot 221b529789 Add latest changes from gitlab-org/gitlab@master 2020-04-15 09:09:46 +00:00
GitLab Bot c6a33b2982 Add latest changes from gitlab-org/gitlab@master 2020-04-10 12:09:36 +00:00
GitLab Bot 060c842402 Add latest changes from gitlab-org/gitlab@master 2020-04-08 00:09:30 +00:00
GitLab Bot 6867eff1f9 Add latest changes from gitlab-org/gitlab@master 2020-04-07 21:09:46 +00:00
GitLab Bot 684d65316a Add latest changes from gitlab-org/gitlab@master 2020-04-02 12:08:18 +00:00
GitLab Bot 1a0d6dbdc2 Add latest changes from gitlab-org/gitlab@master 2020-04-01 12:08:00 +00:00
GitLab Bot b11f7057d0 Add latest changes from gitlab-org/gitlab@master 2020-04-01 09:07:45 +00:00
GitLab Bot 396ad86100 Add latest changes from gitlab-org/gitlab@master 2020-04-01 00:08:09 +00:00
GitLab Bot 95ad46159e Add latest changes from gitlab-org/gitlab@master 2020-03-30 21:08:01 +00:00
GitLab Bot 6ac4a6713e Add latest changes from gitlab-org/gitlab@master 2020-03-27 09:08:28 +00:00
GitLab Bot 23bc19cb73 Add latest changes from gitlab-org/gitlab@master 2020-03-25 00:08:11 +00:00
GitLab Bot 729e3765d5 Add latest changes from gitlab-org/gitlab@master 2020-03-24 12:09:42 +00:00
GitLab Bot 8f9beefac3 Add latest changes from gitlab-org/gitlab@master 2020-03-23 12:09:47 +00:00
GitLab Bot d43aaf286f Add latest changes from gitlab-org/gitlab@master 2020-03-17 00:09:12 +00:00
GitLab Bot 8957ace315 Add latest changes from gitlab-org/gitlab@master 2020-03-14 00:09:30 +00:00
GitLab Bot 18f7828977 Add latest changes from gitlab-org/gitlab@master 2020-03-12 09:09:55 +00:00
GitLab Bot f4186a753b Add latest changes from gitlab-org/gitlab@master 2020-03-09 09:07:45 +00:00
GitLab Bot bbaf2bb043 Add latest changes from gitlab-org/gitlab@master 2020-03-03 21:08:37 +00:00
GitLab Bot e9c2bf2678 Add latest changes from gitlab-org/gitlab@master 2020-03-03 18:08:16 +00:00
GitLab Bot ae78b85a25 Add latest changes from gitlab-org/gitlab@master 2020-02-24 12:09:00 +00:00
GitLab Bot b9bac6dbf7 Add latest changes from gitlab-org/gitlab@master 2020-02-20 15:08:44 +00:00
GitLab Bot 1ac794623a Add latest changes from gitlab-org/gitlab@master 2020-02-20 09:09:13 +00:00
GitLab Bot 0e9eea40b6 Add latest changes from gitlab-org/gitlab@master 2020-02-11 21:08:44 +00:00
GitLab Bot 1ca9950d5f Add latest changes from gitlab-org/gitlab@master 2020-02-11 18:08:58 +00:00
GitLab Bot b4ded0ba7b Add latest changes from gitlab-org/gitlab@master 2020-02-10 09:08:56 +00:00
GitLab Bot a89cb5cbdd Add latest changes from gitlab-org/gitlab@master 2020-02-06 21:08:48 +00:00
GitLab Bot 0eb3d2f799 Add latest changes from gitlab-org/gitlab@master 2020-02-06 15:09:11 +00:00
GitLab Bot 20d564f106 Add latest changes from gitlab-org/gitlab@master 2020-02-05 12:09:15 +00:00
GitLab Bot 55693cc1ec Add latest changes from gitlab-org/gitlab@master 2020-02-03 15:08:45 +00:00
GitLab Bot 1808454313 Add latest changes from gitlab-org/gitlab@master 2020-01-31 12:08:33 +00:00
GitLab Bot 536aa3a1f4 Add latest changes from gitlab-org/gitlab@master 2020-01-30 15:09:15 +00:00
GitLab Bot 23288f62da Add latest changes from gitlab-org/gitlab@master 2020-01-29 15:08:59 +00:00
GitLab Bot fedf978f9a Add latest changes from gitlab-org/gitlab@master 2020-01-28 15:08:36 +00:00
GitLab Bot e4ea43b2b8 Add latest changes from gitlab-org/gitlab@master 2020-01-27 21:08:47 +00:00
GitLab Bot 2c2dd5e36c Add latest changes from gitlab-org/gitlab@master 2020-01-24 12:09:01 +00:00
GitLab Bot 364f6f2e33 Add latest changes from gitlab-org/gitlab@master 2020-01-20 15:09:18 +00:00
GitLab Bot 40254b9ace Add latest changes from gitlab-org/gitlab@master 2020-01-17 21:08:29 +00:00
GitLab Bot 727b1a890c Add latest changes from gitlab-org/gitlab@master 2020-01-16 21:08:24 +00:00
GitLab Bot d47f9d2304 Add latest changes from gitlab-org/gitlab@master 2020-01-16 15:08:41 +00:00
GitLab Bot 74a89b1221 Add latest changes from gitlab-org/gitlab@master 2020-01-13 21:07:39 +00:00
GitLab Bot a5ab3467a7 Add latest changes from gitlab-org/gitlab@master 2020-01-13 15:07:53 +00:00
GitLab Bot eb30dd6e28 Add latest changes from gitlab-org/gitlab@master 2020-01-13 12:08:04 +00:00
GitLab Bot e3e300557f Add latest changes from gitlab-org/gitlab@master 2020-01-08 12:07:59 +00:00
GitLab Bot f6e985dba4 Add latest changes from gitlab-org/gitlab@master 2020-01-08 06:08:13 +00:00
GitLab Bot c0d8f9f3f9 Add latest changes from gitlab-org/gitlab@master 2020-01-03 09:07:33 +00:00
GitLab Bot a72a9af092 Add latest changes from gitlab-org/gitlab@master 2020-01-02 13:03:23 +00:00
GitLab Bot cef56ec097 Add latest changes from gitlab-org/gitlab@master 2019-12-23 00:07:50 +00:00
GitLab Bot bbe2430603 Add latest changes from gitlab-org/gitlab@master 2019-12-18 18:08:04 +00:00
GitLab Bot 5bd24a54ef Add latest changes from gitlab-org/gitlab@master 2019-12-17 09:07:48 +00:00
GitLab Bot 4eeb6b0d16 Add latest changes from gitlab-org/gitlab@master 2019-12-13 15:08:02 +00:00
GitLab Bot 175b4fa261 Add latest changes from gitlab-org/gitlab@master 2019-12-11 18:08:10 +00:00
GitLab Bot ec169c6384 Add latest changes from gitlab-org/gitlab@master 2019-12-07 18:07:50 +00:00
GitLab Bot e1867c38fc Add latest changes from gitlab-org/gitlab@master 2019-12-06 18:07:44 +00:00
GitLab Bot ed73d4f207 Add latest changes from gitlab-org/gitlab@master 2019-12-06 03:08:02 +00:00
GitLab Bot e2334f3613 Add latest changes from gitlab-org/gitlab@master 2019-12-04 00:06:15 +00:00
GitLab Bot ab7cf450ba Add latest changes from gitlab-org/gitlab@master 2019-12-03 18:06:49 +00:00
GitLab Bot 7cdd70dcec Add latest changes from gitlab-org/gitlab@master 2019-11-28 15:06:57 +00:00
GitLab Bot 284ae7dd75 Add latest changes from gitlab-org/gitlab@master 2019-11-28 03:06:32 +00:00
GitLab Bot 9615736987 Add latest changes from gitlab-org/gitlab@master 2019-11-26 00:06:28 +00:00
GitLab Bot 8a1c3b6e1a Add latest changes from gitlab-org/gitlab@master 2019-11-25 06:06:14 +00:00
GitLab Bot ea4762d464 Add latest changes from gitlab-org/gitlab@master 2019-11-22 18:06:00 +00:00
GitLab Bot 6e81d7f628 Add latest changes from gitlab-org/gitlab@master 2019-11-15 15:06:12 +00:00
GitLab Bot 3fc9a8e695 Add latest changes from gitlab-org/gitlab@master 2019-11-15 12:06:12 +00:00
GitLab Bot 3fe3436877 Add latest changes from gitlab-org/gitlab@master 2019-11-15 06:06:13 +00:00
GitLab Bot 69944ffb68 Add latest changes from gitlab-org/gitlab@master 2019-11-12 15:06:26 +00:00
GitLab Bot 0c3f121493 Add latest changes from gitlab-org/gitlab@master 2019-11-11 21:06:20 +00:00
GitLab Bot ff67e3ed08 Add latest changes from gitlab-org/gitlab@master 2019-11-11 18:06:27 +00:00
GitLab Bot 759bab0585 Add latest changes from gitlab-org/gitlab@master 2019-11-08 15:06:21 +00:00
GitLab Bot 791785af55 Add latest changes from gitlab-org/gitlab@master 2019-11-05 12:06:20 +00:00
GitLab Bot aa542224bb Add latest changes from gitlab-org/gitlab@master 2019-11-04 15:07:36 +00:00
GitLab Bot 56d96ad7fa Add latest changes from gitlab-org/gitlab@master 2019-11-01 03:06:26 +00:00
Yorick Peterse ad8eea3834
Merge dev.gitlab.org@master into GitLab.com@master 2019-10-30 15:22:45 +01:00
GitLab Release Tools Bot 771f3fb9aa Merge branch 'security-2914-labels-visible-despite-no-access-to-issues-repositories' into 'master'
Labels visible despite no access to issues & repositories

See merge request gitlab/gitlabhq!3409
2019-10-29 15:58:24 +00:00
GitLab Bot dee9315801 Add latest changes from gitlab-org/gitlab@master 2019-10-29 15:07:20 +00:00
GitLab Bot 29eea410c4 Add latest changes from gitlab-org/gitlab@master 2019-10-28 09:06:04 +00:00
GitLab Bot b3e4ec8e8a Add latest changes from gitlab-org/gitlab@master 2019-10-23 09:06:03 +00:00
Eugenia Grieff 6ff7788d4c Fix labels finder to filter visible issuables
Use project scopes to filter project labels

Add changelog file

Check  issuables visibility in  LabelsFinder

Add specs for issuables visibility cases

Rename Project method to reuse in LabelsFinder

Remove commented code

Improve changelog title
2019-10-22 17:00:56 +01:00
GitLab Bot 6d59e98918 Add latest changes from gitlab-org/gitlab@master 2019-10-18 18:06:21 +00:00
GitLab Bot 25989ab7ef Add latest changes from gitlab-org/gitlab@master 2019-10-18 11:11:44 +00:00
GitLab Bot 238d22c072 Add latest changes from gitlab-org/gitlab@master 2019-10-17 15:06:17 +00:00
GitLab Bot 8c30d396c5 Add latest changes from gitlab-org/gitlab@master 2019-10-14 18:06:24 +00:00
GitLab Bot 308146dc39 Add latest changes from gitlab-org/gitlab@master 2019-10-10 00:06:44 +00:00
GitLab Bot cc6b394a06 Add latest changes from gitlab-org/gitlab@master 2019-10-09 15:05:58 +00:00
Jan Provaznik 2bb752322e
Filter not accessible label events
Label events may use cross-project or cross-group references,
if the projects are not accessible by user, we don't show these
label events.
2019-09-30 14:22:04 +02:00
GitLab Bot 6f9edd1a4c Add latest changes from gitlab-org/gitlab@master 2019-09-23 15:06:32 +00:00
GitLab Bot e4c711546c Add latest changes from gitlab-org/gitlab@master 2019-09-18 21:06:34 +00:00
GitLab Bot 80f61b4035 Add latest changes from gitlab-org/gitlab@master 2019-09-18 14:02:45 +00:00
GitLab Bot bd860c22f6 Add latest changes from gitlab-org/gitlab@master 2019-09-17 12:06:48 +00:00
GitLab Bot b7dfe2ae40 Add latest changes from gitlab-org/gitlab@master 2019-09-13 13:26:31 +00:00
Lin Jen-Shin 3cbfd0be8c
Add projects parameter to IssuableFinder 2019-09-06 16:43:33 +08:00
dineshpanda a3de0cd603 Avoid calling freeze on already frozen strings in app/finders 2019-09-04 09:19:07 +05:30
James Lopez 9174d9a23f Merge branch '62284-follow-up-from-resolve-api-to-get-all-project-group-members-returns-duplicates' into 'master'
Resolve "Follow-up from "Resolve "API to get all project/group members returns duplicates"""

Closes #62284

See merge request gitlab-org/gitlab-ce!28887
2019-08-29 06:34:26 +00:00
Jacopo 864bd12be4 Uses projects_authorizations.access_level in MembersFinder 2019-08-28 17:48:55 +02:00
Victor Zagorodny e4fbd94cf5 Update CE files for GSD projects filter
A new param with_security_reports was added to
GET /groups/:id/projects API and the code to
support this logic in GroupProjectsFinder and
Project model. Also, a DB index was added to
ci_job_artifacts table to speed up the search
of security reports artifacts for projects
2019-08-28 14:26:42 +00:00
Luke Duncalfe 37b17fa61a Add service classes for mutating AwardEmoji
Adding, destroying and toggling emoji previously lacked services and
instead were performed through methods called on Awardable models.

This led to inconsistencies where relevant todos would be marked as done
only when emoji were awarded through our controllers, but not through
the API. Todos could also be marked as done when an emoji was being
removed.

Behaviour changes

- Awarding emoji through the API will now mark a relevant Todo as done
- Toggling an emoji off (destroying it) through our controllers will no
  longer mark a relevant Todo as done

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/63372
2019-08-21 11:39:41 +12:00
Luke Duncalfe 330cbddec3 Renaming AwardedEmojiFinder to a Service
This finder class acts more as a service, as it only returns mapped
data.

Renaming this class allows us to create a new AwardEmojiFinder without
the ambiguity of there being two similarly-named finders.

https://gitlab.com/gitlab-org/gitlab-ce/issues/63372
2019-08-21 10:00:00 +12:00
Bob Van Landuyt 452bc36d60 Rework retry strategy for remote mirrors
**Prevention of running 2 simultaneous updates**

Instead of using `RemoteMirror#update_status` and raise an error if
it's already running to prevent the same mirror being updated at the
same time we now use `Gitlab::ExclusiveLease` for that.

When we fail to obtain a lease in 3 tries, 30 seconds apart, we bail
and reschedule. We'll reschedule faster for the protected branches.

If the mirror already ran since it was scheduled, the job will be
skipped.

**Error handling: Remote side**

When an update fails because of a `Gitlab::Git::CommandError`, we
won't track this error in sentry, this could be on the remote side:
for example when branches have diverged.

In this case, we'll try 3 times scheduled 1 or 5 minutes apart.

In between, the mirror is marked as "to_retry", the error would be
visible to the user when they visit the settings page.

After 3 tries we'll mark the mirror as failed and notify the user.

We won't track this error in sentry, as it's not likely we can help
it.

The next event that would trigger a new refresh.

**Error handling: our side**

If an unexpected error occurs, we mark the mirror as failed, but we'd
still retry the job based on the regular sidekiq retries with
backoff. Same as we used to

The error would be reported in sentry, since its likely we need to do
something about it.
2019-08-13 20:52:01 +00:00
Winnie Hellmann 915bc89396 Revert "Merge branch '4221-board-milestone-should-persist-any-none-properly-ce' into 'master'"
This reverts merge request !30613
2019-08-09 09:59:38 +00:00
Camil Staps e726ed5e12
Handle reviewer comments on !24690 2019-08-07 20:49:37 +02:00
Camil Staps 73e6ba448d
Address reviewer comments 2019-08-07 20:49:17 +02:00
Camil Staps 99bb207ef1
Fix tests 2019-08-07 20:49:16 +02:00
Camil Staps 50f5f2e8ae
Remove private profiles from starrers view of projects 2019-08-07 20:49:16 +02:00
Camil Staps b7b57b83cc
Avoid unnecessary includes in StarredProjectsFinder 2019-08-07 20:49:15 +02:00
Camil Staps bf3bd577e0
Rewrite StarredProjectsFinder to use ProjectsFinder 2019-08-07 20:49:15 +02:00
Camil Staps a052f68116
Add pagination to {project}/starrers view 2019-08-07 20:49:15 +02:00
Camil Staps 6baff6504b
Change sorting options for starrers: name (asc/desc), most/least recent star 2019-08-07 20:49:14 +02:00
Camil Staps 382826855c
Add "Starred projects" tab to user overview 2019-08-07 20:49:14 +02:00
Camil Staps 59976090b5
Add /starrers view for projects 2019-08-07 20:49:13 +02:00
Tiger Watson 36a01a88ce Use separate Kubernetes namespaces per environment
Kubernetes deployments on new clusters will now have
a separate namespace per project environment, instead
of sharing a single namespace for the project.

Behaviour of existing clusters is unchanged.

All new functionality is controlled by the
:kubernetes_namespace_per_environment feature flag,
which is safe to enable/disable at any time.
2019-08-07 04:40:29 +00:00
Steve Abrams 3dbf3997bb Add group level container repository endpoints
API endpoints for requesting container repositories
and container repositories with their tag information
are enabled for users that want to specify the group
containing the repository rather than the specific project.
2019-08-05 20:00:50 +00:00
Igor 92d273a9e6 Use select instead of filter to support 2.5 2019-08-05 16:07:26 +00:00
Stan Hu dbc6c24403 Merge branch '52123-issuable-actions-notesfinder-pderichs' into 'master'
Use NotesFinder to fetch notes on API and Controllers

Closes #52123

See merge request gitlab-org/gitlab-ce!31300
2019-08-01 16:27:02 +00:00
Patrick Derichs 0e99daae4a Use NotesFinder in IssuableActions module
Remove project from NotesFinder constructor

Add project parameter to specs

Also look for methods in private scope

Fix specs to match new NotesFinder constructor
2019-08-01 10:42:42 +02:00
charlie ablett 5d7b46d523 Port CE changes from EE
- DB migration of board milestone values
- issue finder & spec updates
2019-07-31 13:51:46 +00:00
🙈 jacopo beschi 🙉 66d48385ec Resolve "MembersFinder contains slow database query with OR conditions" 2019-07-29 22:33:57 +00:00
Andreas Brandl 988dc80585
Further remove code branches by database type
We dropped MySQL support and a lot of mysql specific code has been
removed in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/29608.

This comes in from the other direction and removes any `if postgresql?`
branches.
2019-07-29 12:47:06 +02:00
Stan Hu c41788fe54 Revert "Merge branch '52123-issuable-actions-notesfinder-pderichs' into 'master'"
This reverts merge request !29733
2019-07-27 04:28:56 +00:00
Stan Hu 7dccb44448 Merge branch '52123-issuable-actions-notesfinder-pderichs' into 'master'
Use NotesFinder to fetch notes in module IssuableActions

Closes #52123

See merge request gitlab-org/gitlab-ce!29733
2019-07-26 22:29:07 +00:00
Patrick Derichs 355a2df560 Use NotesFinder in module IssuableActions
Add spec for concern IssuableActions

Add shared samples for discussions endpoint

Add schema validations for discussions

Fix rubocop style issue

Make target assignable

Use new possibility to provide target
2019-07-26 09:10:36 +02:00
Heinrich Lee Yu 1ce5bcacdb Remove code related to object hierarchy in MySQL
These are not required because MySQL is not
supported anymore
2019-07-25 15:35:06 +08:00
Jan Provaznik 972b5f4555 Removed project autocomplete pagination
This pagination is not used anywhere so there is no reason
to keep it. It seems the usage of offset_id was probably
removed in 90c60138db
2019-07-22 11:44:20 +00:00
Andreas Brandl 5214ad1a7f Merge branch '40379-CJK-search-min-chars' into 'master'
Remove minimum required characters for fuzzy search if no trigram is used

See merge request gitlab-org/gitlab-ce!29810
2019-07-08 09:49:43 +00:00
sujay patel e241c89977 Adding order by to list runner jobs api. 2019-07-05 14:24:56 +05:30
sujay patel b71250ca0f Adding order by to list runner jobs api. 2019-07-05 14:19:28 +05:30
Mario de la Ossa 4f04c4c90b
Ignore min_chars_for_partial_matching unles trigrm
If we're not using a trigram index, then ignore the
min_chars_for_partial_matching setting
2019-07-04 10:56:13 -06:00
Grzegorz Bizon 8775e4a1fa Merge branch 'id-stale-branches' into 'master'
Add endpoint for fetching diverging commit counts

See merge request gitlab-org/gitlab-ce!29802
2019-07-01 08:38:16 +00:00
Igor Drozdov ca5cd7b7fb Add endpoint for fetching diverging commit counts
Extract diverging_commit_counts into a service class
2019-06-28 16:22:35 +03:00
Alexandru Croitor 0f6c42c5ce Move Multiple Issue Boards for Projects to Core
Refactor code to allow multiple issue boards management for projects
in CE
2019-06-26 12:28:00 +03:00
Jan Provaznik 2b327c1b4d Merge branch '63656-runner-tags-search-dropdown-is-empty' into 'master'
Resolve "Runner tags search dropdown is empty"

Closes #63656

See merge request gitlab-org/gitlab-ce!29985
2019-06-24 18:43:54 +00:00
Dmitriy Zaporozhets f928c22ff0
Return all runner tags when search is empty
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2019-06-24 16:44:04 +03:00
Lee Tickett ec66f1b5ca Add name & search parameters to project environments API 2019-06-24 12:18:40 +00:00
Patrick Derichs 9079085fe7 Remove unneeded parentheses 2019-06-19 10:56:55 +02:00
Patrick Derichs b5b5658868 Separate conditions to increase readability 2019-06-19 10:56:55 +02:00
Patrick Derichs 932a9a0c77 Use NotesFinder to fetch notes on API and Controllers
Fix missing iid query on NotesFinder

Changed parameters of find_noteable, 
so changes across a few files were needed.
MergeRequest also requires iid instead of id query

Make NotesFinder fail with RecordNotFound again

Add specs for target_iid

Using RSpec tablesyntax for target_iid specs

Revert "Using RSpec tablesyntax for target_iid specs"

This reverts commit ba45c7f569a.

Allow find_by! here

Fix variable name

Add readable check

Revert "Add readable check"

This reverts commit 9e3a1a7aa39.

Remove unnecessary assignment

Add required changes for EE

Fix parameter count

Reduce code duplication by extracting a noteable module method

The call to find_noteable was redundant so
multiple files and lines have changed in that
commit to use the newly introduced module
method `noteable`.

Replace casecmp with include check

Add parent_type parameter


Revert "Reduce code duplication by extracting
a noteable module method"

This reverts commit 8c0923babf.

Method is no longer needed

Check whether noteable can be read by user
2019-06-19 10:56:55 +02:00
Dmitriy Zaporozhets 15ba85ab8e
Remove some deprecated code
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2019-06-07 14:32:31 +03:00
João Cunha 82e952a8f3 Move file one folder level up to avoid namespace conflict
Clusters::Cluster::KnativeServicesFinder becomes
Clusters::KnativeServicesFinder

This is to avoid loading race condition between:

```
module Clusters
  class Cluster < ApplicationRecord
```

and

```
module Clusters
  class Cluster
```
2019-06-03 15:42:06 +01:00
João Cunha a2aa160cea Adapt functions to work for external Knative
Remove Kn services cache from Clusters::Application::Knative

Knative function can exist even if user did not installed Knative via
GitLab managed apps.

-> Move responsibility of finding services into the Cluster
-> Responsability is inside Clusters::Cluster::KnativeServiceFinder
-> Projects::Serverless::FunctionsFinder now calls depends solely on a
cluster to find the Kn services.
-> Detect Knative by resource presence instead of service presence
-> Mock knative_installed response temporarily for frontend to develop

Display loader while `installed === 'checking'`

Added frontend work to determine if Knative is installed

Memoize with_reactive_cache(*args, &block) to avoid race conditions

When calling with_reactive_cache more than once, it's possible that the
second call will already have the value populated. Therefore, in cases
where we need the sequential calls to have consistent results, we'd fall
under a race condition.

Check knative installation via Knative resource presence

Only load pods if Knative is discovered

Always return a response in FunctionsController#index

- Always indicate if Knative is installed, not installed or checking
- Always indicate the partial response for functions. Final response is
guaranteed when knative_installed is either true | false.

Adds specs for Clusters::Cluster#knative_services_finder

Fix method name when calling on specs

Add an explicit check for functions

Added an explicit check to see if there are any functions available

Fix Serverless feature spec

- we don't find knative installation via database anymore,
rather via Knative resource

Display error message for request timeouts

Display an error message if the request times out

Adds feature specs for when functions exist

Remove a test purposed hardcoded flag

Add ability to partially load functions

Added the ability to partially load functions on the frontend

Add frontend unit tests

Added tests for the new frontend additions

Generate new translations

Generated new frontend translations

Address review comments

Cleaned up the frontend unit test.
Added computed prop for `isInstalled`.

Move string to constant

Simplify nil to array conversion

Put knative_installed states in a frozen hash for better read

Pluralize list of Knative states

Quey services and pods filtering name

This way we don't need to filter the namespace in memory.
Also, the data we get from the network is much smaller.

Simplify cache_key and fix bug

- Simplifies the cache_key by removing namespace duplicate
- Fixes a bug with reactive_cache memoization
2019-05-29 11:21:53 +01:00
Jacopo a9827e0e18 Removes duplicated members from api/projects/:id/members/all
When using the members/all api the same user was returned multiple times
when he was a member of the project/group and also of one of the
ancestor groups.
Now the member is returned only once giving priority to the membership
on the project and maintaining the same behaviour of the members UI.
2019-05-27 15:40:56 +02:00
Tiger 101c4480b3 Remove legacy Kubernetes #actual_namespace
When Kubernetes clusters were originally built they could only
exist at the project level, and so there was logic included
that assumed there would only ever be a single Kubernetes
namespace per cluster. We now support clusters at the group
and instance level, which allows multiple namespaces.

This change consolidates various project-specific fallbacks to
generate namespaces, and hands all responsibility to the
Clusters::KubernetesNamespace model. There is now no concept of
a single namespace for a Clusters::Platforms::Kubernetes; to
retrieve a namespace a project must now be supplied in all cases.

This simplifies upcoming work to use a separate Kubernetes
namespace per project environment (instead of a namespace
per project).
2019-05-21 11:38:11 -05:00
Luke Picciau 6359c0e862 Set attempt project search optimizations flag to default_enabled 2019-05-21 12:19:35 +00:00
Francisco Javier López 68e533dc21 Add improvements to the global search process
Removed the conditions added to
Project.with_feature_available_for_user, and moved to the
IssuableFinder. Now, we ensure that, in the projects retrieved
in the Finder, the user has enough access for the feature.
2019-05-07 11:08:25 +00:00
Heinrich Lee Yu ff627511c0 Add label_name as scalar param of IssuableFinder
This was removed by a previous MR but broke some links
2019-04-23 08:42:04 +08:00
Wei-Meng Lee 1150ab80a0 Abstract author into private method 2019-04-16 23:39:56 +08:00
Wei-Meng Lee 3ef5666783 Only show in autocomplete when author active 2019-04-12 14:58:42 +08:00
Stan Hu bcfd04a221 Revert "Merge branch 'sh-optimize-projects-api' into 'master'"
This reverts merge request !26481
2019-04-10 03:36:09 +00:00
Oswaldo Ferreira ca884980ee [CE] Support multiple assignees for merge requests
Backports https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/10161
(code out of ee/ folder).
2019-04-08 18:40:00 -03:00
Chris Baumbauer b77fe7db3e Add Knative metrics to Prometheus 2019-04-06 02:02:39 +00:00
Dmitriy Zaporozhets 43713d976a Merge branch 'extend-cte-optimisations-to-projects' into 'master'
Extend CTE search optimisation to projects

Closes #55170

See merge request gitlab-org/gitlab-ce!26908
2019-04-05 08:49:13 +00:00
Paul Slaughter 59ac0924da Fix IDE detecting MR from fork branch
**Why?**
Currently the IDE loads a merge request based on only the
`source_branch` name. This means it loads MR's from
forks that have the same branch name (not good).

- This required updating the BE API to accept `source_project_id`
2019-04-05 07:29:53 +00:00
Igor 5b6db251a8 Consider array params on rendering MR list on dashboard
This fixes the bug, when approver filter is provided,
but dashboard asks to enter any filter
2019-04-04 14:54:25 +00:00
Sean McGivern 10ceb33ba2 Extend CTE search optimisation to projects
When we use the `search` param on an `IssuableFinder`, we can run into
issues. We have trigram indexes to support these searches. On
GitLab.com, we often see Postgres's optimiser prioritise the (global)
trigram indexes over the index on `project_id`. For group and project
searches, we know that it will be quicker to filter by `project_id`
first, as it returns fewer rows in most cases.

For group issues search, we ran into this issue previously, and went
through the following iterations:

1. Use a CTE on the project IDs as an optimisation fence. This prevents
   the planner from disregarding the index on `project_id`.
   Unfortunately it breaks some types of sorting, like priority and
   popularity, as they sort on a joined table.
2. Use a subquery for listing issues, and a CTE for counts. The subquery
   - in the case of group lists - didn't help as much as the CTE, but
   was faster than not including it. We can safely use a CTE for counts
   as they don't have sorting.

Now, however, we're seeing the same issue in a project context. The
subquery doesn't help at all there (it would only return one row, after
all). In an attempt to keep total code complexity under control, this
commit removes the subquery optimisation and applies the CTE
optimisation only for sorts we know that are safe.

This means that for more complicated sorts (like priority and
popularity), the search will continue to be very slow. If this is a
high-priority issue, we can consider introducing further optimisations,
but this finder is already very complicated and additional complexity
has a cost.

The group CTE optimisation is controlled by the same feature flag as
before, `attempt_group_search_optimizations`, which is enabled by
default. The new project CTE optimisation is controlled by a new feature
flag, `attempt_project_search_optimizations`, which is disabled by
default.
2019-04-04 12:36:22 +01:00
Peter Marko 22fe2fb4c1 Fix group transfer selection possibilities 2019-04-02 06:49:11 +00:00
Stan Hu c408be48ca Optimize /api/v4/projects endpoint for visibility level
Previously when a user requested a list of projects,
`Project#public_or_visible_to_user` would search all authorized projects
and public/internal projects as well. However, when a user requests a
specific `visibility_level` (e.g. private), that should reduce the
search space, and we shouldn't need to load public/internal projects.

Improves https://gitlab.com/gitlab-org/gitlab-ce/issues/59329
2019-03-27 06:15:33 -05:00
Sean McGivern 222199f670 Only count active milestones as started
The Upcoming milestone filter only considers active milestones, but the
Started one included closed milestones, too. This was inconsistent.
2019-03-19 14:28:30 +00:00
Hiroyuki Sato de784ac105 Filter merge requests by target branch 2019-03-09 12:22:58 +00:00
Nick Thomas e05a86cecd
Allow all personal snippets to be accessed by API
Previously, you could only access personal snippets in the API if you
had authored them. The documentation doesn't state that this is the
case, and it's quite surprising.
2019-03-06 09:05:03 +00:00
Yorick Peterse 59db98a0ca
Merge dev master into GitLab.com master 2019-03-04 19:44:46 +01:00
Yorick Peterse 6683298fe6 Merge branch 'security-commit-private-related-mr' into 'master'
Don't allow non-members to see private related MRs

Closes #2787

See merge request gitlab/gitlabhq!2866
2019-03-04 18:37:10 +00:00
Sean McGivern d860ab195a Merge branch '54643-lower_issuable_finder_complexity' into 'master'
IssuableFinder - Always use CTE for group counts

Closes #54643

See merge request gitlab-org/gitlab-ce!25411
2019-03-01 09:17:29 +00:00
Mario de la Ossa 39afba0659
Always use CTE for IssuableFinder counts
Since the CTE is faster than a subquery and the only reason we're using
a subquery is that the CTE can't handle sorting by certain attributes,
let's use the CTE always (when the feature flag is enabled) when
counting, since we can ignore ordering if we just want a count of
results.
2019-02-28 11:25:57 -06:00
Alexis Reigel 28fcf5c4bf
use functional style for tags finder 2019-02-27 20:20:24 +01:00
Alexis Reigel 022ee0c0c9
don't filter tags by taggable type
Due to performance reasons we cannot use the type filter on the tags.
The table for ActsAsTaggableOn is too big and too unoptimized, such that
the queries time out on production.

See the discussion
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/19740#note_120087938
for more info.
2019-02-27 20:19:50 +01:00
Alexis Reigel cd063eec32
optimize sql query to get tags related to runners
The query generated by ActsAsTaggableOn `@taggable_type.all_tags` is
very inefficient (joins too much, grouping, inner select, ...).
2019-02-27 20:19:50 +01:00
Alexis Reigel 2e05292562
use lazy ajax filter dropdown for runner tags
the potential number of available runner tags is too large to load it
statically to a dropdown. we use the same lazy loaded dropdown as is
used for the users dropdown already.
2019-02-27 20:19:49 +01:00
Alexis Reigel 0fad7aa79c
add tag filter to admin runners page 2019-02-27 20:19:49 +01:00
Nick Thomas a5174cf0fc Merge branch '42086-project-fetch-statistics-api-http-only' into 'master'
Resolve "Project fetch statistics API (HTTP only)"

Closes #42086

See merge request gitlab-org/gitlab-ce!23596
2019-02-27 12:07:05 +00:00
Jacopo 5ae9a44aa1 Add project http fetch statistics API
The API get projects/:id/traffic/fetches allows user with write
access to the repository to get the number of clones for the
last 30 days.
2019-02-27 11:52:35 +01:00
Stan Hu ebb284c0dc Remove N+1 query for tags in /admin/runners page
As discussed in https://github.com/mbleigh/acts-as-taggable-on/issues/91,
we can avoid N+1 queries if we use `tags` instead of `tag_list`.

Seen while reviewing
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/19740.
2019-02-26 12:44:28 -08:00
Rémy Coutable f49aeacdd0
Merge branch 'fix-misspellings-app-comments' into 'master'
Fix misspellings in app/spec comments

See merge request gitlab-org/gitlab-ce!25517
2019-02-26 12:25:01 +01:00
Kamil Trzciński a555a227dd
Merge branch 'filter-confidential-issues' into 'master'
Ability to filter confidential issues

Closes #50747

See merge request gitlab-org/gitlab-ce!24960
2019-02-26 12:24:39 +01:00
Michael Kozono cae2c33681
Revert "Merge branch 'fix-misspellings-app-comments' into 'master'"
This reverts commit 9202bbd129, reversing
changes made to 4b282e9ce1.
2019-02-25 12:53:09 -08:00
Michael Kozono e95b88a06d
Revert "Merge branch 'filter-confidential-issues' into 'master'"
This reverts commit d133bf84c6, reversing
changes made to 7981c0292b.
2019-02-25 12:42:34 -08:00
Kamil Trzciński d133bf84c6 Merge branch 'filter-confidential-issues' into 'master'
Ability to filter confidential issues

Closes #50747

See merge request gitlab-org/gitlab-ce!24960
2019-02-25 11:00:24 +00:00
Takuya Noguchi bbf479a36c Fix misspellings in app/spec comments
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2019-02-25 17:25:19 +09:00
Robert Schilling bf7846bec0 Only use boolean parameters internally
Use internally only boolean params.
2019-02-22 14:55:07 +01:00
Robert Speicher 1f4e5fe7b1 Merge branch '56492-implement-new-arguments-state-closed_before-and-closed_after-for-issuesresolver-in-graphql' into 'master'
Implement new arguments `state`, `closed_before` and `closed_after` for `IssuesResolver` in GraphQL

Closes #56492

See merge request gitlab-org/gitlab-ce!24910
2019-02-21 19:55:14 +00:00
Robert Schilling 56a54c62fb Add confidential_only scop to issue model 2019-02-21 14:12:11 +01:00
Robert Schilling bd9ae901ec Ability to filter confidential issues
Add a new search bar filter for confidential issues. Add filtering
support to the IssuesFinder.
2019-02-21 14:02:38 +01:00
Rémy Coutable f0a2c4116c
Allow IssuableFinder to filter by closed_at
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-02-21 09:40:49 +01:00
Sean McGivern 843f4b94b5 Ignore ordering when calling find_by on finders
We shouldn't care about the ordering here; if we did, it would be more
appropriate to use `take` or `first`. Having the ordering can result in
the database picking a bad query plan, as it might think sorting the
whole table first is the best option.
2019-02-20 11:31:06 +00:00
Mario de la Ossa d0f02b5c9e
Enable subquery for group issue search by default 2019-02-06 10:59:52 -06:00
Sean McGivern 068b41275f Merge branch 'search-title' into 'master'
Add 'in' filter that modifies scope of 'search' filter  to issues and merge requests API

See merge request gitlab-org/gitlab-ce!24350
2019-02-05 09:52:40 +00:00
Hiroyuki Sato 40198f8184 Fix grammar and spelling 2019-02-05 17:32:27 +09:00
James Lopez a3cde02651
Fix contributed projects finder shown private info 2019-01-31 16:51:16 +01:00
Patrick Bajao 65723a2cb6 Modify MergeRequestsFinder to allow filtering by commit 2019-01-28 15:11:38 +08:00
Yorick Peterse 4d2a666c74 Merge branch 'security-contributed-projects' into 'master'
[master] Fix contributed projects info is still visible even user enable private profile

See merge request gitlab/gitlabhq!2743
2019-01-25 16:43:59 +00:00
Jacopo 22eb2e4c22 Adds milestone search
Adds to search ILIKE search for milestones title in:
  - Milestones dashboard
  - Group milestones page
  - Project milestones page
2019-01-24 18:44:09 +01:00
Hiroyuki Sato d32aec06fe Add 'in' filter that modifies scope of 'search' filter to issues and merge requests API 2019-01-14 12:02:55 +09:00
Heinrich Lee Yu 2f76ff19f8 Fix MilestonesFinder to pass relations to scope
Instead of querying relations into ids we just pass them to the model
scope because the scope supports it now.

Also changes other calls to `Milestone.for_projects_and_groups`
2019-01-12 00:05:36 +08:00
Sean McGivern 7a10ef6e75 Merge branch '53431-fix-upcoming-milestone-filter-for-groups' into 'master'
Add group milestones in upcoming filter

Closes #53431

See merge request gitlab-org/gitlab-ce!23098
2019-01-11 11:28:52 +00:00
Chris Baumbauer 1102deb0bd Initial Serverless Functions detailed view 2019-01-10 14:13:41 -08:00
James Lopez 7084d71e78
Fix contributed projects finder shown private info 2019-01-08 16:13:50 +01:00
Heinrich Lee Yu 2490cfeeb2 Refactor Milestone.for_projects_and_groups
Refactored to use Rails 5 ActiveRecord `or` so that it can handle ids,
objects, array of objects, or relations properly.
2018-12-31 11:09:17 +08:00
Alessio Caiazza a7aaad96f3 ReleasesFinder will always return a relation 2018-12-31 12:05:56 +09:00
Alessio Caiazza 1ea2d9faa5 Add releases API
This commit introduces Releases API under /api/v4/projects/:id/releases

* We are introducing release policies at project level.
* We are deprecating releases changes from tags, both api and web
interface.
* Tags::CreateService no longer create a release

This feature is controlled by :releases_page feature flag
2018-12-31 12:05:56 +09:00
Heinrich Lee Yu 12e01daec9 Add group milestones in upcoming filter 2018-12-31 11:00:29 +08:00
Jarka Košanová b1c3955385 Rename GroupHierarchy into ObjectHierarchy
- we now use the hierarchy class also for epics
- also rename supports_nested_groups? into supports_nested_objects?
  - move it to a concern
2018-12-19 15:24:29 +01:00
Bob Van Landuyt 28acd2b087 Hide confidential events in ruby
We're filtering the events using `Event#visible_to_user?`.

At most we're loading 100 events at once.

Pagination is also dealt with in the finder, but the resulting array
is wrapped in a `Kaminari.paginate_array` so the API's pagination
helpers keep working. We're passing the total count into that
paginatable array, which would include confidential events. But we're
not disclosing anything.
2018-12-17 18:47:53 +01:00
Thong Kuah f82c9dbe44 Use finder to decide to show note to user
Given the note is about how to interpret ancestor clusters, use the
finder which actually knows if there are any ancestor clusters to find
out if the note should be shown, rather than passing the same info via a
view to a helper

Added note about Kaminari.paginate_array

Link to followup issue too
2018-12-17 09:51:53 +13:00
Thong Kuah 2ad5f999e9 Check can :read_clusters in finder
This is in addtion to the can checks we have in the controller, as a
finder can be used elsewhere in the future.
2018-12-17 09:51:53 +13:00
Thong Kuah 7e4f76ea89 Show clusters of ancestors in cluster list page
Show both the cluster(s) of the clusterable, and the cluster(s) of
ancestor groups.
2018-12-17 09:50:52 +13:00
Alejandro Rodríguez b65cb237ce Send a notification email on mirror update errors
The email is sent to project maintainers containing the last mirror
update error. This will allow maintainers to set alarms and react
accordingly.
2018-12-11 23:08:17 -03:00
Douwe Maan f06da1c44d Merge branch 'move-group-issues-search-cte-up-the-chain' into 'master'
Add a flag to use a subquery for group issues search

See merge request gitlab-org/gitlab-ce!23445
2018-12-07 11:14:21 +00:00
Douwe Maan a267aa5680 Remove trailing whitespace 2018-12-07 09:11:21 +00:00
Dylan Griffith 2c80a1c0de Introduce Knative Serverless Tab 2018-12-06 18:08:49 +00:00
Douwe Maan 384c5e162d Restructure `foo ? bar : false` as `foo && bar` 2018-12-06 16:31:30 +00:00
Francisco Javier López a6778fc647 Rename project's pipelines relation 2018-12-05 14:39:15 +00:00
Sean McGivern 7fd5dbf9db Add a flag to use a subquery for group issues search
We already had a flag to use a CTE, but this broke searching in some
cases where we need to sort by a joined table. Disabling the CTE flag
makes searches much slower.

The new flag, to use a subquery, makes them slightly slower than the
CTE, while maintaining correctness. If both it and the CTE flag are
enabled, the subquery takes precedence.
2018-11-30 11:57:56 +00:00
Jacopo c068ac67b3 Filter by `None`/`Any` for labels in issues/mrs API
By using the parameters `?labels=None|Any` the user can filter
issues/mrs from the API that has `none/any` label.

Affected endpoints are:

- /api/issues
- /api/projects/:id/issues
- /api/groups/:id/issues
- /api/merge_requests
- /api/projects/:id/merge_requests
- /api/groups/:id/merge_requests
2018-11-23 16:11:52 +01:00