Skip to content

Commit

Permalink
bugfix: UpdateService api add version parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
zouyingjie committed Apr 19, 2021
1 parent 65031f6 commit ba60f0c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/util/jmxtool/agent_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ func (agent *AgentClient) UpdateService(newService *spec.Service, version int64)
return fmt.Errorf("convert yaml %s to json failed: %v", buff, err)
}
kvMap, err := JsonToKVMap(string(jsonBytes))
kvMap["version"] = strconv.FormatInt(version, 10)

bytes, err := json.Marshal(kvMap)
if err != nil {
return fmt.Errorf("marshal %s to json failed: %v", kvMap, err)
Expand Down

0 comments on commit ba60f0c

Please sign in to comment.