fix: Include aggregate tables on snapshot/restore update_db commands#1936
Conversation
* Include the missing tables TreeTestsRollup/TreeListing tables on the
snapshot tools.
Closes kernelci#1935
Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
|
Any clue of the footprint these new tables will take? |
Those tables are already present in the database (I believe they were added to improve performance on listings, mostly). We are just including in a helper command here. |
| return total_inserted | ||
|
|
||
| def snapshot_latest_checkout(self) -> None: | ||
| """Migrate LatestCheckout data from default to dashboard_db""" |
There was a problem hiding this comment.
| """Migrate LatestCheckout data from default to dashboard_db""" | |
| """Migrate LatestCheckout data from dashboard_db to file""" |
Should be db -> file in every snapshot_<table>
There was a problem hiding this comment.
You missed updating restore_latest_checkout and snapshot_latest_checkout
| self.stdout.write("LatestCheckout migration completed") | ||
|
|
||
| def restore_latest_checkout(self) -> None: | ||
| """Migrate LatestCheckout data from default to dashboard_db""" |
There was a problem hiding this comment.
| """Migrate LatestCheckout data from default to dashboard_db""" | |
| """Migrate LatestCheckout data from file to dashboard_db""" |
Should be file -> db in every restore_<table>
| SELECT checkout_id, origin, tree_name, git_repository_url, | ||
| git_repository_branch, start_time | ||
| FROM latest_checkout |
There was a problem hiding this comment.
Wouldn't a wildcard select be sounder for a snapshot?
There was a problem hiding this comment.
There are a few columns that are left out, especially auto generated columns such as _timestamp.
But we could remove them on the python script, maybe.
812ad39 to
9ae615a
Compare
mentonin
left a comment
There was a problem hiding this comment.
Approved, subject to the last docs replacement
| return total_inserted | ||
|
|
||
| def snapshot_latest_checkout(self) -> None: | ||
| """Migrate LatestCheckout data from default to dashboard_db""" |
There was a problem hiding this comment.
You missed updating restore_latest_checkout and snapshot_latest_checkout
Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
9ae615a to
e3adc8a
Compare
…ernelci#1936) * fix: Include aggregate tables on snapshot/restore update_cb commands * Include the missing tables TreeTestsRollup/TreeListing tables on the snapshot tools. Closes kernelci#1935 Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi> * fix: Include LatestCheckout and HardwareStatus tables Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi> --------- Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
What it is
Include the missing tables TreeTestsRollup/TreeListing tables on the snapshot tools.
How to test
update_db snapshotwith any parameters combination.update_db restorecommand with the file generated by previous command.Closes #1935
Signed-off-by: Alan Peixinho alan.peixinho@profusion.mobi