Project

General

Profile

Actions

Bug #35076

open

job invocation api doesnt show all validation errors

Added by Maria Agaphontzev almost 2 years ago. Updated almost 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Foreman
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

When saving a job invocation the validation checks `job_invocation`, `targeting` and `pattern_template_invocations`.
But the it shows error info only for job_invocation and will not show information about targeting and pattern_template_invocations errors.
context code in `app/models/job_invocation_composer.rb`

  def save!
    if valid?
      job_invocation.save!
    else
      raise job_invocation.flattened_validation_exception
    end
  end


Related issues 1 (0 open1 closed)

Related to Foreman Remote Execution - Bug #33397: Propagate triggering errors when creating job invocations via APIClosedOndřej PražákActions
Actions #1

Updated by Maria Agaphontzev almost 2 years ago

  • Pull request https://github.com/theforeman/foreman_remote_execution/pull/648 added
Actions #2

Updated by Adam Ruzicka almost 2 years ago

  • Related to Bug #33397: Propagate triggering errors when creating job invocations via API added
Actions #3

Updated by Adam Ruzicka almost 2 years ago

  • Pull request deleted (https://github.com/theforeman/foreman_remote_execution/pull/648)

Issue 33397 fixes majority of the issues, however it is not complete. Let's reuse this issue to track the remaining bits which are described here https://github.com/theforeman/foreman_remote_execution/pull/648#discussion_r701089440

Actions

Also available in: Atom PDF