Project

General

Profile

Bug #36003

Use default values for fields omitted in update request

Added by Vladimir Vinogradenko over 1 year ago. Updated 8 months ago.

Status:
Done
Priority:
No priority
Assignee:
Vladimir Vinogradenko
Category:
Middleware
Target version:
Severity:
Low
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

freenas# midclt call afp.config
{"id": 1, "guest": false, "guest_user": "nobody", "bindip": ["127.0.0.1"], "connections_limit": 50, "dbpath": "", "global_aux": "", "map_acls": "rights", "chmod_request": "preserve"}
freenas# midclt call afp.update '{}'                      
{"id": 1, "guest": false, "guest_user": "nobody", "bindip": [], "connections_limit": 50, "dbpath": "", "global_aux": "", "map_acls": "rights", "chmod_request": "preserve"}

Note `"bindip` changing to `[]`, things like this should not happen.

Risk
This is a medium/high risk task, we may introduce new bugs accidentally or if something was relying on that (wrong) behavior.

Acceptance Criteria
All `update` methods for all plugins when being called with empty `data` argument should not update anything. This should be checked with automatic tests.

Associated revisions

Revision 69f6925d (diff)
Added by Vladimir Vinogradenko over 1 year ago

Fix update methods that update fields omitted in request to default values Ticket: #36003

Revision a7648e4d (diff)
Added by Vladimir Vinogradenko over 1 year ago

Fix update methods that update fields omitted in request to default values Ticket: #36003

Revision c12f06a6 (diff)
Added by Vladimir Vinogradenko over 1 year ago

Fix update methods that update fields omitted in request to default values Ticket: #36003

History

#1 Updated by William Grzybowski over 1 year ago

  • Target version changed from Backlog to 11.3

#2 Updated by William Grzybowski over 1 year ago

  • Assignee changed from Release Council to Vladimir Vinogradenko

#3 Updated by William Grzybowski over 1 year ago

  • Status changed from Unscreened to Ready for Testing

#4 Updated by William Grzybowski over 1 year ago

  • Needs Merging changed from Yes to No

#5 Updated by Dru Lavigne about 1 year ago

  • Subject changed from Fix update methods that update fields omitted in request to default values to Use default values for fields omitted in update request
  • Needs QA changed from No to Yes

#6 Updated by Dru Lavigne 11 months ago

  • Needs Automation changed from No to Yes

#8 Updated by Dru Lavigne 11 months ago

  • Target version changed from 11.3 to 11.3-BETA1

#12 Updated by Eric Turgeon 8 months ago

  • Needs Automation changed from Yes to No

#13 Updated by Eric Turgeon 8 months ago

I have added API tests for this issue https://github.com/freenas/freenas/pull/2824

#14 Updated by Eric Turgeon 8 months ago

  • Status changed from Ready for Testing to Passed Testing
  • Needs QA changed from Yes to No

Passed the new afp API test and midclt command in FreeNAS 11.3 incremental builds.

#15 Updated by Dru Lavigne 8 months ago

  • Status changed from Passed Testing to Done
  • Target version changed from 11.3-BETA1 to 11.3-ALPHA1

Also available in: Atom PDF