Page MenuHomePhabricator

Editing Diffusion URIs does not update URI index
Closed, ResolvedPublic

Description

Running 2016 w48 stable (rPcfcc3b834d / rARCe17fe43ca3 / rPHU89984ac200).

Reproduction:

  • Go to the Diffusion web UI, pick an existing repository, manage URIs
  • Add a new URI to the repository (none of the options such as visibility or I/O mode seem to affect this)

Expected steps:

  • Repository URI index is updated
  • Searching for the new URI in diffusion.repository.search returns your repository

Actual result:

  • Searching for the repository by callsign (e.g.) and requesting URI attachments shows the new URI
  • Searching for the repository by URI returns no results
  • No PhabricatorSearchWorker tasks are queued/executed as a result of the edit
  • The repository_uri table contains the new URI, but repository_uriindex does not
  • Manually calling $repo->updateURIIndex() results in the index being updated and searching succeeding

I tried to find how this should be triggered from the editor, but ran out of time before I could figure it out. Just leaving this here for now though.

Event Timeline

OK, this is interesting: having tried reproducing it on a test Phacility instance, it works as expected there. Perhaps one difference is that my local installations don't have Diffusion serving repositories itself over, e.g., SSH? These repositories do not have any URIs other than a remote Git URI which Diffusion is observing.

Does making any other edit to the repository (e.g., changing the description) correct the issue?

I'm pretty sure this this was just a straightforward fix that escaped detection for this long because any other repository edit would rebuild the index. D16972 rebuilds the index on any repository URI edit. Let us know if you're seeing issues after that. Thanks for the report!

(Workaround is to make any other edit to the repository, or run bin/search index R123 to explicitly rebuild it.)

@epriestley Thanks, that's fixed it! I'd not looked index engines at all before, so wasn't sure if I was just missing something stupid on that side.

FWIW, trying to pull from Phacility about 5 minutes ago gave me: error: RPC failed; HTTP 500 curl 22 The requested URL returned error: 500 Internal Server Error; trying again immediately after worked just fine. No interesting datapoints to add, but just a heads-up.