Homec4science

Ignore unreachable commits when testing if a repository has imported

Authored by epriestley <git@epriestley.com> on Jul 11 2016, 17:05.

Description

Ignore unreachable commits when testing if a repository has imported

Summary:
Fixes T11309. When checking if a repository was fully imported, we incorrectly allow unreachable, un-imported commits to prevent the repository from moving to "Imported".

This can happen if you delete branches from a repository while it is importing.

Instead, ignore unreachable commits when checking for remaining imports, and when reporting status via bin/repository importing.

Test Plan:

  • Stopped daemons.
  • Created a new repository and activated it.
  • Ran bin/repository update Rxx.
  • Deleted a branch in the repository.
  • Ran bin/repository update Rxx.
  • Ran daemons to flush queue.

Now:

  • Ran bin/repository importing. Old behavior: showed unreachable commits as importing. New behavior: does not show unreachable commits.
  • Ran bin/repository update. Old behavior: failed to move repository to "imported" status. New behavior: correctly moves repository to "imported" status.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11309

Differential Revision: https://secure.phabricator.com/D16269

Details

Committed
epriestley <git@epriestley.com>Jul 11 2016, 18:23
Pushed
aubortJan 31 2017, 17:16
Parents
rPH4068ee2a752d: Make permanent worker failures more user-friendly
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH553c335fbdf8: Ignore unreachable commits when testing if a repository has imported (authored by epriestley <git@epriestley.com>).Jul 11 2016, 18:23