nautobot-app-golden-config icon indicating copy to clipboard operation
nautobot-app-golden-config copied to clipboard

Job Atomic Transaction fully in Nautobot Jobs

Open itdependsnetworks opened this issue 1 year ago • 2 comments

Environment

  • Python version: 3.8
  • Nautobot version: 1.4.1
  • nautobot-golden-config version: 1.2.2

Steps to Reproduce

  1. Run a job

Expected Behavior

The job should be able to run without keeping all of the transactions queued up to the point that the job cannot run.

Observed Behavior

Since everything is ran in the run method runs everything in atomic mode

  • Connect to each device
    • Save to local file
  • Git add -A, git commit -m "$current date update"
  • git push
  • atomic save

Potential Solution

  • Connect to each device
    • Save to local file
  • Git add -A, git commit -m "$current date update"
  • git push
  • Run a git data sync job
    • We can look to optimize this job to run transactionally

itdependsnetworks avatar Oct 12 '22 20:10 itdependsnetworks

Potential idea for workflows: non-atomic workflow elements, thus you could declare which of the steps are atomic vs non-atomic.

mzbroch avatar Oct 14 '22 09:10 mzbroch

Possibly related to https://github.com/nautobot/nautobot/issues/1991

jeffkala avatar Oct 19 '22 13:10 jeffkala