nautobot/nautobot-app-golden-config

Config Plan field in job input form should return only usable options

alhogan-aa opened this issue · 6 comments

Environment

  • Nautobot version: 1.6.2
  • nautobot-golden-config version: 1.6.4

Proposed Functionality

When running the "Deploy Config Plans" job, the choices presented in the "Config Plan" field should be limited (filtered) for only config plans that have not already been deployed. So Config Plans with a status of "Approved".

Alternatively, if a Config Plan has already been executed can we log a warning message for that device without failing the entire job?

Use Case

When running these at scale, it is very difficult to determine which Config Plans are valid options. I needed to execute 1700 config plans in small batches (20-50) and when the job would error, I had to pull up the Config Plan list view on the side to know which ones had already been executed. If I accidentally selected one that had already been run, then the entire job would fail.

I am not following, why wouldn't you just filter the list view to what you want, select all, then select "deploy selected"

  1. That workflow didn't work at scale (see #710)
  2. I agree that using the "deploy selected" should be the primary method for running the Deploy Config Plans job, but it would be nice if the traditional run job workflow were also a usable option.

In my opinion, if a config plan's status prevents it from being an acceptable option, then it shouldn't be listed in the dropdown to be selected. One argument against this is that users might expect all config plans to be listed in the dropdown for completeness. This is understandable and to that, the deployment of other config plans should not stop when a config plan that has already been completed is included in the list of config plans to be deployed. The exception should be caught, a log message should be generated, and the job should continue deploying the other config plans. Currently, the job errors out once a config plan with a status of "completed" is encountered.

Maybe some input validation to prevent this job from accepting a Config Plan with a status of "completed" is all that is needed here?

Think this one is ultimately directly related to #710 and the problem that is described there. Running directly from the job input form wasn't fully the intention. Fixing #710 would natively implement this flexible filtering on deployments.

Think this one is ultimately directly related to #710 and the problem that is described there. Running directly from the job input form wasn't fully the intention. Fixing #710 would natively implement this flexible filtering on deployments.

Fair enough. I will probably hide this job in the Job list view so the users don't attempt to run it from there.

As @jeffkala mentioned this should be handled by #710