Description of problem: It seems that after migrating Jackson to com.fasterxml.jackson (https://gerrit.ovirt.org/113872) then the REST API behavior for serializing JSON properties with a null value have changed. Before this upgrade, those properties with null values were ignored by default and now they are not. It seems that it impacts all rest api endpoints. E.g. comparing the response of api/users/<id>/sshpublickeys on 4.4.x (before migration to com.fasterxml.jackson): { "ssh_public_key" : [ { "content" : "ssh-rsa AAAAB3NzaC1yc2EAAA ....", "user" : { "href" : "/ovirt-engine/api/users/1cdf57d4-1179-11ec-8563-52540012eda2", "id" : "1cdf57d4-1179-11ec-8563-52540012eda2" }, "href" : "/ovirt-engine/api/users/1cdf57d4-1179-11ec-8563-52540012eda2/sshpublickeys/3b31acd9-c23a-43e8-ab4a-ad4ede686f96", "id" : "3b31acd9-c23a-43e8-ab4a-ad4ede686f96" } ] } on 4.5 (master branch) { "ssh_public_key" : [ { "content" : "ssh-rsa AAAAB3NzaC1yc2EAAAADAQA.....", "user" : { "department" : null, "domain_entry_id" : null, "email" : null, "last_name" : null, "logged_in" : null, "namespace" : null, "password" : null, "principal" : null, "user_name" : null, "user_options" : null, "domain" : null, "groups" : null, "options" : null, "permissions" : null, "roles" : null, "ssh_public_keys" : null, "tags" : null, "actions" : null, "name" : null, "description" : null, "comment" : null, "creation_status" : null, "link" : null, "href" : "/ovirt-engine/api/users/60cce70c-b2a1-11e8-a594-001a4a013f3d", "id" : "60cce70c-b2a1-11e8-a594-001a4a013f3d" }, "actions" : null, "name" : null, "description" : null, "comment" : null, "creation_status" : null, "link" : null, "href" : "/ovirt-engine/api/users/60cce70c-b2a1-11e8-a594-001a4a013f3d/sshpublickeys/876990d4-287c-43e9-81a6-cd5ec0fca88a", "id" : "876990d4-287c-43e9-81a6-cd5ec0fca88a" } ], "actions" : null, "size" : null, "total" : null, "active" : null } Actual results: - web-ui fails - fetching all those null values for properties that were fetched as undefined till now, causes web-ui to fail. -rest api responses size are now significantly larger due to adding all those null value properties and the response time is larger as well. Version-Release number of selected component (if applicable): 4.5 (master branch) How reproducible: 100%
Fixed. Current output looks like that: curl -k -H "Accept: application/json" -H "Authorization: Bearer <access_token>" 'https://workstation.dom:8443/ovirt-engine/api/users/a1119f36-75d3-11eb-a179-309c23f67dcf/sshpublickeys' { "ssh_public_key" : [ { "content" : "<SSH_KEY>", "user" : { "href" : "/ovirt-engine/api/users/a1119f36-75d3-11eb-a179-309c23f67dcf", "id" : "a1119f36-75d3-11eb-a179-309c23f67dcf" }, "href" : "/ovirt-engine/api/users/a1119f36-75d3-11eb-a179-309c23f67dcf/sshpublickeys/39105823-3331-4bb9-a9ac-cab5dced8a29", "id" : "39105823-3331-4bb9-a9ac-cab5dced8a29" } ] }%
Verified in ovirt-engine-4.5.0.4-0.1.el8ev.noarch Null properties are excluded