ERP5Type: add a transaction note when bootstraping
Bootstrap is actually the automatic migration of tools. It happened to me several times that I mistakenly start an old instance on a too new version of products and this instance is migrated automatically.
By leaving a note in transaction it's easier to find out which transaction performed the automatic migration to revert to the state before using technique such as https://blog.gocept.com/2019/06/14/undo-transactions-by-truncating-zodb-data-fs/ for FileStorage.
with this change, a command such as;
python -m ZODB.scripts.fstail -n 20 ./instance/slappart6/srv/zodb/root.fs
show something like:
2019-11-12 02:46:42.106313: hash=44fecb9a63411fbf305cea82f4c699c478000d61 user=' None' description='/timer_service/process_timer\nSite migrated' length=462938 offset=881877846 (+70)
for the transaction which did the migration, so it's easy to repair.
The changes were merged into master. The source branch has been removed.
Is it necessary to add a note for each tool? Wouldn't be enough to add a single note in an
elseclause to the try/except of the
I'd rather have a single note next to the LOG at the end of
marked as a Work In ProgressToggle commit list
Thanks for feedback, you are right a single note is enough (if we really need to know what have been modified it can be seen by inspecting the transaction content).
I'll try to put it in the
if migrate, this seem the right place because this condition is true when at least one tool is migrated.
unmarked as a Work In ProgressToggle commit list
I did the change we discussed, test failed, but it was a random failure with functional test. I'll merge this in the next days if no objections.
mergedToggle commit list