Bug 1387099 - Boolean attributes are published as string
Summary: Boolean attributes are published as string
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: eventsapi
Version: 3.9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Aravinda VK
QA Contact:
URL:
Whiteboard:
Depends On: 1379328
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-20 06:12 UTC by Aravinda VK
Modified: 2016-12-06 06:00 UTC (History)
0 users

Fixed In Version: glusterfs-3.9.0
Clone Of: 1379328
Environment:
Last Closed: 2016-12-06 06:00:52 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Aravinda VK 2016-10-20 06:12:20 UTC
+++ This bug was initially created as a clone of Bug #1379328 +++

Description of problem:
Boolean attributes like "force" is published as {"force": "1"} instead of {"force": true}

--- Additional comment from Worker Ant on 2016-09-26 07:47:19 EDT ---

REVIEW: http://review.gluster.org/15574 (eventsapi: Auto convert Boolean and Int attributes) posted (#1) for review on master by Aravinda VK (avishwan)

--- Additional comment from Worker Ant on 2016-09-29 02:25:11 EDT ---

REVIEW: http://review.gluster.org/15574 (eventsapi: Auto convert Boolean and Int attributes) posted (#2) for review on master by Aravinda VK (avishwan)

--- Additional comment from Worker Ant on 2016-10-13 01:49:14 EDT ---

REVIEW: http://review.gluster.org/15574 (eventsapi: Auto convert Boolean and Int attributes) posted (#3) for review on master by Aravinda VK (avishwan)

--- Additional comment from Worker Ant on 2016-10-20 02:10:49 EDT ---

COMMIT: http://review.gluster.org/15574 committed in master by Aravinda VK (avishwan) 
------
commit a482645865af56b8d34a17430649c3c646f3d450
Author: Aravinda VK <avishwan>
Date:   Mon Sep 26 17:08:31 2016 +0530

    eventsapi: Auto convert Boolean and Int attributes
    
    Before publishing in JSON format, automatically convert the
    attribute to "bool" or "int" if configured.
    
    For example, instead of sending force="1", convert to bool and
    send as force=True
    
    {
        "event": "VOLUME_START",
        "name" : "gv1",
        "force": "1"
    }
    
    Convert to,
    
    {
        "event": "VOLUME_START",
        "name" : "gv1",
        "force": true
    }
    
    BUG: 1379328
    Change-Id: Iabc51fd61abc267a7c8dcf0aeac6b3c722d89649
    Signed-off-by: Aravinda VK <avishwan>
    Reviewed-on: http://review.gluster.org/15574
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: Prashanth Pai <ppai>
    Smoke: Gluster Build System <jenkins.org>

Comment 1 Worker Ant 2016-10-20 06:13:17 UTC
REVIEW: http://review.gluster.org/15682 (eventsapi: Auto convert Boolean and Int attributes) posted (#1) for review on release-3.9 by Aravinda VK (avishwan)

Comment 2 Worker Ant 2016-10-20 10:22:46 UTC
COMMIT: http://review.gluster.org/15682 committed in release-3.9 by Aravinda VK (avishwan) 
------
commit 9d6133cfb9f040d21de9d8d57c1478186dde9084
Author: Aravinda VK <avishwan>
Date:   Mon Sep 26 17:08:31 2016 +0530

    eventsapi: Auto convert Boolean and Int attributes
    
    Before publishing in JSON format, automatically convert the
    attribute to "bool" or "int" if configured.
    
    For example, instead of sending force="1", convert to bool and
    send as force=True
    
    {
        "event": "VOLUME_START",
        "name" : "gv1",
        "force": "1"
    }
    
    Convert to,
    
    {
        "event": "VOLUME_START",
        "name" : "gv1",
        "force": true
    }
    
    > Reviewed-on: http://review.gluster.org/15574
    > NetBSD-regression: NetBSD Build System <jenkins.org>
    > CentOS-regression: Gluster Build System <jenkins.org>
    > Reviewed-by: Prashanth Pai <ppai>
    > Smoke: Gluster Build System <jenkins.org>
    
    BUG: 1387099
    Change-Id: Iabc51fd61abc267a7c8dcf0aeac6b3c722d89649
    Signed-off-by: Aravinda VK <avishwan>
    (cherry picked from commit a482645865af56b8d34a17430649c3c646f3d450)
    Reviewed-on: http://review.gluster.org/15682
    Smoke: Gluster Build System <jenkins.org>
    Reviewed-by: Prashanth Pai <ppai>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>

Comment 3 Aravinda VK 2016-10-27 05:23:11 UTC
glusterfs-3.9.0rc2 is released[1] and packages are available for different distributions[2] to test.

[1] http://www.gluster.org/pipermail/maintainers/2016-October/001601.html
[2] http://www.gluster.org/pipermail/maintainers/2016-October/001605.html and http://www.gluster.org/pipermail/maintainers/2016-October/001606.html

Comment 4 Aravinda VK 2016-12-06 06:00:52 UTC
Gluster 3.9 GA is released http://blog.gluster.org/2016/11/announcing-gluster-3-9/


Note You need to log in before you can comment on or make changes to this bug.