can't send numbers in std.http header since requests upgrade to 2.11.0

Bug #1617762 reported by Michal Gershenzon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mistral
Fix Released
High
Renato Recio

Bug Description

In a new devstack requests 2.11.0 was installed
In version 2.10.0 of requests they accepted integers as header value and from 2.11.0 they stopped.
The info came from here: https://github.com/kennethreitz/requests/issues/3477#issuecomment-238381586

workflow works with 2.10.0, but not with 2.11.0:
---
version: '2.0'

sync_http:
  type: direct
  input:
    - metadata: abcd1234
    - num: 7

  tasks:
    send_mistral_http:
      action: std.http
      input:
        url: <% "http://requestb.in/x5477xx5?metadata=" + $.metadata %>
        headers:
          num: <% $.num %>

exception from log:
http://paste.openstack.org/show/564344/

This might affect other things too.

A workaround for devstack:
sudo pip uninstall requests
sudo pip install -I requests==2.10.0

Renato Recio (recio862)
Changed in mistral:
assignee: nobody → Renato Recio (recio862)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to mistral (master)

Fix proposed to branch: master
Review: https://review.openstack.org/365037

Changed in mistral:
status: New → In Progress
Revision history for this message
Renato Recio (recio862) wrote :

Not sure if casting is the solution here. It may be better to enforce the end user to specify string in yaml (using quotes) instead of assuming the api will handle it.

Changed in mistral:
milestone: none → newton-rc1
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to mistral (master)

Reviewed: https://review.openstack.org/365037
Committed: https://git.openstack.org/cgit/openstack/mistral/commit/?id=cbc0a9928a973345a9084b2cc05880a79b5425f0
Submitter: Jenkins
Branch: master

commit cbc0a9928a973345a9084b2cc05880a79b5425f0
Author: Renato Recio <email address hidden>
Date: Fri Sep 2 10:50:31 2016 -0500

    cast to str for allowable types

    Change-Id: Ie2680328ff352718ab266f6533e27eee532d68bb
    Closes-Bug: 1617762

Changed in mistral:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/mistral 3.0.0.0rc1

This issue was fixed in the openstack/mistral 3.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.