Page MenuHomePhabricator

httpbb doesn't support integers in the POST's body
Closed, ResolvedPublic

Description

Hi folks!

I am testing httpbb against the ML Inference endpoint, the goal of my team is to have a set of URIs to test every time that we deploy new Docker images etc..

With the following config I get an error:

$ cat inference_staging.yaml
https://enwiki-goodfaith.revscoring-editquality-goodfaith.wikimedia.org:
  - path: /v1/models/enwiki-goodfaith:predict
    form_body:
      "rev_id": 1234567
    assert_status: 200
    assert_body_contains: probability
    method: POST

$ httpbb --host inference-staging.svc.codfw.wmnet --https_port 30443 inference_staging.yaml
1234567 is not of type 'string'

Failed validating 'type' in schema['patternProperties']['^https?://']['items']['properties']['form_body']['additionalProperties']:
    {'type': 'string'}

On instance['https://enwiki-goodfaith.revscoring-editquality-goodfaith.wikimedia.org'][0]['form_body']['rev_id']:
    1234567

IIUC the httpbb's yaml schema allows only strings in the POST's form data, but in my case I'd also need integers. Would it be possible to relax the constraint??

Related Objects

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 884285 had a related patch set uploaded (by Elukey; author: Elukey):

[operations/software/httpbb@master] parse: allow integers in form_body

https://gerrit.wikimedia.org/r/884285

Change 884285 merged by jenkins-bot:

[operations/software/httpbb@master] parse: allow integers in form_body

https://gerrit.wikimedia.org/r/884285

@elukey I closed this task since your change has already been merged and deployed.

@isarantopoulos: Hi, this task is still open. If this task is resolved, please set the task status to resolved. Thanks a lot!