API Bug when posting cluster create in Job board

Bug #1444758 reported by Davide Agnello on 2015-04-16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Davide Agnello

Bug Description

The timestamp error patch ( introduced a problem with how API Cluster Objects are built in the constructer.

before change:
setattr(self, k, kwargs.get(k, wtypes.Unset))

after change:
if kwargs.get(k) is None:
  setattr(self, k, wtypes.Unset)
  setattr(self, k, kwargs.get(k))

The reason for this change was not to show 'None' fields in cluster response bodies returned from the API. This also caused an issue when the create cluster job is posted to task flow.

Changed in cue:
importance: Undecided → Critical
assignee: nobody → Davide Agnello (dagnello)

Fix proposed to branch: master

Changed in cue:
status: New → In Progress

Submitter: Jenkins
Branch: master

commit 6c91c5abeb0937a998a0102c4bce602ca1463e25
Author: dagnello <email address hidden>
Date: Wed Apr 15 17:57:45 2015 -0700

    Fix for API job post bug

    * previous patch broke job being posted to job board backend
      from the API
    * Removing new way to omit None fields from being returned by api, this
      will have to be revised for an optimized design

    Change-Id: I2b0ef90ea9290dccc181511c63f63cae8c16d2cc
    Partial-Bug: #1444758

Submitter: Jenkins
Branch: master

commit 6c3d8521317c464ccfdecdb7858142a0dfa40b66
Author: dagnello <email address hidden>
Date: Thu Apr 16 13:42:56 2015 -0700

    Resolving Removing Empty fields from API responses

    * Returning empty fields set to Nonw for unset fields will cause
      problems on for Python-cueclient. Specifically when updated_at
      field is returned as None and Python-cueclient tries to create
      a datetime object from it.

    Change-Id: I753d80e554ec7937d89435fcef9f89138acfb48d
    closes-bug: #1444758

Changed in cue:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers