-
Notifications
You must be signed in to change notification settings - Fork 125
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
set vm ancestry from relationship resource info #492
set vm ancestry from relationship resource info #492
Conversation
23861b4
to
c44d780
Compare
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.
This is awesome. Great idea to get genealogy out of there!
I thought I'd explain the sql a little better. Here is what we are doing:
|
9302c94
to
703ede1
Compare
703ede1
to
3accb28
Compare
3accb28
to
abcef5e
Compare
hey @Fryguy could I please ask you to review this again? |
could I please get someone to review this? |
abcef5e
to
95a5972
Compare
95a5972
to
0923423
Compare
aside: we have some notes in gist - may want to bring that into this PR for future reference (or not...) |
5929279
to
8c5b559
Compare
Okay, I'm marking this and the core pr (ManageIQ/manageiq#20788) as work in progress again because I'd like to rewrite the tests. |
c3a869f
to
58287bd
Compare
@kbrock could I get another look at this please? I know you'd have let it get merged as it was but this is better and that was eating me. |
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.
this looks nice.
ship it
58287bd
to
5715ed3
Compare
5715ed3
to
25acdaf
Compare
25acdaf
to
9bfda8b
Compare
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.
I think this is good, but would like @agrare to also review and approve.
From a testing perspective, have you run this against a "real" customer database? I'm curious if it migrates correctly. If so, that would give a huge confidence boost. If it fails, then that's more test cases. |
@Fryguy yes, @NickLaMuro was awesome and provided the customer database that was used to test this. Please see his earlier comment: #492 (comment) |
we'd rather have consistency between interfaces
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.
👍 LGTM after @Fryguy 's two suggestions are fixed
ede1806
to
1d7517b
Compare
Checked commits d-m-u/manageiq-schema@9db3c81~...1d7517b with ruby 2.6.3, rubocop 0.82.0, haml-lint 0.35.0, and yamllint spec/migrations/20200607025146_add_ancestry_to_vm_spec.rb
|
we are working on converting vm genealogy to use ancestry. In order to do this, we need to use the existing relationship resource information on all vms with genealogy rels of type VmOrTemplate to convert those resource ids into vm ids.
This PR 1) adds the necessary index and 2) gets the ancestry information from the relationships, splitting on slashes, then maps those back to the vm ancestry records.
the first commit's the original sql which joined to vms
the second commit removes that join so we no longer have a potential issue with the ordering
needs ManageIQ/manageiq#20788, tests are green: ManageIQ/manageiq-cross_repo-tests#225