ansible / awx

AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is one of the upstream projects for Red Hat Ansible Automation Platform.
Other
13.98k stars 3.41k forks source link

Show 'invalid' marker on broken workflows #1502

Open wenottingham opened 6 years ago

wenottingham commented 6 years ago
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
mabashian commented 5 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:

screen shot 2019-01-15 at 1 50 34 pm

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?

mabashian commented 5 years ago

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.