]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commitdiff
Show sandcastle URL in phabricator
authorIslam AbdelRahman <tec@fb.com>
Tue, 20 Dec 2016 18:54:38 +0000 (10:54 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 20 Dec 2016 19:09:12 +0000 (11:09 -0800)
Summary:
We are passing a string as diff_id which make conduit call fail

```
$ echo '{"diff_id": "20982117", "name":"click here for sandcastle tests for D20982117", "link":"https://our.intern.facebook.com/intern/sandcastle/1984718793/"}' | arc call-conduit differential.updateunitresults
{"error":"ERR-CONDUIT-CORE","errorMessage":"ERR-CONDUIT-CORE: Argument 1 passed to EntDiffPropertiesUpdateMutationBuilder::setDiffNumber() must be an instance of int, string given","response":null}
```

fix it by removing double quotes
Closes https://github.com/facebook/rocksdb/pull/1700

Differential Revision: D4350227

Pulled By: IslamAbdelRahman

fbshipit-source-id: b4504af

arcanist_util/config/RocksDBCommonHelper.php

index 00fb52f48900b7757a685baac791efa21ec95601..de40cc78c3f47d766750fec9e3d1dec660dfecc1 100644 (file)
@@ -21,7 +21,7 @@ function postURL($diffID, $url) {
   assert(is_numeric($diffID));
   assert(strlen($url) > 0);
 
-  $cmd = 'echo \'{"diff_id": "' . $diffID . '", '
+  $cmd = 'echo \'{"diff_id": ' . $diffID . ', '
          . '"name":"click here for sandcastle tests for D' . $diffID . '", '
          . '"link":"' . $url . '"}\' | '
          . 'arc call-conduit '
@@ -35,7 +35,7 @@ function buildUpdateTestStatusCmd($diffID, $test, $status) {
   assert(strlen($test) > 0);
   assert(strlen($status) > 0);
 
-  $cmd = 'echo \'{"diff_id": "' . $diffID . '", '
+  $cmd = 'echo \'{"diff_id": ' . $diffID . ', '
          . '"name":"' . $test . '", '
          . '"result":"' . $status . '"}\' | '
          . 'arc call-conduit '