Commit Graph

34 Commits

Author SHA1 Message Date
Tiger 8b83f90459 Remove :kubernetes_namespace_per_environment feature flag
Feature flag has been defaulting to `true` since 12.2
2019-08-30 15:42:33 +10: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
Thong Kuah f0391c2517 Add frozen_string_literal to spec/support
Using the sed script from
https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
2019-07-25 17:33:34 +12:00
Jasper Maes 624a1cdab4 Upgrade Rails to 5.1.6.1
Model.new.attributes now also returns encrypted attributes.
2019-04-23 08:31:23 +08:00
Jasper Maes 07eb92b605 Passing the separator argument as a positional parameter is deprecated 2018-12-14 22:49:26 +01:00
Thong Kuah 305ab0405a Revert "Merge branch 'refactor-cluster-create-service-spec' into 'master'"
This reverts merge request !22407
2018-10-22 20:12:26 +00:00
Thong Kuah c3c22cb210 Move shared examples into the only file where used
This will make it easier to perform in place adjustments, etc for future
MRs involving group clusters.
2018-10-17 10:43:14 +13:00
Thong Kuah 56f309dd53 Remove `rbac_clusters` feature flag
Now that Auto DevOps can run in a RBAC enabled cluster from
https://gitlab.com/gitlab-org/gitlab-ce/issues/51942, we can now remove
the FF.

As the flag only governed if UI elements would appear or not when
creating/adding existing clusters; the effect of removing the FF would
be that the checkbox to choose to enable RBAC clusters will now always
appear.

Remove FF stubs from specs

Improve spec context names
2018-10-04 14:31:05 +13:00
Thong Kuah 3c5c6c2c2e Address BE review - re-arrange some specs 2018-09-14 16:26:51 +12:00
Thong Kuah 292d2208e0 Add FE option for users to choose to create a fully RBAC-enabled cluster or not.
This is similar to the option in the Add Existing cluster form
2018-09-14 16:26:51 +12:00
Thong Kuah c9af170d9a Create a GKE cluster with legacy_abac disabled when the `:rbac_clusters` feature flag is enabled
Explicitly persist the legacy_abac value of the cluster_provider_gcp so that we can disable abac if the `:rbac_clusters` feature flag is enabled
2018-09-14 16:26:51 +12:00
Mark Chao a63bce1a4b Resolve "Rename the `Master` role to `Maintainer`" Backend 2018-07-11 14:36:08 +00:00
Matija Čupić f96552c7c7
Extract shared components from Clusters::CreateService spec 2018-05-13 14:17:34 +02:00
Olivier Gonzalez 065d44538b
Cleanly handle plural name for ghost user migration 2018-05-07 23:38:05 -04:00
blackst0ne 27c95364b5 Replace '.team << [user, role]' with 'add_role(user)' in specs 2017-12-22 19:18:28 +11:00
Robert Speicher 72a7b30c9f Change all `:empty_project` to `:project` 2017-08-02 17:47:31 -04:00
Robert Speicher 9513bd18c4 Ensure all project factories use `:repository` trait or `:empty_project` 2017-08-01 14:51:52 -04:00
Jarka Kadlecova a9d940bffc Use Ghost user when edited_by, merged_by deleted 2017-07-19 11:35:17 +02:00
Eric Eastwood ea090291bb Rename "Slash commands" to "Quick actions"
Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/27070

Deprecate "chat commands" in favor of "slash commands"

We looked for things like:

 - `slash commmand`
 - `slash_command`
 - `slash-command`
 - `SlashCommand`
2017-06-15 09:01:56 -05:00
Robert Speicher a6ec5121f0 Correct RSpec/SingleLineHook cop offenses 2017-06-14 13:18:56 -05:00
Valery Sizov 387c4b2c21 Backport of multiple_assignees_feature [ci skip] 2017-05-04 17:11:53 +03:00
Timothy Andrew 133f00bedd Move records to the ghost user in a transaction.
- While deleting a user, some of the user's associated records are moved to the
  ghost user so they aren't deleted. The user is blocked before these records
  are moved, to prevent the user from creating new records while the migration
  is happening, and so preventing a data race.

- Previously, if the migration failed, the user would _remain_ blocked, which is
  not the expected behavior. On the other hand, we can't just stick the block +
  migration into a transaction, because we want the block to be committed before
  the migration starts (for the data race reason mentioned above).

- One solution (implemented in this commit) is to block the user in a parent
  transaction, migrate the associated records in a nested sub-transaction, and
  then unblock the user in the parent transaction if the sub-transaction fails.
2017-04-24 06:46:10 +00:00
Timothy Andrew 1c42505b02
Implement review comments from @DouweM for !10467.
1. Have `MigrateToGhostUser` be a service rather than a mixed-in module, to keep
   things explicit. Specs testing the behavior of this class are moved into a
   separate service spec file.

2. Add a `user.reported_abuse_reports` association to make the
   `migrate_abuse_reports` method more consistent with the other `migrate_`
   methods.
2017-04-06 22:39:40 +05:30
Timothy Andrew 3e1a1242c6
Move a user's award emoji to the ghost user
... when the user is destroyed.

1. Normally, for a given awardable and award emoji name, a user is only allowed
   to create a single award emoji.

2. This validation needs to be removed for ghost users, since:

   - User A and User B have created award emoji - with the same name and against
     the same awardable
   - User A is deleted. Their award emoji is moved to the ghost user
   - User B is deleted. Their award emoji needs to be moved to the ghost user.
     However, this breaks the uniqueness validation, since the ghost user is
     only allowed to have one award emoji of a given name for a given awardable
2017-04-06 18:59:17 +05:30
Timothy Andrew 97cbf7c223
Move a user's notes to the ghost user
... when the user is destroyed.
2017-04-06 18:58:59 +05:30
Timothy Andrew 72580f07af
Move a user's merge requests to the ghost user.
1. When the user is deleted.

2. Refactor out code relating to "migrating records to the ghost user" into a
   `MigrateToGhostUser` concern, which is tested using a shared example.
2017-04-06 18:58:57 +05:30
Rémy Coutable 4e3516788f Don't use FFaker in factories, use sequences instead
FFaker can generate data that randomly break our test suite. This
simplifies our factories and use sequences which are more predictive.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-04-03 18:54:48 +02:00
Robert Speicher ca9a79f620 Use `:empty_project` where possible in service specs 2017-03-27 20:44:09 -04:00
Douwe Maan c10064aad5 Enable Style/SpaceInsideBrackets 2017-02-23 09:31:56 -06:00
wendy0402 9a24db121c fix issue creation from milestone doesn't assign the milestone 2017-02-12 09:02:03 +07:00
Semyon Pupkov 3deb66ea56 Add traits for ProjectFeatures to Project factory
https://gitlab.com/gitlab-org/gitlab-ce/issues/24007
2017-02-05 13:11:45 +05:00
Felipe Artur 1b082a4c33 Check if user can read issue before being assigned 2016-12-27 19:25:17 -02:00
Mark Fletcher 9f97fa4d9f Ensure issuable state changes only fire webhooks once
* Webhooks for close and reopen events now fired in respective services only
* Prevents generic 'update' webhooks firing too
2016-12-16 10:52:59 +00:00
Rémy Coutable adab5dba43 Fix permission for setting an issue's due date
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-09-28 17:41:32 +02:00