Project

General

Profile

Bug #13011

With Rails 4, job invocation index fails when searching based on started_at times

Added by Ivan Necas about 7 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

The following error message is displayed:

table name "foreman_tasks_tasks" specified more than once

SELECT  "job_invocations"."id" AS t0_r0, "job_invocations"."targeting_id" AS t0_r1,       "job_invocations"."job_name" AS t0_r2, "job_invocations"."task_id" AS t0_r3, "job_invocat      ions"."task_group_id" AS t0_r4, "job_invocations"."triggering_id" AS t0_r5, "job_invocati      ons"."description" AS t0_r6, "foreman_tasks_tasks"."id" AS t1_r0, "foreman_tasks_tasks"."      type" AS t1_r1, "foreman_tasks_tasks"."label" AS t1_r2, "foreman_tasks_tasks"."started_at      " AS t1_r3, "foreman_tasks_tasks"."ended_at" AS t1_r4, "foreman_tasks_tasks"."state" AS t      1_r5, "foreman_tasks_tasks"."result" AS t1_r6, "foreman_tasks_tasks"."external_id" AS t1_      r7, "foreman_tasks_tasks"."parent_task_id" AS t1_r8, "foreman_tasks_tasks"."start_at" AS       t1_r9, "foreman_tasks_tasks"."start_before" AS t1_r10 FROM "job_invocations" LEFT OUTER J      OIN "foreman_tasks_tasks" ON "foreman_tasks_tasks"."id" = "job_invocations"."task_id" LEF      T OUTER JOIN foreman_tasks_tasks ON foreman_tasks_tasks.id = job_invocations.task_id WHER      E (("foreman_tasks_tasks"."started_at" >= '2016-01-05 11:08:27.590884'))  ORDER BY job_in      vocations.id DESC LIMIT 20 OFFSET 0):

Associated revisions

Revision 925b72f7 (diff)
Added by Ivan Necas about 7 years ago

Fixes #13011 - use standard way to join with task

Otherwise, the scoped search has issues producing valid sql

Revision ac9a3dc2
Added by Ivan Necas about 7 years ago

Merge pull request #100 from iNecas/fix-job-invocation-started-at-search

Fixes #13011 - use standard way to join with task

History

#1 Updated by Ivan Necas about 7 years ago

  • Target version set to 97

#2 Updated by Ivan Necas about 7 years ago

  • Description updated (diff)

#3 Updated by The Foreman Bot about 7 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_remote_execution/pull/100 added

#4 Updated by Ivan Necas about 7 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF