HomePhabricator

[BUILDBOT] Work around phabricator API change

Description

[BUILDBOT] Work around phabricator API change

Summary:
Phabricator used to have a bug where absolute path were used instead of
relatives, causing the diffusion.browsequery endpoint to fail:
https://secure.phabricator.com/D21519

Since the bug is fixed, the browsequery endpoint will requires a
trailing slash in the directory input (path parameter) or it will
return an empty result.

This is a bug that will probably be fixed upsteam at some point, but in
the meantime we can add this trailing slash to work around this issue,
since this should also be a valid input.

Note that searching for / (root path) throws an error, so this diff
uses an os.path.join(dir, '') call to make sure the trailing slash is
only appended to non empty directory names.

Test Plan:

pytest

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Differential Revision: https://reviews.bitcoinabc.org/D9095

Details

Provenance
FabienAuthored on Jan 28 2021, 07:35
FabienPushed on Jan 28 2021, 08:46
Reviewer
Restricted Project
Differential Revision
D9095: [BUILDBOT] Work around phabricator API change
Parents
rABCcd5131913fa9: [test] test that an invalid GETDATA doesn't prevent processing of futureā€¦
Branches
Unknown
Tags
Unknown