Opened 8 years ago

Closed 8 years ago

#1344 closed defect (fixed)

Bindctl can't set value of optional empty value

Reported by: vorner Owned by: jelte
Priority: medium Milestone: Sprint-20111108
Component: ~bind-ctl (obsolete) Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: Core Feature Depending on Ticket:
Estimated Difficulty: 3 Add Hours to Ticket:
Total Hours: 0 Internal?: no


If there's a variable in config that has no default value and is optional (therefore it is allowed for it not to be there and by default it isn't there), it is impossible to set it. The possibility is to set the whole parent providing JSON directly, which is not convenient.

Example (expecting to be on the now unmerged #213 branch, as I'm not aware of such variable in master):

> config show Boss/components/b10-cmdctl/
Boss/components/b10-cmdctl//special	"cmdctl"	string	(modified)
Boss/components/b10-cmdctl//process	null	string	
Boss/components/b10-cmdctl//kind	"needed"	string	(modified)
Boss/components/b10-cmdctl//address	null	string	
Boss/components/b10-cmdctl//params/	list	
> config set Boss/components/b10-cmdctl/process "cat"
Error: process not found in /Boss/components/b10-cmdctl/


Change History (9)

comment:1 Changed 8 years ago by jelte

  • Add Hours to Ticket changed from 0 to 03

comment:2 Changed 8 years ago by jelte

  • Add Hours to Ticket 03 deleted
  • Estimated Difficulty changed from 0 to 3

comment:3 Changed 8 years ago by jelte

  • Milestone changed from Next-Sprint-Proposed to Sprint-20111108

comment:4 Changed 8 years ago by jelte

  • Owner set to jelte
  • Status changed from new to assigned

comment:5 Changed 8 years ago by jelte

  • Owner changed from jelte to UnAssigned
  • Status changed from assigned to reviewing

It was too strict on nonexistent data, so the check for that needed a bit more information on whether to raise an error. Most of the additions are testdata and tests

comment:6 Changed 8 years ago by stephen

  • Owner changed from UnAssigned to stephen

comment:7 Changed 8 years ago by stephen

  • Owner changed from stephen to jelte

Reviewed commit 1cdc605c50c999ffc1225bee5817aa0ae26bcc4d

Looks OK, please merge.

Does this need a ChangeLog entry?

comment:8 Changed 8 years ago by jelte

proposed changelog entry:

[bug] jelte
Fixed a bug where bindctl could not set a value that is optional and has no default, resulting in the error that the setting itself was unknown. bindctl now correctly sees the setting and is able to set it.

comment:9 Changed 8 years ago by jelte

  • Resolution set to fixed
  • Status changed from reviewing to closed

merged, closing ticket

Note: See TracTickets for help on using tickets.