Skip to content
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

Fix establishing relations of tenants and cloud tenants between different cloud tenant -> tenant sync #17190

Merged

Conversation

lpichler
Copy link
Contributor

Main case:

  1. added provider with any user
  2. refresh with tenant sync
  3. changed user in provider - he has different set of cloud tenant
  4. refresh with tenant sync

about testing

This implies couple cases and this PR is covering them by specs.
Each case is described in comments.
Testing is done by testing all relations of synced tenant. So for each result tenant is tested his source, cloud_tenant's,source_tenant, children and parent.
This fully covering result tree of tenant.

Fixes here

Is it basically continuation of @gtanzillo 's fix #16144 and
and #16144 is fixing the BZ. But during this investigation have been found some bugs related to uncovered some relations.

Links

https://bugzilla.redhat.com/show_bug.cgi?id=1498045

@miq-bot add_label blocker, bug, gaprindashvili/yes, fine/yes
@miq-bot assign @gtanzillo

@lpichler lpichler changed the title Fix establishing relations cloud tenant are changed between cloud tenant -> tenant sync Fix establishing relations of tenants and cloud tenants between different cloud tenant -> tenant sync Mar 23, 2018
@lpichler lpichler changed the title Fix establishing relations of tenants and cloud tenants between different cloud tenant -> tenant sync [WIP] Fix establishing relations of tenants and cloud tenants between different cloud tenant -> tenant sync Mar 23, 2018
@miq-bot miq-bot added the wip label Mar 23, 2018
it can happen when the new user has greater count of cloud tenants
than previous provider's user and some of them have different names
so parent of existing tenant was not updated correcltly.
@lpichler lpichler force-pushed the fix_establishing_relations_in_tenant_sync branch from 80fcc7f to dc75287 Compare March 23, 2018 14:13
…columns

because such source (CloudTenant) no longer exists
@lpichler lpichler force-pushed the fix_establishing_relations_in_tenant_sync branch 3 times, most recently from e29b4bc to 9616903 Compare March 23, 2018 14:32
@lpichler lpichler changed the title [WIP] Fix establishing relations of tenants and cloud tenants between different cloud tenant -> tenant sync Fix establishing relations of tenants and cloud tenants between different cloud tenant -> tenant sync Mar 23, 2018
@lpichler lpichler force-pushed the fix_establishing_relations_in_tenant_sync branch from 9616903 to 85cab6b Compare March 23, 2018 14:34
@miq-bot miq-bot removed the wip label Mar 23, 2018
@lpichler lpichler force-pushed the fix_establishing_relations_in_tenant_sync branch from 85cab6b to 10a49ba Compare March 23, 2018 14:46
there is several cases when user of provider is changed and cloud tenants
are changed as well.

Each case is testing resulted tenant and all his relations as
parent, children, source_tenant and source.
@lpichler lpichler force-pushed the fix_establishing_relations_in_tenant_sync branch from 10a49ba to 59d8272 Compare March 23, 2018 15:15
@miq-bot
Copy link
Member

miq-bot commented Mar 23, 2018

Checked commits lpichler/manageiq@e29b4d3~...59d8272 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 0 offenses detected
Everything looks fine. 🍪

Copy link
Member

@gtanzillo gtanzillo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice tests!

@gtanzillo gtanzillo added this to the Sprint 83 Ending Apr 9, 2018 milestone Mar 28, 2018
@gtanzillo gtanzillo merged commit d03161f into ManageIQ:master Mar 28, 2018
simaishi pushed a commit that referenced this pull request Apr 2, 2018
…_tenant_sync

Fix establishing relations of tenants and cloud tenants between different cloud tenant -> tenant sync
(cherry picked from commit d03161f)

https://bugzilla.redhat.com/show_bug.cgi?id=1562772
@simaishi
Copy link
Contributor

simaishi commented Apr 2, 2018

Gaprindashvili backport details:

$ git log -1
commit 4dac9bbb0de586efae9538f92a49542ad45d09ce
Author: Gregg Tanzillo <[email protected]>
Date:   Wed Mar 28 09:13:06 2018 -0400

    Merge pull request #17190 from lpichler/fix_establishing_relations_in_tenant_sync
    
    Fix establishing relations of tenants and cloud tenants between different cloud tenant -> tenant sync
    (cherry picked from commit d03161f3c0c77016ed29b92b23ef9c0487c93275)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1562772

@lpichler lpichler deleted the fix_establishing_relations_in_tenant_sync branch April 3, 2018 06:21
simaishi pushed a commit that referenced this pull request Apr 9, 2018
…_tenant_sync

Fix establishing relations of tenants and cloud tenants between different cloud tenant -> tenant sync
(cherry picked from commit d03161f)

https://bugzilla.redhat.com/show_bug.cgi?id=1562773
@simaishi
Copy link
Contributor

simaishi commented Apr 9, 2018

Fine backport details:

$ git log -1
commit 8622b6901855dec3baf58d79817b3507489f90d9
Author: Gregg Tanzillo <[email protected]>
Date:   Wed Mar 28 09:13:06 2018 -0400

    Merge pull request #17190 from lpichler/fix_establishing_relations_in_tenant_sync
    
    Fix establishing relations of tenants and cloud tenants between different cloud tenant -> tenant sync
    (cherry picked from commit d03161f3c0c77016ed29b92b23ef9c0487c93275)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1562773

d-m-u pushed a commit to d-m-u/manageiq that referenced this pull request Jun 6, 2018
…tions_in_tenant_sync

Fix establishing relations of tenants and cloud tenants between different cloud tenant -> tenant sync
(cherry picked from commit d03161f)

https://bugzilla.redhat.com/show_bug.cgi?id=1562773
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants