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

Mismatch is shown even if has_cloudigrade_mismatch is false #511

Closed
ntkathole opened this issue Nov 18, 2020 · 4 comments
Closed

Mismatch is shown even if has_cloudigrade_mismatch is false #511

ntkathole opened this issue Nov 18, 2020 · 4 comments
Assignees
Labels
bug Something isn't working env:test

Comments

@ntkathole
Copy link
Member

ntkathole commented Nov 18, 2020

Description

"Improve reporting accuracy" notification is displayed even if api returns has_cloudigrade_mismatch as false for today's date.

Env: QA-beta
Account : swatch-rhui

Expected behavior

"Improve reporting accuracy" notification should display only when has_cloudigrade_mismatch is false.

Steps to reproduce

  1. Have cloudmeter configured account with no mismatch.
  2. Login to account.

Additional context, version info

{'date': datetime.datetime(2020, 11, 18, 1, 2, 51, 327983, tzinfo=tzutc()),
 'instance_count': 1,
 'cores': 0,
 'sockets': 1,
 'physical_instance_count': 0,
 'physical_cores': 0,
 'physical_sockets': 0,
 'hypervisor_instance_count': 0,
 'hypervisor_cores': 0,
 'hypervisor_sockets': 0,
 'cloud_instance_count': 1,
 'cloud_cores': 0,
 'cloud_sockets': 1,
 'has_data': True,
 'has_cloudigrade_data': True,
 'has_cloudigrade_mismatch': False}

Screenshot from 2020-11-18 10-28-42

@ntkathole ntkathole added the bug Something isn't working label Nov 18, 2020
@ntkathole
Copy link
Member Author

As per conversation with @cdcabrera, current (18/11/2020) logic is, if any one entry in tally response for particular granularity (i.e. last 30 days record for daily) returns false, then we display mismatch data banner.

We should consider only latest (today's date) entry to display this banner else if any user has mismatch in account for 1 day, he/she may see that banner for upcoming 1 month for daily granularity. This may confuse user as even if account mismatch is fixed, page would display mismatch banner.

@ntkathole
Copy link
Member Author

@cdcabrera with above fix, we are considering last 2 days for mismatch, but we missed functionality that show notification when mismatch is at filter (sla/usage) level.
ex: There is no notification in account when /api/rhsm-subscriptions/v1/tally/products/RHEL returns

has_cloudigrade_data : true
has_cloudigrade_mismatch : false

and /api/rhsm-subscriptions/v1/tally/products/RHEL?sla=premium returns

has_cloudigrade_data : true
has_cloudigrade_mismatch : true

@cdcabrera
Copy link
Member

Good catch @ntkathole we went back and forth on this aspect currently the updated query isn't passed into the banner area. However since it appears "mismatch" appears after the fact we can look at passing the query into the banner message... it'll be based on the query the graph accepts.

@ntkathole
Copy link
Member Author

VERIFIED. Functionality looks good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working env:test
Projects
None yet
Development

No branches or pull requests

2 participants