Description of problem: Getting this error when importing job templates from local dir - "This template is locked. Please clone it to a new template to customize.ERF45-3514 [JobTemplate::NonUniqueInputsError]: Duplicated inputs detected: ["pre_script", "package", "post_script"]". Version-Release number of selected component (if applicable): Satellite 6.7 snap 6 How reproducible: Always Steps to Reproduce: 1. Attempt to import the job templates from local/git repo. Actual results: Job Template import throws an error "This template is locked. Please clone it to a new template to customize.ERF45-3514 [JobTemplate::NonUniqueInputsError]: Duplicated inputs detected: ["pre_script", "package", "post_script"]". " Expected results: Successful import of job template or the appropriate human-readable error. Additional info:
Community templates sync without problems, I tried to add template input with a duplicate name to a job template, but I did not get error as described. Do we have a template (or a whole template repo) that causes this?
Created redmine issue https://projects.theforeman.org/issues/28647 from this bug
Upstream bug assigned to oprazak
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/28647 has been resolved.
Created attachment 1656674 [details] cycle in foreign input sets metadata The issue is caused by invalid metadata - when template uses itself as a source for foreign input sets, an attempt is made to create duplicate template inputs. While it is correct that template is not imported, the error message does not point to the cause of the problem. I added a validation that checks for this kind of cyclic dependencies.
Verified! @ Satellite 6.7 snap 13 Steps: ---------------- 1. Attempt to import the job templates from local/git repo that has invalid metadata as per comment 9. Observation: ----------------- The template is not being imported and Satellite is showing the correct reason for it as below: ERF45-3514 [JobTemplate::NonUniqueInputsError]: Duplicated inputs detected: ["errata"]
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2020:1454