Bug #29682
Unable to update default value of a smart class parameter (Sql query error).
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1830834
Description of problem: Unable to update the default value of a smart class parameter
hammer sc-param update --id 3086 --default-value '["ntp3.csv.local iburst trust","ntp4.csv.local iburst"]'
Could not update the parameter:
PG::ProtocolViolation: ERROR: invalid message format
: SELECT "taxonomies".* FROM "taxonomies" WHERE "taxonomies"."id" IN ($1, $2, $3, $4, $5, $6, $7, $8, $9.......<Record truncated>......
....$270159, $270160, $270161, $270162, $270163, $270164) ORDER BY "taxonomies"."title" ASC
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:603:in `async_exec'
Version-Release number of selected component (if applicable): Satellite 6.6
Actual results: Fails to update default value of smart class parameter.
Expected results: Should able to update default value
Additional info:
It seems the above query fails due to SQL query constructed with large arguments(around 2.7L parameters) and it fails to execute.
Associated revisions
Refs #29682 - added test to verify audit change
Refs #29682 - refactored test case
Refs #29682 - apply distinct & reorder on taxonomies association
History
#1
Updated by Kavita Gaikwad 9 months ago
- Assignee set to Kavita Gaikwad
#2
Updated by The Foreman Bot 9 months ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/7636 added
#3
Updated by The Foreman Bot 8 months ago
- Fixed in Releases 2.2.0 added
#4
Updated by Tomer Brisker 8 months ago
- Fixed in Releases 2.1.0 added
- Fixed in Releases deleted (
2.2.0)
#5
Updated by Kavita Gaikwad 8 months ago
- Status changed from Ready For Testing to Closed
Applied in changeset f013e3ca2f4db20227fd5fd7ce0606a675de396e.
Fixes #29682 - remove duplicate elements in audit set_taxonomies