Significant delay on differential.diff.search endpoint

Hi,

I have a script that attempts to query information from the differential.diff.search endpoint on Phabricator, but revisions are not showing up in requests within 40 seconds of differential creation. What is the expected delay for this endpoint to start returning revisions after creation?

Thanks!

What is the expected delay for this endpoint to start returning revisions after creation?

Just to make sure you’re doing what you think you’re doing – differential.diff.search will never return revisions: it returns diffs, not revisions. Use differential.revision.search to search revisions.

differential.diff.search will return diffs immediately after creation.

1 Like

Sorry about the terminology. That said, I am not seeing immediate results using that endpoint. I’ll try digging deeper, but I do know that eventually these calls succeed, I just don’t have more specific statistics.

I can’t reproduce this; differential.diff.search returns a diff immediately after creation:

epriestley@orbital ~/dev/phabricator $ date
Wed Feb 12 07:58:34 PST 2020
epriestley@orbital ~/dev/phabricator $ arc diff HEAD^ --only
 PUSH STAGING  Pushing changes to staging area...
# Request received by "secure001.phacility.net", forwarding to cluster host "secure001.phacility.net".
# Acquiring write lock for repository "rSTAGING"...
# Acquired write lock immediately.
# Acquiring read lock for repository "rSTAGING" on device "secure001.phacility.net"...
# Acquired read lock immediately.
# Device "secure001.phacility.net" is already a cluster leader and does not need to be synchronized.
# Ready to receive on cluster host "secure001.phacility.net".
Total 0 (delta 0), reused 0 (delta 0)
# Released cluster write lock.
To ssh://secure.phabricator.com/diffusion/STAGING/staging.git
 * [new tag]               9d1af762d5182723282f62c8fb5c1bb69b7bf96d -> phabricator/base/49973
 * [new tag]               2327578adc946eefb1864ea6ebe0522b5290d6a0 -> phabricator/diff/49973
Created a new Differential diff:
        Diff URI: https://secure.phabricator.com/differential/diff/49973/

Included changes:
  M       src/infrastructure/markup/blockrule/PhutilRemarkupTableBlockRule.php
epriestley@orbital ~/dev/phabricator $ echo '{"limit":1}' | arc call-conduit differential.diff.search
{"error":null,"errorMessage":null,"response":{"data":[{"id":49973,"type":"DIFF","phid":"PHID-DIFF-cdinehguip2ieypgyekx","fields":{"revisionPHID":null,"authorPHID":"PHID-USER-ba8aeea1b3fe2853d6bb","repositoryPHID":"PHID-REPO-9a38b7db1b795ae3e348","refs":[{"type":"branch","name":"master"},{"type":"onto","name":"master"},{"type":"base","identifier":"9d1af762d5182723282f62c8fb5c1bb69b7bf96d"}],"dateCreated":1581523116,"dateModified":1581523116,"policy":{"view":"public"}},"attachments":[]}],"maps":[],"query":{"queryKey":null},"cursor":{"limit":1,"after":"49973","before":null,"order":null}}}
epriestley@orbital ~/dev/phabricator $ date
Wed Feb 12 07:58:44 PST 2020
1 Like

I am so sorry. I’ve tracked down the issue and it was 100% on my end. Sorry for wasting your time.

If you’re curious, the issue was that the staging repo was not configured properly. It existed, but the main repo wasn’t configured to use it, so of course there were no changes in that repo. :man_facepalming:

Thank you so much for you time!

Glad you got things working! And thanks for the followup.

1 Like