1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-11 09:22:40 +01:00
Commit graph

6886 commits

Author SHA1 Message Date
Bob Trahan
ab8f7907de Herald - add support for application emails.
Summary:
Fixes T5039. The trick / possibly lame part here is we only match 1 application email and its undefined which one. e.g. if a user emails us at address x, y, and z only one of those will pick up the mail. Ergo, don't let users define non-sensical herald conditions like "matches all". Also document what I think was non-intuitive about the code with an inline comment; we have to return an array with just a phid from an object and out of context it feels very "what the...???"

Note this needs to be deployed to other applications still, but I think its okay to close T5039 aggressively here since its done from a user story perspective.

Test Plan: set up a herald rule to flag tasks created as blue via app email x. sent an email to x via `bin/mail receive-test` and verified the task had the blue flag

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T5039

Differential Revision: https://secure.phabricator.com/D11564
2015-01-29 14:15:38 -08:00
James Rhodes
82f506f175 Check to make sure credential is not null in SSH command interface
Summary: This adds a check to make sure the credential exists when loading it in the Drydock SSH interface.  This effectively turns a fatal error (calling a method on a non-object) into a catchable exception.

Test Plan: Had a badly configured resource, saw the exception appear instead of daemon fataling.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11530
2015-01-28 23:40:34 +00:00
James Rhodes
6e723c5c5a Use %B when writing to Harbormaster build logs
Summary: Fixes T7007.  Using `%B` permits non-UTF8 data to be appended to Harbormaster build logs.  Since we're not really in control of the processes Harbormaster is running remotely, and since they may output invalid UTF8 data, we should store the invalid data instead of failing the build (due to UTF8 exception).

Test Plan: @epriestley said this was the right fix, though I haven't tested it on our production system which actually exhibits the issue yet.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7007

Differential Revision: https://secure.phabricator.com/D11532
2015-01-28 23:06:20 +00:00
epriestley
8798083ad9 Proxy VCS SSH requests
Summary: Fixes T7034. Like HTTP, proxy requests to the correct host if a repository has an Almanac service host.

Test Plan: Ran VCS requests through the proxy.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7034

Differential Revision: https://secure.phabricator.com/D11543
2015-01-28 14:41:24 -08:00
Bob Trahan
fe0ca0abf2 Application Emails - add datasource so we can have a typeahead
Summary: Ref T5039. This will be necessary for Herald integration so users can make rules like "if app email is one of x, y, or z add projects foo, bar, and metallica." I think its best to do an actual typeahead here -- users select full email addresses -- rather than support prefix, suffix, etc stuff on the email address. I think the latter approach would yield lots of confusion, as well as prevent us from (more) easily providing diagnostic tools about what happened when and why.

Test Plan: hacked a maniphest tokenizer to use this new datasource and it worked

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T5039

Differential Revision: https://secure.phabricator.com/D11546
2015-01-28 14:35:42 -08:00
epriestley
6a0fb7c37f Make grammar more consistent
Summary: In Maniphest, we say "X closed <task> by committing <commit>". In Differential, we currently say "X closed <revision> by commit <commit>", which sounds nongrammatical to me.

Test Plan: grammar'd

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D11544
2015-01-28 12:52:58 -08:00
Bob Trahan
799dada3ad MetaMTA - add support for "Default Author"
Summary: Ref T5952. This adds support for a "default author" and deploys it on Maniphest.

Test Plan: used augmented (by this diff) bin/mail receive-test to test creation via an application email with a default author configured and no author specified. a task was created with the author as the default author i configured.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T5952

Differential Revision: https://secure.phabricator.com/D11446
2015-01-28 11:13:29 -08:00
epriestley
9b359affe7 Prepare SSH connections for proxying
Summary:
Ref T7034.

In a cluster environment, when a user connects with a VCS request over SSH (like `git pull`), the receiving server may need to proxy it to a server which can actually satisfy the request.

In order to proxy the request, we need to know which repository the user is interested in accessing.

Split the SSH workflow into two steps:

  # First, identify the repository.
  # Then, execute the operation.

In the future, this will allow us to put a possible "proxy the whole thing somewhere else" step in the middle, mirroring the behavior of Conduit.

This is trivially easy in `git` and `hg`. Both identify the repository on the commmand line.

This is fiendishly complex in `svn`, for the same reasons that hosting SVN was hard in the first place. Specifically:

  - The client doesn't tell us what it's after.
  - To get it to tell us, we have to send it a server capabilities string //first//.
  - We can't just start an `svnserve` process and read the repository out after a little while, because we may need to proxy the request once we figure out the repository.
  - We can't consume the client protocol frame that tells us what the client wants, because when we start the real server request it won't know what the client is after if it never receives that frame.
  - On the other hand, we must consume the second copy of the server protocol frame that would be sent to the client, or they'll get two "HELLO" messages and not know what to do.

The approach here is straightforward, but the implementation is not trivial. Roughly:

  - Start `svnserve`, read the "hello" frame from it.
  - Kill `svnserve`.
  - Send the "hello" to the client.
  - Wait for the client to send us "I want repository X".
  - Save the message it sent us in the "peekBuffer".
  - Return "this is a request for repository X", so we can proxy it.

Then, to continue the request:

  - Start the real `svnserve`.
  - Read the "hello" frame from it and throw it away.
  - Write the data in the "peekBuffer" to it, as though we'd just received it from the client.
  - State of the world is normal again, so we can continue.

Also fixed some other issues:

  - SVN could choke if `repository.default-local-path` contained extra slashes.
  - PHP might emit some complaints when executing the commit hook; silence those.

Test Plan: Pushed and pulled repositories in SVN, Mercurial and Git.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7034

Differential Revision: https://secure.phabricator.com/D11541
2015-01-28 10:18:07 -08:00
Chad Little
170dc15c05 Make border conditional in crumbs
Summary: Add a setBorder call to CrumbsView to be more deliberate when a border is drawn. Could not find any CSS hacks to set it conditionally CSS.

Test Plan: Browsed every application that called crumbs and make a design decision. Also fixed a few bad layouts.

Reviewers: btrahan, epriestley

Reviewed By: btrahan

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11533
2015-01-28 09:33:49 -08:00
Chad Little
48f15fb960 Update stock Homepage to look like Dashboards
Summary: Swaps out AphrontPanels for ObjectBoxes. I'd like to start reducing the floating object lists around the site for consistency. Also, these should provide more items above the fold.

Test Plan:
Test on my local homepage. Built a fake welcome.html too, though I think that's deprecated.

{F277020}

{F277021}

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11529
2015-01-27 15:30:11 -08:00
epriestley
5c71da8cdb Quicksand, an ignoble successor to Quickling
Summary:
Ref T2086. Ref T7014. With the persistent column, there is significant value in retaining chrome state through navigation events, because the user may have a lot of state in the chat window (scroll position, text selection, room juggling, partially entered text, etc). We can do this by capturing navigation events and faking them with Javascript.

(This can also improve performance, albeit slightly, and I believe there are better approaches to tackle performance any problems which exist with the chrome in many cases).

At Facebook, this system was "Photostream" in photos and then "Quickling" in general, and the technical cost of the system was //staggering//. I am loathe to pursue it again. However:

  - Browsers are less junky now, and we target a smaller set of browsers. A large part of the technical cost of Quickling was the high complexity of emulating nagivation events in IE, where we needed to navigate a hidden iframe to make history entries. All desktop browsers which we might want to use this system on support the History API (although this prototype does not yet implement it).
  - Javelin and Phabricator's architecture are much cleaner than Facebook's was. A large part of the technical cost of Quickling was inconsistency, inlined `onclick` handlers, and general lack of coordination and abstraction. We will have //some// of this, but "correctly written" behaviors are mostly immune to it by design, and many of Javelin's architectural decisions were influenced by desire to avoid issues we encountered building this stuff for Facebook.
  - Some of the primitives which Quickling required (like loading resources over Ajax) have existed in a stable state in our codebase for a year or more, and adoption of these primitives was trivial and uneventful (vs a huge production at Facebook).
  - My hubris is bolstered by recent success with WebSockets and JX.Scrollbar, both of which I would have assessed as infeasibly complex to develop in this project a few years ago.

To these points, the developer cost to prototype Photostream was several weeks; the developer cost to prototype this was a bit less than an hour. It is plausible to me that implementing and maintaining this system really will be hundreds of times less complex than it was at Facebook.

Test Plan:
My plan for this and D11497 is:

  - Get them in master.
  - Some secret key / relatively-hidden preference activates the column.
  - Quicksand activates //only// when the column is open.
  - We can use column + quicksand for a long period of time (i.e., over the course of Conpherence v2 development) and hammer out the long tail of issues.
  - When it derps up, you just hide the column and you're good to go.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T2086, T7014

Differential Revision: https://secure.phabricator.com/D11507
2015-01-27 14:52:09 -08:00
epriestley
d8550c114d Promote instance identity to the upstream and pass it to commit hooks
Summary:
Fixes T7019. In a cluster environment, pushes currently fail because the commit hook can't identify the instance.

For web processes, the hostname identifies the instance -- but we don't have a hostname in the hook.

For CLI processes, the environment identifies the instance -- but we don't have an environment in the hook under SVN.

Promote the instance identifier into the upstream and pack/unpack it explicitly for hooks. This is probably not useful for anyone but us, but the amount of special-purpose code we're introducing is very small.

I poked at trying to do this in a more general way, but:

  - We MUST know this BEFORE we run code, so the normal subclassing stuff is useless.
  - I couldn't come up with any other parameter which might ever be useful to pass in.

Test Plan: Used `git push` to push code through proxied HTTP, got a clean push.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7019

Differential Revision: https://secure.phabricator.com/D11495
2015-01-27 14:51:48 -08:00
epriestley
fb5e50e6cc Proxy VCS HTTP requests
Summary:
Ref T7019. When we receive a `git clone https://` (or `git push` on HTTP/S), and the repository is not local, proxy the request to the appropriate service.

This has scalability limits, but they are not more severe than the existing limits (T4369) and are about as abstracted as we can get them.

This doesn't fully work in a Phacility context because the commit hook does not know which instance it is running in, but that problem is not unique to HTTP.

Test Plan:
  - Pushed and pulled a Git repo via proxy.
  - Pulled a Git repo normally.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7019

Differential Revision: https://secure.phabricator.com/D11494
2015-01-27 14:51:09 -08:00
epriestley
ac41db402a In Diffusion, split service URI resolution from conduit client construction
Summary:
Ref T7019. Ref T7034. In both proxying cases, we want to proxy the request but can not do so over Conduit.

Split the URI resolution apart from Conduit client construction so we can just pull an SSH or HTTP/S URI out of the repository without getting an entire Conduit client.

Test Plan: Browsed around a service-hosted repository. This diff has no behavioral changes.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7034, T7019

Differential Revision: https://secure.phabricator.com/D11491
2015-01-27 14:50:38 -08:00
epriestley
7720b799e4 Add boilerplate scaffolding for Phortune subscriptions
Summary:
Ref T6881. This roughs in the major objects, support classes, and controllers.

  - Show subscriptions on account detail.
  - Browse all account subscriptions.
  - Link to active subsciptions from merchant detail.

Test Plan: Clicked around in the UI. There's no way to create subscriptions yet, so I basically just kicked the tires on this. I probably missed a few things that I'll clean up in followups.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T6881

Differential Revision: https://secure.phabricator.com/D11482
2015-01-27 14:50:20 -08:00
epriestley
5b6b2ee850 Give Maniphest a title glyph
Summary:
Ref T7055. Apparently we just never had one? I feel like I'm crazy. But I can't find any trace in the logs.

I'm actually not 100% sold on this being better because it's a color glyph on OSX and those feel a little out of place / tacky to me compared to the black-and-white ones. So I'd be fine with just leaving it off, too. Clearly not important if no one noticed it until I caught it in T7055.

Test Plan: {F276917}

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T7055

Differential Revision: https://secure.phabricator.com/D11524
2015-01-27 14:49:42 -08:00
Chad Little
32b85c065e Delete app icons
Summary: Unused at this point

Test Plan: Grep

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: hach-que, Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11506
2015-01-27 12:36:39 -08:00
Chad Little
d3d480fcf0 Give Config History a sidenav
Summary: Adds in the sidenav

Test Plan: Click on sidenav, see it persist

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11526
2015-01-27 12:26:15 -08:00
Chad Little
155b83bb6e Add FontIcons to PHUIObjectItemView
Summary: Added generic FontIcons for PHUIObjectItemView, used in Almanac Console. Simplified States.

Test Plan:
Almanac Console, UIExamples

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11527
2015-01-27 12:25:54 -08:00
Chad Little
1028afd89e Change Macro icon to file-image-o
Summary: Changes icon

Test Plan: Load up Macro, see new icon.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11509
2015-01-26 12:44:43 -08:00
Chad Little
b34f6e2fb0 Remove extra links in ProjectListItems
Summary: With the new magic controller switcher, these links are needed.

Test Plan: Look at list of Projects

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11510
2015-01-26 12:44:09 -08:00
Chad Little
64f145ef46 Redesign Crumbs
Summary: Slimmer crumbs, less complex, no sprites, less visual disruption.

Test Plan:
Test Conpherence, Objects, Application Search pages.

{F275026}

{F275027}

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11486
2015-01-26 08:27:54 -08:00
Chad Little
96edc9d2bc Roll out more FontIcons
Summary: Sidenav launcher, search typeahead results, apps launcher

Test Plan:
Used each of these items

{F275814}

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11499
2015-01-26 08:19:22 -08:00
Chad Little
b303d719ef Add back token story icon
Summary: Adds it back

Test Plan: Give token, view story

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11498
2015-01-25 15:12:54 -08:00
Chad Little
6018ef91b8 Remove 1x AppIcons, use FontIcons instead
Summary: Removes the 1x application icons, and uses the fonticons instead. Feed was only known location.

Test Plan:
feed, dashboards, grep for use

{F275636}

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: hach-que, Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11496
2015-01-25 14:14:41 -08:00
Chad Little
7140e23b50 Updates 2015-01-25 08:01:28 -08:00
Chad Little
0ab065a14b derp 2015-01-25 00:22:57 -08:00
Chad Little
5d8bb61dde Add FontIcon bridge to AppIcons
Summary: Select a similar or better FontAwesome icon to represent each application

Test Plan: Visual inspection

Reviewers: epriestley, btrahan

Subscribers: hach-que, Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11489
2015-01-24 23:43:01 -08:00
epriestley
8d087ae738 Remove 'initFromConduit' option from Diffusion
Summary:
Ref T2783. I think this served two purposes:

  - Improving performance in cases where we "know" a repository is local.
  - Preventing loops.

It is now obsolete:

  - After D11476, refs can almost always resolve on a fast path.
  - As T2783 moves forward, we can usually no longer know when a repository is local without actually looking it up -- almost everything is allowed to run anywhere.
  - The cluster behavior in D11475 now prevents loops.

Test Plan: `grep`, browsed around. This didn't really do much of anything anymore.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2783

Differential Revision: https://secure.phabricator.com/D11477
2015-01-23 13:31:45 -08:00
epriestley
d98eb2c8b8 Provide a fast path for resolving repository refs
Summary:
Ref T2783. With service-oriented calls, we take a larger performacne hit than necessary resolving refs.

Instead of resolving refs over the wire, try to resolve them from the database first. This can resolve almost all refs (commit hashes, branch and tag names).

This can't resolve weird refs like `master~50`, and obviously can't resolve invalid refs. In those cases we'll go back to the old logic, call `diffusion.resolverefs`, and end up with the right result.

Test Plan:
  - Browsed repositories in Diffusion.
  - Verified that service repositories no longer make unnecessary `diffusion.resolverefs` calls for common refs (branch names, commit hashes).
  - Resolved refs like `master~50`, saw call to underlying VCS and correct result.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2783

Differential Revision: https://secure.phabricator.com/D11476
2015-01-23 13:31:17 -08:00
epriestley
d94d1da610 Proxy Diffusion Conduit API calls
Summary:
Fixes T7020. When an external user makes a Conduit request to Diffusion but the repository isn't hosted locally, we need to proxy it.

This also adds a guard layer to prevent requests from getting infinitely proxied inside the cluster.

In "trivial" configurations (where the repository is a service repository, but the service is on the local device) I'm making us always proxy anyway. This basically makes it reasonable to test this stuff (otherwise you'd have to set up two different installs) and this configuration doesn't make much sense in real life (if you're using multiple machines, making one a dedicating daemons+repo box is almost certainly the most reasonable configuration, even for a cluster size of 2).

Test Plan:
  - With a service-hosted repository, made Diffusion conduit calls and browsed the UI. Verified requests got proxied once, then resovled.
  - With a non-service repository, made Diffusion conduit calls and browsed UI. Verified requests were handled in-process immediately.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7020

Differential Revision: https://secure.phabricator.com/D11475
2015-01-23 13:30:52 -08:00
epriestley
7c2474bef7 Move Conduit client construction logic into Repository
Summary: Ref T7020. I need this elsewhere, and it's relatively internal anyway.

Test Plan: Browsed around my local, cluster-configured install and saw everything working fine.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7020

Differential Revision: https://secure.phabricator.com/D11474
2015-01-23 13:30:00 -08:00
Chad Little
45ae9cf340 Move PhabricatorCrumbs to PHUICrumbs
Summary: Ref T7014, laying the groundwork for redesigning crumbs.

Test Plan: Tested numberous pages, grep'd locations.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7014

Differential Revision: https://secure.phabricator.com/D11478
2015-01-23 11:35:09 -08:00
Bob Trahan
a03d16907c Audit - fix issue "showing older" on some commits
Summary: Fixes T7021. When I moved around all the timeline stuff I guess I didn't find this "corner" case, which is wildly common in the post-commit review workflow that we don't use.

Test Plan: pre-patch I could reproduce the issue and post patch I could not. The reproduction case is to have a commit with inline comments and then enough subsequent comments to have a "show older" UI. clicking "show older" now works!

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7021

Differential Revision: https://secure.phabricator.com/D11479
2015-01-23 11:32:38 -08:00
epriestley
30eea5e936 Resolve an issue with Diffusion URI parsing ignoring some information
Summary: Fixes T7011. Recent refactoring here caused us to begin ignoring URI parameters like `commit`. Most controllers take parameters as a `dblob`, which was still parsed properly.

Test Plan:
  - Editing different commits actually edits the desired commits.
  - Browsed around some `dblob` pages and verified they still work properly.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T7011

Differential Revision: https://secure.phabricator.com/D11473
2015-01-23 08:36:27 -08:00
epriestley
adf209e655 When registering a device, write a device ID
Summary:
Ref T5833. In some cases, we need to know if an Almanac device is the localhost or not, so we can either handle or forward the request.

To accomplish this, write a device ID when running `bin/almanac register`.

Using `--allow-key-reuse` and `--identify-as`, multiple devices are permitted to //authenticate// as one device but //identify// as different devices. In the Phacility cluster, this allows all the `repoXXX` machines to have one keypair (making key management much easier) but still work as separate devices. This is an advanced feature; normal installs with 1-3 hosts would just generate a key + device per host and identify/authenticate as the same device.

Test Plan: Ran commands with lots of flags like `PHACILITY_INSTANCE=local sudo -E ./bin/almanac register --device daemon.phacility.net --private-key ~/dev/core/conf/keys/daemon.key --force --allow-key-reuse --identify-as local001.phacility.net`. Got a good result from `AlmanacKeys::getDeviceID()` afterward.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5833

Differential Revision: https://secure.phabricator.com/D11452
2015-01-22 16:06:04 -08:00
Joshua Spence
7bd2994c2e Improve atomizing of PHP @return annotation
Summary: Fixes T6890. This doesn't feel like a perfect solution, but I can't think of any cases in which this will produce the wrong result either.

Test Plan: Ran `./bin/diviner generate` and checked the generated documentation for `PhabricatorCommonPasswords::loadWordlist()`. The return type was corrected shown as `map<string, bool>`.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6890

Differential Revision: https://secure.phabricator.com/D11469
2015-01-23 07:18:11 +11:00
Joshua Spence
25ee2d4508 Rename DifferentialHunk subclasses for consistency
Summary: Ref T5655.

Test Plan: `arc lint`

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T5655

Differential Revision: https://secure.phabricator.com/D11470
2015-01-23 07:17:04 +11:00
Joshua Spence
fff0481184 Add method description to conduit.query
Summary: As suggested in T6950, add the method description to the response from `conduit.query`.

Test Plan: Called `echo '{}' | arc call-conduit conduit.query` and verified that the response contained the method description.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11467
2015-01-23 07:16:26 +11:00
Joshua Spence
1258ed348b Add return type to conduit.query
Summary: Fixes T6950. Adds the return type of Conduit API methods to the `conduit.query` call.

Test Plan: Called `echo '{}' | arc call-conduit conduit.query` and verified that the return types were present in the response.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T6950

Differential Revision: https://secure.phabricator.com/D11466
2015-01-23 07:16:15 +11:00
Joshua Spence
c429e4a222 Don't create mentions for dependent diffs
Summary:
Fixes T6858. We shouldn't create mentions for dependent diffs.

NOTE: This won't fix the issue for existing revisions (which have the mentions edge), but I think that this is harmless.

Test Plan: Added `Depends on Dxxx` to a differential summary. Saw a `josh added a dependent revision` transaction, but no explicit mention.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6858

Differential Revision: https://secure.phabricator.com/D11460
2015-01-23 07:12:05 +11:00
epriestley
20dbdd7c28 Fix validation of network names in Almanac
Summary: Ref T5833. This was using the wrong constant, so we weren't validating property.

Test Plan: Tried to create a nameless network and correctly got an error.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5833

Differential Revision: https://secure.phabricator.com/D11447
2015-01-20 14:14:30 -08:00
Bob Trahan
847ff549ce Differential - return a better response for validation error cases
Summary: Fixes T6989. Basically return a nice dialogue like we do for "NoEffect" transactions. This is a little prettier than the other dialogue was. Also, stop adding TYPE_EDGE as a transaction type as we end up having it 2x, which then makes the error get validated 2x.

Test Plan: tried to add myself as a reviewer and got a nice error message.

Reviewers: chad, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6989

Differential Revision: https://secure.phabricator.com/D11448
2015-01-20 13:59:17 -08:00
epriestley
77bcbed9f9 Implement PolicyAwareQuery for triggers
Summary:
Ref T6881. I tried to cheat here by not implementing this, but we need it for destroying triggers directly with `bin/remove destroy`, since that needs to load them by PHID.

So, cheat slightly less. Implement PolicyAware but not CursorPagedPolicyAware.

Test Plan:
  - Used `bin/remove destroy` to destroy a trigger by PHID.
  - Browsed daemon console.
  - Ran trigger daemon.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T6881

Differential Revision: https://secure.phabricator.com/D11445
2015-01-20 13:32:43 -08:00
Bob Trahan
53b06408f4 MetaMTA - add (basic) application emails and deploy to Maniphest
Summary: Ref T5952, T3404. This lays the basic plumbing for how this will work, all the way to deploying on Maniphest. Aside from what is mentioned on T5952, I think page(s) on editing application emails could use a little more helpful text about what's going on, similar to how the config page that's getting deprecated works.

Test Plan: ran migration and noted my create email address migrated successfully. used bin/mail to make a task. added another email and used bin/mail to make a task. deleted an email. edited an email. invoked various error states and they all looked good.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T3404, T5952

Differential Revision: https://secure.phabricator.com/D11418
2015-01-19 16:07:26 -08:00
Chad Little
00faa2b2f7 Fix mobile action menus in Phriction
Summary: Fixes T6963. Long term will likely make this more like other document views, but not worth the time right now since this is only location.

Test Plan: Review Phriction document at desktop and mobile breakpoints. Click menu and see menu.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6963

Differential Revision: https://secure.phabricator.com/D11420
2015-01-19 12:42:05 -08:00
Joshua Spence
94730a1a43 Minor tidying of some Aphlict code
Summary: Self-explanatory.

Test Plan: Eyeball it.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11424
2015-01-20 06:37:15 +11:00
Chad Little
3bc54c2041 Project revamp part 2: Edit
Summary:
Taking a pass at revamping the edit pages in Projects. Specifically:

 - Remove EditMainController
 - Move actions from EditMain to Profile
 - Move properties from EditMain to Profile
 - Move timeline from EditMain to Profile
 - Move Open Tasks from Profile to sidenavicon
 - Add custom icons and colors to timeline

Feel free to bang on this a bit and give feedback, feels generally correct to me.

Test Plan: Edit everything I could on various projects. Check links, timelines, actions.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11421
2015-01-19 10:14:27 -08:00
epriestley
19be32656f Implement clock/trigger infrastructure for scheduling actions
Summary:
Ref T6881. Hopefully, this is the hard part.

This adds a new daemon (the "trigger" daemon) which processes triggers, schedules them, and then executes them at the scheduled time. The design is a little complicated, but has these goals:

  - High resistance to race conditions: only the application writes to the trigger table; only the daemon writes to the event table. We won't lose events if someone saves a meeting at the same time as we're sending a reminder out for it.
  - Execution guarantees: scheduled events are guaranteed to execute exactly once.
  - Support for arbitrarily large queues: the daemon will make progress even if there are millions of triggers in queue. The cost to update the queue is proportional to the number of changes in it; the cost to process the queue is proportional to the number of events to execute.
  - Relatively good observability: you can monitor the state of the trigger queue reasonably well from the web UI.
  - Modular Infrastructure: this is a very low-level construct that Calendar, Phortune, etc., should be able to build on top of.

It doesn't have this stuff yet:

  - Not very robust to bad actions: a misbehaving trigger can stop the queue fairly easily. This is OK for now since we aren't planning to make it part of any other applications for a while. We do still get execute-exaclty-once, but it might not happen for a long time (until someone goes and fixes the queue), when we could theoretically continue executing other events.
  - Doesn't start automatically: normal users don't need to run this thing yet so I'm not starting it by default.
  - Not super well tested: I've vetted the basics but haven't run real workloads through this yet.
  - No sophisticated tooling: I added some basic stuff but it's missing some pieces we'll have to build sooner or later, e.g. `bin/trigger cancel` or whatever.
  - Intentionally not realtime: This design puts execution guarantees far above realtime concerns, and will not give you precise event execution at 1-second resolution. I think this is the correct goal to pursue architecturally, and certainly correct for subscriptions and meeting reminders. Events which execute after they have become irrelevant can simply decline to do anything (like a meeting reminder which executes after the meeting is over).

In general, the expectation for applications is:

  - When creating an object (like a calendar event) that needs to trigger a scheduled action, write a trigger (and save the PHID if you plan to update it later).
  - The daemon will process the event and schedule the action efficiently, in a race-free way.
  - If you want to move the action, update the trigger and the daemon will take care of it.
  - Your action will eventually dump a task into the task queue, and the task daemons will actually perform it.

Test Plan:
Using a test script like this:

```
<?php

require_once 'scripts/__init_script__.php';

$trigger = id(new PhabricatorWorkerTrigger())
  ->setAction(
    new PhabricatorLogTriggerAction(
      array(
        'message' => 'test',
      )))
  ->setClock(
    new PhabricatorMetronomicTriggerClock(
      array(
        'period' => 33,
      )))
  ->save();

var_dump($trigger);
```

...I queued triggers and ran the daemon:

  - Verified triggers fire;
  - verified triggers reschedule;
  - verified trigger events show up in the web UI;
  - tried different periods;
  - added some triggers while the daemon was running;
  - examined `phd debug` output for anything suspicious.

It seems to work in trivial use case, at least.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T6881

Differential Revision: https://secure.phabricator.com/D11419
2015-01-16 12:13:31 -08:00
Joshua Spence
daadf95537 Fix visibility of PhutilArgumentWorkflow::didConstruct methods
Summary: Ref T6822.

Test Plan: `grep`. This method is only called from within `PhutilArgumentWorkflow::__construct`.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T6822

Differential Revision: https://secure.phabricator.com/D11415
2015-01-16 07:42:07 +11:00
Joshua Spence
c2ac63e9ad Increase visibility of PhabricatorController::buildApplicationMenu methods
Summary: Ref T6822. This method needs to be `public` because it is called from `PhabricatorApplicationSearchController::buildApplicationMenu()`.

Test Plan: I wouldn't expect //increasing// method visibility to break anything.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6822

Differential Revision: https://secure.phabricator.com/D11416
2015-01-16 07:41:26 +11:00
Joshua Spence
62dfcd1e55 Fix the visibility of PhutilDaemon::run methods
Summary: Ref T6822. This method is only called from `PhutilDaemon::execute()` and can be made `protected`.

Test Plan: See D11404.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6822

Differential Revision: https://secure.phabricator.com/D11405
2015-01-16 06:59:29 +11:00
Joshua Spence
94b96ae533 Fix visibility of the PhabricatorWorker::doWork() methods
Summary: Ref T6822. This method is only called from within the `PhabricatorWorker::executeTask()` and `PhabricatorWorker::scheduleTask()` methods.

Test Plan: `grep`ped for `->doWork`.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6822

Differential Revision: https://secure.phabricator.com/D11406
2015-01-16 06:58:50 +11:00
Joshua Spence
a76b161c7f Fix visibility of ConduitAPIMethod::execute methods
Summary: Ref T6822. These methods should be `protected`.

Test Plan: `grep`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T6822

Differential Revision: https://secure.phabricator.com/D11407
2015-01-16 06:58:31 +11:00
Joshua Spence
378d4380d3 Fix visibility of the LiskDAO::willWriteData method
Summary: Ref T6822.

Test Plan: `grep`. This method is only called from `LiskDAO::update()`.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T6822

Differential Revision: https://secure.phabricator.com/D11409
2015-01-16 06:56:52 +11:00
Joshua Spence
6ff5eed206 Fix visibility of DiffusionLowLevelQuery::executeQuery() methods
Summary: Ref T6822.

Test Plan: `grep`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T6822

Differential Revision: https://secure.phabricator.com/D11411
2015-01-16 06:56:33 +11:00
Joshua Spence
487eb4e916 Don't try to create the Aphlict log directory if it already exists
Summary: Ref T6944. This was not quite implemented correctly in D11387.

Test Plan: Saw no more exceptions about being unable to create `/var/log`.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: maxhodak, Korvin, epriestley

Maniphest Tasks: T6944

Differential Revision: https://secure.phabricator.com/D11397
2015-01-15 18:00:19 +11:00
Bob Trahan
1cc81b1d0a OAuthServer - hide client secret behind a "View Secret" action
Summary: ...also adds policies on who can view and who can edit an action. Fixes T6949.

Test Plan: viewed a secret through the new UI and it worked

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6949

Differential Revision: https://secure.phabricator.com/D11401
2015-01-14 17:27:45 -08:00
Bob Trahan
57761ce220 Differential - re-jigger mail such that inline comments show up right after the main comments.
Summary: Ref T6962. Mainly accomplished by re-factoring the base editor `buildMailBody` function and then using it differently in the `DifferentialTransactionEditor`.

Test Plan: commented on a revision leaving inline feedback. inspected via bin/mail and it looked good! also made a maniphest comment and checked that email, which still looked good.

Reviewers: chad, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6962

Differential Revision: https://secure.phabricator.com/D11402
2015-01-14 17:23:18 -08:00
Bob Trahan
923096efc8 Config - add phd.variant-config to suppress "Daemon & Web config" error message on a per key basis
Summary: Fixes T6959.

Test Plan: When I was ready to test the feature, the "Daemon & Web config" error already showed up, from having added phd.variant-config. I went meta and changed the value of phd.variant-config to have phd.variant-config. The config error disappeared. I then changed the conpherence setting about conpherence email prefix and the error showed up again. Removing the conpherence config setting made the error disappear once more.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6959

Differential Revision: https://secure.phabricator.com/D11399
2015-01-14 13:46:31 -08:00
Joshua Spence
1f09e05c68 Automatically create the Aphlict log directory
Summary: Fixes T6944. Attempt to automatically create the log directory for the Aphlict server. If the directory can't be created, throw a helpful exception.

Test Plan:
# Set `notification.log` to `/var/log/aphlict/aphlict.log`.
# Ran `./bin/aphlict debug` and saw an exception (because the user doesn't have permissions to create the `/var/log/aphlict` directory).
# Ran `sudo chmod 777 /var/log`.
# Ran `./bin/aphlict debug` and saw the `/var/log/aphlict` directory created.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T6944

Differential Revision: https://secure.phabricator.com/D11387
2015-01-15 06:54:55 +11:00
Chad Little
b711407b17 Remove wiki move explanation in projects
Summary: I assume we've shown this long enough, plus with redesign it's a good time to remove.

Test Plan: reload page, no link

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11394
2015-01-14 11:24:36 -08:00
Chad Little
c44858f11b Add back edit project link on profile page
Summary: We still seem to reach for this, though may be time to remove Wiki?

Test Plan: view link

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11393
2015-01-14 11:17:22 -08:00
epriestley
bdfbad092b Fix an issue with Auth edit 404ing
Summary: Fixes T6971. This parameter got updated slightly wrong.

Test Plan: Edited an auth provider.

Reviewers: chad, btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T6971

Differential Revision: https://secure.phabricator.com/D11392
2015-01-14 11:04:22 -08:00
Chad Little
498ce937e7 Check if user can create project before showing shortcut
Summary: In Maniphest, we provide an additional caption shortcut if you can create projects, which has no use if you cant. Fixes T6969

Test Plan: Check page with and without a user's capability.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6969

Differential Revision: https://secure.phabricator.com/D11390
2015-01-14 10:23:11 -08:00
epriestley
39406bd1f3 Fix access to undeclared variable when trying to create invalid Auth provider
Summary: Ref T6971. This fixes the error the user reported. Not sure what's up with the root cause of their issue.

Test Plan: Went to `/auth/config/new/asdfqwer/` and got a 404 instead of an exception.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T6971

Differential Revision: https://secure.phabricator.com/D11388
2015-01-14 06:55:18 -08:00
Bob Trahan
4655b7e4da OAuthServer - implement destructible interface on oauth server client objects
Summary: Fixes T6955.

Test Plan: made an oauth app. made a test authorization. ran bin/remove destroy <phid of oauth client> and there were no errors. verified oauth app and test authorization were both gone.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6955

Differential Revision: https://secure.phabricator.com/D11378
2015-01-13 16:17:38 -08:00
Bob Trahan
38d216f0f1 Policy - add destructible interface
Summary: Fixes T6957. If / when a policy object is destroyed, access to an object that uses that policy object is denied.

Test Plan: looked around in the code to fail confident enough to write the summary above

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6957

Differential Revision: https://secure.phabricator.com/D11380
2015-01-13 16:15:52 -08:00
epriestley
ad9af106ee Check policy.locked slightly sooner in PhabricatorApplication
Summary: We could still miss this if the policy had never been customized and we returned early after one of the other checks.

Test Plan:
Works great on instances now.

{F267067}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D11374
2015-01-13 12:39:58 -08:00
Joshua Spence
ca80688733 Fix a filename
Summary: Third time lucky... the filename should match the class name now.

Test Plan: `arc lint`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11362
2015-01-14 07:04:36 +11:00
Joshua Spence
346d970707 Fix visibility for DifferentialManiphestTasksField::readValueFromRevision
Summary: Ref T6822.

Test Plan: `grep` for `->readValueFromRevision(`.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6822

Differential Revision: https://secure.phabricator.com/D11364
2015-01-14 07:04:36 +11:00
Joshua Spence
36b760cd8a Fix method visiblity for PhabricatorFileTestCase::getPhabricatorTestCaseConfiguration
Summary: Ref T6822.

Test Plan: `grep` for `->getPhabricatorTestCaseConfiguration(`.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6822

Differential Revision: https://secure.phabricator.com/D11366
2015-01-14 07:04:36 +11:00
Bob Trahan
32edb7e2bb Followup from D11358#106424 and make policy.locked fully work
Summary: Fast commit. Also forgot to make the config override the existing policy. I *think* this is the right spot and we're good? Ref T6947.

Test Plan: viewed the application settings page for people application and saw the correct overrode setting.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6947

Differential Revision: https://secure.phabricator.com/D11373
2015-01-13 12:03:11 -08:00
Joshua Spence
463d094f96 Fix method visibility for PhabricatorPolicyAwareQuery subclasses
Summary: Ref T6822.

Test Plan:
`grep` for the following:

  - `->willFilterPage(`
  - `->loadPage(`
  - `->didFilterPage(`
  - `->getReversePaging(`
  - `->didFilterPage(`
  - `->willExecute(`
  - `->nextPage(`

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: hach-que, Korvin, epriestley

Maniphest Tasks: T6822

Differential Revision: https://secure.phabricator.com/D11367
2015-01-14 07:01:16 +11:00
epriestley
20e9cfac67 Add a "ClusterDatabase" Almanac service type
Summary: Ref T5833. This doesn't do anything yet, but will allow new instances to automaticaly bind to an open database without anything too hacky.

Test Plan:
Created a service of this type.

{F267059}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5833

Differential Revision: https://secure.phabricator.com/D11372
2015-01-13 11:59:23 -08:00
Joshua Spence
8434143795 Fix AphrontTagView visibility
Summary: Ref T6822.

Test Plan: `grep`

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6822

Differential Revision: https://secure.phabricator.com/D11368
2015-01-14 06:54:39 +11:00
Joshua Spence
d6b882a804 Fix visiblity of LiskDAO::getConfiguration()
Summary: Ref T6822.

Test Plan: `grep`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: hach-que, Korvin, epriestley

Maniphest Tasks: T6822

Differential Revision: https://secure.phabricator.com/D11370
2015-01-14 06:54:13 +11:00
Bob Trahan
8cfc37f8fc Config - add an option to lock policy settings
Summary: Fixes T6947

Test Plan:
locked people.create.user and noted the UI only showed a link to the existing policy with no way to edit it.

tried to set the config to all the various bad things and saw helpful error messages telling me what I did wrong.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6947

Differential Revision: https://secure.phabricator.com/D11358
2015-01-13 11:46:29 -08:00
Chad Little
7e78a3f906 Make Workboard icon grey if not enabled
Summary: Not sure this is obvious enough, but maybe future apps will use as well?

Test Plan: test a project with and without a workboard

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11371
2015-01-13 09:53:24 -08:00
Bob Trahan
e85dfcbeee People - add application policy on user creation
Summary: Ref T6947.

Test Plan: made the setting say only admin user a and noted admin user b lost access

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T4137, T6947

Differential Revision: https://secure.phabricator.com/D11357
2015-01-12 15:18:16 -08:00
Chad Little
f3db0891c7 Remove project icon in a few places
Summary: Reduces visual duplication in a few places.

Test Plan: Review pages in sandbox, see image removed.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11354
2015-01-12 14:48:29 -08:00
Bob Trahan
46913f651e Auth - add "manage providers" capability
Summary: Ref T6947.

Test Plan: toggled setting in application settings and changes stuck. set policy to admin user a only and could not add a provider as a admin user b.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6947

Differential Revision: https://secure.phabricator.com/D11356
2015-01-12 14:37:58 -08:00
lkassianik
98ec225c9c T6895, Comment edit history should not provide action dropdown for transactions.
Summary: Fixes T6895, When viewing comment edit history, user should not see a dropdown for each comment edit transaction.

Test Plan: Edit task comment, view comment edit history, comment transactions should not provide a dropdown with action items.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6895

Differential Revision: https://secure.phabricator.com/D11355
2015-01-12 14:14:37 -08:00
lkassianik
fa47c26907 T6917, PhabricatorApplicationTransactionNoEffectException when saving "blocking tasks" without changing them
Summary: Fixes T6917, swallow exception when saving blocking tasks with no changes

Test Plan: Open task, "Edit Blocking Tasks", save without changing, dialog should close with no exception

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6917

Differential Revision: https://secure.phabricator.com/D11353
2015-01-12 13:47:15 -08:00
Bob Trahan
1eb8b6a1b8 Maniphest - allow for searching for tasks based on dependency relationships
Summary:
Fixes T5352. This is very useful for finding things that should be easy to do ("not blocked") as well as things that are important to do ("blocking"). I have wanted to check out the latter case in our installation, though no promises on what I would end up actually doing from that search result list. =D

I also think supporting something like T6638 is reasonable but the UI seems trickier to me; its some sort of task tokenizer, which I don't think we've done before?

Test Plan: toggled various search options and got reasonable results. When i clicked conflicting things like "blocking" and "not blocking" verified it was like I had not clicked anything at all.

Reviewers: chad, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T5352

Differential Revision: https://secure.phabricator.com/D11306
2015-01-12 13:42:37 -08:00
Chad Little
25167776dc Better text when project home has no tasks
Summary: Adds more user friendly copy to the result list

Test Plan: Test on a project with and without tasks.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11352
2015-01-12 13:39:08 -08:00
Joshua Spence
3d9dd45635 Allow Aphlict client port to be overridden
Summary: In my use case, I have `notification.client-uri` set to `https://phabricator.example.com/ws/` (which routes to `nginx`) but I need `aphlict` to listen to port `22280`.

Test Plan: Tested in our install.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11337
2015-01-13 06:38:39 +11:00
Chad Little
953f281dc0 Revamp Projects with new navigation
Summary:
A refresh of Projects including a new navigations UI.

 - New Navigation UI.
 - Auto switch default page if Workboard has been initialized
 - Move Feed to it's own page
 - Increase 'tasks' on Project Home to 50 over 10
 - Fix various display bugs on Workboards
 - Remove 'crumbs' from Project portal (unneeded).

Test Plan:
- clicked a link for a project with no workboard and saw the profile
- clicked a link for a project with a workboard and saw the workboard
- navigated around the various edit pages, inspecting links and making sure things linked back to the new profile uri

{F266460}

{F266461}

{F266462}

{F266463}

{F266464}

Reviewers: epriestley, btrahan

Reviewed By: epriestley, btrahan

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11272
2015-01-12 10:04:01 -08:00
Aviv Eyal
1f6c91a7ba Remove lingering setForceLocal() call
Summary: leftovers from D10959, I guess

Test Plan: git grep setForceLocal

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11349
2015-01-12 09:48:41 -08:00
Bob Trahan
2d904dfddf Diffusion - missed a "dont load diffusion request" in the code serving pathway
Summary: Fixes T6939.

Test Plan: From the task, visited a URI like http://code.example.com/diffusion/REPO/repo.git/info/refs?service=git-upload-pack. Before the patch, I got an error and post patch I get a nice login prompt to provide credentials to the repository, as expected based on my confguration

Reviewers: chad, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6939

Differential Revision: https://secure.phabricator.com/D11348
2015-01-12 08:50:50 -08:00
epriestley
0d070c91dc Fix Aphlict logging
Summary:
Yeahhhhhhhh....

  - Open a "stream", not a "steam".
  - Make error easier for users to understand.
  - Write to the log in debug mode so the issue is more apparent.

Test Plan:
  - Started server with bad permissions, got usable error message.
  - Started server with good permissions, got logfile.

Reviewers: joshuaspence, btrahan

Reviewed By: btrahan

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11339
2015-01-12 08:16:08 -08:00
Chad Little
790d250967 Move ActionList mobile links to better location
Summary: Ref T5752, moves mobile action menus to the object box instead of crumbs.

Test Plan: View action menus at tablet, desktop, and mobile break points. Verify clicking buttons works as expected opening menu.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T5752

Differential Revision: https://secure.phabricator.com/D11340
2015-01-12 07:24:35 -08:00
epriestley
2189b6df6d Fix slowvote exception when viewing description diff
Summary: Fixes T6937. We weren't passing required parameters.

Test Plan: Followed repro steps in task.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T6937

Differential Revision: https://secure.phabricator.com/D11346
2015-01-12 07:20:20 -08:00
epriestley
5b3b9b7182 Fix some CC handling in Maniphest
Summary:
Fixes T6932. Fixes some issues from D11303.

  - When claiming a task, if it was previously unassigned, we would try to CC `null`.
  - When claiming a task, if the current owner was already CC'd, the viewer would incorrectly be warned about all subscribers being CC'd.

Test Plan:
  - Claimed an unclaimed task.
  - Claimed a task with owner CC'd.

Reviewers: btrahan, joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Maniphest Tasks: T6932

Differential Revision: https://secure.phabricator.com/D11336
2015-01-11 17:57:20 -08:00
Joshua Spence
698b7f9ea3 Explicitly declare method/property visibility
Summary: Self-explanatory.

Test Plan: `arc lint`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: hach-que, Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11278
2015-01-12 08:18:13 +11:00
lkassianik
9853ff2cff T6856 Make Project Images that match Typeahead choices
Summary: Ref T6856, Make matching Project picture to Project icon easy.

Test Plan: Edit Project, edit Project picture, click "Use Project Icon", Project picture should now match Project icon.

Reviewers: chad, #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: btrahan, Korvin, epriestley

Maniphest Tasks: T6856

Differential Revision: https://secure.phabricator.com/D11300
2015-01-11 09:40:53 -08:00
Joshua Spence
9b21274138 Allow PhabricatorRepositoryCommitHeraldWorker to continue on certain types of exceptions
Summary: Fixes T6922. We should allow the commit pipeline to continue on certain types of exceptions, including `PhabricatorApplicationTransactionNoEffectException`.

Test Plan:
**Before**
```lang=bash
> ./bin/repository reparse --herald rP2660b944bed4e4dde3e66303656b1d96d8b03e9b
[2015-01-10 09:38:06] EXCEPTION: (PhabricatorApplicationTransactionNoEffectException) Transactions have no effect:
  - Edges already exist; transaction has no effect. at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:1635]
  #0 PhabricatorApplicationTransactionEditor::filterTransactions(PhabricatorRepositoryCommit, array) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:649]
  #1 PhabricatorApplicationTransactionEditor::applyTransactions(PhabricatorRepositoryCommit, array) called at [<phabricator>/src/applications/repository/worker/PhabricatorRepositoryCommitHeraldWorker.php:91]
  #2 PhabricatorRepositoryCommitHeraldWorker::parseCommit(PhabricatorRepository, PhabricatorRepositoryCommit) called at [<phabricator>/src/applications/repository/worker/PhabricatorRepositoryCommitParserWorker.php:44]
  #3 PhabricatorRepositoryCommitParserWorker::doWork() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorWorker.php:91]
  #4 PhabricatorWorker::executeTask() called at [<phabricator>/src/applications/repository/management/PhabricatorRepositoryManagementReparseWorkflow.php:297]
  #5 PhabricatorRepositoryManagementReparseWorkflow::execute(PhutilArgumentParser) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:396]
  #6 PhutilArgumentParser::parseWorkflowsFull(array) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:292]
  #7 PhutilArgumentParser::parseWorkflows(array) called at [<phabricator>/scripts/repository/manage_repositories.php:22]
```

**After**
```lang=bash
> ./bin/repository reparse --herald rP2660b944bed4e4dde3e66303656b1d96d8b03e9b
Done.
```

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6922

Differential Revision: https://secure.phabricator.com/D11304
2015-01-10 09:42:42 +11:00
Bob Trahan
ef4f1a7f74 Maniphest - fix corner case where no-op subscriber change had wrong error
Summary: Fixes T6732. Fix is to stop trying to catch the error in the controller and let the editor do its job.

Test Plan: tried to add an existing subscriber and got an error message about how that wouldn't do anything

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6732

Differential Revision: https://secure.phabricator.com/D11303
2015-01-09 14:14:47 -08:00
Bob Trahan
59770443b6 Projects - tokenize [ProjectX] so "projectX" is a match
Summary:
Fixes T4656. Helps users with this naming convention, which is probably not super duper rare.

Users will need to make an edit to a project -or- run bin/search index "#project-tag" to make this actually work.

Test Plan: made a project "[T4656test]". Typed "t4" and project showed up!

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T4656

Differential Revision: https://secure.phabricator.com/D11302
2015-01-09 14:09:13 -08:00
Bob Trahan
1a997fb0df Config - fix management scripts with --database parameter
Summary: Fixes T6923. Turns out we can't use the editor since we don't have a user with a phid (just some omnipotent guy).

Test Plan: ./bin/config set --database syntax.filemap '{}'; ./bin/config delete --database syntax.filemap

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6923

Differential Revision: https://secure.phabricator.com/D11301
2015-01-09 13:58:11 -08:00
Bob Trahan
a823654be0 Diffusion - return 404 errors for bad URIs
Summary: Fixes T5646. Makes diffusion a much better user experience. Users now see a 404 exception page when they have a bad URI. Previously, they saw a developer-facing raw exception.

Test Plan: played around in diffusion a bunch. most of these changes were fairly mechanical at the end of the day.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T5646

Differential Revision: https://secure.phabricator.com/D11299
2015-01-09 13:29:08 -08:00
Bob Trahan
11a20079ef Maniphest / Workboards - show workboard column when adding a project to a task
Summary: Fixes T6471. This makes adding projects to tasks have better workflow towards boards; without it, you have to click project -> board -> do stuff on board as opposed to column -> do stuff on board.

Test Plan: added and removed projets. saw column listed parenthetcally when expected

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6471

Differential Revision: https://secure.phabricator.com/D11260
2015-01-09 11:12:21 -08:00
Bob Trahan
152072fc97 OAuthServer - harden things up a bit
Summary: This is the hardening work mentioned in T887#86529. Also take a documentation pass for accuracy about these changes and formatting. Ref T4593.

Test Plan: unit tests...! generated diviner docs and oauthserver doc looked good

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T4593

Differential Revision: https://secure.phabricator.com/D11298
2015-01-09 11:04:18 -08:00
lkassianik
7a6f4ab75a T6594, Logged out users should see "View Raw" in dropdown of timeline items
Summary: Fixes T6594, Logged out users should be able to "View Raw" comments in public objects.

Test Plan: Log out, open maniphest task with comments, open dropdown associated with comment, click "View Raw", should be able to see raw comment.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T6594

Differential Revision: https://secure.phabricator.com/D11295
2015-01-09 06:47:16 -08:00
epriestley
e0aa33c46b Make test for setting "next" cookie more general
Summary:
Ref T6870. Since it does not make sense to redirect the user to the login form after they log in, we try not to set the login form as the `next` cookie.

However, the current check is hard-coded to `/auth/start/`, and the form can also be served at `/login/`. This has no real effect on normal users, but did make debugging T6870 confusing.

Instead of using a hard-coded path check, test if the controller was delegated to. If it was, store the URI. If it's handling the request without delegation, don't.

Test Plan:
  - Visited login form at `/login/` and `/auth/start/`, saw it not set a next URI.
  - Visited login form at `/settings/` (while logged out), saw it set a next URI.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley, lpriestley

Maniphest Tasks: T6870

Differential Revision: https://secure.phabricator.com/D11292
2015-01-09 06:42:03 -08:00
Joshua Spence
420f955c2a Fix an incorrect file name
Summary: Self explanatory. This was broken in D11185.

Test Plan: `arc lint`

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11280
2015-01-09 18:35:43 +11:00
Bob Trahan
04fb3defd9 Auth - fix headers for instructions on Phabricator OAuth provider
Summary: Ref T887. Derp'd this in D11287, despite taking screenshots and everything.

Test Plan: looks bettah and more consistent

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T887

Differential Revision: https://secure.phabricator.com/D11294
2015-01-08 16:36:44 -08:00
Bob Trahan
2be746fb1f Auth - restore Phabricator OAuth as a provider
Summary: So meta it hurts. Fixes T887.

Test Plan: created a second instance of phabricator locally. made an account on oauth server phabricator. set up my normal dev phabricator to use this new oauth phabricator. noted the form worked. created an account via the oauth method and it worked.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T887

Differential Revision: https://secure.phabricator.com/D11287
2015-01-08 16:28:04 -08:00
lkassianik
4aea5325fd T6883, Button to save document in legalpad should say "Save Document" instead of "Edit Document"
Summary: Fixes T6883, Legalpad action button on edit document page should say "Save Document" instead of "Edit Document"

Test Plan: Open Legalpad, open existing document, blue action button should say "Save Document"

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6883

Differential Revision: https://secure.phabricator.com/D11291
2015-01-08 16:12:09 -08:00
Joshua Spence
638cf20c9d Allow the Aphlict server to bind to localhost
Summary: If you are running the Aphlict server behind a reverse proxy (such as `nginx`) then there's no need to bind to `0.0.0.0`. Add a `--client-host` flag to `aphlict_server.js` to allow binding to a different hostname. Also changed the other flags for consistency and clarity.

Test Plan: Started, stopped and debug the Aphlict server.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11288
2015-01-09 11:10:47 +11:00
lkassianik
8ddb9e2875 T6869, Mailing list "Public (No Login Required)" name should be visible to logged out users.
Summary: When viewing a task with a mailing list CC where the mailing list is public, logged out user should see the name of the mailing list

Test Plan: Create public mailing list, CC mailing list on task, logout and view task, mailing list name should still be visible on the task

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11290
2015-01-08 16:00:57 -08:00
lkassianik
6c7e0e2807 T6870, Return to previous page after login via header
Summary: Fixes T6870, logging in from a public object should land on that object.

Test Plan: Navigate to a maniphest task in a logged out state, login, landing page should be maniphest task.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T6870

Differential Revision: https://secure.phabricator.com/D11289
2015-01-08 15:56:22 -08:00
Joshua Spence
5c25f38038 Pass --host to aphlict_server.js
Summary: This was omitted in D11143.

Test Plan: I don't always test, but when I do... I do it in production.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11284
2015-01-09 09:01:27 +11:00
epriestley
9e0f70e17d Rewrite Aphlict to use Websockets
Summary:
Fixes T6559. No more flash, use Websockets. This is less aggressive than the earlier version, and retains more server logic.

  - Support "wss".
  - Make the client work.
  - Remove "notification.user" entirely.
  - Seems ok?

Test Plan:
In Safari, Firefox and Chrome, saw the browsers connect. Made a bunch of comments/updates and saw notifications.

Notable holes in the test plan:

  - Haven't tested "wss" yet. I'll do this on secure.
  - Notifications are //too fast// now, locally. I get them after I hit submit but before the page reloads.
  - There are probably some other rough edges, this is a fairly big patch.

Reviewers: joshuaspence, btrahan

Reviewed By: joshuaspence, btrahan

Subscribers: fabe, btrahan, epriestley

Maniphest Tasks: T6713, T6559

Differential Revision: https://secure.phabricator.com/D11143
2015-01-08 10:03:00 -08:00
epriestley
6a7469e1aa Don't show notifications about your own actions
Summary:
Ref T6559. See discussion in D11143. At least locally, WebSockets are too fast and create immediate local notifications on page submit.

To mitigate this, don't notify about your own actions.

This isn't perfect (we get the other-copies-of-the-window-open-in-other-tabs case wrong) but I think the case we get wrong is rare / not very important.

Test Plan: Submitted stuff, saw other users get notifications but not me.

Reviewers: btrahan, joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Maniphest Tasks: T6559

Differential Revision: https://secure.phabricator.com/D11275
2015-01-08 09:43:33 -08:00
epriestley
c0e15f2c65 Fix bad ancestor classname
Summary: Derped this up in D11234.

Test Plan: Ran `bin/search index --all`.

Reviewers: joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D11273
2015-01-07 16:13:20 -08:00
Bob Trahan
6de8fe418c Conduit - document that ERR-CONDUIT-CORE is coming atchya
Summary: Fixes T6863. Seems like this belongs there?

Test Plan: loaded up an API in conduit console and saw the new error text

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6863

Differential Revision: https://secure.phabricator.com/D11261
2015-01-06 14:41:28 -08:00
Bob Trahan
ae0a214574 Workboards - on edit, remove a task if no longer associated with workboard
Summary: Fixes T6179. This makes the interaction where users remove a task from a workboard much more pleasant.

Test Plan: Loaded up workboard for "A Project". Edited tasks and if / when I removed "A Project" they disappeared on save.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6179

Differential Revision: https://secure.phabricator.com/D11259
2015-01-06 13:28:35 -08:00
Joshua Spence
e7f8e79742 Fix method visibility for PhabricatorController subclasses
Summary: Ref T6822.

Test Plan: Visual inspection. These methods are only called from within `PhabricatorController` subclasses.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6822

Differential Revision: https://secure.phabricator.com/D11241
2015-01-07 07:34:59 +11:00
Joshua Spence
e448386d39 Fix method visibility for PhabricatorApplicationSearchEngine methods
Summary: Ref T6822.

Test Plan: Visual inspection. These methods are only called from within the `PhabricatorApplicationSearchEngine` class.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6822

Differential Revision: https://secure.phabricator.com/D11242
2015-01-07 07:34:52 +11:00
Joshua Spence
367918aac1 Fix method visibility for PhabricatorApplication methods
Summary: Ref T6822.

Test Plan: Visual inspection. These methods are only called from within the `PhabricatorApplication` class.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6822

Differential Revision: https://secure.phabricator.com/D11243
2015-01-07 07:34:44 +11:00
Joshua Spence
78b19a43e1 Fix method visibility for PhabricatorApplicationTransactionEditor methods
Summary: Ref T6822.

Test Plan: Visual inspection. These methods are only called from within the `PhabricatorApplicationTransactionEditor` class.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6822

Differential Revision: https://secure.phabricator.com/D11244
2015-01-07 07:34:35 +11:00
Joshua Spence
81972b61d7 Fix method visibility for PhabricatorBitbucketAuthProvider::getProviderConfigurationHelp()
Summary: Ref T6822.

Test Plan: Visual inspection. This method is only called from within `PhabricatorOAuthAuthProvider` subclasses.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6822

Differential Revision: https://secure.phabricator.com/D11246
2015-01-07 07:34:25 +11:00
Joshua Spence
2c855a8993 Fix method visibility for PhabricatorConfigStorageSchema methods
Summary: Ref T6822.

Test Plan: Visual inspection. These methods are only called from within the `PhabricatorConfigStorageSchema` class.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6822

Differential Revision: https://secure.phabricator.com/D11247
2015-01-07 07:33:52 +11:00
Joshua Spence
44093da93c Fix method visibility for PhabricatorRepositoryCommitParserWorker subclasses
Summary: Ref T6822.

Test Plan: Visual inspection. This method is only called from within the `PhabricatorRepositoryCommitParserWorker` class.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6822

Differential Revision: https://secure.phabricator.com/D11248
2015-01-07 07:33:43 +11:00
Joshua Spence
7756484a00 Fix method visibility for AphrontFormControl methods
Summary: Ref T6822.

Test Plan: Visual inspection. These methods are only called from within the `AphrontFormControl` class.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6822

Differential Revision: https://secure.phabricator.com/D11249
2015-01-07 07:33:37 +11:00
lkassianik
9c568802bb T6555, When creating a task with a non existing parent parameter, phabricator should 404
Summary: Fixes T6555, The following should 404: /maniphest/task/create/?parent=asdf, /maniphest/task/create/?parent=0, /maniphest/task/create/?parent=999999 (where T999999 does not exist)

Test Plan: Navigate to /maniphest/task/create/?parent=asdf or /maniphest/task/create/?parent=0 or /maniphest/task/create/?parent=999999 (where T999999 does not exist). See 404.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6555

Differential Revision: https://secure.phabricator.com/D11258
2015-01-06 11:48:55 -08:00
Bob Trahan
648fa2e1bc Repositories - Move scripts/repository/reparse.php to bin/repository reparse
Summary:
Fixes T5966. Accomplishes a few things

 - see title
 - adds a force-autoclose flag and the plumbing for it
 - removes references to some HarborMaster thing that used to key off commits and seems long dead, but forgotten :/

Test Plan:
ran a few commands. These first three had great success:

`./repository reparse --all FIRSTREPO --message --change  --herald --owners`
`./repository reparse --all FIRSTREPO --message --change  --herald --owners --min-date yesterday`
`./repository reparse --all FIRSTREPO --message --change  --herald --owners --min-date yesterday --force-autoclose`

...and these next two showed me some errors as expected:

`./repository reparse --all FIRSTREPO --message --change  --herald --owners --min-date garbagedata`
`./repository reparse --all GARBAGEREPO --message --change  --herald --owners`

Also, made a diff in a repository with autoclose disabled and commited the diff. Later, reparse the diff with force-autoclose. Verified the diff closed and that the reason "why" had the proper message text.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: joshuaspence, epriestley, Korvin

Maniphest Tasks: T5966

Differential Revision: https://secure.phabricator.com/D10492
2015-01-06 11:42:15 -08:00
Chad Little
3e421c7450 Normalize 'Archived' states in object headers
Summary: Quick pass at cleaning up language, icons, colors for 'Archive' and 'Activate' on various objects.

Test Plan:
Tested archiving and activating each object changed.

{F262694}

{F262697}

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11256
2015-01-06 11:13:04 -08:00
epriestley
a455e50e29 Build a Conpherence thread index
Summary:
Ref T3165. Builds a dedicated index for Conpherence to avoid scale/policy filtering concerns.

  - This is pretty one-off but I think it's generally OK.
  - There's no UI for it.
  - `ConpherenceFulltextQuery` is very low-level. You would need to do another query on the PHIDs it returns to actually show anything to the user.
  - The `previousTransactionPHID` is so you can load chat context efficiently. Specifically, if you want to show results like this:

> previous line of context
> **line of chat that matches the query**
> next line of context

...you can read the previous lines out of `previousTransactionPHID` directly, and the next lines by issuing one query with `WHERE previousTransactionPHID IN (...)`.

I'm not 100% sure this is useful, but it seemed like a reasonable thing to provide, since there's no way to query this efficiently otherwise and I figure a lot of chat might make way more sense with a couple of lines of context.

Test Plan:
  - Indexed a thread manually (whole thing indexed).
  - Indexed a thread by updating it (just the new comment indexed).
  - Wrote a hacky test script and got reasonable-looking query results.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T3165

Differential Revision: https://secure.phabricator.com/D11234
2015-01-06 10:24:30 -08:00
epriestley
d4f992d2ed Continue after rejecting commits from a commit query
Summary: Fixes T6880. If matching commits have no visible/loadable repository, we shouldn't keep going forward in the loop.

Test Plan: Havne't built a repro locally yet so not 100% sure this fixes it.

Reviewers: btrahan, mbishopim3, fabe

Reviewed By: mbishopim3, fabe

Subscribers: mbishopim3, epriestley

Maniphest Tasks: T6880

Differential Revision: https://secure.phabricator.com/D11251
2015-01-06 08:02:49 -08:00
Joshua Spence
f2e87aad89 Rename the PhabricatorAuthFactorTOTP class for consistency
Summary: Ref T5655.

Test Plan: `grep`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T5655

Differential Revision: https://secure.phabricator.com/D11191
2015-01-06 22:56:04 +11:00
Joshua Spence
7c124d7854 Rename PhutilRealnameContextFreeGrammar for consistency
Summary: Ref T5655. Depends on D11226.

Test Plan: See D11226.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T5655

Differential Revision: https://secure.phabricator.com/D11227
2015-01-06 12:04:19 +11:00
lkassianik
87c1d004be T6597, Uninstalled applications are still linked on Application launcher
Summary: Fixes T6597, Uninstalled applications should not be clickable when searching "All Applications" in the Applications launcher

Test Plan: Navigate too /applications/query/all, uninstall an application, navigate back to all applications. Uninstalled application title should not be clickable.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6597

Differential Revision: https://secure.phabricator.com/D11223
2015-01-05 16:25:47 -08:00
lkassianik
204ae221d2 Fixes T6637, "closing by commit" should update task status and specify responsible commit, but drop the artificial comment.
Summary: When updating the status of a task via commit, transaction should show responsible commit and status update if it was changed.

Test Plan: Push a commit "Fixes Txx", transaction should include status update and commit number.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6637

Differential Revision: https://secure.phabricator.com/D11230
2015-01-05 16:22:13 -08:00
Bob Trahan
ad1da6ec5e Projects - display "members" link in disabled style if user can't edit project
Summary: Fixes T6862.

Test Plan: viewed a project list and saw disabled-style "Members" links as appropos

Reviewers: epriestley, chad

Reviewed By: chad

Subscribers: Korvin, epriestley

Maniphest Tasks: T6862

Differential Revision: https://secure.phabricator.com/D11229
2015-01-05 15:39:44 -08:00
Joshua Spence
dd42020ef3 Use PhabricatorAuditEditor to write revert edges
Summary: Use `PhabricatorAuditEditor` instead of `PhabricatorEdgeEditor` when writing reverts edges. This ensures that a transaction is created in addition to the edge.

Test Plan: Reverted a commit and pushed to remote. Saw a row created in `phabricator_audit.audit_transaction_comment`. Interestingly, I can't actually see the transaction at http://phabricator.local/r${CALLSIGN}${REVERTED_COMMIT_HASH}.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11212
2015-01-06 07:30:38 +11:00
Chad Little
311747bd5e Change CLOSED colors to Indigo over Black
Summary: CLosed is a pretty important state and black tends to blend in a bit. This bumps to an alternate color to improve ability to scan and know state of objects.

Test Plan:
Review a number of closed objects. I will follow up with another diff on 'Archived' colors.

{F261895}

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11222
2015-01-05 11:19:01 -08:00
Bob Trahan
384b670709 Fix string truncation calls all over the codebase.
Summary: Fixes T6608, though I'll also clean up the comment for PhutilStringTruncator in another diff. If I understand correctly, before T1191, MySQL column length was by character count and post T1191 its by byte count. Ergo, most of these changes are going from codepoint -> bytes. See test plan for complete list of what was and was not done.

Test Plan:
Thought very carefully about each callsite and made changes as appropos. "Display" means the string is clearly used for display-only purposes and correctly uses "glyph" already.

grep -rn PhutilUTF8StringTruncator *

applications/calendar/query/PhabricatorCalendarEventSearchEngine.php:217:        ->addAttribute(id(new PhutilUTF8StringTruncator())  -- display
applications/chatlog/controller/PhabricatorChatLogChannelLogController.php:111:      $author = id(new PhutilUTF8StringTruncator())  -- display
applications/conduit/method/ConduitConnectConduitAPIMethod.php:62:    $client_description = id(new PhutilUTF8StringTruncator()) -- was codepoint, changed to bytes
applications/conpherence/view/ConpherenceFileWidgetView.php:22:        ->setFileName(id(new PhutilUTF8StringTruncator()) -- display
applications/differential/controller/DifferentialDiffViewController.php:65:            id(new PhutilUTF8StringTruncator()) -- display
applications/differential/event/DifferentialHovercardEventListener.php:69:        id(new PhutilUTF8StringTruncator()) -- display
applications/differential/parser/DifferentialCommitMessageParser.php:144:      $short = id(new PhutilUTF8StringTruncator()) -- was glyphs, made to bytes
applications/differential/view/DifferentialLocalCommitsView.php:80:      $summary = id(new PhutilUTF8StringTruncator()) -- display
applications/diffusion/controller/DiffusionBrowseFileController.php:686:            id(new PhutilUTF8StringTruncator()) -- display
applications/feed/story/PhabricatorFeedStory.php:392:      $text = id(new PhutilUTF8StringTruncator()) -- display, unless people are saving the results of renderSummary() somewhere...
applications/harbormaster/storage/build/HarbormasterBuild.php:216:    $log_source = id(new PhutilUTF8StringTruncator()) -- was codepoints now bytes
applications/herald/storage/transcript/HeraldObjectTranscript.php:55:        // NOTE: PhutilUTF8StringTruncator has huge runtime for giant strings. -- not applicable
applications/maniphest/export/ManiphestExcelDefaultFormat.php:107:        id(new PhutilUTF8StringTruncator()) -- bytes
applications/metamta/storage/PhabricatorMetaMTAMail.php:587:        $body = id(new PhutilUTF8StringTruncator()) -- bytes
applications/people/event/PhabricatorPeopleHovercardEventListener.php:62:        id(new PhutilUTF8StringTruncator()) -- display
applications/phame/conduit/PhameCreatePostConduitAPIMethod.php:93:      id(new PhutilUTF8StringTruncator()) -- was codepoints, now bytes
applications/pholio/storage/PholioTransaction.php:300:        id(new PhutilUTF8StringTruncator()) -- display
applications/phortune/provider/PhortuneBalancedPaymentProvider.php:147:    $charge_as = id(new PhutilUTF8StringTruncator()) -- bytes
applications/ponder/storage/PonderAnswerTransaction.php:86:          id(new PhutilUTF8StringTruncator()) -- display
applications/ponder/storage/PonderQuestionTransaction.php:267:            id(new PhutilUTF8StringTruncator()) -- display
applications/ponder/storage/PonderQuestionTransaction.php:276:            id(new PhutilUTF8StringTruncator()) -- display
applications/repository/storage/PhabricatorRepositoryCommitData.php:43:    $summary = id(new PhutilUTF8StringTruncator()) -- was codepoints, now bytes
applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php:20:    $data->setAuthorName(id(new PhutilUTF8StringTruncator()) -- was codepoints, now bytes
applications/slowvote/query/PhabricatorSlowvoteSearchEngine.php:158:        $item->addAttribute(id(new PhutilUTF8StringTruncator()) -- display
infrastructure/daemon/workers/query/PhabricatorWorkerLeaseQuery.php:317:    $host = id(new PhutilUTF8StringTruncator()) -- bytes
view/form/control/AphrontFormPolicyControl.php:61:      $policy_short_name = id(new PhutilUTF8StringTruncator()) -- glyphs, probably display only

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6608

Differential Revision: https://secure.phabricator.com/D11219
2015-01-05 11:14:54 -08:00
Joshua Spence
4e7c10cec5 Fix a duplicate case statement
Summary: This appears to be a typo, identified by `ArcanistXHPASTLinter::LINT_DUPLICATE_SWITCH_CASE` (see D11171).

Test Plan: `arc lint`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11194
2015-01-05 08:24:16 +11:00
Joshua Spence
85b26964f1 Attempt to workaround non-deterministic sort behavior
Summary: Ref T6861. Some discussion in IRC. The behavior of `sort` is somewhat broken when dealing with mixed types. In this particular case, we have both integers and strings.

Test Plan: @epriestley confirmed that this made the ordering of the Celerity map slightly-more-sane.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6861

Differential Revision: https://secure.phabricator.com/D11210
2015-01-05 08:23:47 +11:00
Joshua Spence
85a3636747 Write edges for commit reverts
Summary:
Ref T1751. When a commit reverts another commit:

  - Add an edge linking them;
  - Show the edge in Diffusion.

Next steps are:

  - If the reverted commit is associated with a Differential revision, leave a comment;
  - Also leave a comment on the commit (no API yet);
  - Also trigger an audit by the original commit's author.

Test Plan: Used `scripts/repository/reparse.php --message ...` to parse commits with revert language. Verified they appear correctly in Diffusion, and update Differential.

Reviewers: btrahan, epriestley

Reviewed By: btrahan, epriestley

Subscribers: Korvin, epriestley, cburroughs, joshuaspence, sascha-egerer, aran

Maniphest Tasks: T4896, T1751

Differential Revision: https://secure.phabricator.com/D5846
2015-01-05 07:09:02 +11:00
Joshua Spence
fe618772fd Show unit test namespaces
Summary: Show the full unit test name, including the namespace. Depends on D11208.

Test Plan: Inspected the "Table of Contents" of a diff created //with// D11208 and //without// D11208 applied.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11209
2015-01-05 06:49:46 +11:00
Joshua Spence
a7a3c90f14 Fix a file name to match the PHP class name
Summary: This was misnamed in D11177.

Test Plan: `arc lint`

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11193
2015-01-05 06:38:59 +11:00
Joshua Spence
3c64cb4d0a Rename DifferentialLandingStrategy subclasses for consistency
Summary: Ref T5655.

Test Plan: `grep`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: avivey, Korvin, epriestley

Maniphest Tasks: T5655

Differential Revision: https://secure.phabricator.com/D11186
2015-01-05 06:33:43 +11:00
Joshua Spence
97cd8c1c75 Rename DiffusionSSHWorkflow subclasses for consistency
Summary: Ref T5655.

Test Plan: `grep`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T5655

Differential Revision: https://secure.phabricator.com/D11185
2015-01-05 06:33:19 +11:00
Joshua Spence
94ac3c084b Rename PhabricatorDashboardPanelType subclasses for consistency
Summary: Ref T5655.

Test Plan: `grep`

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T5655

Differential Revision: https://secure.phabricator.com/D11182
2015-01-05 06:32:08 +11:00
Chad Little
3b09d42069 Clarify Tasks listed on Project Profiles
Summary: Fixes T6772. Adds additional checks and language. Happy to tweak language.

Test Plan: Test a Project with 3, 10, and 11 tasks.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6772

Differential Revision: https://secure.phabricator.com/D11192
2015-01-04 09:03:04 -08:00
Joshua Spence
2dea11047a Don't write inverse edges for DifferentialRevisionHasReviewerEdgeType
Summary: The default behavior was inadvertedly changed in D11074. This restores the original behavior.

Test Plan: Added a project reviewer to a diff, saw no inverse transaction recorded.

Reviewers: Krenair, epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11181
2015-01-04 10:07:56 +11:00
Joshua Spence
7b567f185c Rename PhabricatorUIExample subclasses for consistency
Summary: Ref T5655. Basically, rename all `PhabricatorUIExample` subclasses to be either `Phabricator*UIExample` or `PHUI*Example`.

Test Plan: `arc lint` and `arc unit`.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T5655

Differential Revision: https://secure.phabricator.com/D11177
2015-01-04 08:36:47 +11:00