nautobot-app-version-control
nautobot-app-version-control copied to clipboard
Explore Core Views at Historical Commit
This issue is design discussion around interacting with views of historical commits.
Currently, branch "heads" are the only versions that can be used with the Version Control plugin. Additional work would be needed to access versions of the data model from non-head commits. The challenges are mostly at the Django layer, as Dolt supports querying commits in the same way it supports querying branches. An outline of the design:
-
A new "time-travel" URL prefix that renders core Nautobot views with data from the commit. Core Nautobot URLs would be prefixed with a plugin URL like
/plugins/dolt/commits/<commit-hash>/<core url>
. Inspecting the device list at a commit would look like/plugins/dolt/commits/kctsfpllp1mahueasds6eg978geu2quc/dcim/devices/
-
A mechanism to disable form views, or handle database write errors. Writes cannot be made against commits.
-
The ability to
dolt_checkout()
a non-head commit. Git handles this with "detached head" state. Dolt does not currently support detached head. Alternatively, a Django database router could be used to route queries to a "revision database" likenautobot/kctsfpllp1mahueasds6eg978geu2quc