Skip to content

Conversation

@ddutt
Copy link
Member

@ddutt ddutt commented May 9, 2023

Description

Three somewhat related bug fixes:

  • namespace table: user query was applied too early resulting in either query failures or the wrong data being filtered
  • namespace table: the schema didn't contain the lastUpdate column
  • device: the filters such as os, vendor etc didn't work correctly because of an incorrect merge with the poller table. There's still a corner case where it fails.

Type of change

These are bug fixes. One test was updated to handle the changes caused by these fixes.

New Behavior

namespace show honors the user filters plus query-str correctly.

Proposed Release Note Entry

  • namespace's schema reflects the actual namespace columns
  • namespace honors the filters the user specifies
  • device honors the os/vendor/model filters the user specifies.
  • I have read the comments and followed the CONTRIBUTING.md.
  • I have explained my PR according to the information in the comments or in a linked issue.
  • My PR source branch is created from the develop branch.
  • My PR targets the develop branch.
  • All my commits have --signoff applied

@ddutt ddutt requested review from LucaNicosia and claudious96 May 9, 2023 03:04
@ddutt ddutt force-pushed the device-namespace-fixes branch from 82f9cd4 to 7936a90 Compare May 9, 2023 03:15
ddutt added 4 commits May 9, 2023 10:08
Essentially, we want the device table to show all devices in the
inventory, even those that were never polled due to whatever reason that
connectivity could not be established. To do this, we pull the info
about devices from the poller table. However, we were pulling all
devices from the poller table which meant even those that were
successful and were already in the device table. This meant any filter
the user had applied such as specifying model, vendor, OS, etc. were
lost when we did the merge.

To avoid this issue, but stay true to the reason we were pulling data
from the poller table, we change the poller query to only return info
about devices that have failed. This fix however has the limitation that
it doesn't handle the case where a device has failed presently, but it
once was polled, and a user filter prevents a device from being selected,
by the device table. We'll tackle that case separately.

Signed-off-by: Dinesh Dutt <dd.ps4u@gmail.com>
Signed-off-by: Dinesh Dutt <dd.ps4u@gmail.com>
Signed-off-by: Dinesh Dutt <dd.ps4u@gmail.com>
Signed-off-by: Dinesh Dutt <dd.ps4u@gmail.com>
@ddutt ddutt force-pushed the device-namespace-fixes branch from c93f69d to 9aa9176 Compare May 9, 2023 17:22
@ddutt ddutt merged commit fe92eec into develop May 9, 2023
@ddutt ddutt deleted the device-namespace-fixes branch May 9, 2023 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants