nautobot / nautobot

Network Source of Truth & Network Automation Platform
https://docs.nautobot.com
Apache License 2.0
1.07k stars 283 forks source link

Plugins should use Post Upgrade #832

Closed smk4664 closed 3 years ago

smk4664 commented 3 years ago

Proposed Functionality

Plugins should use nautobot-server post_upgrade after installing plugins instead of nautobot-server migrate and nautobot-server collectstatic.

Use Case

Ease of installing plugins, and also covers bases of clearing cache, running migrations whether they think database changes have happened or not.

Database Changes

N/A

External Dependencies

N/A

jmcgill298 commented 3 years ago

Does this command accept an App to limit the scope of what gets executed?

smk4664 commented 3 years ago

Not currently, it targets all. But you can turn off some of the commands.

https://nautobot.readthedocs.io/en/stable/administration/nautobot-server/#post_upgrade

jmcgill298 commented 3 years ago

I fear that this can cause unexpected and irreversible side effects, especially with how Poetry handles dependencies. I know that I have accidently caused Nautobot to upgrade by installing/upgrading Plugins. If it automatically ran migrations, then it would have been very difficult to rollback to the desired Nautobot version.

smk4664 commented 3 years ago

Our existing guide just says to run nautobot-server migrate. Migrations are reversible (or should be). I will put in a PR for adding an app input to post_upgrade.