Open wenottingham opened 6 years ago
@wenottingham I talked with @ryanpetrello about this one and I think that gathering this information on the unified_job_templates endpoint is just going to be too expensive for the api to do. The UI could still implement this feature but it would require us to make an extra request for each workflow listed to see if it's missing templates. We already do this on the details view:
We'd be making the same request on the list view. We've tended to avoid having to make more than one request in our other lists to keep performance up but if you think this is vital to add then it can definitely be done.
I wonder if the combination of the above screenshot and https://github.com/ansible/tower/issues/695 would be enough to let users know that something is missing from the workflow?
Thoughts on an api-driven solution:
Rather than attempting to calculate this on the fly, the api could attempt to maintain a state (broken v. not broken) as resources are deleted. So, when a JT is deleted for example, we'd need to go out and check to see if that JT was used in a workflow somewhere. If it was, we'd flip the state
switch over to broken until the user comes in and replaces that JT or deletes the offending node.
ISSUE TYPE
COMPONENT NAME
SUMMARY
We have the new 'invalid' marker on job templates with missing components.
It should also show for:
ENVIRONMENT
ADDITIONAL INFORMATION