[Test] spec/requests/api/project_packages_spec.rb | API::ProjectPackages GET /projects/:id/packages/:package_id without the need for a license with build info does not result in additional queries
Test metadata (don't modify)
Field | Value |
---|---|
File URL | spec/requests/api/project_packages_spec.rb#L249 |
Filename | spec/requests/api/project_packages_spec.rb |
Description | API::ProjectPackages GET /projects/:id/packages/:package_id without the need for a license with build info does not result in additional queries |
Test level | integration |
Hash | 03cfd2d1b3dfa67ccdce7c6dee041935a2a5e1c49 |
Duration | 2.3 seconds |
Expected duration | < 19.2 seconds |
Stack trace
Failure/Error:
expect do
get api(package_url, user)
end.not_to exceed_query_limit(control).with_threshold(4)
Expected a maximum of 22 (+4) queries, got 27:
Query Diff:
-----------
SELECT "personal_access_tokens".* FROM "personal_access_tokens"...
-- (expected: 1, got: 0)
WHERE "personal_access_tokens"."token_digest" = 'ZoIhSKvuzWzgshtttr9c7vmh8kf03WxeDoglvxXBXqs=' LIMIT 1
-- (expected: 2, got: 0)
WHERE "personal_access_tokens"."token_digest" = 'yWdBuNnUPgOjqUX5BudZjcM9Uot1qnb64HVnDrU20aE=' LIMIT 1
-- (expected: 0, got: 1)
WHERE "personal_access_tokens"."token_digest" = 'jbiQerM+ZbHXxK8ZNq1dniJeDg3PN6k/Ffa1H3nOkOU=' LIMIT 1
-- (expected: 0, got: 2)
WHERE "personal_access_tokens"."token_digest" = 'THmVAHBOIppddKpI1jdYbU1TDgtnTPSWeDlTYopuVqM=' LIMIT 1
SELECT "projects"."id", "projects"."name", "projects"."path", "projects"."description", "projects"."created_at", "projects"."updated_at", "projects"."creator_id", "projects"."namespace_id", "projects"."last_activity_at", "projects"."import_url", "projects"."visibility_level", "projects"."archived", "projects"."avatar", "projects"."merge_requests_template", "projects"."star_count", "projects"."merge_requests_rebase_enabled", "projects"."import_type", "projects"."import_source", "projects"."approvals_before_merge", "projects"."reset_approvals_on_push", "projects"."merge_requests_ff_only_enabled", "projects"."issues_template", "projects"."mirror", "projects"."mirror_last_update_at", "projects"."mirror_last_successful_update_at", "projects"."mirror_user_id", "projects"."shared_runners_enabled", "projects"."runners_token", "projects"."build_allow_git_fetch", "projects"."build_timeout", "projects"."mirror_trigger_builds", "projects"."pending_delete", "projects"."public_builds", "projects"."last_repository_check_failed", "projects"."last_repository_check_at", "projects"."only_allow_merge_if_pipeline_succeeds", "projects"."has_external_issue_tracker", "projects"."repository_storage", "projects"."repository_read_only", "projects"."request_access_enabled", "projects"."has_external_wiki", "projects"."ci_config_path", "projects"."lfs_enabled", "projects"."description_html", "projects"."only_allow_merge_if_all_discussions_are_resolved", "projects"."repository_size_limit", "projects"."printing_merge_request_link_enabled", "projects"."auto_cancel_pending_pipelines", "projects"."service_desk_enabled", "projects"."cached_markdown_version", "projects"."delete_error", "projects"."last_repository_updated_at", "projects"."disable_overriding_approvers_per_merge_request", "projects"."storage_version", "projects"."resolve_outdated_diff_discussions", "projects"."remote_mirror_available_overridden", "projects"."only_mirror_protected_branches", "projects"."pull_mirror_available_overridden", "projects"."jobs_cache_index", "projects"."external_authorization_classification_label", "projects"."mirror_overwrites_diverged_branches", "projects"."pages_https_only", "projects"."external_webhook_token", "projects"."packages_enabled", "projects"."merge_requests_author_approval", "projects"."pool_repository_id", "projects"."runners_token_encrypted", "projects"."bfg_object_map", "projects"."detected_repository_languages", "projects"."merge_requests_disable_committers_approval", "projects"."require_password_to_approve", "projects"."max_pages_size", "projects"."max_artifacts_size", "projects"."pull_mirror_branch_prefix", "projects"."remove_source_branch_after_merge", "projects"."marked_for_deletion_at", "projects"."marked_for_deletion_by_user_id", "projects"."autoclose_referenced_issues", "projects"."suggestion_commit_message", "projects"."project_namespace_id", "projects"."hidden", "projects"."organization_id" FROM "projects"...
-- (expected: 0, got: 1)
WHERE "projects"."id" = 309 LIMIT 1
SELECT "users".* FROM "users"...
-- (expected: 0, got: 1)
WHERE "users"."id" = 564
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"."max_personal_access_token_lifetime", "namespaces"."push_rule_id", "namespaces"."shared_runners_enabled", "namespaces"."allow_descendants_override_disabled_shared_runners", "namespaces"."traversal_ids", "namespaces"."organization_id" FROM "namespaces"...
-- (expected: 0, got: 1)
WHERE "namespaces"."id" = 873 LIMIT 1
SELECT "routes".* FROM "routes"...
-- (expected: 0, got: 1)
WHERE "routes"."source_id" = 873 AND "routes"."source_type" = 'Namespace' LIMIT 1
SELECT "ci_pipelines"."id", "ci_pipelines"."ref", "ci_pipelines"."sha", "ci_pipelines"."before_sha", "ci_pipelines"."created_at", "ci_pipelines"."updated_at", "ci_pipelines"."tag", "ci_pipelines"."yaml_errors", "ci_pipelines"."committed_at", "ci_pipelines"."project_id", "ci_pipelines"."status", "ci_pipelines"."started_at", "ci_pipelines"."finished_at", "ci_pipelines"."duration", "ci_pipelines"."user_id", "ci_pipelines"."lock_version", "ci_pipelines"."pipeline_schedule_id", "ci_pipelines"."source", "ci_pipelines"."config_source", "ci_pipelines"."protected", "ci_pipelines"."failure_reason", "ci_pipelines"."iid", "ci_pipelines"."merge_request_id", "ci_pipelines"."source_sha", "ci_pipelines"."target_sha", "ci_pipelines"."external_pull_request_id", "ci_pipelines"."ci_ref_id", "ci_pipelines"."locked", "ci_pipelines"."partition_id", "ci_pipelines"."auto_canceled_by_id" FROM "ci_pipelines"...
-- (expected: 0, got: 1)
WHERE "ci_pipelines"."id" = 58
Reports (11)
- 2024-01-28: https://gitlab.com/gitlab-org/gitlab/-/jobs/6036829229 (https://gitlab.com/gitlab-org/gitlab/-/pipelines/1154942433)
- 2024-01-29: https://gitlab.com/gitlab-org/gitlab/-/jobs/6039617367 (https://gitlab.com/gitlab-org/gitlab/-/pipelines/1155534523)
- 2024-03-08: https://gitlab.com/gitlab-org/gitlab/-/jobs/6349852913 (https://gitlab.com/gitlab-org/gitlab/-/pipelines/1206095168)
- 2024-03-08: https://gitlab.com/gitlab-org/gitlab/-/jobs/6349791310 (https://gitlab.com/gitlab-org/gitlab/-/pipelines/1206085763)
- 2024-03-08: https://gitlab.com/gitlab-org/gitlab/-/jobs/6349791381 (https://gitlab.com/gitlab-org/gitlab/-/pipelines/1206085763)
- 2024-03-08: https://gitlab.com/gitlab-org/gitlab/-/jobs/6349791453 (https://gitlab.com/gitlab-org/gitlab/-/pipelines/1206085763)
- 2024-03-08: https://gitlab.com/gitlab-org/gitlab/-/jobs/6350478020 (https://gitlab.com/gitlab-org/gitlab/-/pipelines/1206186231)
- 2024-03-08: https://gitlab.com/gitlab-org/gitlab/-/jobs/6350369866 (https://gitlab.com/gitlab-org/gitlab/-/pipelines/1206174051)
- 2024-03-08: https://gitlab.com/gitlab-org/gitlab/-/jobs/6350369919 (https://gitlab.com/gitlab-org/gitlab/-/pipelines/1206174051)
- 2024-03-08: https://gitlab.com/gitlab-org/gitlab/-/jobs/6350369817 (https://gitlab.com/gitlab-org/gitlab/-/pipelines/1206174051)
- 2024-03-08: https://gitlab.com/gitlab-org/gitlab/-/jobs/6350370017 (https://gitlab.com/gitlab-org/gitlab/-/pipelines/1206174051)
Edited by TEST_FAILURES_PROJECT_TOKEN