Subtransaction: Seed::Environment#to_resource
Subtransaction caused by https://gitlab.com/gitlab-org/gitlab/-/blob/19f76cb5a21c9a391199fe97ff2d5f5501df1399/lib/gitlab/ci/pipeline/seed/environment.rb#L15. Backtrace from the logs: ``` lib/gitlab/database/transaction/observer.rb:41:in `block in register!' lib/gitlab/database.rb:260:in `block in transaction' lib/gitlab/database.rb:259:in `transaction' app/models/application_record.rb:75:in `block in safe_find_or_create_by' lib/gitlab/database.rb:260:in `block in transaction' lib/gitlab/database.rb:259:in `transaction' app/models/application_record.rb:75:in `safe_find_or_create_by' lib/gitlab/ci/pipeline/seed/environment.rb:15:in `to_resource' lib/gitlab/ci/pipeline/seed/build.rb:107:in `environment_attributes_for' app/services/ci/retry_build_service.rb:61:in `block in clone_build' app/services/ci/retry_build_service.rb:60:in `tap' app/services/ci/retry_build_service.rb:60:in `clone_build' app/services/ci/retry_build_service.rb:37:in `reprocess!' app/services/ci/retry_build_service.rb:20:in `execute' app/models/ci/build.rb:218:in `retry' app/models/ci/build.rb:365:in `block (2 levels) in <class:Build>' lib/gitlab/database.rb:260:in `block in transaction' lib/gitlab/database.rb:259:in `transaction' app/services/ci/register_job_service.rb:227:in `assign_runner!' app/services/ci/register_job_service.rb:173:in `process_build' app/services/ci/register_job_service.rb:81:in `block in process_queue' app/services/ci/register_job_service.rb:140:in `block (2 levels) in each_build' app/services/ci/register_job_service.rb:140:in `each' app/services/ci/register_job_service.rb:140:in `block in each_build' lib/gitlab/database.rb:166:in `allow_cross_joins_across_databases' app/services/ci/register_job_service.rb:106:in `each_build' app/services/ci/register_job_service.rb:54:in `process_queue' app/services/ci/register_job_service.rb:30:in `block in execute' lib/gitlab/ci/queue/metrics.rb:108:in `observe_queue_time' app/services/ci/register_job_service.rb:29:in `execute' lib/api/ci/runner.rb:141:in `block (2 levels) in <class:Runner>' ee/lib/gitlab/ip_address_state.rb:10:in `with' lib/api/api_guard.rb:213:in `call' ee/lib/omni_auth/strategies/group_saml.rb:41:in `other_phase' lib/gitlab/jira/middleware.rb:19:in `call' ```
issue