Create Deployment in a separate transaction at pipeline creation
What does this MR do and why?
This MR is one of the series of MRs to fix the following ~"sharding-blocker" issues.
- Creating a pipeline with deployments/environments/others causes CrossDatabaseModificationAcrossUnsupportedTablesError
- Ci::RetryBuildService causes CrossDatabaseModificationAcrossUnsupportedTablesError
- Auto Job Retry is performed in a DB transaction and subject of lock contention
What's wrong in the current implementation
When a pipeline job has environment
keyword, GitLab creates deployments
record altogether, which represents information of deployments in the project. The ci_builds
record and deployments
record has 1-to-1 relation and they are persisted in the same transaction. Specifically, Inserting a row to deployments
at pipeline creation (Initialized at here)
In this case, we rely on Rails's AutoSave feature. So we basically assign an initialized deployment object to a parent object (which is Ci::Build
) and just save
the parent object, so that it automatically wraps the subsequent queries in the same transaction. For example,
BEGIN;
INSERT INTO ci_builds ...
INSERT INTO deployments ...
COMMIT;
However, due to the ci_tables
decomposition effort, these queries are executed in separate databases, hence the transaction is not functional anymore, rather it increases the timing of the transaction, which is subject of lock contention.
Here is an overview of the current implementation:
When a pipeline runs
- Build a pipeline object
- Build a job object for N
- Persist an environment object
- Persist an resource group object
- Build a deployment object
- Build a job object for N
- Begin Transaction
- Persist the pipeline object
- Persist the job objects
- Persist deployments <- (Cross-DB transaction. To be fixed.)
How we change the process in this MR
To fix this issue, we basically put the deployment insertion out from the transaction. To do so, we need to adjust creation process for associated entities Environment
and ResourceGroup
as currently they are implemented based on the previous same-transaction approach.
The process is changed in the following way:
When a pipeline runs
- Build a pipeline object
- Build a job object for N
- Persist environment objects
- Persist resource group objects
- Begin Transaction
- Persist the pipeline object
- Persist the job objects
- Build and Persist deployments <- (OK)
Related issues
This MR subsequently fixes the following issues.
Feature Flag
This change is behind create_deployment_in_separate_transaction
feature flag. We'll evaluate the safety of this change in our projects before rolling out globally.
Screenshots or screen recordings
How to set up and validate locally
Run a pipeline with the following .gitlab-ci.yml
and make sure that the pipeline creation is successful.
production:
script: echo
environment: production
Example Queries
Here are the example queries that were actually generated for creating a pipeline on GitLab development test instance. Please search with INSERT INTO "deployments"
so that you have an idea how the execution order is changed.
.gitlab-ci.yml
production:
script: echo
environment: production
resource_group: $CI_ENVIRONMENT_NAME
Before
[17] pry(main)> puts control.log
SELECT "project_ci_cd_settings".* FROM "project_ci_cd_settings" WHERE "project_ci_cd_settings"."project_id" = 220 LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "project_features".* FROM "project_features" WHERE "project_features"."project_id" = 220 LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "namespaces"."id", "namespaces"."name", "namespaces"."path", "namespaces"."owner_id", "namespaces"."created_at", "namespaces"."updated_at", "namespaces"."type", "namespaces"."description", "namespaces"."avatar", "namespaces"."membership_lock", "namespaces"."share_with_group_lock", "namespaces"."visibility_level", "namespaces"."request_access_enabled", "namespaces"."ldap_sync_status", "namespaces"."ldap_sync_error", "namespaces"."ldap_sync_last_update_at", "namespaces"."ldap_sync_last_successful_update_at", "namespaces"."ldap_sync_last_sync_at", "namespaces"."description_html", "namespaces"."lfs_enabled", "namespaces"."parent_id", "namespaces"."shared_runners_minutes_limit", "namespaces"."repository_size_limit", "namespaces"."require_two_factor_authentication", "namespaces"."two_factor_grace_period", "namespaces"."cached_markdown_version", "namespaces"."project_creation_level", "namespaces"."runners_token", "namespaces"."file_template_project_id", "namespaces"."saml_discovery_token", "namespaces"."runners_token_encrypted", "namespaces"."custom_project_templates_group_id", "namespaces"."auto_devops_enabled", "namespaces"."extra_shared_runners_minutes_limit", "namespaces"."last_ci_minutes_notification_at", "namespaces"."last_ci_minutes_usage_notification_level", "namespaces"."subgroup_creation_level", "namespaces"."emails_disabled", "namespaces"."max_pages_size", "namespaces"."max_artifacts_size", "namespaces"."mentions_disabled", "namespaces"."default_branch_protection", "namespaces"."unlock_membership_to_ldap", "namespaces"."max_personal_access_token_lifetime", "namespaces"."push_rule_id", "namespaces"."shared_runners_enabled", "namespaces"."allow_descendants_override_disabled_shared_runners", "namespaces"."traversal_ids" FROM "namespaces" WHERE "namespaces"."id" = 1 LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT 1 AS one FROM "merge_requests" WHERE "merge_requests"."source_project_id" = 220 AND ("merge_requests"."state_id" IN (1)) AND "merge_requests"."allow_maintainer_to_push" = TRUE AND (EXISTS (SELECT 1 FROM "project_authorizations" WHERE "project_authorizations"."user_id" = 1 AND (access_level >= 30 ) AND (project_authorizations.project_id = merge_requests.target_project_id) LIMIT 1)) LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "licenses".* FROM "licenses" ORDER BY "licenses"."id" DESC LIMIT 100 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "protected_branches".* FROM "protected_branches" WHERE "protected_branches"."project_id" = 220 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "protected_branch_push_access_levels".* FROM "protected_branch_push_access_levels" WHERE "protected_branch_push_access_levels"."protected_branch_id" = 52 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "security_orchestration_policy_configurations".* FROM "security_orchestration_policy_configurations" WHERE "security_orchestration_policy_configurations"."project_id" = 220 LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "compliance_management_frameworks".* FROM "compliance_management_frameworks" INNER JOIN "project_compliance_framework_settings" ON "compliance_management_frameworks"."id" = "project_compliance_framework_settings"."framework_id" WHERE "project_compliance_framework_settings"."project_id" = 220 LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "routes".* FROM "routes" WHERE "routes"."source_id" = 1 AND "routes"."source_type" = 'Namespace' LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "repository_languages".* FROM "repository_languages" WHERE "repository_languages"."project_id" = 220 ORDER BY share DESC /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "project_auto_devops".* FROM "project_auto_devops" WHERE "project_auto_devops"."project_id" = 220 LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT 1 AS one FROM "requirements" WHERE "requirements"."project_id" = 220 AND "requirements"."state" = 1 LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "merge_requests".* FROM "merge_requests" WHERE "merge_requests"."source_project_id" = 220 AND "merge_requests"."source_branch" = 'main' AND ("merge_requests"."state_id" IN (1)) ORDER BY "merge_requests"."id" DESC LIMIT 4 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
WITH RECURSIVE "clusters_cte" AS ((SELECT "clusters".*, NULL AS group_parent_id, 0 AS depth FROM "clusters" INNER JOIN "cluster_projects" ON "cluster_projects"."cluster_id" = "clusters"."id" INNER JOIN "projects" ON "projects"."id" = "cluster_projects"."project_id" WHERE "clusters"."management_project_id" = 220 AND "clusters"."cluster_type" = 3 AND "projects"."namespace_id" = 1)
UNION
(SELECT "clusters".*, "projects"."namespace_id" AS group_parent_id, 1 AS depth FROM "projects" LEFT OUTER JOIN "cluster_projects" ON "cluster_projects"."project_id" = "projects"."id" LEFT OUTER JOIN "clusters" ON "clusters"."id" = "cluster_projects"."cluster_id" WHERE "projects"."id" = 220)
UNION
(SELECT "clusters".*, "namespaces"."parent_id" AS group_parent_id, ("clusters_cte"."depth" + 1) FROM "clusters_cte", "namespaces" LEFT OUTER JOIN cluster_groups ON cluster_groups.group_id = namespaces.id LEFT OUTER JOIN clusters ON cluster_groups.cluster_id = clusters.id WHERE "namespaces"."id" = "clusters_cte"."group_parent_id")) SELECT "clusters".* FROM "clusters_cte" "clusters" WHERE "clusters"."id" IS NOT NULL AND "clusters"."enabled" = TRUE AND "clusters"."environment_scope" = '*' ORDER BY (CASE clusters.management_project_id
WHEN 220 THEN 0
ELSE depth
END) ASC
LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "clusters".* FROM "clusters" WHERE "clusters"."cluster_type" = 1 AND "clusters"."enabled" = TRUE AND "clusters"."environment_scope" = '*' ORDER BY "clusters"."id" ASC LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "ci_freeze_periods".* FROM "ci_freeze_periods" WHERE "ci_freeze_periods"."project_id" = 220 ORDER BY "ci_freeze_periods"."created_at" ASC /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "namespaces"."id", "namespaces"."name", "namespaces"."path", "namespaces"."owner_id", "namespaces"."created_at", "namespaces"."updated_at", "namespaces"."type", "namespaces"."description", "namespaces"."avatar", "namespaces"."membership_lock", "namespaces"."share_with_group_lock", "namespaces"."visibility_level", "namespaces"."request_access_enabled", "namespaces"."ldap_sync_status", "namespaces"."ldap_sync_error", "namespaces"."ldap_sync_last_update_at", "namespaces"."ldap_sync_last_successful_update_at", "namespaces"."ldap_sync_last_sync_at", "namespaces"."description_html", "namespaces"."lfs_enabled", "namespaces"."parent_id", "namespaces"."shared_runners_minutes_limit", "namespaces"."repository_size_limit", "namespaces"."require_two_factor_authentication", "namespaces"."two_factor_grace_period", "namespaces"."cached_markdown_version", "namespaces"."project_creation_level", "namespaces"."runners_token", "namespaces"."file_template_project_id", "namespaces"."saml_discovery_token", "namespaces"."runners_token_encrypted", "namespaces"."custom_project_templates_group_id", "namespaces"."auto_devops_enabled", "namespaces"."extra_shared_runners_minutes_limit", "namespaces"."last_ci_minutes_notification_at", "namespaces"."last_ci_minutes_usage_notification_level", "namespaces"."subgroup_creation_level", "namespaces"."emails_disabled", "namespaces"."max_pages_size", "namespaces"."max_artifacts_size", "namespaces"."mentions_disabled", "namespaces"."default_branch_protection", "namespaces"."unlock_membership_to_ldap", "namespaces"."max_personal_access_token_lifetime", "namespaces"."push_rule_id", "namespaces"."shared_runners_enabled", "namespaces"."allow_descendants_override_disabled_shared_runners", "namespaces"."traversal_ids" FROM "namespaces" WHERE "namespaces"."type" = 'Group' AND "namespaces"."id" = 1 LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "ci_variables".* FROM "ci_variables" WHERE "ci_variables"."project_id" = 220 AND "ci_variables"."environment_scope" = '*' /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "user_credit_card_validations".* FROM "user_credit_card_validations" WHERE "user_credit_card_validations"."user_id" = 1 LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
UPDATE "internal_ids" SET "last_value" = ("internal_ids"."last_value" + 1) WHERE "internal_ids"."project_id" = 220 AND "internal_ids"."usage" = 5 RETURNING "last_value" /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "ci_refs".* FROM "ci_refs" WHERE "ci_refs"."project_id" = 220 AND "ci_refs"."ref_path" = 'refs/heads/main' LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "agent_project_authorizations".* FROM "agent_project_authorizations" INNER JOIN "cluster_agents" ON "cluster_agents"."id" = "agent_project_authorizations"."agent_id" INNER JOIN "projects" ON "projects"."id" = "cluster_agents"."project_id" WHERE "agent_project_authorizations"."project_id" = 220 AND "projects"."namespace_id" = 1 AND (config->'access_as' IS NULL OR config->'access_as' = '{}' OR config->'access_as' ?| array['agent','ci_job','ci_user','impersonate']) /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "cluster_agents".* FROM "cluster_agents" WHERE "cluster_agents"."project_id" = 220 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
WITH RECURSIVE "clusters_cte" AS ((SELECT "clusters".*, NULL AS group_parent_id, 0 AS depth FROM "clusters" INNER JOIN "cluster_projects" ON "cluster_projects"."cluster_id" = "clusters"."id" INNER JOIN "projects" ON "projects"."id" = "cluster_projects"."project_id" WHERE "clusters"."management_project_id" = 220 AND "clusters"."cluster_type" = 3 AND "projects"."namespace_id" = 1)
UNION
(SELECT "clusters".*, "projects"."namespace_id" AS group_parent_id, 1 AS depth FROM "projects" LEFT OUTER JOIN "cluster_projects" ON "cluster_projects"."project_id" = "projects"."id" LEFT OUTER JOIN "clusters" ON "clusters"."id" = "cluster_projects"."cluster_id" WHERE "projects"."id" = 220)
UNION
(SELECT "clusters".*, "namespaces"."parent_id" AS group_parent_id, ("clusters_cte"."depth" + 1) FROM "clusters_cte", "namespaces" LEFT OUTER JOIN cluster_groups ON cluster_groups.group_id = namespaces.id LEFT OUTER JOIN clusters ON cluster_groups.cluster_id = clusters.id WHERE "namespaces"."id" = "clusters_cte"."group_parent_id")) SELECT "clusters".* FROM "clusters_cte" "clusters" WHERE "clusters"."id" IS NOT NULL AND "clusters"."enabled" = TRUE AND (environment_scope IN ('*', 'production') OR
'production' LIKE
REPLACE(REPLACE(REPLACE(environment_scope,
'%', '\%'),
'_', '\_'),
'*', '%')
) ORDER BY (CASE clusters.management_project_id
WHEN 220 THEN 0
ELSE depth
END) ASC
, CASE environment_scope
WHEN '*' THEN 0
WHEN 'production' THEN 2
ELSE 1
END DESC
LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "clusters".* FROM "clusters" WHERE "clusters"."cluster_type" = 1 AND "clusters"."enabled" = TRUE AND (environment_scope IN ('*', 'production') OR
'production' LIKE
REPLACE(REPLACE(REPLACE(environment_scope,
'%', '\%'),
'_', '\_'),
'*', '%')
) ORDER BY CASE environment_scope
WHEN '*' THEN 0
WHEN 'production' THEN 2
ELSE 1
END DESC
LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "ci_variables".* FROM "ci_variables" WHERE "ci_variables"."project_id" = 220 AND (environment_scope IN ('*', 'production') OR
'production' LIKE
REPLACE(REPLACE(REPLACE(environment_scope,
'%', '\%'),
'_', '\_'),
'*', '%')
) ORDER BY CASE environment_scope
WHEN '*' THEN 0
WHEN 'production' THEN 2
ELSE 1
END ASC
/*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "plans".* FROM "plans" WHERE "plans"."name" = 'default' LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "plan_limits"."id", "plan_limits"."plan_id", "plan_limits"."ci_active_pipelines", "plan_limits"."ci_pipeline_size", "plan_limits"."ci_active_jobs", "plan_limits"."project_hooks", "plan_limits"."group_hooks", "plan_limits"."ci_project_subscriptions", "plan_limits"."ci_pipeline_schedules", "plan_limits"."offset_pagination_limit", "plan_limits"."ci_instance_level_variables", "plan_limits"."storage_size_limit", "plan_limits"."ci_max_artifact_size_lsif", "plan_limits"."ci_max_artifact_size_archive", "plan_limits"."ci_max_artifact_size_metadata", "plan_limits"."ci_max_artifact_size_trace", "plan_limits"."ci_max_artifact_size_junit", "plan_limits"."ci_max_artifact_size_sast", "plan_limits"."ci_max_artifact_size_dependency_scanning", "plan_limits"."ci_max_artifact_size_container_scanning", "plan_limits"."ci_max_artifact_size_dast", "plan_limits"."ci_max_artifact_size_codequality", "plan_limits"."ci_max_artifact_size_license_management", "plan_limits"."ci_max_artifact_size_license_scanning", "plan_limits"."ci_max_artifact_size_performance", "plan_limits"."ci_max_artifact_size_metrics", "plan_limits"."ci_max_artifact_size_metrics_referee", "plan_limits"."ci_max_artifact_size_network_referee", "plan_limits"."ci_max_artifact_size_dotenv", "plan_limits"."ci_max_artifact_size_cobertura", "plan_limits"."ci_max_artifact_size_terraform", "plan_limits"."ci_max_artifact_size_accessibility", "plan_limits"."ci_max_artifact_size_cluster_applications", "plan_limits"."ci_max_artifact_size_secret_detection", "plan_limits"."ci_max_artifact_size_requirements", "plan_limits"."ci_max_artifact_size_coverage_fuzzing", "plan_limits"."ci_max_artifact_size_browser_performance", "plan_limits"."ci_max_artifact_size_load_performance", "plan_limits"."ci_needs_size_limit", "plan_limits"."conan_max_file_size", "plan_limits"."maven_max_file_size", "plan_limits"."npm_max_file_size", "plan_limits"."nuget_max_file_size", "plan_limits"."pypi_max_file_size", "plan_limits"."generic_packages_max_file_size", "plan_limits"."golang_max_file_size", "plan_limits"."debian_max_file_size", "plan_limits"."project_feature_flags", "plan_limits"."ci_max_artifact_size_api_fuzzing", "plan_limits"."ci_pipeline_deployments", "plan_limits"."pull_mirror_interval_seconds", "plan_limits"."daily_invites", "plan_limits"."rubygems_max_file_size", "plan_limits"."terraform_module_max_file_size", "plan_limits"."helm_max_file_size", "plan_limits"."ci_registered_group_runners", "plan_limits"."ci_registered_project_runners", "plan_limits"."web_hook_calls", "plan_limits"."ci_daily_pipeline_schedule_triggers", "plan_limits"."ci_max_artifact_size_cluster_image_scanning", "plan_limits"."ci_jobs_trace_size_limit", "plan_limits"."pages_file_entries", "plan_limits"."dast_profile_schedules", "plan_limits"."external_audit_event_destinations", "plan_limits"."dotenv_variables", "plan_limits"."dotenv_size", "plan_limits"."pipeline_triggers" FROM "plan_limits" WHERE "plan_limits"."plan_id" = 1 LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "environments".* FROM "environments" WHERE "environments"."project_id" = 220 AND "environments"."name" = 'production' LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
BEGIN /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT 1 AS one FROM "environments" WHERE "environments"."name" = 'production' AND "environments"."project_id" = 220 LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT 1 AS one FROM "environments" WHERE "environments"."slug" = 'production' AND "environments"."project_id" = 220 LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
INSERT INTO "environments" ("project_id", "name", "created_at", "updated_at", "slug", "tier") VALUES (220, 'production', '2021-12-06 06:06:12.136847', '2021-12-06 06:06:12.136847', 'production', 0) RETURNING "id" /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
COMMIT /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
WITH RECURSIVE "clusters_cte" AS ((SELECT "clusters".*, NULL AS group_parent_id, 0 AS depth FROM "clusters" INNER JOIN "cluster_projects" ON "cluster_projects"."cluster_id" = "clusters"."id" INNER JOIN "projects" ON "projects"."id" = "cluster_projects"."project_id" WHERE "clusters"."management_project_id" = 220 AND "clusters"."cluster_type" = 3 AND "projects"."namespace_id" = 1)
UNION
(SELECT "clusters".*, "projects"."namespace_id" AS group_parent_id, 1 AS depth FROM "projects" LEFT OUTER JOIN "cluster_projects" ON "cluster_projects"."project_id" = "projects"."id" LEFT OUTER JOIN "clusters" ON "clusters"."id" = "cluster_projects"."cluster_id" WHERE "projects"."id" = 220)
UNION
(SELECT "clusters".*, "namespaces"."parent_id" AS group_parent_id, ("clusters_cte"."depth" + 1) FROM "clusters_cte", "namespaces" LEFT OUTER JOIN cluster_groups ON cluster_groups.group_id = namespaces.id LEFT OUTER JOIN clusters ON cluster_groups.cluster_id = clusters.id WHERE "namespaces"."id" = "clusters_cte"."group_parent_id")) SELECT "clusters".* FROM "clusters_cte" "clusters" WHERE "clusters"."id" IS NOT NULL AND "clusters"."enabled" = TRUE AND (environment_scope IN ('*', 'production') OR
'production' LIKE
REPLACE(REPLACE(REPLACE(environment_scope,
'%', '\%'),
'_', '\_'),
'*', '%')
) ORDER BY (CASE clusters.management_project_id
WHEN 220 THEN 0
ELSE depth
END) ASC
, CASE environment_scope
WHEN '*' THEN 0
WHEN 'production' THEN 2
ELSE 1
END DESC
LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "clusters".* FROM "clusters" WHERE "clusters"."cluster_type" = 1 AND "clusters"."enabled" = TRUE AND (environment_scope IN ('*', 'production') OR
'production' LIKE
REPLACE(REPLACE(REPLACE(environment_scope,
'%', '\%'),
'_', '\_'),
'*', '%')
) ORDER BY CASE environment_scope
WHEN '*' THEN 0
WHEN 'production' THEN 2
ELSE 1
END DESC
LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
UPDATE "internal_ids" SET "last_value" = ("internal_ids"."last_value" + 1) WHERE "internal_ids"."project_id" = 220 AND "internal_ids"."usage" = 2 RETURNING "last_value" /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "ci_variables".* FROM "ci_variables" WHERE "ci_variables"."project_id" = 220 AND "ci_variables"."environment_scope" = '*' /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "ci_resource_groups".* FROM "ci_resource_groups" WHERE "ci_resource_groups"."project_id" = 220 AND "ci_resource_groups"."key" = 'production' LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
BEGIN /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
INSERT INTO "ci_resource_groups" ("created_at", "updated_at", "project_id", "key") VALUES ('2021-12-06 06:06:12.149275', '2021-12-06 06:06:12.149275', 220, 'production') RETURNING "id" /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
INSERT INTO "ci_resources" ("created_at", "updated_at", "resource_group_id") VALUES ('2021-12-06 06:06:12.150872', '2021-12-06 06:06:12.150872', 74) RETURNING "id" /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
COMMIT /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
BEGIN /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
INSERT INTO "ci_pipelines" ("ref", "sha", "before_sha", "created_at", "updated_at", "project_id", "status", "user_id", "source", "config_source", "protected", "iid", "ci_ref_id", "lock_version") VALUES ('main', '03e049b38ca152db18a014e564bac1fd41c127e3', '0000000000000000000000000000000000000000', '2021-12-06 06:06:12.155244', '2021-12-06 06:06:12.155244', 220, 'created', 1, 1, 1, TRUE, 10, 22, 0) RETURNING "id" /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
INSERT INTO "ci_stages" ("project_id", "pipeline_id", "created_at", "updated_at", "name", "status", "position", "lock_version") VALUES (220, 1216, '2021-12-06 06:06:12.157012', '2021-12-06 06:06:12.157012', 'test', 0, 2, 0) RETURNING "id" /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "ci_builds".* FROM "ci_builds" WHERE "ci_builds"."type" = 'Ci::Build' AND "ci_builds"."token_encrypted" IN ('Dj1d1/PDWjws18OaFYs1d/5cX5ofcaq1N1FwYfT8wAwHN0TL', 'Dj1d1/PDWjws18OaFYs1d/5cX5ofcaq1N1FwYfT8wAwHN0TL') LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
INSERT INTO "ci_builds" ("status", "created_at", "updated_at", "commit_id", "name", "stage", "stage_idx", "tag", "ref", "user_id", "type", "project_id", "environment", "when", "protected", "token_encrypted", "resource_group_id", "processed", "scheduling_type", "stage_id", "lock_version", "retried") VALUES ('created', '2021-12-06 06:06:12.160127', '2021-12-06 06:06:12.160127', 1216, 'production', 'test', 2, FALSE, 'main', 1, 'Ci::Build', 220, 'production', 'on_success', TRUE, 'Dj1d1/PDWjws18OaFYs1d/5cX5ofcaq1N1FwYfT8wAwHN0TL', 74, FALSE, 0, 1606, 0, FALSE) RETURNING "id" /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
INSERT INTO "ci_builds_metadata" ("project_id", "config_options", "config_variables", "has_exposed_artifacts", "expanded_environment_name", "build_id") VALUES (220, '{"script":["echo"],"environment":{"name":"production","action":"start"},"resource_group_key":"$CI_ENVIRONMENT_NAME"}', '[]', FALSE, 'production', 3665) RETURNING "id" /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
INSERT INTO "deployments" ("iid", "project_id", "environment_id", "ref", "tag", "sha", "user_id", "deployable_type", "created_at", "updated_at", "status", "deployable_id") VALUES (12, 220, 705, 'main', FALSE, '03e049b38ca152db18a014e564bac1fd41c127e3', 1, 'CommitStatus', '2021-12-06 06:06:12.163874', '2021-12-06 06:06:12.163874', 0, 3665) RETURNING "id" /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
INSERT INTO "ci_pipelines_config" ("pipeline_id", "content") VALUES (1216, '---
include:
- local: ".gitlab-ci.yml"
') RETURNING "pipeline_id" /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
COMMIT /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
BEGIN /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "ci_pipelines"."id" FROM "ci_pipelines" WHERE "ci_pipelines"."project_id" = 220 AND (ci_pipelines.created_at > '2021-11-29 06:06:12.176003') AND ("ci_pipelines"."source" IN (1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12) OR "ci_pipelines"."source" IS NULL) AND "ci_pipelines"."ref" = 'main' AND "ci_pipelines"."id" NOT IN (WITH RECURSIVE "base_and_descendants" AS ((SELECT "ci_pipelines".* FROM "ci_pipelines" WHERE "ci_pipelines"."id" = 1216)
UNION
(SELECT "ci_pipelines".* FROM "ci_pipelines", "base_and_descendants", "ci_sources_pipelines" WHERE "ci_sources_pipelines"."pipeline_id" = "ci_pipelines"."id" AND "ci_sources_pipelines"."source_pipeline_id" = "base_and_descendants"."id" AND "ci_sources_pipelines"."source_project_id" = "ci_sources_pipelines"."project_id")) SELECT "id" FROM "base_and_descendants" AS "ci_pipelines") AND "ci_pipelines"."sha" != '03e049b38ca152db18a014e564bac1fd41c127e3' AND ("ci_pipelines"."status" IN ('created','waiting_for_resource','preparing','pending','running','scheduled')) ORDER BY "ci_pipelines"."id" ASC LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
COMMIT /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT COUNT("ci_builds"."id") FROM "ci_builds" WHERE "ci_builds"."commit_id" = 1216 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT COUNT("ci_builds"."id") FROM "ci_builds" WHERE "ci_builds"."commit_id" = 1216 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT COUNT(*) FROM "ci_pipelines" INNER JOIN "ci_builds" ON "ci_builds"."commit_id" = "ci_pipelines"."id" AND "ci_builds"."type" = 'Ci::Build' WHERE "ci_pipelines"."project_id" = 220 AND (ci_pipelines.created_at > '2021-12-05 06:06:12.185196') AND ("ci_pipelines"."status" IN ('created','waiting_for_resource','preparing','pending','running')) /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "merge_requests".* FROM "merge_requests" WHERE "merge_requests"."source_project_id" = 220 AND "merge_requests"."source_branch" = 'main' AND (EXISTS (SELECT 1 FROM "merge_request_diffs" INNER JOIN "merge_request_diff_commits" ON "merge_request_diff_commits"."merge_request_diff_id" = "merge_request_diffs"."id" WHERE (merge_requests.latest_merge_request_diff_id = merge_request_diffs.id) AND "merge_request_diff_commits"."sha" = '\x03e049b38ca152db18a014e564bac1fd41c127e3')) AND ("merge_requests"."state_id" IN (1)) /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
After
[10] pry(main)> puts control.log
SELECT "project_ci_cd_settings".* FROM "project_ci_cd_settings" WHERE "project_ci_cd_settings"."project_id" = 220 LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "project_features".* FROM "project_features" WHERE "project_features"."project_id" = 220 LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "namespaces"."id", "namespaces"."name", "namespaces"."path", "namespaces"."owner_id", "namespaces"."created_at", "namespaces"."updated_at", "namespaces"."type", "namespaces"."description", "namespaces"."avatar", "namespaces"."membership_lock", "namespaces"."share_with_group_lock", "namespaces"."visibility_level", "namespaces"."request_access_enabled", "namespaces"."ldap_sync_status", "namespaces"."ldap_sync_error", "namespaces"."ldap_sync_last_update_at", "namespaces"."ldap_sync_last_successful_update_at", "namespaces"."ldap_sync_last_sync_at", "namespaces"."description_html", "namespaces"."lfs_enabled", "namespaces"."parent_id", "namespaces"."shared_runners_minutes_limit", "namespaces"."repository_size_limit", "namespaces"."require_two_factor_authentication", "namespaces"."two_factor_grace_period", "namespaces"."cached_markdown_version", "namespaces"."project_creation_level", "namespaces"."runners_token", "namespaces"."file_template_project_id", "namespaces"."saml_discovery_token", "namespaces"."runners_token_encrypted", "namespaces"."custom_project_templates_group_id", "namespaces"."auto_devops_enabled", "namespaces"."extra_shared_runners_minutes_limit", "namespaces"."last_ci_minutes_notification_at", "namespaces"."last_ci_minutes_usage_notification_level", "namespaces"."subgroup_creation_level", "namespaces"."emails_disabled", "namespaces"."max_pages_size", "namespaces"."max_artifacts_size", "namespaces"."mentions_disabled", "namespaces"."default_branch_protection", "namespaces"."unlock_membership_to_ldap", "namespaces"."max_personal_access_token_lifetime", "namespaces"."push_rule_id", "namespaces"."shared_runners_enabled", "namespaces"."allow_descendants_override_disabled_shared_runners", "namespaces"."traversal_ids" FROM "namespaces" WHERE "namespaces"."id" = 1 LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT 1 AS one FROM "merge_requests" WHERE "merge_requests"."source_project_id" = 220 AND ("merge_requests"."state_id" IN (1)) AND "merge_requests"."allow_maintainer_to_push" = TRUE AND (EXISTS (SELECT 1 FROM "project_authorizations" WHERE "project_authorizations"."user_id" = 1 AND (access_level >= 30 ) AND (project_authorizations.project_id = merge_requests.target_project_id) LIMIT 1)) LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "protected_branches".* FROM "protected_branches" WHERE "protected_branches"."project_id" = 220 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "protected_branch_push_access_levels".* FROM "protected_branch_push_access_levels" WHERE "protected_branch_push_access_levels"."protected_branch_id" = 52 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "security_orchestration_policy_configurations".* FROM "security_orchestration_policy_configurations" WHERE "security_orchestration_policy_configurations"."project_id" = 220 LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "compliance_management_frameworks".* FROM "compliance_management_frameworks" INNER JOIN "project_compliance_framework_settings" ON "compliance_management_frameworks"."id" = "project_compliance_framework_settings"."framework_id" WHERE "project_compliance_framework_settings"."project_id" = 220 LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "routes".* FROM "routes" WHERE "routes"."source_id" = 1 AND "routes"."source_type" = 'Namespace' LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "repository_languages".* FROM "repository_languages" WHERE "repository_languages"."project_id" = 220 ORDER BY share DESC /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "project_auto_devops".* FROM "project_auto_devops" WHERE "project_auto_devops"."project_id" = 220 LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT 1 AS one FROM "requirements" WHERE "requirements"."project_id" = 220 AND "requirements"."state" = 1 LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "merge_requests".* FROM "merge_requests" WHERE "merge_requests"."source_project_id" = 220 AND "merge_requests"."source_branch" = 'main' AND ("merge_requests"."state_id" IN (1)) ORDER BY "merge_requests"."id" DESC LIMIT 4 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
WITH RECURSIVE "clusters_cte" AS ((SELECT "clusters".*, NULL AS group_parent_id, 0 AS depth FROM "clusters" INNER JOIN "cluster_projects" ON "cluster_projects"."cluster_id" = "clusters"."id" INNER JOIN "projects" ON "projects"."id" = "cluster_projects"."project_id" WHERE "clusters"."management_project_id" = 220 AND "clusters"."cluster_type" = 3 AND "projects"."namespace_id" = 1)
UNION
(SELECT "clusters".*, "projects"."namespace_id" AS group_parent_id, 1 AS depth FROM "projects" LEFT OUTER JOIN "cluster_projects" ON "cluster_projects"."project_id" = "projects"."id" LEFT OUTER JOIN "clusters" ON "clusters"."id" = "cluster_projects"."cluster_id" WHERE "projects"."id" = 220)
UNION
(SELECT "clusters".*, "namespaces"."parent_id" AS group_parent_id, ("clusters_cte"."depth" + 1) FROM "clusters_cte", "namespaces" LEFT OUTER JOIN cluster_groups ON cluster_groups.group_id = namespaces.id LEFT OUTER JOIN clusters ON cluster_groups.cluster_id = clusters.id WHERE "namespaces"."id" = "clusters_cte"."group_parent_id")) SELECT "clusters".* FROM "clusters_cte" "clusters" WHERE "clusters"."id" IS NOT NULL AND "clusters"."enabled" = TRUE AND "clusters"."environment_scope" = '*' ORDER BY (CASE clusters.management_project_id
WHEN 220 THEN 0
ELSE depth
END) ASC
LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "clusters".* FROM "clusters" WHERE "clusters"."cluster_type" = 1 AND "clusters"."enabled" = TRUE AND "clusters"."environment_scope" = '*' ORDER BY "clusters"."id" ASC LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "ci_freeze_periods".* FROM "ci_freeze_periods" WHERE "ci_freeze_periods"."project_id" = 220 ORDER BY "ci_freeze_periods"."created_at" ASC /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "ci_instance_variables".* FROM "ci_instance_variables" /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "namespaces"."id", "namespaces"."name", "namespaces"."path", "namespaces"."owner_id", "namespaces"."created_at", "namespaces"."updated_at", "namespaces"."type", "namespaces"."description", "namespaces"."avatar", "namespaces"."membership_lock", "namespaces"."share_with_group_lock", "namespaces"."visibility_level", "namespaces"."request_access_enabled", "namespaces"."ldap_sync_status", "namespaces"."ldap_sync_error", "namespaces"."ldap_sync_last_update_at", "namespaces"."ldap_sync_last_successful_update_at", "namespaces"."ldap_sync_last_sync_at", "namespaces"."description_html", "namespaces"."lfs_enabled", "namespaces"."parent_id", "namespaces"."shared_runners_minutes_limit", "namespaces"."repository_size_limit", "namespaces"."require_two_factor_authentication", "namespaces"."two_factor_grace_period", "namespaces"."cached_markdown_version", "namespaces"."project_creation_level", "namespaces"."runners_token", "namespaces"."file_template_project_id", "namespaces"."saml_discovery_token", "namespaces"."runners_token_encrypted", "namespaces"."custom_project_templates_group_id", "namespaces"."auto_devops_enabled", "namespaces"."extra_shared_runners_minutes_limit", "namespaces"."last_ci_minutes_notification_at", "namespaces"."last_ci_minutes_usage_notification_level", "namespaces"."subgroup_creation_level", "namespaces"."emails_disabled", "namespaces"."max_pages_size", "namespaces"."max_artifacts_size", "namespaces"."mentions_disabled", "namespaces"."default_branch_protection", "namespaces"."unlock_membership_to_ldap", "namespaces"."max_personal_access_token_lifetime", "namespaces"."push_rule_id", "namespaces"."shared_runners_enabled", "namespaces"."allow_descendants_override_disabled_shared_runners", "namespaces"."traversal_ids" FROM "namespaces" WHERE "namespaces"."type" = 'Group' AND "namespaces"."id" = 1 LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "ci_variables".* FROM "ci_variables" WHERE "ci_variables"."project_id" = 220 AND "ci_variables"."environment_scope" = '*' /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "user_credit_card_validations".* FROM "user_credit_card_validations" WHERE "user_credit_card_validations"."user_id" = 1 LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
UPDATE "internal_ids" SET "last_value" = ("internal_ids"."last_value" + 1) WHERE "internal_ids"."project_id" = 220 AND "internal_ids"."usage" = 5 RETURNING "last_value" /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "ci_refs".* FROM "ci_refs" WHERE "ci_refs"."project_id" = 220 AND "ci_refs"."ref_path" = 'refs/heads/main' LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "agent_project_authorizations".* FROM "agent_project_authorizations" INNER JOIN "cluster_agents" ON "cluster_agents"."id" = "agent_project_authorizations"."agent_id" INNER JOIN "projects" ON "projects"."id" = "cluster_agents"."project_id" WHERE "agent_project_authorizations"."project_id" = 220 AND "projects"."namespace_id" = 1 AND (config->'access_as' IS NULL OR config->'access_as' = '{}' OR config->'access_as' ?| array['agent','ci_job','ci_user','impersonate']) /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "cluster_agents".* FROM "cluster_agents" WHERE "cluster_agents"."project_id" = 220 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
WITH RECURSIVE "clusters_cte" AS ((SELECT "clusters".*, NULL AS group_parent_id, 0 AS depth FROM "clusters" INNER JOIN "cluster_projects" ON "cluster_projects"."cluster_id" = "clusters"."id" INNER JOIN "projects" ON "projects"."id" = "cluster_projects"."project_id" WHERE "clusters"."management_project_id" = 220 AND "clusters"."cluster_type" = 3 AND "projects"."namespace_id" = 1)
UNION
(SELECT "clusters".*, "projects"."namespace_id" AS group_parent_id, 1 AS depth FROM "projects" LEFT OUTER JOIN "cluster_projects" ON "cluster_projects"."project_id" = "projects"."id" LEFT OUTER JOIN "clusters" ON "clusters"."id" = "cluster_projects"."cluster_id" WHERE "projects"."id" = 220)
UNION
(SELECT "clusters".*, "namespaces"."parent_id" AS group_parent_id, ("clusters_cte"."depth" + 1) FROM "clusters_cte", "namespaces" LEFT OUTER JOIN cluster_groups ON cluster_groups.group_id = namespaces.id LEFT OUTER JOIN clusters ON cluster_groups.cluster_id = clusters.id WHERE "namespaces"."id" = "clusters_cte"."group_parent_id")) SELECT "clusters".* FROM "clusters_cte" "clusters" WHERE "clusters"."id" IS NOT NULL AND "clusters"."enabled" = TRUE AND (environment_scope IN ('*', 'production') OR
'production' LIKE
REPLACE(REPLACE(REPLACE(environment_scope,
'%', '\%'),
'_', '\_'),
'*', '%')
) ORDER BY (CASE clusters.management_project_id
WHEN 220 THEN 0
ELSE depth
END) ASC
, CASE environment_scope
WHEN '*' THEN 0
WHEN 'production' THEN 2
ELSE 1
END DESC
LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "clusters".* FROM "clusters" WHERE "clusters"."cluster_type" = 1 AND "clusters"."enabled" = TRUE AND (environment_scope IN ('*', 'production') OR
'production' LIKE
REPLACE(REPLACE(REPLACE(environment_scope,
'%', '\%'),
'_', '\_'),
'*', '%')
) ORDER BY CASE environment_scope
WHEN '*' THEN 0
WHEN 'production' THEN 2
ELSE 1
END DESC
LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "ci_variables".* FROM "ci_variables" WHERE "ci_variables"."project_id" = 220 AND (environment_scope IN ('*', 'production') OR
'production' LIKE
REPLACE(REPLACE(REPLACE(environment_scope,
'%', '\%'),
'_', '\_'),
'*', '%')
) ORDER BY CASE environment_scope
WHEN '*' THEN 0
WHEN 'production' THEN 2
ELSE 1
END ASC
/*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "plans".* FROM "plans" WHERE "plans"."name" = 'default' LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "plan_limits"."id", "plan_limits"."plan_id", "plan_limits"."ci_active_pipelines", "plan_limits"."ci_pipeline_size", "plan_limits"."ci_active_jobs", "plan_limits"."project_hooks", "plan_limits"."group_hooks", "plan_limits"."ci_project_subscriptions", "plan_limits"."ci_pipeline_schedules", "plan_limits"."offset_pagination_limit", "plan_limits"."ci_instance_level_variables", "plan_limits"."storage_size_limit", "plan_limits"."ci_max_artifact_size_lsif", "plan_limits"."ci_max_artifact_size_archive", "plan_limits"."ci_max_artifact_size_metadata", "plan_limits"."ci_max_artifact_size_trace", "plan_limits"."ci_max_artifact_size_junit", "plan_limits"."ci_max_artifact_size_sast", "plan_limits"."ci_max_artifact_size_dependency_scanning", "plan_limits"."ci_max_artifact_size_container_scanning", "plan_limits"."ci_max_artifact_size_dast", "plan_limits"."ci_max_artifact_size_codequality", "plan_limits"."ci_max_artifact_size_license_management", "plan_limits"."ci_max_artifact_size_license_scanning", "plan_limits"."ci_max_artifact_size_performance", "plan_limits"."ci_max_artifact_size_metrics", "plan_limits"."ci_max_artifact_size_metrics_referee", "plan_limits"."ci_max_artifact_size_network_referee", "plan_limits"."ci_max_artifact_size_dotenv", "plan_limits"."ci_max_artifact_size_cobertura", "plan_limits"."ci_max_artifact_size_terraform", "plan_limits"."ci_max_artifact_size_accessibility", "plan_limits"."ci_max_artifact_size_cluster_applications", "plan_limits"."ci_max_artifact_size_secret_detection", "plan_limits"."ci_max_artifact_size_requirements", "plan_limits"."ci_max_artifact_size_coverage_fuzzing", "plan_limits"."ci_max_artifact_size_browser_performance", "plan_limits"."ci_max_artifact_size_load_performance", "plan_limits"."ci_needs_size_limit", "plan_limits"."conan_max_file_size", "plan_limits"."maven_max_file_size", "plan_limits"."npm_max_file_size", "plan_limits"."nuget_max_file_size", "plan_limits"."pypi_max_file_size", "plan_limits"."generic_packages_max_file_size", "plan_limits"."golang_max_file_size", "plan_limits"."debian_max_file_size", "plan_limits"."project_feature_flags", "plan_limits"."ci_max_artifact_size_api_fuzzing", "plan_limits"."ci_pipeline_deployments", "plan_limits"."pull_mirror_interval_seconds", "plan_limits"."daily_invites", "plan_limits"."rubygems_max_file_size", "plan_limits"."terraform_module_max_file_size", "plan_limits"."helm_max_file_size", "plan_limits"."ci_registered_group_runners", "plan_limits"."ci_registered_project_runners", "plan_limits"."web_hook_calls", "plan_limits"."ci_daily_pipeline_schedule_triggers", "plan_limits"."ci_max_artifact_size_cluster_image_scanning", "plan_limits"."ci_jobs_trace_size_limit", "plan_limits"."pages_file_entries", "plan_limits"."dast_profile_schedules", "plan_limits"."external_audit_event_destinations", "plan_limits"."dotenv_variables", "plan_limits"."dotenv_size", "plan_limits"."pipeline_triggers" FROM "plan_limits" WHERE "plan_limits"."plan_id" = 1 LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "environments".* FROM "environments" WHERE "environments"."project_id" = 220 AND "environments"."name" = 'production' LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
BEGIN /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT 1 AS one FROM "environments" WHERE "environments"."name" = 'production' AND "environments"."project_id" = 220 LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT 1 AS one FROM "environments" WHERE "environments"."slug" = 'production' AND "environments"."project_id" = 220 LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
INSERT INTO "environments" ("project_id", "name", "created_at", "updated_at", "slug", "tier") VALUES (220, 'production', '2021-12-06 06:04:49.563044', '2021-12-06 06:04:49.563044', 'production', 0) RETURNING "id" /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
COMMIT /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "ci_variables".* FROM "ci_variables" WHERE "ci_variables"."project_id" = 220 AND "ci_variables"."environment_scope" = '*' /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "ci_resource_groups".* FROM "ci_resource_groups" WHERE "ci_resource_groups"."project_id" = 220 AND "ci_resource_groups"."key" = 'production' LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
BEGIN /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
INSERT INTO "ci_resource_groups" ("created_at", "updated_at", "project_id", "key") VALUES ('2021-12-06 06:04:49.571433', '2021-12-06 06:04:49.571433', 220, 'production') RETURNING "id" /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
INSERT INTO "ci_resources" ("created_at", "updated_at", "resource_group_id") VALUES ('2021-12-06 06:04:49.590447', '2021-12-06 06:04:49.590447', 73) RETURNING "id" /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
COMMIT /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
BEGIN /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
INSERT INTO "ci_pipelines" ("ref", "sha", "before_sha", "created_at", "updated_at", "project_id", "status", "user_id", "source", "config_source", "protected", "iid", "ci_ref_id", "lock_version") VALUES ('main', '03e049b38ca152db18a014e564bac1fd41c127e3', '0000000000000000000000000000000000000000', '2021-12-06 06:04:49.594703', '2021-12-06 06:04:49.594703', 220, 'created', 1, 1, 1, TRUE, 9, 22, 0) RETURNING "id" /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
INSERT INTO "ci_stages" ("project_id", "pipeline_id", "created_at", "updated_at", "name", "status", "position", "lock_version") VALUES (220, 1215, '2021-12-06 06:04:49.597393', '2021-12-06 06:04:49.597393', 'test', 0, 2, 0) RETURNING "id" /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "ci_builds".* FROM "ci_builds" WHERE "ci_builds"."type" = 'Ci::Build' AND "ci_builds"."token_encrypted" IN ('bHM+wNHPQSd3sfzqN5I7J/Jhaq9H2/BjhGISkphcKXV4Beyn', 'bHM+wNHPQSd3sfzqN5I7J/Jhaq9H2/BjhGISkphcKXV4Beyn') LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
INSERT INTO "ci_builds" ("status", "created_at", "updated_at", "commit_id", "name", "stage", "stage_idx", "tag", "ref", "user_id", "type", "project_id", "environment", "when", "protected", "token_encrypted", "resource_group_id", "processed", "scheduling_type", "stage_id", "lock_version", "retried") VALUES ('created', '2021-12-06 06:04:49.601459', '2021-12-06 06:04:49.601459', 1215, 'production', 'test', 2, FALSE, 'main', 1, 'Ci::Build', 220, 'production', 'on_success', TRUE, 'bHM+wNHPQSd3sfzqN5I7J/Jhaq9H2/BjhGISkphcKXV4Beyn', 73, FALSE, 0, 1605, 0, FALSE) RETURNING "id" /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
INSERT INTO "ci_builds_metadata" ("project_id", "config_options", "config_variables", "has_exposed_artifacts", "expanded_environment_name", "build_id") VALUES (220, '{"script":["echo"],"environment":{"name":"production","action":"start"}}', '[]', FALSE, 'production', 3664) RETURNING "id" /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
INSERT INTO "ci_pipelines_config" ("pipeline_id", "content") VALUES (1215, '---
include:
- local: ".gitlab-ci.yml"
') RETURNING "pipeline_id" /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
COMMIT /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "deployments".* FROM "deployments" WHERE "deployments"."deployable_id" = 3664 AND "deployments"."deployable_type" = 'CommitStatus' LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
WITH RECURSIVE "clusters_cte" AS ((SELECT "clusters".*, NULL AS group_parent_id, 0 AS depth FROM "clusters" INNER JOIN "cluster_projects" ON "cluster_projects"."cluster_id" = "clusters"."id" INNER JOIN "projects" ON "projects"."id" = "cluster_projects"."project_id" WHERE "clusters"."management_project_id" = 220 AND "clusters"."cluster_type" = 3 AND "projects"."namespace_id" = 1)
UNION
(SELECT "clusters".*, "projects"."namespace_id" AS group_parent_id, 1 AS depth FROM "projects" LEFT OUTER JOIN "cluster_projects" ON "cluster_projects"."project_id" = "projects"."id" LEFT OUTER JOIN "clusters" ON "clusters"."id" = "cluster_projects"."cluster_id" WHERE "projects"."id" = 220)
UNION
(SELECT "clusters".*, "namespaces"."parent_id" AS group_parent_id, ("clusters_cte"."depth" + 1) FROM "clusters_cte", "namespaces" LEFT OUTER JOIN cluster_groups ON cluster_groups.group_id = namespaces.id LEFT OUTER JOIN clusters ON cluster_groups.cluster_id = clusters.id WHERE "namespaces"."id" = "clusters_cte"."group_parent_id")) SELECT "clusters".* FROM "clusters_cte" "clusters" WHERE "clusters"."id" IS NOT NULL AND "clusters"."enabled" = TRUE AND (environment_scope IN ('*', 'production') OR
'production' LIKE
REPLACE(REPLACE(REPLACE(environment_scope,
'%', '\%'),
'_', '\_'),
'*', '%')
) ORDER BY (CASE clusters.management_project_id
WHEN 220 THEN 0
ELSE depth
END) ASC
, CASE environment_scope
WHEN '*' THEN 0
WHEN 'production' THEN 2
ELSE 1
END DESC
LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "clusters".* FROM "clusters" WHERE "clusters"."cluster_type" = 1 AND "clusters"."enabled" = TRUE AND (environment_scope IN ('*', 'production') OR
'production' LIKE
REPLACE(REPLACE(REPLACE(environment_scope,
'%', '\%'),
'_', '\_'),
'*', '%')
) ORDER BY CASE environment_scope
WHEN '*' THEN 0
WHEN 'production' THEN 2
ELSE 1
END DESC
LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
UPDATE "internal_ids" SET "last_value" = ("internal_ids"."last_value" + 1) WHERE "internal_ids"."project_id" = 220 AND "internal_ids"."usage" = 2 RETURNING "last_value" /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
BEGIN /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
INSERT INTO "deployments" ("iid", "project_id", "environment_id", "ref", "tag", "sha", "user_id", "deployable_type", "created_at", "updated_at", "status", "deployable_id") VALUES (11, 220, 704, 'main', FALSE, '03e049b38ca152db18a014e564bac1fd41c127e3', 1, 'CommitStatus', '2021-12-06 06:04:49.642223', '2021-12-06 06:04:49.642223', 0, 3664) RETURNING "id" /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
COMMIT /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
BEGIN /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "ci_pipelines"."id" FROM "ci_pipelines" WHERE "ci_pipelines"."project_id" = 220 AND (ci_pipelines.created_at > '2021-11-29 06:04:49.650613') AND ("ci_pipelines"."source" IN (1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12) OR "ci_pipelines"."source" IS NULL) AND "ci_pipelines"."ref" = 'main' AND "ci_pipelines"."id" NOT IN (WITH RECURSIVE "base_and_descendants" AS ((SELECT "ci_pipelines".* FROM "ci_pipelines" WHERE "ci_pipelines"."id" = 1215)
UNION
(SELECT "ci_pipelines".* FROM "ci_pipelines", "base_and_descendants", "ci_sources_pipelines" WHERE "ci_sources_pipelines"."pipeline_id" = "ci_pipelines"."id" AND "ci_sources_pipelines"."source_pipeline_id" = "base_and_descendants"."id" AND "ci_sources_pipelines"."source_project_id" = "ci_sources_pipelines"."project_id")) SELECT "id" FROM "base_and_descendants" AS "ci_pipelines") AND "ci_pipelines"."sha" != '03e049b38ca152db18a014e564bac1fd41c127e3' AND ("ci_pipelines"."status" IN ('created','waiting_for_resource','preparing','pending','running','scheduled')) ORDER BY "ci_pipelines"."id" ASC LIMIT 1 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
COMMIT /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT COUNT("ci_builds"."id") FROM "ci_builds" WHERE "ci_builds"."commit_id" = 1215 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT COUNT("ci_builds"."id") FROM "ci_builds" WHERE "ci_builds"."commit_id" = 1215 /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT COUNT(*) FROM "ci_pipelines" INNER JOIN "ci_builds" ON "ci_builds"."commit_id" = "ci_pipelines"."id" AND "ci_builds"."type" = 'Ci::Build' WHERE "ci_pipelines"."project_id" = 220 AND (ci_pipelines.created_at > '2021-12-05 06:04:49.662618') AND ("ci_pipelines"."status" IN ('created','waiting_for_resource','preparing','pending','running')) /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
SELECT "merge_requests".* FROM "merge_requests" WHERE "merge_requests"."source_project_id" = 220 AND "merge_requests"."source_branch" = 'main' AND (EXISTS (SELECT 1 FROM "merge_request_diffs" INNER JOIN "merge_request_diff_commits" ON "merge_request_diff_commits"."merge_request_diff_id" = "merge_request_diffs"."id" WHERE (merge_requests.latest_merge_request_diff_id = merge_request_diffs.id) AND "merge_request_diff_commits"."sha" = '\x03e049b38ca152db18a014e564bac1fd41c127e3')) AND ("merge_requests"."state_id" IN (1)) /*application:console,db_config_name:main,line:/devkitkat/services/rails/cache/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia/comment.rb:25:in `block in construct_comment'*/
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.