Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Aug 5, 2012
  1. @nexeck

    Separates the PID and log directories of daemons

    nexeck authored
    Summary: The Log and PID directory should be separable in the config file
    
    Test Plan: Start the daemons, and check if the pid and log files are stored in directories that were specified in the config file.
    
    Reviewers: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D3149
Commits on Jun 20, 2012
  1. @bobtrahan

    phd - on start command accurately detect if daemons are running befor…

    bobtrahan authored
    …e erroring out
    
    Summary: loadRunningDaemons loads daemons that may be running (have a file pid). other commands handle this appropriately so just make sure the start command knows whats up
    
    Test Plan: phd start, stop, reload all seemed to work just fine.
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Maniphest Tasks: T1284
    
    Differential Revision: https://secure.phabricator.com/D2808
Commits on May 30, 2012
  1. Depend on class autoloading

    vrana authored
    Test Plan:
    Run setup.
    /differential/
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Koolvin
    
    Maniphest Tasks: T1103
    
    Differential Revision: https://secure.phabricator.com/D2612
Commits on May 11, 2012
  1. @epriestley

    Fix "phd repository-launch-readonly"

    epriestley authored
    Summary:
      - Delete an unreachable block of code.
      - Pass "--" to terminate overseer args.
    
    Test Plan: Ran "phd repository-launch-readonly", didn't get argument errors out of the daemon.
    
    Reviewers: jungejason
    
    Reviewed By: jungejason
    
    CC: aran
    
    Differential Revision: https://secure.phabricator.com/D2456
Commits on May 9, 2012
  1. @epriestley

    Minor, instructions suggest "phd list" but really mean "phd status".

    epriestley authored
    "phd list" lists available (not running) daemons.
    
    Auditors: csilvers
  2. @epriestley

    Simplify daemon management: "phd start"

    epriestley authored
    Summary:
      - Merge CommitTask daemon into PullLocal daemon. This is another artifact of past instability (and order-dependent parsers). We still publish to the timeline, although this was the last consumer. Long term we'll probably delete timeline and move to webhooks, since everyone who has asked about this stuff has been eager to trade away the durability and ordering of the timeline for the ease of use of webhooks. There's also no reason to timeline this anymore since parsing is no longer order-dependent.
      - Add `phd start` to start all the daemons you need. Add `phd restart` to restart all the daemons you need. So cool~
      - Simplify and improve phd and Diffusion daemon documentation.
    
    Test Plan:
      - Ran `phd start`.
      - Ran `phd restart`.
      - Generated/read documentation.
      - Imported some stuff, got clean parses.
    
    Reviewers: btrahan, csilvers
    
    Reviewed By: csilvers
    
    CC: aran, jungejason, nh
    
    Differential Revision: https://secure.phabricator.com/D2433
Commits on May 8, 2012
  1. @epriestley

    Use one daemon to discover commits in all repositories, not one per r…

    epriestley authored
    …epository
    
    Summary:
    See D2418. This merges the commit discovery daemon into the same single daemon, and applies all the same rules to it.
    
    There are relatively few implementation changes, but a few things did change:
    
      - I simplified/improved Mercurial importing, by finding full branch tip hashes with "--debug branches" and using "parents --template {node}" so we don't need to do separate "--debug id" calls.
      - Added a new "--not" flag to exclude repositories, since I switched to real arg parsing anyway.
      - I removed a web UI notification that you need to restart the daemons, this is no longer true.
      - I added a web UI notification that no pull daemon is running on the machine.
    
    NOTE: @makinde, this doesn't change anything from your perspective, but it something breaks this is the likely cause.
    
    This implicitly resolves T792, because discovery no longer runs before pulling.
    
    Test Plan:
    
      - Swapped databases to a fresh install.
      - Ran "pulllocal" in debug mode. Verified it correctly does nothing (fixed a minor issue with min() on empty array).
      - Added an SVN repository. Verified it cloned and discovered correctly.
      - Added a Mercurial repository. Verified it cloned and discovered correctly.
      - Added a Git repository. Verified it cloned and discovered correctly.
      - Ran with arguments to verify behaviors: "--not MTEST --not STEST", "P --no-discovery", "P".
    
    Reviewers: btrahan, csilvers, Makinde
    
    Reviewed By: btrahan
    
    CC: aran
    
    Maniphest Tasks: T792
    
    Differential Revision: https://secure.phabricator.com/D2430
Commits on May 7, 2012
  1. @epriestley

    Run one daemon to pull all working copies, not one daemon per working…

    epriestley authored
    … copy
    
    Summary:
    Allow the pull daemon to take a list of repositories. By default, pull all repositories.
    
    Make some effort to respect pull frequencies, although we'll necessarily suffer a bit if running with only one process.
    
    NOTE: We still launch one discovery daemon per working copy, so this only cuts the daemon count in half.
    
    Test Plan:
      - Ran `phd debug pulllocal`, verified behavior.
      - Ran `pull.php P MTEST SVNTEST --trace`, verified it pulled the repos and ran the right commands.
      - Ran `phd repository-launch-master`, verified the right daemons launched, checked daemon console.
      - Ran `phd repository-launch-readonly`, verified the right daemon launched, checked daemon console.
    
    Reviewers: btrahan, csilvers, davidreuss
    
    Reviewed By: csilvers
    
    CC: aran
    
    Differential Revision: https://secure.phabricator.com/D2418
Commits on Oct 2, 2011
  1. @epriestley

    Merge __init_env__.php into __init_script__.php

    epriestley authored
    Summary: There are currently two files, but all scripts require both of them,
    which is clearly silly. In the longer term I want to rewrite all of this init
    stuff to be more structured (e.g., merge webroot/index.php and __init_script__
    better) but this reduces the surface area of the ad-hoc "include files" API we
    have now, at least.
    
    Test Plan:
      - Grepped for __init_env__.php (no hits)
      - Ran a unit test (to test unit changes)
      - Ran a daemon (to test daemon changes)
    
    Reviewers: jungejason, nh, tuomaspelkonen, aran
    
    Reviewed By: jungejason
    
    CC: aran, jungejason
    
    Differential Revision: 976
Commits on Oct 1, 2011
  1. @relrod

    Stop 'stop' from being in phd's list twice, and provide a way to kill…

    relrod authored
    … one particular PID.
    
    Summary:
    This is a pretty bad, but working implmentation of a way to kill one particular PID that
    is controlled by Phabricator. Also remove the second 'stop' from the ##phd help## list.
    
    Test Plan:
      [ricky@rhelpad01 phabricator] (phd-stop-twice)$ ./bin/phd status
      PID  	Started                 	Daemon
      30154	Oct 1 2011, 2:38:08 AM  	PhabricatorMetaMTADaemon
      30172	Oct 1 2011, 2:38:09 AM  	PhabricatorMetaMTADaemon
      30190	Oct 1 2011, 2:38:09 AM  	PhabricatorMetaMTADaemon
      30210	Oct 1 2011, 2:38:09 AM  	PhabricatorMetaMTADaemon
    
      [ricky@rhelpad01 phabricator] (phd-stop-twice)$ ./bin/phd stop 30190
      Stopping daemon 'PhabricatorMetaMTADaemon' (30190)...
      Daemon 30190 exited normally.
    
      [ricky@rhelpad01 phabricator] (phd-stop-twice)$ ./bin/phd stop 123456
      123456 is not controlled by Phabricator. Not killing.
    
      [ricky@rhelpad01 phabricator] (phd-stop-twice)$ ./bin/phd stop
      Stopping daemon 'PhabricatorMetaMTADaemon' (30154)...
      Stopping daemon 'PhabricatorMetaMTADaemon' (30172)...
      Stopping daemon 'PhabricatorMetaMTADaemon' (30210)...
      Daemon 30210 exited normally.
      Daemon 30154 exited normally.
      Daemon 30172 exited normally.
    
    Reviewers: epriestley
    
    CC:
    
    Differential Revision: 975
Commits on Sep 21, 2011
  1. @epriestley

    Add an "arcanist.projectinfo" Conduit call

    epriestley authored
    Summary:
    We currently rely on "remote_hooks_enabled" in .arcconfig to determine whether
    commands like "arc amend" and "arc merge" should imply "arc mark-committed".
    
    However, this is a historical artifact that is now bad for a bunch of reasons:
    
      - The option name is confusing, it really means 'repository is tracked'.
      - The option is hard to discover and generally sucks.
      - We can empirically determine the right answer since we now know if a project
    is in a tracked repository.
    
    Add a call which arcanist can make on these workflows to figure out if it is
    interacting with a project in a tracked repository or not.
    
    Also added an "isTracked()" convenience method to reduce the number of magic
    strings all over the place.
    
    Test Plan: Ran "arcanist.projectinfo" for nonexistent, untracked and tracked
    projects.
    
    Reviewers: Makinde, jungejason, nh, tuomaspelkonen, aran
    
    Reviewed By: Makinde
    
    CC: aran, epriestley, Makinde
    
    Differential Revision: 945
Commits on Sep 16, 2011
  1. @epriestley

    Add a Mercurial commit discovery daemon

    epriestley authored
    Summary:
    Repository import has three major steps:
    
      - Commit discovery (serial)
      - Message parsing (parallel, mostly VCS independent)
      - Change parsing (parallel, highly VCS dependent)
    
    This implements commit discovery for Mercurial, similar to git's parsing:
    
      - List the heads of all the branches.
      - If we haven't already discovered them, follow them back to their roots (or
    the first commit we have discovered).
      - Import all the newly discovered commits, oldest first.
    
    This is a little complicated but it ensures we discover commits in depth order,
    so the discovery process is robust against interruption/failure. If we just
    inserted commits as we went, we might read the tip, insert it, and then crash.
    When we ran again, we'd think we had already discovered commits older than HEAD.
    
    This also allows later stages to rely on being able to find Phabricator commit
    IDs which correspond to parent commits.
    
    NOTE: This importer is fairly slow because "hg" has a large startup time
    (compare "hg --version" to "git --version" and "svn --version"; on my machine,
    hg has 60ms of overhead for any command) and we need to run many commands (see
    the whole "hg id" mess). You can expect something like 10,000 per hour, which
    means you may need to run overnight to discover a large repository (IIRC, the
    svn/git discovery processes are both about an order of magnitude faster). We
    could improve this with batching, but I want to keep it as simple as possible
    for now.
    
    Test Plan: Discovered all the commits in the main Mercurial repository,
    http://selenic.com/repo/hg.
    
    Reviewers: Makinde, jungejason, nh, tuomaspelkonen, aran
    
    Reviewed By: Makinde
    
    CC: aran, Makinde
    
    Differential Revision: 943
Commits on Aug 17, 2011
  1. @epriestley

    Explicitly detect missing pcntl and exit with an obvious error

    epriestley authored
    Summary: We already detect this in setup but double-check just in case, see
    gmail thread.
    Test Plan: Rebuilt PHP without pcntl and tried to run phd, got an error.
    Reviewed By: aran
    Reviewers: aran, jungejason, tuomaspelkonen
    CC: aran
    Differential Revision: 819
Commits on Jun 27, 2011
  1. @epriestley

    Show logs to the console in 'phd debug'

    epriestley authored
    Summary:
    Currently we send logs to the logfile in 'phd debug', but we should send them to
    the console instead.
    
    Also fixed some %C stuff which could theoretically cause problems if a user had
    percentage symbols in their paths (heaven forbid).
    
    fratrik, this or D535 might have been involved in frustrating your efforts to
    debug the "sudo" stuff.
    
    Test Plan:
    Ran "phd debug irc derpderp" and "phd launch irc derpderp". In the former case,
    the exception appeared in the console. In the latter, it appeared in the log.
    
    Reviewed By: codeblock
    Reviewers: codeblock, jungejason, tuomaspelkonen, aran, fratrik
    CC: aran, codeblock
    Differential Revision: 536
Commits on Jun 14, 2011
  1. @epriestley
Commits on Jun 13, 2011
  1. @epriestley

    Add a "phd debug" command

    epriestley authored
    Summary:
    Make it easier to find obvious problems in daemons by letting them run
    undaemonized in the console without requiring the user to know the magical
    incantations for loading libraries, etc.
    
    Test Plan:
    Ran "phd debug nice", simulated some failures (e.g., bringing down Phabricator,
    daemon fatal) and got useful error messages.
    
    Reviewed By: jungejason
    Reviewers: toulouse, jungejason, tuomaspelkonen, aran
    CC: aran, jungejason
    Differential Revision: 448
  2. @epriestley

    Create phd PID directory if it doesn't exist, and give the user a mea…

    epriestley authored
    …ningful
    
    error message if that doesn't work
    
    Summary:
    This workflow is needlessly bad right now, make it not terrible.
    
    Also removed some related, unused code.
    
    Test Plan:
    Ran 'phd launch nice' with no directory and with a failing mkdir command.
    
    Reviewed By: toulouse
    Reviewers: hsb, toulouse, codeblock
    CC: aran, toulouse
    Differential Revision: 440
Commits on Apr 2, 2011
  1. @epriestley

    Move 'phd parse-commit' to a dedicated script; allow message parsing …

    epriestley authored
    …tasks to
    
    be executed in isolation, provide a script to requeue all message reparses,
    stop parse-commit from inserting side-effect tasks.
Commits on Mar 27, 2011
  1. @epriestley
  2. @epriestley
Commits on Mar 21, 2011
  1. @epriestley
Commits on Mar 18, 2011
  1. Use PhabricatorDaemon for sending emails.

    jungejason authored
    Summary:
    Make PhabricatorMetaMTADaemon extend PhabricatorDaemon.
    
    Test Plan:
    send mail with the new daemon.
    
    Reviewed By: epriestley
    Reviewers: epriestley
    CC: epriestley
    Differential Revision: 74
Commits on Mar 15, 2011
  1. @epriestley
  2. @epriestley

    More phd stuff.

    epriestley authored
Commits on Mar 14, 2011
  1. @epriestley

    Improve featureset for phd.

    epriestley authored
Commits on Mar 13, 2011
  1. @epriestley
Commits on Feb 14, 2011
  1. @epriestley

    Rought cut of search.

    epriestley authored
    Summary: Botched this pretty badly in git so we'll see how much I broke. :/
    
    Test Plan:
    
    Reviewers:
    
    CC:
Commits on Feb 10, 2011
  1. @epriestley

    Very basic daemon infrastructure, plus MetaMTA daemon.

    epriestley authored
    Summary: Amazon SES seems to be working well, except that it takes more than a
    second to send mail in-process. Kick it out of process. (Between this and the
    ImplementationAdapter layer, MetaMTA almost makes sense. :/)
    
    Test Plan: Ran the daemon and got a flood of unsent test email.
    
    Reviewers:
    
    CC:
Something went wrong with that request. Please try again.