Creating/editing value stream with new duplicate custom stage names results in 500 error
Summary
Creating a new value stream with new duplicate custom stage names results in a 500 error due to UNIQUE
constraint.
Steps to reproduce
- Create/edit value stream
- Add two custom stages with the same name
- Submit form
What is the current bug behavior?
Form submission is stuck, and no errors are displayed in the UI.
What is the expected correct behavior?
Form is allowed to submit and errors should be displayed upon backend/frontend validation.
Relevant logs and/or screenshots
Screen Recording 2023-06-14 at 4.54.13 PM.mov
ActiveRecord::RecordNotUnique at /groups/toolbox/-/analytics/value_stream_analytics/value_streams/23
====================================================================================================
PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_group_stages_on_group_id_group_value_stream_id_and_name"
DETAIL: Key (group_id, group_value_stream_id, name)=(22, 23, Cool) already exists.
> To access an interactive console with this error, point your browser to: /__better_errors
lib/gitlab/database/load_balancing/connection_proxy.rb, line 127
----------------------------------------------------------------
``` ruby
122 if read_only_transaction?
123 raise WriteInsideReadOnlyTransactionError, 'A write query is performed inside a read-only transaction'
124 end
125
126 @load_balancer.read_write do |connection|
> 127 connection.public_send(...)
128 end
129 end
130
131 private
132
App backtrace
-------------
- lib/gitlab/database/load_balancing/connection_proxy.rb:127:in `block in write_using_load_balancer'
- lib/gitlab/database/load_balancing/load_balancer.rb:127:in `block in read_write'
- lib/gitlab/database/load_balancing/load_balancer.rb:198:in `retry_with_backoff'
- lib/gitlab/database/load_balancing/load_balancer.rb:116:in `read_write'
- lib/gitlab/database/load_balancing/connection_proxy.rb:126:in `write_using_load_balancer'
- lib/gitlab/database/load_balancing/connection_proxy.rb:61:in `block (2 levels) in <class:ConnectionProxy>'
- lib/gitlab/database/load_balancing/connection_proxy.rb:127:in `block in write_using_load_balancer'
- lib/gitlab/database/load_balancing/load_balancer.rb:127:in `block in read_write'
- lib/gitlab/database/load_balancing/load_balancer.rb:198:in `retry_with_backoff'
- lib/gitlab/database/load_balancing/load_balancer.rb:116:in `read_write'
- lib/gitlab/database/load_balancing/connection_proxy.rb:126:in `write_using_load_balancer'
- lib/gitlab/database/load_balancing/connection_proxy.rb:78:in `transaction'
- lib/gitlab/database/load_balancing/connection_proxy.rb:127:in `block in write_using_load_balancer'
- lib/gitlab/database/load_balancing/load_balancer.rb:127:in `block in read_write'
- lib/gitlab/database/load_balancing/load_balancer.rb:198:in `retry_with_backoff'
- lib/gitlab/database/load_balancing/load_balancer.rb:116:in `read_write'
- lib/gitlab/database/load_balancing/connection_proxy.rb:126:in `write_using_load_balancer'
- lib/gitlab/database/load_balancing/connection_proxy.rb:78:in `transaction'
- ee/app/services/analytics/cycle_analytics/value_streams/create_service.rb:22:in `execute'
- ee/app/controllers/concerns/ee/analytics/cycle_analytics/value_stream_actions.rb:45:in `update'
- ee/lib/gitlab/ip_address_state.rb:10:in `with'
- ee/app/controllers/ee/application_controller.rb:45:in `set_current_ip_address'
- app/controllers/application_controller.rb:500:in `set_current_admin'
- lib/gitlab/session.rb:11:in `with_session'
- app/controllers/application_controller.rb:491:in `set_session_storage'
- lib/gitlab/i18n.rb:107:in `with_locale'
- lib/gitlab/i18n.rb:113:in `with_user_locale'
- app/controllers/application_controller.rb:482:in `set_locale'
- app/controllers/application_controller.rb:475:in `set_current_context'
- lib/gitlab/metrics/elasticsearch_rack_middleware.rb:16:in `call'
- lib/gitlab/middleware/memory_report.rb:13:in `call'
- lib/gitlab/middleware/speedscope.rb:13:in `call'
- lib/gitlab/query_limiting/middleware.rb:17:in `block in call'
- lib/gitlab/query_limiting/transaction.rb:45:in `run'
- lib/gitlab/query_limiting/middleware.rb:16:in `call'
- lib/gitlab/database/load_balancing/rack_middleware.rb:23:in `call'
- lib/gitlab/middleware/rails_queue_duration.rb:33:in `call'
- lib/gitlab/metrics/rack_middleware.rb:16:in `block in call'
- lib/gitlab/metrics/web_transaction.rb:46:in `run'
- lib/gitlab/metrics/rack_middleware.rb:16:in `call'
- lib/gitlab/jira/middleware.rb:19:in `call'
- lib/gitlab/middleware/go.rb:20:in `call'
- lib/gitlab/etag_caching/middleware.rb:21:in `call'
- lib/gitlab/middleware/query_analyzer.rb:11:in `block in call'
- lib/gitlab/database/query_analyzer.rb:37:in `within'
- lib/gitlab/middleware/query_analyzer.rb:11:in `call'
- lib/gitlab/middleware/multipart.rb:173:in `call'
- lib/gitlab/middleware/read_only/controller.rb:50:in `call'
- lib/gitlab/middleware/read_only.rb:18:in `call'
- lib/gitlab/middleware/same_site_cookies.rb:27:in `call'
- lib/gitlab/middleware/basic_health_check.rb:25:in `call'
- lib/gitlab/middleware/handle_malformed_strings.rb:21:in `call'
- lib/gitlab/middleware/handle_ip_spoof_attack_error.rb:25:in `call'
- lib/gitlab/middleware/request_context.rb:15:in `call'
- lib/gitlab/middleware/webhook_recursion_detection.rb:15:in `call'
- config/initializers/fix_local_cache_middleware.rb:11:in `call'
- lib/gitlab/middleware/compressed_json.rb:44:in `call'
- lib/gitlab/middleware/static.rb:11:in `call'
- lib/gitlab/webpack/dev_server_middleware.rb:34:in `perform_request'
- lib/gitlab/middleware/rack_multipart_tempfile_factory.rb:19:in `call'
- lib/gitlab/middleware/sidekiq_web_static.rb:20:in `call'
- lib/gitlab/metrics/requests_rack_middleware.rb:79:in `call'
- lib/gitlab/middleware/release_env.rb:13:in `call'
Full backtrace
--------------
- activerecord (6.1.7.2) lib/active_record/connection_adapters/abstract_adapter.rb:682:in `translate_exception_class'
- activerecord (6.1.7.2) lib/active_record/connection_adapters/abstract_adapter.rb:699:in `rescue in block in log'
- activerecord (6.1.7.2) lib/active_record/connection_adapters/abstract_adapter.rb:695:in `block in log'
- activesupport (6.1.7.2) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
- activerecord (6.1.7.2) lib/active_record/connection_adapters/abstract_adapter.rb:687:in `log'
- activerecord (6.1.7.2) lib/active_record/connection_adapters/postgresql_adapter.rb:670:in `exec_no_cache'
- activerecord (6.1.7.2) lib/active_record/connection_adapters/postgresql_adapter.rb:649:in `execute_and_clear'
- marginalia (1.11.1) lib/marginalia.rb:91:in `execute_and_clear_with_marginalia'
- activerecord (6.1.7.2) lib/active_record/connection_adapters/postgresql/database_statements.rb:55:in `exec_query'
- activerecord (6.1.7.2) lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `exec_insert'
- activerecord (6.1.7.2) lib/active_record/connection_adapters/postgresql/database_statements.rb:93:in `exec_insert'
- activerecord (6.1.7.2) lib/active_record/connection_adapters/abstract/database_statements.rb:171:in `insert'
- activerecord (6.1.7.2) lib/active_record/connection_adapters/abstract/query_cache.rb:22:in `insert'
- lib/gitlab/database/load_balancing/connection_proxy.rb:127:in `block in write_using_load_balancer'
- lib/gitlab/database/load_balancing/load_balancer.rb:127:in `block in read_write'
- lib/gitlab/database/load_balancing/load_balancer.rb:198:in `retry_with_backoff'
- lib/gitlab/database/load_balancing/load_balancer.rb:116:in `read_write'
- lib/gitlab/database/load_balancing/connection_proxy.rb:126:in `write_using_load_balancer'
- lib/gitlab/database/load_balancing/connection_proxy.rb:61:in `block (2 levels) in <class:ConnectionProxy>'
- activerecord (6.1.7.2) lib/active_record/persistence.rb:375:in `_insert_record'
- activerecord (6.1.7.2) lib/active_record/persistence.rb:929:in `_create_record'
- activerecord (6.1.7.2) lib/active_record/counter_cache.rb:166:in `_create_record'
- activerecord (6.1.7.2) lib/active_record/locking/optimistic.rb:79:in `_create_record'
- activerecord (6.1.7.2) lib/active_record/attribute_methods/dirty.rb:201:in `_create_record'
- activerecord (6.1.7.2) lib/active_record/callbacks.rb:461:in `block in _create_record'
- activesupport (6.1.7.2) lib/active_support/callbacks.rb:98:in `run_callbacks'
- activesupport (6.1.7.2) lib/active_support/callbacks.rb:824:in `_run_create_callbacks'
- activerecord (6.1.7.2) lib/active_record/callbacks.rb:461:in `_create_record'
- activerecord (6.1.7.2) lib/active_record/timestamp.rb:108:in `_create_record'
- bullet (7.0.2) lib/bullet/active_record61.rb:6:in `_create_record'
- activerecord (6.1.7.2) lib/active_record/persistence.rb:900:in `create_or_update'
- activerecord (6.1.7.2) lib/active_record/callbacks.rb:457:in `block in create_or_update'
- activesupport (6.1.7.2) lib/active_support/callbacks.rb:106:in `run_callbacks'
- activesupport (6.1.7.2) lib/active_support/callbacks.rb:824:in `_run_save_callbacks'
- activerecord (6.1.7.2) lib/active_record/callbacks.rb:457:in `create_or_update'
- activerecord (6.1.7.2) lib/active_record/timestamp.rb:126:in `create_or_update'
- activerecord (6.1.7.2) lib/active_record/persistence.rb:474:in `save'
- activerecord (6.1.7.2) lib/active_record/validations.rb:47:in `save'
- activerecord (6.1.7.2) lib/active_record/transactions.rb:298:in `block in save'
- activerecord (6.1.7.2) lib/active_record/transactions.rb:354:in `block in with_transaction_returning_status'
- activerecord (6.1.7.2) lib/active_record/connection_adapters/abstract/database_statements.rb:318:in `transaction'
- lib/gitlab/database/load_balancing/connection_proxy.rb:127:in `block in write_using_load_balancer'
- lib/gitlab/database/load_balancing/load_balancer.rb:127:in `block in read_write'
- lib/gitlab/database/load_balancing/load_balancer.rb:198:in `retry_with_backoff'
- lib/gitlab/database/load_balancing/load_balancer.rb:116:in `read_write'
- lib/gitlab/database/load_balancing/connection_proxy.rb:126:in `write_using_load_balancer'
- lib/gitlab/database/load_balancing/connection_proxy.rb:78:in `transaction'
- activerecord (6.1.7.2) lib/active_record/transactions.rb:350:in `with_transaction_returning_status'
- activerecord (6.1.7.2) lib/active_record/transactions.rb:298:in `save'
- activerecord (6.1.7.2) lib/active_record/suppressor.rb:44:in `save'
- activerecord (6.1.7.2) lib/active_record/associations/collection_association.rb:373:in `insert_record'
- activerecord (6.1.7.2) lib/active_record/associations/has_many_association.rb:58:in `insert_record'
- activerecord (6.1.7.2) lib/active_record/autosave_association.rb:423:in `block in save_collection_association'
- activerecord (6.1.7.2) lib/active_record/autosave_association.rb:416:in `save_collection_association'
- activerecord (6.1.7.2) lib/active_record/autosave_association.rb:208:in `block in add_autosave_association_callbacks'
- activerecord (6.1.7.2) lib/active_record/autosave_association.rb:181:in `block in define_non_cyclic_method'
- activesupport (6.1.7.2) lib/active_support/callbacks.rb:427:in `block in make_lambda'
- activesupport (6.1.7.2) lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'
- activesupport (6.1.7.2) lib/active_support/callbacks.rb:516:in `block in invoke_after'
- activesupport (6.1.7.2) lib/active_support/callbacks.rb:516:in `invoke_after'
- activesupport (6.1.7.2) lib/active_support/callbacks.rb:107:in `run_callbacks'
- activesupport (6.1.7.2) lib/active_support/callbacks.rb:824:in `_run_update_callbacks'
- activerecord (6.1.7.2) lib/active_record/callbacks.rb:465:in `_update_record'
- activerecord (6.1.7.2) lib/active_record/timestamp.rb:121:in `_update_record'
- activerecord (6.1.7.2) lib/active_record/persistence.rb:900:in `create_or_update'
- activerecord (6.1.7.2) lib/active_record/callbacks.rb:457:in `block in create_or_update'
- activesupport (6.1.7.2) lib/active_support/callbacks.rb:117:in `block in run_callbacks'
- activerecord (6.1.7.2) lib/active_record/autosave_association.rb:385:in `around_save_collection_association'
- activesupport (6.1.7.2) lib/active_support/callbacks.rb:126:in `block in run_callbacks'
- activesupport (6.1.7.2) lib/active_support/callbacks.rb:137:in `run_callbacks'
- activesupport (6.1.7.2) lib/active_support/callbacks.rb:824:in `_run_save_callbacks'
- activerecord (6.1.7.2) lib/active_record/callbacks.rb:457:in `create_or_update'
- activerecord (6.1.7.2) lib/active_record/timestamp.rb:126:in `create_or_update'
- activerecord (6.1.7.2) lib/active_record/persistence.rb:474:in `save'
- activerecord (6.1.7.2) lib/active_record/validations.rb:47:in `save'
- activerecord (6.1.7.2) lib/active_record/transactions.rb:298:in `block in save'
- activerecord (6.1.7.2) lib/active_record/transactions.rb:354:in `block in with_transaction_returning_status'
- activerecord (6.1.7.2) lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `block in transaction'
- activerecord (6.1.7.2) lib/active_record/connection_adapters/abstract/transaction.rb:319:in `block in within_new_transaction'
- activesupport (6.1.7.2) lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
- activesupport (6.1.7.2) lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
- activesupport (6.1.7.2) lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
- activerecord (6.1.7.2) lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction'
- activerecord (6.1.7.2) lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `transaction'
- lib/gitlab/database/load_balancing/connection_proxy.rb:127:in `block in write_using_load_balancer'
- lib/gitlab/database/load_balancing/load_balancer.rb:127:in `block in read_write'
- lib/gitlab/database/load_balancing/load_balancer.rb:198:in `retry_with_backoff'
- lib/gitlab/database/load_balancing/load_balancer.rb:116:in `read_write'
- lib/gitlab/database/load_balancing/connection_proxy.rb:126:in `write_using_load_balancer'
- lib/gitlab/database/load_balancing/connection_proxy.rb:78:in `transaction'
- activerecord (6.1.7.2) lib/active_record/transactions.rb:350:in `with_transaction_returning_status'
- activerecord (6.1.7.2) lib/active_record/transactions.rb:298:in `save'
- activerecord (6.1.7.2) lib/active_record/suppressor.rb:44:in `save'
- ee/app/services/analytics/cycle_analytics/value_streams/create_service.rb:22:in `execute'
- ee/app/controllers/concerns/ee/analytics/cycle_analytics/value_stream_actions.rb:45:in `update'
- actionpack (6.1.7.2) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
- actionpack (6.1.7.2) lib/abstract_controller/base.rb:228:in `process_action'
- actionpack (6.1.7.2) lib/action_controller/metal/rendering.rb:30:in `process_action'
- actionpack (6.1.7.2) lib/abstract_controller/callbacks.rb:42:in `block in process_action'
- activesupport (6.1.7.2) lib/active_support/callbacks.rb:117:in `block in run_callbacks'
- ee/lib/gitlab/ip_address_state.rb:10:in `with'
- ee/app/controllers/ee/application_controller.rb:45:in `set_current_ip_address'
- activesupport (6.1.7.2) lib/active_support/callbacks.rb:126:in `block in run_callbacks'
- app/controllers/application_controller.rb:500:in `set_current_admin'
- activesupport (6.1.7.2) lib/active_support/callbacks.rb:126:in `block in run_callbacks'
- lib/gitlab/session.rb:11:in `with_session'
- app/controllers/application_controller.rb:491:in `set_session_storage'
- activesupport (6.1.7.2) lib/active_support/callbacks.rb:126:in `block in run_callbacks'
- lib/gitlab/i18n.rb:107:in `with_locale'
- lib/gitlab/i18n.rb:113:in `with_user_locale'
- app/controllers/application_controller.rb:482:in `set_locale'
- activesupport (6.1.7.2) lib/active_support/callbacks.rb:126:in `block in run_callbacks'
- marginalia (1.11.1) lib/marginalia.rb:109:in `record_query_comment'
- activesupport (6.1.7.2) lib/active_support/callbacks.rb:126:in `block in run_callbacks'
- sentry-raven (3.1.2) lib/raven/integrations/rails/controller_transaction.rb:7:in `block in included'
- activesupport (6.1.7.2) lib/active_support/callbacks.rb:126:in `block in run_callbacks'
- sentry-rails (5.8.0) lib/sentry/rails/controller_transaction.rb:28:in `block in sentry_around_action'
- sentry-ruby (5.8.0) lib/sentry/hub.rb:100:in `with_child_span'
- sentry-ruby (5.8.0) lib/sentry-ruby.rb:446:in `with_child_span'
- sentry-rails (5.8.0) lib/sentry/rails/controller_transaction.rb:14:in `sentry_around_action'
- activesupport (6.1.7.2) lib/active_support/callbacks.rb:126:in `block in run_callbacks'
- app/controllers/application_controller.rb:475:in `set_current_context'
- activesupport (6.1.7.2) lib/active_support/callbacks.rb:126:in `block in run_callbacks'
- activesupport (6.1.7.2) lib/active_support/callbacks.rb:137:in `run_callbacks'
- actionpack (6.1.7.2) lib/abstract_controller/callbacks.rb:41:in `process_action'
- actionpack (6.1.7.2) lib/action_controller/metal/rescue.rb:22:in `process_action'
- actionpack (6.1.7.2) lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
- activesupport (6.1.7.2) lib/active_support/notifications.rb:203:in `block in instrument'
- activesupport (6.1.7.2) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
- activesupport (6.1.7.2) lib/active_support/notifications.rb:203:in `instrument'
- actionpack (6.1.7.2) lib/action_controller/metal/instrumentation.rb:33:in `process_action'
- actionpack (6.1.7.2) lib/action_controller/metal/params_wrapper.rb:249:in `process_action'
- activerecord (6.1.7.2) lib/active_record/railties/controller_runtime.rb:27:in `process_action'
- actionpack (6.1.7.2) lib/abstract_controller/base.rb:165:in `process'
- actionview (6.1.7.2) lib/action_view/rendering.rb:39:in `process'
- actionpack (6.1.7.2) lib/action_controller/metal.rb:190:in `dispatch'
- actionpack (6.1.7.2) lib/action_controller/metal.rb:254:in `dispatch'
- actionpack (6.1.7.2) lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
- actionpack (6.1.7.2) lib/action_dispatch/routing/route_set.rb:33:in `serve'
- actionpack (6.1.7.2) lib/action_dispatch/routing/mapper.rb:19:in `block in <class:Constraints>'
- actionpack (6.1.7.2) lib/action_dispatch/routing/mapper.rb:49:in `serve'
- actionpack (6.1.7.2) lib/action_dispatch/journey/router.rb:50:in `block in serve'
- actionpack (6.1.7.2) lib/action_dispatch/journey/router.rb:32:in `serve'
- actionpack (6.1.7.2) lib/action_dispatch/routing/route_set.rb:842:in `call'
- gitlab-experiment (0.7.1) lib/gitlab/experiment/middleware.rb:19:in `call'
- omniauth (2.1.0) lib/omniauth/strategy.rb:202:in `call!'
- omniauth (2.1.0) lib/omniauth/strategy.rb:169:in `call'
- actionpack (6.1.7.2) lib/action_dispatch/middleware/static.rb:24:in `call'
- flipper (0.25.0) lib/flipper/middleware/memoizer.rb:72:in `memoized_call'
- flipper (0.25.0) lib/flipper/middleware/memoizer.rb:37:in `call'
- lib/gitlab/metrics/elasticsearch_rack_middleware.rb:16:in `call'
- lib/gitlab/middleware/memory_report.rb:13:in `call'
- lib/gitlab/middleware/speedscope.rb:13:in `call'
- lib/gitlab/query_limiting/middleware.rb:17:in `block in call'
- lib/gitlab/query_limiting/transaction.rb:45:in `run'
- lib/gitlab/query_limiting/middleware.rb:16:in `call'
- lib/gitlab/database/load_balancing/rack_middleware.rb:23:in `call'
- lib/gitlab/middleware/rails_queue_duration.rb:33:in `call'
- lib/gitlab/metrics/rack_middleware.rb:16:in `block in call'
- lib/gitlab/metrics/web_transaction.rb:46:in `run'
- lib/gitlab/metrics/rack_middleware.rb:16:in `call'
- lib/gitlab/jira/middleware.rb:19:in `call'
- lib/gitlab/middleware/go.rb:20:in `call'
- lib/gitlab/etag_caching/middleware.rb:21:in `call'
- lib/gitlab/middleware/query_analyzer.rb:11:in `block in call'
- lib/gitlab/database/query_analyzer.rb:37:in `within'
- lib/gitlab/middleware/query_analyzer.rb:11:in `call'
- batch-loader (2.0.1) lib/batch_loader/middleware.rb:11:in `call'
- bullet (7.0.2) lib/bullet/rack.rb:15:in `call'
- rack-attack (6.6.1) lib/rack/attack.rb:103:in `call'
- apollo_upload_server (2.1.0) lib/apollo_upload_server/middleware.rb:19:in `call'
- lib/gitlab/middleware/multipart.rb:173:in `call'
- rack (2.2.7) lib/rack/static.rb:161:in `call'
- rack-attack (6.6.1) lib/rack/attack.rb:127:in `call'
- warden (1.2.9) lib/warden/manager.rb:36:in `block in call'
- warden (1.2.9) lib/warden/manager.rb:34:in `call'
- rack-cors (1.1.1) lib/rack/cors.rb:100:in `call'
- rack (2.2.7) lib/rack/tempfile_reaper.rb:15:in `call'
- rack (2.2.7) lib/rack/etag.rb:27:in `call'
- rack (2.2.7) lib/rack/conditional_get.rb:40:in `call'
- rack (2.2.7) lib/rack/head.rb:12:in `call'
- actionpack (6.1.7.2) lib/action_dispatch/http/permissions_policy.rb:22:in `call'
- actionpack (6.1.7.2) lib/action_dispatch/http/content_security_policy.rb:19:in `call'
- lib/gitlab/middleware/read_only/controller.rb:50:in `call'
- lib/gitlab/middleware/read_only.rb:18:in `call'
- rack (2.2.7) lib/rack/session/abstract/id.rb:266:in `context'
- rack (2.2.7) lib/rack/session/abstract/id.rb:260:in `call'
- actionpack (6.1.7.2) lib/action_dispatch/middleware/cookies.rb:697:in `call'
- lib/gitlab/middleware/same_site_cookies.rb:27:in `call'
- activerecord (6.1.7.2) lib/active_record/migration.rb:601:in `call'
- actionpack (6.1.7.2) lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
- activesupport (6.1.7.2) lib/active_support/callbacks.rb:98:in `run_callbacks'
- actionpack (6.1.7.2) lib/action_dispatch/middleware/callbacks.rb:26:in `call'
- actionpack (6.1.7.2) lib/action_dispatch/middleware/executor.rb:14:in `call'
- actionpack (6.1.7.2) lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
- sentry-rails (5.8.0) lib/sentry/rails/rescued_exception_interceptor.rb:12:in `call'
- better_errors (2.10.0) lib/better_errors/middleware.rb:87:in `protected_app_call'
- better_errors (2.10.0) lib/better_errors/middleware.rb:82:in `better_errors_call'
- better_errors (2.10.0) lib/better_errors/middleware.rb:60:in `call'
- actionpack (6.1.7.2) lib/action_dispatch/middleware/debug_exceptions.rb:29:in `call'
- sentry-ruby (5.8.0) lib/sentry/rack/capture_exceptions.rb:28:in `block (2 levels) in call'
- sentry-ruby (5.8.0) lib/sentry/hub.rb:220:in `with_session_tracking'
- sentry-ruby (5.8.0) lib/sentry-ruby.rb:375:in `with_session_tracking'
- sentry-ruby (5.8.0) lib/sentry/rack/capture_exceptions.rb:19:in `block in call'
- sentry-ruby (5.8.0) lib/sentry/hub.rb:59:in `with_scope'
- sentry-ruby (5.8.0) lib/sentry-ruby.rb:355:in `with_scope'
- sentry-ruby (5.8.0) lib/sentry/rack/capture_exceptions.rb:18:in `call'
- actionpack (6.1.7.2) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
- lib/gitlab/middleware/basic_health_check.rb:25:in `call'
- lib/gitlab/middleware/handle_malformed_strings.rb:21:in `call'
- railties (6.1.7.2) lib/rails/rack/logger.rb:37:in `call_app'
- railties (6.1.7.2) lib/rails/rack/logger.rb:26:in `block in call'
- activesupport (6.1.7.2) lib/active_support/tagged_logging.rb:99:in `block in tagged'
- activesupport (6.1.7.2) lib/active_support/tagged_logging.rb:37:in `tagged'
- activesupport (6.1.7.2) lib/active_support/tagged_logging.rb:99:in `tagged'
- railties (6.1.7.2) lib/rails/rack/logger.rb:26:in `call'
- sprockets-rails (3.4.2) lib/sprockets/rails/quiet_assets.rb:13:in `call'
- actionpack (6.1.7.2) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
- lib/gitlab/middleware/handle_ip_spoof_attack_error.rb:25:in `call'
- lib/gitlab/middleware/request_context.rb:15:in `call'
- lib/gitlab/middleware/webhook_recursion_detection.rb:15:in `call'
- request_store (1.5.1) lib/request_store/middleware.rb:19:in `call'
- rack-timeout (0.6.3) lib/rack/timeout/core.rb:148:in `block in call'
- rack-timeout (0.6.3) lib/rack/timeout/support/timeout.rb:19:in `timeout'
- rack-timeout (0.6.3) lib/rack/timeout/core.rb:147:in `call'
- rack (2.2.7) lib/rack/method_override.rb:24:in `call'
- rack (2.2.7) lib/rack/runtime.rb:22:in `call'
- rack-timeout (0.6.3) lib/rack/timeout/core.rb:148:in `block in call'
- rack-timeout (0.6.3) lib/rack/timeout/support/timeout.rb:19:in `timeout'
- rack-timeout (0.6.3) lib/rack/timeout/core.rb:147:in `call'
- config/initializers/fix_local_cache_middleware.rb:11:in `call'
- lib/gitlab/middleware/compressed_json.rb:44:in `call'
- actionpack (6.1.7.2) lib/action_dispatch/middleware/executor.rb:14:in `call'
- actionpack (6.1.7.2) lib/action_dispatch/middleware/static.rb:24:in `call'
- lib/gitlab/middleware/static.rb:11:in `call'
- lib/gitlab/webpack/dev_server_middleware.rb:34:in `perform_request'
- rack-proxy (0.7.6) lib/rack/proxy.rb:87:in `call'
- lib/gitlab/middleware/rack_multipart_tempfile_factory.rb:19:in `call'
- rack (2.2.7) lib/rack/sendfile.rb:110:in `call'
- lib/gitlab/middleware/sidekiq_web_static.rb:20:in `call'
- actionpack (6.1.7.2) lib/action_dispatch/middleware/host_authorization.rb:148:in `call'
- lib/gitlab/metrics/requests_rack_middleware.rb:79:in `call'
- gitlab-labkit (0.33.0) lib/labkit/middleware/rack.rb:22:in `block in call'
- gitlab-labkit (0.33.0) lib/labkit/context.rb:35:in `with_context'
- gitlab-labkit (0.33.0) lib/labkit/middleware/rack.rb:21:in `call'
- actionpack (6.1.7.2) lib/action_dispatch/middleware/request_id.rb:26:in `call'
- sentry-raven (3.1.2) lib/raven/integrations/rack.rb:51:in `call'
- railties (6.1.7.2) lib/rails/engine.rb:539:in `call'
- railties (6.1.7.2) lib/rails/railtie.rb:207:in `method_missing'
- lib/gitlab/middleware/release_env.rb:13:in `call'
- rack (2.2.7) lib/rack/urlmap.rb:74:in `block in call'
- rack (2.2.7) lib/rack/urlmap.rb:58:in `call'
- puma (6.3.0) lib/puma/configuration.rb:270:in `call'
- puma (6.3.0) lib/puma/request.rb:100:in `block in handle_request'
- puma (6.3.0) lib/puma/thread_pool.rb:344:in `with_force_shutdown'
- puma (6.3.0) lib/puma/request.rb:99:in `handle_request'
- puma (6.3.0) lib/puma/server.rb:443:in `process_client'
- puma (6.3.0) lib/puma/server.rb:245:in `block in run'
- puma (6.3.0) lib/puma/thread_pool.rb:151:in `block in spawn_thread'
Suggested solution
-
frontend Handle anything other than success with a relevant message rather than an infinite spinner
👉 #415512 (closed) -
frontend Add a validation on the frontend to detect duplicate stage names in the form (create and also on edit)
👉 #415513 (closed) -
backend Write a custom validator/validation method along the lines of #415404 (closed) to detect duplicate names in the
CreateService
(this issue)
Edited by charlie ablett