Project

General

Profile

Bug #35076

job invocation api doesnt show all validation errors

Added by Maria Agaphontzev about 2 months ago. Updated about 2 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Foreman
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
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

Related to Foreman Remote Execution - Bug #33397: Propagate triggering errors when creating job invocations via APIClosed

History

#1 Updated by Maria Agaphontzev about 2 months ago

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

#2 Updated by Adam Ruzicka about 2 months ago

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

#3 Updated by Adam Ruzicka about 2 months 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

Also available in: Atom PDF