Project

General

Profile

Actions

Bug #19137

open

notExists, notEquals, notRegex does not work on subelements like software, disks, etc

Added by François ARMAND over 3 years ago. Updated 5 months ago.

Status:
New
Priority:
N/A
Assignee:
-
Category:
Web - Nodes & inventories
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Small
Priority:
0
Name check:
To do
Fix check:
To do
Regression:
No

Description

If a notXXX query apply on a sub element (ie a composed query with subquery), then it does not work as expected. It works for element of node summary.

Say we wan't node without sotware "soft1" installed. If we you use "software" "not regex" "soft1", we get all nodes as long as they have at least one other software than soft1.

The reason is that what we actually do is look for all software not matching soft1, then get nodes with at least one of the resulting software in their software list.
It should take node with only software in that list.
The same logic works for notEqual, but not for notExists, since we can't get the list of software that don't exists.

So we could inverse the composition, which would be more efficient too in most cases (the example on software is very telling: you likely look for nodes with one, or a couple of missing software, and so all non-matching software is likely a ten of thousand long list of elements): we could look for software mathching the regex, and only take nodes with NO software in the resulting list (that works also with notequals and notexists, if for the latter we directly translate it to "take node with no software").

This change does not seem easy at all, since we need to add logic to inverse composition of subquery (making it work correctly with and/or case).

A workaround could be to add a query field "inverse result", default to false, which would returns "all node minus the one matching the query" (and would be ok for most simple case, especially combined with the possibility to compose groupes).


Related issues 1 (0 open1 closed)

Related to Rudder - Bug #19138: Add an option to invert result of a node queryReleasedVincent MEMBRÉActions
Actions #1

Updated by François ARMAND over 3 years ago

  • Target version changed from 6.1.12 to 6.2.5
Actions #2

Updated by Vincent MEMBRÉ over 3 years ago

  • Target version changed from 6.2.5 to 6.2.6
Actions #3

Updated by Vincent MEMBRÉ over 3 years ago

  • Target version changed from 6.2.6 to 6.2.7
Actions #4

Updated by Vincent MEMBRÉ over 3 years ago

  • Target version changed from 6.2.7 to 6.2.8
Actions #5

Updated by Vincent MEMBRÉ over 3 years ago

  • Target version changed from 6.2.8 to 6.2.9
Actions #6

Updated by Vincent MEMBRÉ over 3 years ago

  • Target version changed from 6.2.9 to 6.2.10
Actions #7

Updated by Vincent MEMBRÉ about 3 years ago

  • Target version changed from 6.2.10 to 6.2.11
Actions #8

Updated by Vincent MEMBRÉ about 3 years ago

  • Target version changed from 6.2.11 to 6.2.12
Actions #9

Updated by Vincent MEMBRÉ almost 3 years ago

  • Target version changed from 6.2.12 to 6.2.13
Actions #10

Updated by François ARMAND almost 3 years ago

  • Related to Bug #19138: Add an option to invert result of a node query added
Actions #11

Updated by François ARMAND almost 3 years ago

  • Effort required set to Small

We added the "invert result query". Now we should remove the "notEquals" etc filters for sub-component to avoid misuse and bug report, and document in the query box.

For migration: only hide the relevant filter, don't make them forbiden. New groups won't get them, and old one will still work.

Actions #12

Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 6.2.13 to 6.2.14
Actions #13

Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 6.2.14 to 6.2.15
Actions #14

Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 6.2.15 to 6.2.16
Actions #15

Updated by Alexis Mousset over 2 years ago

  • Target version changed from 6.2.16 to 6.2.17
Actions #16

Updated by Vincent MEMBRÉ about 2 years ago

  • Target version changed from 6.2.17 to 997
Actions #17

Updated by Vincent MEMBRÉ about 2 years ago

  • Target version changed from 997 to 6.2.18
Actions #18

Updated by Vincent MEMBRÉ about 2 years ago

  • Target version changed from 6.2.18 to 6.2.19
Actions #19

Updated by Vincent MEMBRÉ about 2 years ago

  • Target version changed from 6.2.19 to 6.2.20
Actions #20

Updated by Vincent MEMBRÉ about 2 years ago

  • Target version changed from 6.2.20 to old 6.2 issues to relocate
Actions #21

Updated by Alexis Mousset over 1 year ago

  • Target version changed from old 6.2 issues to relocate to 7.2.11
  • Regression set to No
Actions #22

Updated by Vincent MEMBRÉ about 1 year ago

  • Target version changed from 7.2.11 to 1046
Actions #23

Updated by Alexis Mousset about 1 year ago

  • Target version changed from 1046 to 7.3.8
Actions #24

Updated by Vincent MEMBRÉ about 1 year ago

  • Target version changed from 7.3.8 to 7.3.9
Actions #25

Updated by Vincent MEMBRÉ about 1 year ago

  • Target version changed from 7.3.9 to 7.3.10
Actions #26

Updated by Vincent MEMBRÉ 12 months ago

  • Target version changed from 7.3.10 to 7.3.11
Actions #27

Updated by Vincent MEMBRÉ 10 months ago

  • Target version changed from 7.3.11 to 7.3.12
Actions #28

Updated by Vincent MEMBRÉ 9 months ago

  • Target version changed from 7.3.12 to 7.3.13
Actions #29

Updated by Vincent MEMBRÉ 9 months ago

  • Target version changed from 7.3.13 to 7.3.14
Actions #30

Updated by Vincent MEMBRÉ 7 months ago

  • Target version changed from 7.3.14 to 7.3.15
Actions #31

Updated by Vincent MEMBRÉ 6 months ago

  • Target version changed from 7.3.15 to 7.3.16
Actions #32

Updated by Vincent MEMBRÉ 5 months ago

  • Target version changed from 7.3.16 to 7.3.17
Actions

Also available in: Atom PDF