gitlab-org--gitlab-foss/spec/models
Nick Thomas a5a444906d Fix the project auto devops API
If `project_auto_devops.enabled` is nil for a project, when setting any
auto devops values via the API, we try to create a new row in the DB,
instead of re-using the existing one. This leads to the project_id
being set to nil, and the database `NOT NULL` constraint leading to a
500 response.

This commit resolves the issue by correctly detecting the presence of a
ProjectAutoDevops row and re-using it. Persistence is also moved away
from explicit `update!` calls and into relying on `autosave: true` on
the model.
2019-07-19 21:39:26 +00:00
..
application_setting Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
badges Autocorrect with RSpec/ExampleWording cop 2019-04-05 08:43:27 +00:00
blob_viewer Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
ci Allow use of legacy triggers with feature flag 2019-07-15 15:05:22 +02:00
clusters Enable GitLabb runner to be uninstalled from cluster 2019-07-16 16:11:10 +00:00
concerns Fix the project auto devops API 2019-07-19 21:39:26 +00:00
conversational_development_index Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
cycle_analytics Add code review remarks 2019-07-16 18:45:15 +02:00
diff_viewer Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
error_tracking Handle missing keys in sentry api response 2019-03-29 14:53:40 +00:00
hooks Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
issue Upgrade to Rails 5.2 2019-07-12 10:15:31 +08:00
members Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
merge_request Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
namespace Implements lease_release on NamespaceAggregation 2019-07-04 15:52:02 +00:00
network Autocorrect with RSpec/ExampleWording cop 2019-04-05 08:43:27 +00:00
postgresql Fix background migrations failing with unused replication slot 2019-06-25 08:35:29 -07:00
project_services Make sure all specs run properly 2019-07-11 11:59:53 +02:00
protected_branch Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
releases
serverless Add Knative metrics to Prometheus 2019-04-06 02:02:39 +00:00
uploads
ability_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
abuse_report_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
active_session_spec.rb Do Redis lookup in batches in ActiveSession.sessions_from_ids 2019-07-17 11:07:26 +00:00
appearance_spec.rb Fix order-dependent spec failure in appearance_spec.rb 2019-07-03 11:27:16 -07:00
application_record_spec.rb Optimise upload path calls 2019-05-14 11:01:48 -05:00
application_setting_spec.rb refactor: remove Sentry from application settings 2019-06-25 21:17:19 +02:00
award_emoji_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
badge_spec.rb Autocorrect with RSpec/ExampleWording cop 2019-04-05 08:43:27 +00:00
blob_spec.rb Ensure that we only request blobs in one batch 2019-04-24 14:13:32 +01:00
board_group_recent_visit_spec.rb CE-port for 7714-view-recent-boards 2019-03-01 19:47:52 +08:00
board_project_recent_visit_spec.rb CE-port for 7714-view-recent-boards 2019-03-01 19:47:52 +08:00
board_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
broadcast_message_spec.rb Set 2 weeks as the expiration time for the current broadcast message 2019-06-25 19:41:05 -03:00
chat_name_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
chat_team_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
commit_collection_spec.rb Backport splitting approval changes from CE 2019-04-02 11:01:07 +00:00
commit_range_spec.rb Banzai - avoid redis if attr is in DB cache 2019-07-10 21:35:43 -06:00
commit_spec.rb Speed up commit loads by disabling BatchLoader replace_methods 2019-06-13 14:21:23 -07:00
commit_status_spec.rb Remove deprecated uses of attribute_changed? 2019-04-30 15:24:25 +08:00
compare_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
container_repository_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
deploy_key_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
deploy_keys_project_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
deploy_token_spec.rb Add username to deploy tokens 2019-07-02 18:56:48 +00:00
deployment_metrics_spec.rb Restore fallback to deployment_platform_cluster 2019-07-08 09:14:37 +12:00
deployment_spec.rb Remove un-used method 2019-07-08 09:14:37 +12:00
diff_discussion_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
diff_note_spec.rb Avoid 500's when commit is not reachable 2019-06-05 08:38:09 -03:00
discussion_spec.rb GraphQL support for Notes created in discussions 2019-07-10 12:13:48 +12:00
email_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
environment_spec.rb Introduce predictable environment slugs 2019-07-19 11:33:07 +10:00
environment_status_spec.rb Share project object in EnvironmentStatus 2019-07-08 09:13:21 +12:00
event_collection_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
event_spec.rb Rename methods that conflict in Rails 5.2 2019-05-12 23:42:06 -05:00
external_issue_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
fork_network_member_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
fork_network_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
generic_commit_status_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
global_milestone_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
gpg_key_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
gpg_key_subkey_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
gpg_signature_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
group_custom_attribute_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
group_label_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
group_milestone_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
group_spec.rb Remove group_clusters feature flag 2019-06-28 00:28:03 +12:00
guest_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
identity_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
import_export_upload_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
instance_configuration_spec.rb Display maximum artifact size from runtime config 2019-04-03 21:02:11 +02:00
internal_id_spec.rb Fix failing spec/models/internal_id_spec.rb spec 2019-06-26 14:33:57 +00:00
issue_collection_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
issue_spec.rb Added labels_hook_attrs method 2019-06-24 11:51:34 +02:00
key_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
label_link_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
label_note_spec.rb
label_priority_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
label_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
legacy_diff_discussion_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
lfs_download_object_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
lfs_file_lock_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
lfs_object_spec.rb CE backport for changes in EE MR 13894 2019-06-17 11:23:06 +12:00
lfs_objects_project_spec.rb CE backport for changes in EE MR 13894 2019-06-17 11:23:06 +12:00
license_template_spec.rb Fix license_template_spec to not modify String 2019-04-01 14:37:54 +13:00
list_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
member_spec.rb Allow a member to have an access level equal to parent group 2019-04-30 13:31:51 -07:00
merge_request_diff_commit_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
merge_request_diff_file_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
merge_request_diff_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
merge_request_spec.rb Add commit_id to AttributeCleaner::ALLOWED_REFERENCES 2019-07-15 10:30:39 +01:00
milestone_spec.rb Merge branch 'ce-9578-adjust-opened-issues-count-and-completion-rate' into 'master' 2019-06-04 21:54:31 +00:00
namespace_spec.rb Includes logic to persist namespace statistics 2019-07-02 14:44:39 +00:00
note_diff_file_spec.rb Remove cleaned up OIDs from database and cache 2019-05-06 11:35:03 +01:00
note_spec.rb Banzai - avoid redis if attr is in DB cache 2019-07-10 21:35:43 -06:00
notification_recipient_spec.rb Resolve "Email notifications do not work properly (issue due date)" 2019-06-12 15:55:09 +00:00
notification_setting_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
pages_domain_acme_order_spec.rb Add pages domains acme orders 2019-06-06 18:55:31 +00:00
pages_domain_spec.rb Fix saving domain without certificate for auto_ssl 2019-07-12 17:19:01 +03:00
personal_access_token_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
pool_repository_spec.rb Fix wrong use of ActiveRecord in PoolRepository 2019-04-20 13:27:53 +00:00
programming_language_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
project_authorization_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
project_auto_devops_spec.rb Remove un-used methods 2019-05-24 14:40:12 +12:00
project_ci_cd_setting_spec.rb Move project default git depth behind feature flags 2019-06-10 17:40:19 +00:00
project_custom_attribute_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
project_daily_statistic_spec.rb Add project http fetch statistics API 2019-02-27 11:52:35 +01:00
project_deploy_token_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
project_feature_spec.rb Fix wrong pages access level default 2019-07-17 12:56:58 +00:00
project_group_link_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
project_import_data_spec.rb
project_import_state_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
project_label_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
project_metrics_setting_spec.rb Add ProjectMetricsDashboardSetting model and table 2019-04-26 17:23:26 +00:00
project_repository_spec.rb
project_snippet_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
project_spec.rb Fix typo "beetween" in timeout validation message 2019-07-13 13:29:47 +00:00
project_statistics_spec.rb Schedule namespace aggregation in other contexts 2019-07-08 15:06:05 +00:00
project_team_spec.rb [CE] Reduce diff with EE in spec/models/project_team_spec.rb 2019-04-02 10:21:35 +02:00
project_wiki_spec.rb Added list_pages method to avoid loading all wiki pages content 2019-04-25 04:19:07 +00:00
prometheus_metric_spec.rb
protectable_dropdown_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
protected_branch_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
protected_tag_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
push_event_payload_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
push_event_spec.rb Rename methods that conflict in Rails 5.2 2019-05-12 23:42:06 -05:00
redirect_route_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
release_spec.rb Show upcoming status for releases 2019-07-03 09:12:15 +00:00
remote_mirror_spec.rb Show disabled project repo mirrors 2019-05-07 03:42:09 +01:00
repository_language_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
repository_spec.rb Upgrade rspec-rails to 3.8.2 and dependencies 2019-07-10 15:04:56 -03:00
resource_label_event_spec.rb Use Redis for CacheMarkDownField on non AR models 2019-06-05 13:19:59 +08:00
route_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
sent_notification_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
service_spec.rb Use title and description fields for issue trackers 2019-07-02 15:00:27 +02:00
shard_spec.rb
snippet_blob_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
snippet_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
spam_log_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
ssh_host_key_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
subscription_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
suggestion_spec.rb Fixed test specs 2019-04-04 13:08:34 +00:00
system_note_metadata_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
term_agreement_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
timelog_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
todo_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
tree_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
trending_project_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
upload_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
user_agent_detail_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
user_callout_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
user_custom_attribute_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
user_interacted_project_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
user_preference_spec.rb Added user time settings fields to profile 2019-05-07 21:58:16 +00:00
user_spec.rb Migrate null values for users.private_profile 2019-07-15 21:07:54 +00:00
user_status_spec.rb
wiki_directory_spec.rb Add # frozen_string_literal to spec/models 2019-04-01 14:37:54 +13:00
wiki_page_spec.rb Added list_pages method to avoid loading all wiki pages content 2019-04-25 04:19:07 +00:00