IterationsFinder with filters by timeframe returns iterations which start before the timeframe failure
Job #555076736 failed for 57eda517:
rspec ./ee/spec/finders/iterations_finder_spec.rb:101 # IterationsFinder with filters by timeframe returns iterations which start before the timeframe
1) IterationsFinder with filters by timeframe returns iterations which start before the timeframe
Failure/Error: iteration = create(:iteration, :skip_future_date_validation, project: project_2, start_date: now - 5.days)
ActiveRecord::RecordInvalid:
Validation failed: Dates cannot overlap with other existing Iterations
# ./vendor/ruby/2.6.0/gems/activerecord-6.0.2.2/lib/active_record/validations.rb:81:in `raise_validation_error'
# ./vendor/ruby/2.6.0/gems/activerecord-6.0.2.2/lib/active_record/validations.rb:53:in `save!'
# ./vendor/ruby/2.6.0/gems/activerecord-6.0.2.2/lib/active_record/transactions.rb:319:in `block in save!'
# ./vendor/ruby/2.6.0/gems/activerecord-6.0.2.2/lib/active_record/transactions.rb:375:in `block in with_transaction_returning_status'
# ./vendor/ruby/2.6.0/gems/activerecord-6.0.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:281:in `block in transaction'
# ./vendor/ruby/2.6.0/gems/activerecord-6.0.2.2/lib/active_record/connection_adapters/abstract/transaction.rb:280:in `block in within_new_transaction'
# /usr/local/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
# ./vendor/ruby/2.6.0/gems/activerecord-6.0.2.2/lib/active_record/connection_adapters/abstract/transaction.rb:278:in `within_new_transaction'
# ./vendor/ruby/2.6.0/gems/activerecord-6.0.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:281:in `transaction'
# ./vendor/ruby/2.6.0/gems/activerecord-6.0.2.2/lib/active_record/transactions.rb:212:in `transaction'
# ./vendor/ruby/2.6.0/gems/activerecord-6.0.2.2/lib/active_record/transactions.rb:366:in `with_transaction_returning_status'
# ./vendor/ruby/2.6.0/gems/activerecord-6.0.2.2/lib/active_record/transactions.rb:319:in `save!'
# ./vendor/ruby/2.6.0/gems/activerecord-6.0.2.2/lib/active_record/suppressor.rb:48:in `save!'
# ./vendor/ruby/2.6.0/gems/state_machines-activerecord-0.6.0/lib/state_machines/integrations/active_record.rb:515:in `block in save!'
# ./vendor/ruby/2.6.0/gems/state_machines-activerecord-0.6.0/lib/state_machines/integrations/active_record.rb:530:in `block in around_save'
# ./vendor/ruby/2.6.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:150:in `block in run_actions'
# ./vendor/ruby/2.6.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:170:in `catch_exceptions'
# ./vendor/ruby/2.6.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:148:in `run_actions'
# ./vendor/ruby/2.6.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:133:in `run_callbacks'
# ./vendor/ruby/2.6.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:212:in `run_callbacks'
# ./vendor/ruby/2.6.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:63:in `block (2 levels) in perform'
# ./vendor/ruby/2.6.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:63:in `catch'
# ./vendor/ruby/2.6.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:63:in `block in perform'
# ./vendor/ruby/2.6.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:186:in `within_transaction'
# ./vendor/ruby/2.6.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:62:in `perform'
# ./vendor/ruby/2.6.0/gems/state_machines-activerecord-0.6.0/lib/state_machines/integrations/active_record.rb:530:in `around_save'
# ./vendor/ruby/2.6.0/gems/state_machines-activerecord-0.6.0/lib/state_machines/integrations/active_record.rb:515:in `save!'
# ./vendor/ruby/2.6.0/gems/factory_bot-5.1.0/lib/factory_bot/evaluation.rb:18:in `create'
# ./vendor/ruby/2.6.0/gems/factory_bot-5.1.0/lib/factory_bot/strategy/create.rb:12:in `block in result'
# ./vendor/ruby/2.6.0/gems/factory_bot-5.1.0/lib/factory_bot/strategy/create.rb:9:in `tap'
# ./vendor/ruby/2.6.0/gems/factory_bot-5.1.0/lib/factory_bot/strategy/create.rb:9:in `result'
# ./vendor/ruby/2.6.0/gems/factory_bot-5.1.0/lib/factory_bot/factory.rb:43:in `run'
# ./vendor/ruby/2.6.0/gems/factory_bot-5.1.0/lib/factory_bot/factory_runner.rb:29:in `block in run'
# ./vendor/ruby/2.6.0/gems/activesupport-6.0.2.2/lib/active_support/notifications.rb:182:in `instrument'
# ./vendor/ruby/2.6.0/gems/factory_bot-5.1.0/lib/factory_bot/factory_runner.rb:28:in `run'
# ./vendor/ruby/2.6.0/gems/factory_bot-5.1.0/lib/factory_bot/strategy_syntax_method_registrar.rb:20:in `block in define_singular_strategy_method'
# ./ee/spec/finders/iterations_finder_spec.rb:102:in `block (4 levels) in <top (required)>'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/example.rb:257:in `instance_exec'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/example.rb:257:in `block in run'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/example.rb:503:in `block in with_around_and_singleton_context_hooks'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/example.rb:460:in `block in with_around_example_hooks'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/hooks.rb:472:in `block in run'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/hooks.rb:612:in `block in run_around_example_hooks_for'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/example.rb:345:in `call'
# ./vendor/ruby/2.6.0/gems/rspec-rails-4.0.0/lib/rspec/rails/adapters.rb:75:in `block (2 levels) in <module:MinitestLifecycleAdapter>'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/example.rb:450:in `instance_exec'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/example.rb:450:in `instance_exec'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/hooks.rb:381:in `execute_with'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/hooks.rb:614:in `block (2 levels) in run_around_example_hooks_for'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/example.rb:345:in `call'
# ./spec/spec_helper.rb:301:in `block (3 levels) in <top (required)>'
# ./vendor/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/testing.rb:55:in `server_middleware'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:292:in `block (2 levels) in <top (required)>'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/example.rb:450:in `instance_exec'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/example.rb:450:in `instance_exec'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/hooks.rb:381:in `execute_with'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/hooks.rb:614:in `block (2 levels) in run_around_example_hooks_for'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/example.rb:345:in `call'
# ./spec/spec_helper.rb:288:in `block (3 levels) in <top (required)>'
# ./vendor/ruby/2.6.0/gems/gitlab-labkit-0.12.0/lib/labkit/context.rb:32:in `with_context'
# ./spec/spec_helper.rb:288:in `block (2 levels) in <top (required)>'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/example.rb:450:in `instance_exec'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/example.rb:450:in `instance_exec'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/hooks.rb:381:in `execute_with'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/hooks.rb:614:in `block (2 levels) in run_around_example_hooks_for'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/example.rb:345:in `call'
# ./vendor/ruby/2.6.0/gems/rspec-retry-0.6.1/lib/rspec/retry.rb:123:in `block in run'
# ./vendor/ruby/2.6.0/gems/rspec-retry-0.6.1/lib/rspec/retry.rb:110:in `loop'
# ./vendor/ruby/2.6.0/gems/rspec-retry-0.6.1/lib/rspec/retry.rb:110:in `run'
# ./vendor/ruby/2.6.0/gems/rspec-retry-0.6.1/lib/rspec_ext/rspec_ext.rb:12:in `run_with_retry'
# ./vendor/ruby/2.6.0/gems/rspec-retry-0.6.1/lib/rspec/retry.rb:37:in `block (2 levels) in setup'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/example.rb:450:in `instance_exec'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/example.rb:450:in `instance_exec'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/hooks.rb:381:in `execute_with'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/hooks.rb:614:in `block (2 levels) in run_around_example_hooks_for'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/example.rb:345:in `call'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/hooks.rb:615:in `run_around_example_hooks_for'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/hooks.rb:472:in `run'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/example.rb:460:in `with_around_example_hooks'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/example.rb:503:in `with_around_and_singleton_context_hooks'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/example.rb:254:in `run'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/example_group.rb:633:in `block in run_examples'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/example_group.rb:629:in `map'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/example_group.rb:629:in `run_examples'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/example_group.rb:595:in `run'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/example_group.rb:596:in `block in run'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/example_group.rb:596:in `map'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/example_group.rb:596:in `run'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/example_group.rb:596:in `block in run'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/example_group.rb:596:in `map'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/example_group.rb:596:in `run'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/runner.rb:121:in `block (3 levels) in run_specs'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/runner.rb:121:in `map'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/runner.rb:121:in `block (2 levels) in run_specs'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/configuration.rb:2031:in `with_suite_hooks'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/runner.rb:116:in `block in run_specs'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/reporter.rb:74:in `report'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/runner.rb:115:in `run_specs'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/runner.rb:89:in `run'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/runner.rb:71:in `run'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/lib/rspec/core/runner.rb:45:in `invoke'
# ./vendor/ruby/2.6.0/gems/rspec-core-3.9.1/exe/rspec:4:in `<top (required)>'
# ./vendor/ruby/2.6.0/bin/rspec:23:in `load'
# ./vendor/ruby/2.6.0/bin/rspec:23:in `<top (required)>'
# /usr/local/lib/ruby/2.6.0/bundler/cli/exec.rb:74:in `load'
# /usr/local/lib/ruby/2.6.0/bundler/cli/exec.rb:74:in `kernel_load'
# /usr/local/lib/ruby/2.6.0/bundler/cli/exec.rb:28:in `run'
# /usr/local/lib/ruby/2.6.0/bundler/cli.rb:463:in `exec'
# /usr/local/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
# /usr/local/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
# /usr/local/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
# /usr/local/lib/ruby/2.6.0/bundler/cli.rb:27:in `dispatch'
# /usr/local/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
# /usr/local/lib/ruby/2.6.0/bundler/cli.rb:18:in `start'
# /usr/local/lib/ruby/gems/2.6.0/gems/bundler-1.17.2/exe/bundle:30:in `block in <top (required)>'
# /usr/local/lib/ruby/2.6.0/bundler/friendly_errors.rb:124:in `with_friendly_errors'
# /usr/local/lib/ruby/gems/2.6.0/gems/bundler-1.17.2/exe/bundle:22:in `<top (required)>'
# /usr/local/bin/bundle:23:in `load'
# /usr/local/bin/bundle:23:in `<main>'