Multiple QA Failures in e2e:saas | User token creation failed - expires_at can't be blank
QA Failure
Summary
Multiple QA failures are occurring in e2e:saas
due to user token creation failing
https://gitlab.com/gitlab-org/customers-gitlab-com/-/jobs/4439331335
Stack trace
Response message: User token creation failed, Status code: 400, Body:
{
"message": {
"expires_at": [
"can't be blank"
]
}
}
20) User purchase plan for group when upgrade from free to ultimate behaves like successful purchase shows correct plan info on GitLab and CustomersDots
Failure/Error: to_create { |instance| instance.create }
QA::Helper::Errors::ResourceCreationFailedError:
User token creation failed
Shared Example Group: "successful purchase" called from ./spec/ui/purchase/purchase_group_plan_spec.rb:66
# ./helper/api_request_helper.rb:22:in `block in post'
# ./helper/api_request_helper.rb:20:in `post'
# ./vendor/gitlab/resource/user.rb:48:in `create_token'
# ./runtime/logger.rb:23:in `block (2 levels) in log_method'
# ./helper/http_headers.rb:43:in `user_auth_headers'
# ./vendor/gitlab/resource/project.rb:27:in `create'
# ./runtime/logger.rb:23:in `block (2 levels) in log_method'
# ./spec/factories.rb:6:in `block (2 levels) in <top (required)>'
# ./vendor/ruby/3.2.0/gems/factory_bot-6.2.1/lib/factory_bot/evaluation.rb:18:in `create'
# ./vendor/ruby/3.2.0/gems/factory_bot-6.2.1/lib/factory_bot/strategy/create.rb:12:in `block in result'
# ./vendor/ruby/3.2.0/gems/factory_bot-6.2.1/lib/factory_bot/strategy/create.rb:9:in `result'
# ./vendor/ruby/3.2.0/gems/factory_bot-6.2.1/lib/factory_bot/factory.rb:43:in `run'
# ./vendor/ruby/3.2.0/gems/factory_bot-6.2.1/lib/factory_bot/factory_runner.rb:29:in `block in run'
# ./vendor/ruby/3.2.0/gems/activesupport-7.0.4.3/lib/active_support/notifications.rb:208:in `instrument'
# ./vendor/ruby/3.2.0/gems/factory_bot-6.2.1/lib/factory_bot/factory_runner.rb:28:in `run'
# ./vendor/ruby/3.2.0/gems/factory_bot-6.2.1/lib/factory_bot/strategy_syntax_method_registrar.rb:28:in `block in define_singular_strategy_method'
# ./spec/factories.rb:106:in `block (4 levels) in <top (required)>'
# ./vendor/ruby/3.2.0/gems/factory_bot-6.2.1/lib/factory_bot/callback.rb:12:in `instance_exec'
# ./vendor/ruby/3.2.0/gems/factory_bot-6.2.1/lib/factory_bot/callback.rb:12:in `run'
# ./vendor/ruby/3.2.0/gems/factory_bot-6.2.1/lib/factory_bot/callbacks_observer.rb:11:in `block in update'
# ./vendor/ruby/3.2.0/gems/factory_bot-6.2.1/lib/factory_bot/callbacks_observer.rb:10:in `each'
# ./vendor/ruby/3.2.0/gems/factory_bot-6.2.1/lib/factory_bot/callbacks_observer.rb:10:in `update'
# ./vendor/ruby/3.2.0/gems/factory_bot-6.2.1/lib/factory_bot/evaluation.rb:24:in `notify'
# ./vendor/ruby/3.2.0/gems/factory_bot-6.2.1/lib/factory_bot/strategy/create.rb:13:in `block in result'
# ./vendor/ruby/3.2.0/gems/factory_bot-6.2.1/lib/factory_bot/strategy/create.rb:9:in `result'
# ./vendor/ruby/3.2.0/gems/factory_bot-6.2.1/lib/factory_bot/factory.rb:43:in `run'
# ./vendor/ruby/3.2.0/gems/factory_bot-6.2.1/lib/factory_bot/factory_runner.rb:29:in `block in run'
# ./vendor/ruby/3.2.0/gems/activesupport-7.0.4.3/lib/active_support/notifications.rb:208:in `instrument'
# ./vendor/ruby/3.2.0/gems/factory_bot-6.2.1/lib/factory_bot/factory_runner.rb:28:in `run'
# ./vendor/ruby/3.2.0/gems/factory_bot-6.2.1/lib/factory_bot/strategy_syntax_method_registrar.rb:28:in `block in define_singular_strategy_method'
# ./spec/ui/purchase/purchase_group_plan_spec.rb:7:in `block (3 levels) in <module:QA>'
# ./spec/ui/purchase/purchase_group_plan_spec.rb:15:in `block (4 levels) in <module:QA>'
# ./page/base.rb:22:in `perform'
# ./spec/ui/purchase/purchase_group_plan_spec.rb:14:in `block (3 levels) in <module:QA>'
# ./vendor/ruby/3.2.0/gems/rspec-retry-0.6.2/lib/rspec/retry.rb:124:in `block in run'
# ./vendor/ruby/3.2.0/gems/rspec-retry-0.6.2/lib/rspec/retry.rb:110:in `loop'
# ./vendor/ruby/3.2.0/gems/rspec-retry-0.6.2/lib/rspec/retry.rb:110:in `run'
# ./vendor/ruby/3.2.0/gems/rspec-retry-0.6.2/lib/rspec_ext/rspec_ext.rb:12:in `run_with_retry'
# ./vendor/ruby/3.2.0/gems/rspec-retry-0.6.2/lib/rspec/retry.rb:37:in `block (2 levels) in setup'
Screenshot / HTML page
Blank pages
Possible fixes
Add an expires_at
parameter for the impersonation token API call