Jira (PDB-5104) Fix schemas that don't handle to_string function data

2 views
Skip to first unread message

Andrei Filipovici (Jira)

unread,
Apr 9, 2021, 12:43:03 PM4/9/21
to puppe...@googlegroups.com
Andrei Filipovici created an issue
 
PuppetDB / Task PDB-5104
Fix schemas that don't handle to_string function data
Issue Type: Task Task
Assignee: Unassigned
Created: 2021/04/09 9:42 AM
Labels: query-engine-improvements
Priority: Normal Normal
Reporter: Andrei Filipovici

Validation done by the row-schema for fact-contents endpoint
(https://github.com/puppetlabs/puppetdb/blob/6.x/src/puppetlabs/puppetdb/query/fact_contents.clj#L10-L24)

fails for rows on which we apply the to_string function.
We also need to make sure that there are no other schemas that might throw errors because of this.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Andrei Filipovici (Jira)

unread,
Apr 9, 2021, 12:45:04 PM4/9/21
to puppe...@googlegroups.com

Andrei Filipovici (Jira)

unread,
Apr 9, 2021, 12:46:02 PM4/9/21
to puppe...@googlegroups.com
Andrei Filipovici updated an issue
Validation done by the row-schema for fact-contents endpoint
(https://github.com/puppetlabs/puppetdb/blob/6.x/src/puppetlabs/puppetdb/query/fact_contents.clj#L10-L24)

fails for rows on which we apply the to_string function.
We also need to make sure that there are no other schemas that might throw errors because of this.

There is a disable unit test with this particular issue. It has to be enabled once this is fixed.

Andrei Filipovici (Jira)

unread,
Apr 19, 2021, 12:14:01 PM4/19/21
to puppe...@googlegroups.com

Andrei Filipovici (Jira)

unread,
Jun 7, 2021, 8:15:01 AM6/7/21
to puppe...@googlegroups.com
Andrei Filipovici updated an issue
Validation done by the row-schema for fact-contents endpoint
(https://github.com/puppetlabs/puppetdb/blob/6.x/src/puppetlabs/puppetdb/query/fact_contents.clj#L10-L24)

fails for rows on which we apply the to_string function.
We also need to make sure that there are no other schemas that might throw errors because of this.

This can be reproduced with this query:


There is a disable disabled unit test with this particular issue ticket id . It has to be enabled once this is fixed.

Andrei Filipovici (Jira)

unread,
Jun 7, 2021, 8:16:04 AM6/7/21
to puppe...@googlegroups.com
Andrei Filipovici updated an issue
Validation done by the row-schema for fact-contents endpoint
(https://github.com/puppetlabs/puppetdb/blob/6.x/src/puppetlabs/puppetdb/query/fact_contents.clj#L10-L24)

fails for rows on which we apply the to_string function.
We also need to make sure that there are no other schemas that might throw errors because of this.

This can be reproduced with this query:

{code:java}
["extract", [["function", "to_string", "value"]], ["=","name", "uptime_seconds"]]
{code}
on the facts endpoint.

*
There is a disabled unit test with this ticket id. It has to be enabled once this is fixed. *

Andrei Filipovici (Jira)

unread,
Jun 7, 2021, 8:59:02 AM6/7/21
to puppe...@googlegroups.com
Andrei Filipovici updated an issue
Validation done by the row-schema for fact-contents endpoint
(https://github.com/puppetlabs/puppetdb/blob/6.x/src/puppetlabs/puppetdb/query/fact_contents.clj#L10-L24)

fails for rows on which we apply the to_string function.
We also need to make sure that there are no other schemas that might throw errors because of this.

This can be reproduced with this query:

{code:java}
["extract", [["function", "to_string", "value"]], ["=","name", "uptime_seconds"]]
{code}
on the facts endpoint.

If you add a formatting parameter after `value`, like "9,999", the query won't fail. Not sure if that's a desired behaviour.

*There is a disabled unit test with this ticket id. It has to be enabled once this is fixed.*

Andrei Filipovici (Jira)

unread,
Jun 7, 2021, 9:15:02 AM6/7/21
to puppe...@googlegroups.com
Andrei Filipovici updated an issue
Validation done by the row-schema for fact-contents endpoint
(https://github.com/puppetlabs/puppetdb/blob/6.x/src/puppetlabs/puppetdb/query/fact_contents.clj#L10-L24)

fails for rows on which we apply the to_string function.
We also need to make sure that there are no other schemas that might throw errors because of this.

This can be reproduced with this query:

{code:java}
["extract", [["function", "to_string", "value"]], ["=","name", "uptime_seconds"]]
{code}
on the facts endpoint.

If you add a formatting parameter after `value` mask , like "9,999", the query won't fail , but no result is given . Not sure if that's Do we need a desired behaviour. default formatting mask for integers?

*There is a disabled unit test with this ticket id. It has to be enabled once this is fixed.*

Bogdan Irimie (Jira)

unread,
Jun 8, 2021, 3:11:03 AM6/8/21
to puppe...@googlegroups.com

Bogdan Irimie (Jira)

unread,
Jun 16, 2021, 3:42:01 AM6/16/21
to puppe...@googlegroups.com

Bogdan Irimie (Jira)

unread,
Jun 16, 2021, 3:42:01 AM6/16/21
to puppe...@googlegroups.com

Sebastian Miclea (Jira)

unread,
Jun 17, 2021, 4:02:02 AM6/17/21
to puppe...@googlegroups.com

Sebastian Miclea (Jira)

unread,
Jun 24, 2021, 11:27:02 AM6/24/21
to puppe...@googlegroups.com
Sebastian Miclea updated an issue
Validation done by the row-schema for fact-contents endpoint


fails for rows on which we apply the to_string function.
We also need to make sure that there are no other schemas that might throw errors because of this.

This can be reproduced with this query:

{code:java}
["extract", [["function", "to_string", "value" , "9999999" ]], ["=","name", "uptime_seconds"]]

{code}
on the facts endpoint.

If you add a formatting mask, like "9,999", the query won't fail, but no result is given. Do we need a default formatting mask for integers?


*There is a disabled unit test with this ticket id. It has to be enabled once this is fixed.*

Rob Browning (Jira)

unread,
Jul 12, 2021, 8:05:04 PM7/12/21
to puppe...@googlegroups.com
Rob Browning updated an issue
Change By: Rob Browning
Fix Version/s: PDB 6.18.0
Fix Version/s: PDB 7.5.0
Reply all
Reply to author
Forward
0 new messages