-
Notifications
You must be signed in to change notification settings - Fork 898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove EvmDatabaseOps and related rake tasks #21384
Conversation
@jrafanie Please review. |
Realized this morning that we should also probably remove the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really excited about the cleanup work you are are doing
Heh. Every time I see green code I wonder why we are adding it here and not in the appliance console. (the gc code before and now this)
a68cb9e
to
0fa2846
Compare
I also made another branch to remove the master...NickLaMuro:remove-database-ops-and-backups I could see doing it both ways
The second option would probably need a UI and schema PR, though. |
I am for deleting features as one set of deletes per feature. I know this started as trying to delete FileDepot, which isn't a feature so much as a library, so I am +1 on deleting the dependent features first, then ultimately killing FileDepot. I also generally like to split UI and API "usage" of a backend feature into separate PRs, but mostly for review purposes, as UI/API PR can generally be merged in their entirety before deleting the backend. In that sense, the feature in question is database backups, and deleting that includes deleting the model, the relationships, and the "tools" which is the rake tasks (I assume the UI is already deleted). I could see the "tools" being like the UI/API, which can be merged independently, so from a review perspective, I feel like having them as a separate PR is best. |
No, this isn't the case yet. I need to make that PR on it's own again as well. |
Maybe they were added when there was no appliance_console repo so they all lived here? Either way, I agree, if we're only using it in console, it should go there if we even want to keep some of the features. |
This whole thing came about from the concept that the UI conversion of the ops view for database backups needed an API endpoint, and that specifically was determined that it was a feature we didn't want to support, so axing the view was a better idea. To not completely strip the database backups functionality, it was simplified to be self contained, and so we are now deleting the features specific to the database backups specifically. This |
WAIT. I will redeem myself from poo poing your delete of file depot due to pxe server. 💩 I very much believe nothing is calling NOTE: As long as we drop it from appliance console, db backup, miq_schedule, evm_database_ops, and evm_dba.rake but that's what you're mostly doing here. I think. If you remove the rest, I think we're good. |
@NickLaMuro I noticed that DatabaseBackup.gc calls EvmDatbaseOps.gc, so at least that method must be removed from this PR. manageiq/app/models/database_backup.rb Line 61 in 1ad1f72
|
Actually also noticed EvmDatabaseOps.backup in there - here's the whole list of callers that I can find: https://github.com/search?q=org%3AManageIQ+EvmDatabaseOps&type=code relevant ones:
|
I think I noticed this as well, but forgot to act on it. Was going to just hard code that logic into
I plan on deleting that as mentioned here: But, that probably does mean that we should delete Whew... @jrafanie who knew that deleting code was so complex! 😩 |
Wasn't sure if manageiq/lib/tasks/evm_dba.rake Lines 107 to 124 in 1ad1f72
If it isn't, I am entirely fine dropping this entirely, I just was working under the assumption that this task might be called outside of just the UI potentially. If not, we can axe it as well. |
Searching in github and locally I don't see rake with gc called anywhere
|
@Fryguy I was more assuming |
I don't recall them running it, personally. Usually it was straight vacuumdb calls if really needed. |
Fair enough. I can axe that method then as well. Makes the code change easier. 👍 |
0fa2846
to
21469ac
Compare
21469ac
to
62182e5
Compare
Well... mostly. A single (set of) method(s) is needed as the appliance_console uses this method to check the current database connection. This code could be moved into the console itself, but since it was released recently, this allows that code to still function until a new version not requiring it can be released.
62182e5
to
4d3d218
Compare
Checked commit NickLaMuro@4d3d218 with ruby 2.6.3, rubocop 1.13.0, haml-lint 0.35.0, and yamllint |
Now that this is removed from appliance console, I think these can be removed from here, even before the ui PR is merged. food for future PRs: Many moons ago, we needed manageiq to create the running As you probably already know, it is the first migration that creates |
While yes, I would like to finally have this checkbox marked off on my TODO, I am also in no rush and I don't think anyone else is. I would rather no merge things where errors could crop up that need to at least be addressed by explaining "why". We can wait until the UI is resolved, then merge. Won't take much effort on my end once a decision is made, but I am not going to pressure for a review on something that really isn't a big concern right now. |
Well... mostly.
A single (set of) method(s) is needed as the
appliance_console
uses this method to check the current database connection.This code could be moved into the console itself, but since it was released recently, this allows that code to still function until a new version not requiring it can be released.
Links
appliance_console
with PR above