1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-22 10:18:48 +02:00
Commit graph

6483 commits

Author SHA1 Message Date
Bob Trahan
ba2963ecb3 Diffusion - fix commits not importing fully
Summary: Fixes T6336. Turns out that the function to update the import status updates that database and doesn't update the object. If the object doesn't get the pertinent update AND there's a herald rule that runs, then the object is later re-saved without ever getting the update flag.

Test Plan: logic in the ole sandbox and going to push it to prod and run re-parse on impacted commits

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley, chad

Maniphest Tasks: T6336

Differential Revision: https://secure.phabricator.com/D10723
2014-10-17 09:41:27 -07:00
epriestley
e6d946661d Minor, fix some missing column schema
Auditors: btrahan
2014-10-17 05:06:54 -07:00
epriestley
3e516e40f3 Build AlmanacInterface
Summary: Ref T5833. An interface is an IP (maybe v4, maybe v6) and port on a specified network (public internet, VPN, NAT block, etc).

Test Plan: See screenshots.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5833

Differential Revision: https://secure.phabricator.com/D10718
2014-10-17 05:04:24 -07:00
epriestley
3e704f6c78 Build AlmanacNetwork
Summary: Ref T5833. This differentiates address spaces like the public internet from VPNs, so when a service is available at `192.168.0.1`, we'll know it's on some specific NAT block or whatever.

Test Plan: See screenshots.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5833

Differential Revision: https://secure.phabricator.com/D10715
2014-10-17 05:04:02 -07:00
epriestley
247cb94d5a Build AlmanacDevice UI
Summary: Ref T5833. The "uninteresting" part of this object is virtually identical to AlmanacService.

Test Plan: See screenshots.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5833

Differential Revision: https://secure.phabricator.com/D10714
2014-10-17 05:02:14 -07:00
epriestley
796921021b Build AlmanacService
Summary: Ref T5833. See that task for functional goals and some discussion of design.

Test Plan: See screenshots.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5833

Differential Revision: https://secure.phabricator.com/D10713
2014-10-17 05:01:57 -07:00
epriestley
9352c76e81 Decouple some aspects of request routing and construction
Summary:
Ref T5702. This is a forward-looking change which provides some very broad API improvements but does not implement them. In particular:

  - Controllers no longer require `$request` to construct. This is mostly for T5702, directly, but simplifies things in general. Instead, we call `setRequest()` before using a controller. Only a small number of sites activate controllers, so this is less code overall, and more consistent with most constructors not having any parameters or effects.
  - `$request` now offers `getURIData($key, ...)`. This is an alternate way of accessing `$data` which is currently only available on `willProcessRequest(array $data)`. Almost all controllers which implement this method do so in order to read one or two things out of the URI data. Instead, let them just read this data directly when processing the request.
  - Introduce `handleRequest(AphrontRequest $request)` and deprecate (very softly) `processRequest()`. The majority of `processRequest()` calls begin `$request = $this->getRequest()`, which is avoided with the more practical signature.
  - Provide `getViewer()` on `$request`, and a convenience `getViewer()` on `$controller`. This fixes `$viewer = $request->getUser();` into `$viewer = $request->getViewer();`, and converts the `$request + $viewer` two-liner into a single `$this->getViewer()`.

Test Plan:
  - Browsed around in general.
  - Hit special controllers (redirect, 404).
  - Hit AuditList controller (uses new style).

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5702

Differential Revision: https://secure.phabricator.com/D10698
2014-10-17 05:01:40 -07:00
Bob Trahan
934eea2ef2 Hovercards - allow public access
Summary: see title

Test Plan: set config to allow public access and viewed a hovercard uri. saw a hovercard with little info as opposed to login prompt. Fixes T6337.

Reviewers: epriestley, chad

Reviewed By: chad

Subscribers: Korvin, epriestley

Maniphest Tasks: T6337

Differential Revision: https://secure.phabricator.com/D10722
2014-10-16 17:40:12 -07:00
Bob Trahan
d9dd098e40 Audit - fix erroneous mentions of tasks, etc via commit message
Summary: we don't want to mention these phids... when expanding transactions, build the unmnentionable map and make it so. slightly hairy due to how the editor framework works, but overall i think this is the right place to put these hooks.  Fixes T6331.

Test Plan: made a commit with a commit message that had fixes, refs, depends on, and auditors and saw no erroneous mentions

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, chad, epriestley

Maniphest Tasks: T6331

Differential Revision: https://secure.phabricator.com/D10721
2014-10-16 17:13:55 -07:00
Bob Trahan
ac83ff7060 Audit - add mail tags
Summary: Fixes T2497. I'm not sure where we are with subscribers and custom vs normal codepath, but the mailtags implementation makes no assumptions and can handle it either way.

Test Plan: made a commit and got some sensible mail tags

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T2497

Differential Revision: https://secure.phabricator.com/D10712
2014-10-16 08:41:15 -07:00
Bob Trahan
3dd92a78ac Move audit to application transactions
Summary:
Fixes T4896, T6293.

Do most of the work in the editor, but pull the raw patch in the daemon and set that on the editor. This is somewhat of a pre-optimization but it was easy enough to do and makes sense to me.

Test Plan:
made a commit and saw it get parsed.
made a commit with "Auditors: foo" field and saw audit made for foo
turned on inline patch and attach patch and saw the patches

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6293, T4896

Differential Revision: https://secure.phabricator.com/D10705
2014-10-15 13:20:12 -07:00
Chad Little
87679d4295 Add actions to crumbs in fund/phortune
Summary: These were missing. Sorry, need to fix this interface someday.

Test Plan: pay for stuff on mobile

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D10708
2014-10-15 12:17:25 -07:00
Chad Little
f10fbb8600 Add Pink, correct Indigo in base colors
Summary: Fixes T6307

Test Plan: Test UIExamples Color Pallete and Icon samples.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6307

Differential Revision: https://secure.phabricator.com/D10707
2014-10-15 10:33:26 -07:00
Chad Little
13aa443e2d Fix project view and edit uris on creation
Summary: Fixes T6305, sets edit and view uris later in the stack.

Test Plan: Create and edit a project in /project/. Create a project in a dialog. Get redirected to correct place. Verify Cancel send you back to home.

Reviewers: epriestley, btrahan

Reviewed By: btrahan

Subscribers: Korvin, epriestley

Maniphest Tasks: T6305

Differential Revision: https://secure.phabricator.com/D10702
2014-10-14 09:55:52 -07:00
Bob Trahan
af4ebc67c6 Differental - match "Revision ID:" uri value on domain only
Summary: pre-patch, we match on things like https / http and port... just match domains. Fixes T5693.

Test Plan: arc diff -> arc land and the diff was closed correctly

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T5693

Differential Revision: https://secure.phabricator.com/D10701
2014-10-13 17:08:57 -07:00
Bob Trahan
1af6f21573 Increase clarity when closing a revision in response to a commit
Summary:
I am not sure how valuable this is *as is* - I think it needs different explanations for what happened in mercurial or subversion? I do not know what those explanations are.

Made an error in D10485 - the $hashes that were saved is an array of objects, so it ends up turning into garbage via the wonders of serialization and de-serialization. Fix that by explicitly saving the tree hash.

I would like to make this work for the other VCS types we support, add the "undo / nope" button and call it fixed.

Ref T3686.

Test Plan: clicked "explan why" and saw why

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T5693, T3686

Differential Revision: https://secure.phabricator.com/D10489
2014-10-13 16:55:26 -07:00
Bob Trahan
7d9eb8baaf Transactions - fix doorkeeper feed story error
Summary: missing a setHandles on this codepath I think...? Fixes T6300.

Test Plan: not actually tested - I just think this is the fix since the other renderX methods all do this setHandles thing and I can't figure out how handles get set otherwise...

Reviewers: epriestley, avivey

Reviewed By: epriestley, avivey

Subscribers: avivey, Korvin, epriestley

Maniphest Tasks: T6300

Differential Revision: https://secure.phabricator.com/D10699
2014-10-13 16:45:58 -07:00
epriestley
29fbe8ba7f Clear Fund initiative notifications when viewing an initaitive
Summary: Fixes T6301. Just missed this in building out the page.

Test Plan: Viewed an initiative, verified `pageObjects` populated correctly.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T6301

Differential Revision: https://secure.phabricator.com/D10700
2014-10-13 15:11:41 -07:00
Bob Trahan
c51489f138 Differential - fix bogus foreach(null)
Summary: Default $phids to array() and update it if getValue() has something pertinent... Fixes T6292.

Test Plan: just used the ole logic noodle on this one.

Reviewers: chad, epriestley

Reviewed By: chad, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6292

Differential Revision: https://secure.phabricator.com/D10697
2014-10-13 12:57:08 -07:00
epriestley
c728c0ac60 Make Celerity a real application
Summary: Ref T5702. This primarily gets URI routing out of Aphront and into an Application, for consistency.

Test Plan: Loaded some pages, got static resources.

Reviewers: chad, btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5702

Differential Revision: https://secure.phabricator.com/D10696
2014-10-13 11:17:23 -07:00
epriestley
bd741ffcc7 Move DarkConsole to an application
Summary: Ref T5702. Primarily, this gets the custom DarkConsole URI routes out of the Aphront core and into an Application, like almost all other routes.

Test Plan: Used DarkConsole.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5702

Differential Revision: https://secure.phabricator.com/D10695
2014-10-13 11:17:09 -07:00
epriestley
384fd24627 Send mail about cart/order changes from Phortune
Summary: Ref T2787. When order statuses change, send merchants and users email about it.

Test Plan: Used `bin/mail` to review mail.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D10694
2014-10-13 11:16:44 -07:00
epriestley
214b5b7158 Add cart transactions to Phortune
Summary: Ref T2787. I mostly just want these in place so I can glue emails to them, but they're also useful on their own.

Test Plan: {F216515}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D10688
2014-10-13 11:16:27 -07:00
epriestley
8ba2a1fd44 Show only recent orders and charges on Phortune account profile page
Summary: Ref T2787. Currently, we show all orders/charges, which won't scale well. Show the 10 most recent and link to full order/charge history.

Test Plan: {F216325}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D10685
2014-10-13 11:14:50 -07:00
epriestley
7fc7b89bb4 Remove some dead Phortune code
Summary: Ref T2787. This stuff is now irrelevant and/or has no callsites.

Test Plan: `grep`, poked around

Reviewers: chad, btrahan

Reviewed By: chad, btrahan

Subscribers: epriestley

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D10684
2014-10-13 11:14:33 -07:00
epriestley
2172f59ed5 Support logged-out users in Fund
Summary: Ref T5835. Sprinkle `shouldAllowPublic()` around to let logged-out users gain access.

Test Plan: Viewed an initiative while logged out.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5835

Differential Revision: https://secure.phabricator.com/D10683
2014-10-13 11:14:17 -07:00
epriestley
fcdd4a533f Allow Fund initiatives to be searched for
Summary: Ref T5835. Dump these into global search so you can find them.

Test Plan: {F216290}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5835

Differential Revision: https://secure.phabricator.com/D10682
2014-10-13 11:14:02 -07:00
epriestley
2d0ee77bd4 Give Phortune merchants explicit members
Summary:
Ref T2787. Make this a little more concrete with explicit membership instead of a general edit policy. In particular, we need to know who to email when orders happen, and can't reasonably do that with an edit policy.

I imagine this might eventually get more nuanced (e.g., users who can only approve orders vs users who can manage the merchant itself) but that's a long ways away.

Test Plan: {F216284}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D10681
2014-10-13 11:13:50 -07:00
Bob Trahan
ee8004ab4d Projects - merge create + edit interface code paths
Summary:
Fixes T6145, T4016.

Filed T6287 and T6288 for some polish on this.

Test Plan: Made new projects from Maniphest - great success. Made new projects from project / create - also great success.

Reviewers: chad, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T4016, T6145

Differential Revision: https://secure.phabricator.com/D10679
2014-10-10 16:57:05 -07:00
epriestley
159e56d58a Make Phortune account members editable and modernize the edge constant
Summary:
Ref T2787.

  - Account members can add and remove other members (major use case is corporate accounts).
  - Use a modern edge constant setup.

Test Plan: See screenshots.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D10678
2014-10-10 15:00:06 -07:00
epriestley
1112419a97 Support feed and email in Fund
Summary: Ref T5835. Make fund stories publish to feed and send email.

Test Plan: Made edits, etc., saw them in feed and outbound email.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5835

Differential Revision: https://secure.phabricator.com/D10677
2014-10-10 11:29:42 -07:00
epriestley
44415c5473 Make Fund transactions more informative and complete
Summary: Ref T5835. Show backing amounts in transactions. Account for and show refunds.

Test Plan: {F215869}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5835

Differential Revision: https://secure.phabricator.com/D10676
2014-10-10 11:29:31 -07:00
epriestley
38927d5704 Add a "Review" status to Phortune
Summary: Ref T2787. Allow merchants to flag orders for review. For now, all orders are flagged for review. Eventually, I could imagine Herald rules for coarse things (e.g., require review of all orders over $1,000, or require review of all orders by users not on a whitelist) and maybe examining fraud data for the providers which support it.

Test Plan: {F215848}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D10675
2014-10-10 11:29:13 -07:00
epriestley
fe5bc764b3 Support multiple payment accounts and account switching in Phortune
Summary: Ref T2787. Support multiple payment accounts so you can have personal vs company payment accounts.

Test Plan: See screenshots.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D10673
2014-10-09 16:59:03 -07:00
epriestley
f53861aa9d Smooth out Phortune purchase completion flow
Summary:
Ref T2787. Currently, we dump the user back into the application. Instead, give them a confirmation screen and then let them continue.

Also fix a couple of unit tests I adjusted the underlying behavior of somewhat-recently in libphutil.

Test Plan: {F215498}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D10672
2014-10-09 16:58:26 -07:00
epriestley
f41ae2228a Implement Phortune charge updates
Summary: Ref T2787. These don't necessarily do a ton yet, but we can get PayPal out of hold, at least.

Test Plan: Updated charges from all providers. Cleared a PayPal hold.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D10670
2014-10-09 16:57:52 -07:00
epriestley
2a2fb62229 Add a HOLD state to Phortune and handle unusual states better
Summary:
Ref T2787. When Paypal comes back to us with funds on hold, dead-end the transaction but handle it properly.

Generally, smooth out the user interaction on weird states.

Implement refudnds/cancels for Paypal.

Test Plan: {F215230}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D10667
2014-10-09 04:30:47 -07:00
Bob Trahan
45bb77531c Policy - fix error message
Summary: We were saying "Object Restricted Object"; instead say "Restricted Object". Fixes T6104.

Test Plan: made a restricted paste and a restricted task and saw good error messages.  {F215281}  {F215282}

Reviewers: epriestley, chad

Reviewed By: chad

Subscribers: Korvin, epriestley

Maniphest Tasks: T6104

Differential Revision: https://secure.phabricator.com/D10668
2014-10-08 19:46:56 -07:00
epriestley
ad991b0197 Handle Phortune charge failures cleanly
Summary:
Ref T2787. Currently, we kill a cart and dead-end the workflow on a charge failure.

Instead, fail the charge and reset the cart so the user can try using a valid payment instrument like a normal checkout workflow would.

Some shakiness/smoothing on WePay for the moment; PayPal is still made up since we don't have a "Hold" state yet.

Test Plan: {F215214}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D10666
2014-10-08 17:23:02 -07:00
Bob Trahan
c0848bca6d Allow bin/config to affect database configuration and migrate between local and database configuration
Summary: Fixes T4018. Basically hits the bullet points in that task description except the "ideally" one.

Test Plan:
ran bin/config migrate and saw sensible output.

```
~> ./bin/config migrate
Migrating file-based config to more modern config...
Skipping config of source type PhabricatorConfigDatabaseSource...
Skipping config of source type PhabricatorConfigLocalSource...
Skipping config of source type PhabricatorConfigDefaultSource...
Done. Migrated 0 keys.
```

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: hach-que, epriestley, Korvin

Maniphest Tasks: T4018

Differential Revision: https://secure.phabricator.com/D10490
2014-10-08 16:15:05 -07:00
epriestley
f4604ae147 Implement refunds for Balanced in Phortune
Summary: Ref T2787. Does refunds for Balanced.

Test Plan: {F215205}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D10665
2014-10-08 15:33:36 -07:00
epriestley
1e8c314c81 Mostly implement order refunds and cancellations
Summary:
Ref T2787. This has some rough edges but basically works.

  - Users can cancel orders that are in incomplete states (or in complete states, if the application allows them to -- for example, some future application might allow cancellation of billed-but-not-shipped orders).
  - Merchant controllers can partially or fully refund orders from any state after payment.

Test Plan: This is still rough around the edges, but issued Stripe and WePay refunds.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: chad, epriestley

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D10664
2014-10-08 15:33:25 -07:00
epriestley
b6c65719e4 Allow merchant controllers to review orders in Phortune
Summary: Ref T2787. Sets the stage for administrating / cancelling / refunding orders and hold orders.

Test Plan:
{F215140}

{F215141}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D10663
2014-10-08 14:40:02 -07:00
epriestley
19db3fbb60 Allow merchants to disable payment providers and show more UI info
Summary:
Ref T2787.

  - Allow merchants to disable payment providers.
  - Show more useful information about providers on the payments page.
  - Make test vs live more clear.
  - Show merchant status.
  - Add a description to merchants to flesh them out a bit -- the merchant areas of responsibilities seem to be fitting well with accounts, etc.

Test Plan: {F215109}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D10662
2014-10-08 08:31:24 -07:00
epriestley
795eb3669e Minor, specify a missing column type
Auditors: btrahan
2014-10-08 05:37:16 -07:00
epriestley
43215bf0bd Make Fund backers render a little more nicely
Summary: Ref T5835. Mostly UI smoothing. Also add a "Risks" field to initiatives.

Test Plan: {F214952}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5835

Differential Revision: https://secure.phabricator.com/D10660
2014-10-08 05:32:42 -07:00
epriestley
65421a9e3e Make Phortune account page a little more usable
Summary: Ref T2787. Minor UI improvements.

Test Plan: {F214945}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: chad, epriestley

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D10658
2014-10-08 05:32:01 -07:00
epriestley
608465da1e Track total funding amount on Fund initiatives
Summary: Ref T5835. Show total funding amount and payable merchant on initiatives.

Test Plan: {F214936}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5835

Differential Revision: https://secure.phabricator.com/D10657
2014-10-08 05:31:48 -07:00
epriestley
89a6ed98e7 Use real icons for payment providers
Summary: Ref T2787. Uses the real icons. Straightens out the add payment flow a tiny bit.

Test Plan: {F214922}

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D10654
2014-10-07 15:07:01 -07:00
Chad Little
03ddb4a0fc Add slug check around project.query conduit call
Summary: Fixes T6252

Test Plan: Test project query from conduit app, see no errors in log.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6252

Differential Revision: https://secure.phabricator.com/D10655
2014-10-07 15:05:57 -07:00
Chad Little
8aa047766d Check for presence of any Columns before triggering initialization of Workboard
Summary: Ref T6256, this prevents more installs from getting in this weird state. We'll have to follow up if possible to "fix" the issue retroactively.

Test Plan: Test moving a backlog column to new position, hiding rest of other panels.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6256

Differential Revision: https://secure.phabricator.com/D10651
2014-10-07 14:49:22 -07:00
epriestley
9c4b8a0fb2 Adjust payment workflows to deal with merchants and configurable providers in Phortune
Summary:
Ref T2787. Builds on D10649 by rebining existing objects (carts, charges, etc) to merchantPHIDs and providerPHIDs instead of an implicit global merchant and weird global artifacts (providerType / providerKey).

Basically:

  - When you create something that users can pay for, you specify a merchant to control where the payment goes.
  - Accounts are install-wide, but payment methods are bound to merchants. This seems to do a reasonable job of balancing usability and technical concerns.
  - Replace a bunch of weird links between objects with standard PHIDs.
  - Improve "add payment method" flow.

Test Plan: Went through the Fund flow with Stripe and WePay, funding an initiative.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D10652
2014-10-07 14:41:59 -07:00
epriestley
9aa5a8cb7b Make payment providers a configurable property of Merchants in Phortune
Summary:
Ref T2787. Instead of making providers global configuration, make them a thing on merchants with web configuration.

Payment methods and some of the pyament workflow needs to be retooled a bit after this, but this seemed like a reasonable cutoff point for this diff.

Test Plan: See screenshots.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D10649
2014-10-07 14:41:41 -07:00
Joshua Spence
3cf9a5820f Minor formatting changes
Summary: Apply some autofix linter rules.

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

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin, hach-que

Differential Revision: https://secure.phabricator.com/D10585
2014-10-08 08:39:49 +11:00
epriestley
fcd2025a85 Add Merchants to Phortune
Summary:
Ref T2787. Currently, you add payment providers (Stripe, Paypal, etc) in global configuration.

Generally, this approach is cumbersome, limiting, and often hard for users to figure out. It also doesn't provide a natural way to segment payment receivers or provide web access to administrative payment functions like issuing refunds, canceling orders, etc. I think that stuff definitely needs to be in the web UI, and the rule for access to it can't reasonably just be "all administrators" in a lot of reasonable cases.

The only real advantage is that it prevents an attacker from adjusting settings and pointing something at an account they control. But this attack can be mitigated through notifications, some sort of CLI-only merchant lock, payment accounts being relatively identifiable, etc.

So introduce "merchants", which are basically payable entities. An individual merchant will have attached Paypal, Stripe, etc., accounts, and access rules. When you buy something in an application, the merchant to pay is also specified. They also provide an umbrella for dealing with permissions down the line.

This may get a //little// cumbersome because if there are several merchants your saved card information is not shared across them. I think that will be fine in the normal case (most installs will have only one merchant). Even if it isn't and we leave providers global, I think introducing this is the right call from a web UI / permissions point of view. I'll play around with it in the next couple of diffs and figure out exactly where the line goes.

Test Plan: Listed, created, edited, viewed merchants.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D10648
2014-10-07 10:55:16 -07:00
epriestley
61b1fe78c7 Modernize Phortune PHID constants
Summary:
Ref T2787. These were still stuck in the stone ages.

(The handles are pretty skeletal but most aren't used anywehre.)

Test Plan: Funded an initiative without anything breaking. Grepped for removed constants.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D10647
2014-10-06 16:48:16 -07:00
epriestley
19c1c07d35 Give Balanced provider complete workflow logic in Phortune
Summary: Ref T2787. Like Stripe, this one is pretty easy to get working correctly on the "good" path and fataling out in a safe way on bad paths.

Test Plan: Funded an initiative with Balanced.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D10645
2014-10-06 16:48:02 -07:00
epriestley
31817b9097 Disable Phortune Paypal payment provider
Summary:
Ref T2787. For test charges, Paypal is putting the charge in a "payment review" state. Dealing with this state requires way more infrastructure than other providers: we're supposed to pause delivery, then poll Paypal every 6 hours to see if the review has resolved.

Since I can't seem to generate normal test charges, I can't test Paypal for now. Disable it until we have more infrastructure.

(This diff gets us further along, up to the point where I hit this issue.)

Test Plan: Read documentation, rolled eyes.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D10644
2014-10-06 14:51:51 -07:00
epriestley
83e1a1ddb2 Give Stripe complete payment workflow logic in Phortune
Summary:
Ref T2787. This basically already works correctly since the hard logic is external to the provider on API providers. Tweak a couple of things.

Failures still just fail the cart completely, for now.

Test Plan: Completed a charge with Stripe.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D10640
2014-10-06 14:21:11 -07:00
epriestley
4ef547f8d6 Give WePay complete payment logic in Phortune
Summary:
Ref T2787. This doesn't get all the edge cases quite correct, but is generally a safe, complete payment workflow:

  - Shares the actual charging state logic.
  - Makes it appropriately stateful with locking and transactions.
  - Gets the main flow correct.
  - Detects failure cases, just tends to blow up rather than help the user resolve them.

Test Plan:
  - Charged with WePay.
  - Charged with Infinite Free Money.
  - Resumed an abandoned cart.
  - Hit all failure states where we just dead-end the cart. Not ideal, but (seemingly) complete/safe/correct.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D10639
2014-10-06 14:20:40 -07:00
epriestley
0beb8228da Give applications control over Phortune cart logic
Summary: Ref T2787. Similar to D10634, give applications more control over the cart workflow. For now this just means they get to pick exit URIs, but in the future they can manage more details of cart behavior.

Test Plan: Funded an initiative and got returned to the initiative instead of dead-ending in Phortune.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D10638
2014-10-06 14:19:08 -07:00
Chad Little
923f625130 Fix incorrect maniphest.update conduit UI
Summary: Fixes T6254 and renames status as string. Though maybe this should go through `formatStringConstants`?

Test Plan: Reload Conduit page, see new text.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6254

Differential Revision: https://secure.phabricator.com/D10637
2014-10-06 11:06:23 -07:00
epriestley
35dc510e18 Add more structure to Phortune product purchasing flow
Summary:
Ref T2787. When a user purchases a product in Phortune, transition the cart through a purchased state and invoke product callbacks so applications can respond to the workflow.

Also shore up some stuff like preventing negative amounts of funding.

Test Plan: Backed an initiative and saw it show up on the initiative after completing the purcahsing workflow.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D10635
2014-10-06 10:36:43 -07:00
epriestley
e9615b74a5 Move Phortune product logic into applications
Summary: Ref T2787. `Product` is currently a fairly heavy object, but as Phortune develops it makes a lot of sense to make it a lighter object and put more product logic in applications. Convert it into a fairly lightweight reference to applications. The idea is that Phortune is mostly providing a cart flow, and applications manage the details of products.

Test Plan: Funded an initiative for $1.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D10634
2014-10-06 10:30:06 -07:00
epriestley
f86f9dc512 Make Currency a more formal type
Summary:
Ref T2787. Phortune currently stores a bunch of stuff as `...inUSDCents`. This ends up being pretty cumbersome and I worry it will create a huge headache down the road (and possibly not that far off if we do Coinbase/Bitcoin soon). Even now, it's more of a pain than I figured it would be.

Instead:

  - Provide an application-level serialization mechanism.
  - Provide currency serialization.
  - Store currency in an abstract way (currently, as "1.23 USD") that can handle currencies in the future.
  - Change all `...inUSDCents` to `..asCurrency`.
  - This generally simplifies all the application code.
  - Also remove some columns which don't make sense or don't make sense anymore. Notably, `Product` is going to get more abstract and mostly be provided by applications.

Test Plan:
  - Created a new product.
  - Purchased a product.
  - Backed an initiative.
  - Ran unit tests.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D10633
2014-10-06 10:26:48 -07:00
James Rhodes
8fbebce501 Implement storage of a host ID and a public key for authorizing Conduit between servers
Summary:
Ref T4209.  This creates storage for public keys against authorized hosts, such that servers can be authorized to make Conduit calls as the omnipotent user.

Servers are registered into this system by running the following command once:

```
bin/almanac register
```

NOTE: This doesn't implement authorization between servers, just the storage of public keys.

Placing this against Almanac seemed like the most sensible place, since I'm imagining in future that the `register` command will accept more information (like the hostname of the server so it can be found in the service directory).

Test Plan: Ran `bin/almanac register` and saw the host (and public key information) appear in the database.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T4209

Differential Revision: https://secure.phabricator.com/D10400
2014-10-03 22:52:41 +10:00
epriestley
0ddb187508 Add a setup warning about innodb_buffer_pool_size
Summary: Fixes T6119. This is a little fuzzy, but generally bumping up `innodb_buffer_pool_size` to something bigger than the default (which is often anemic, at `8M`) is desriable, and it seems like it will fix the specific issue a user encountered in T6119.

Test Plan: {F211855}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T6119

Differential Revision: https://secure.phabricator.com/D10630
2014-10-02 14:44:36 -07:00
epriestley
d67b7f0f47 Correct column mutations for old versions of MySQL
Summary:
Ref T1191. Although I fixed some of the mutations earlier (in D10598), I missed the column mutations under old versions of MySQL. In particular, this isn't valid:

  - `ALTER TABLE ... MODIFY columnName VARCHAR(64) COLLATE binary`

Issue the permitted version of this instead, which is:

  - `ALTER TABLE ... MODIFY columnName VARBINARY(64)`

Also fixed an issue where a clean schema had the wrong nullability for a column in the draft table. Force it to the expected nullability.

The other trick here is around the one column with a FULLTEXT index on it, which needs a little massaging.

Test Plan:
  - Forced my local install to return `false` for utf8mb4 support.
  - Did a clean adjust into `binary` columns.
  - Poked around, added emoji to things.
  - Reverted the fake check and did a clean adjust into `utf8mb4` columns.
  - Emoji survived.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: fabe, epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10627
2014-10-02 14:44:22 -07:00
epriestley
e333017c3e Strip email signatures from Mailbox
Summary: thanks mailbox

Test Plan: unit tests

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D10629
2014-10-02 12:33:43 -07:00
epriestley
8fa8415c07 Automatically build all Lisk schemata
Summary:
Ref T1191. Now that the whole database is covered, we don't need to do as much work to build expected schemata. Doing them database-by-database was helpful in converting, but is just reudndant work now.

Instead of requiring every application to build its Lisk objects, just build all Lisk objects.

I removed `harbormaster.lisk_counter` because it is unused.

It would be nice to autogenerate edge schemata, too, but that's a little trickier.

Test Plan: Database setup issues are all green.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley, hach-que

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10620
2014-10-02 09:51:20 -07:00
epriestley
e4e5a2004f Use sort, not text, for search index table
Summary: Ref T1191. The index's case sensitivity depends on the column type. Using `text` makes the search case-sensitive, which is not desirable.

Test Plan: After adjustment, searched for "PROJECTS" and found hits against "projects".

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10619
2014-10-02 09:50:23 -07:00
epriestley
5f82805068 Make execution order of Herald rules explicit
Summary: Fixes T6211. This gives Herald rules an explicit execution order, which seems generally good. See some discussion on T6211 and inline.

Test Plan:
  - Added unit test.
  - Dry ran rules and saw rules appear in the expected order in the transcript.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T6211

Differential Revision: https://secure.phabricator.com/D10624
2014-10-02 09:49:32 -07:00
epriestley
3c6781b177 Differentiate between "no pygmetnize" and "nonworking pygmentize" during setup
Summary: Fixes T6210. The current messaging may be confusing if `pygmentize` is available but broken.

Test Plan: Faked the binary names and hit the errors, which seemed helpful.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T6210

Differential Revision: https://secure.phabricator.com/D10626
2014-10-02 09:48:04 -07:00
epriestley
7018909447 Fix TokenGiven stories for Asana
Summary: Ref T6201. This isn't quite perfect but should be good enough. At some point far in the future I plan to revamp feed rendering a bit. This should possibly become a real ApplicationTransaction story eventually, too.

Test Plan: {F211777}

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T6201

Differential Revision: https://secure.phabricator.com/D10625
2014-10-02 09:20:27 -07:00
epriestley
4eb4399640 Convert SavedQuery / NamedQuery to text, not bytes
Summary: Ref T1191. Similar issue to D10613. This column usually has a hash exactly 12 bytes long, but sometimes stores an internal builtin query name like "open", "all", etc. It might be nice to promote those to 12-byte hashes of a consistent length eventually, but for now just make this a variable-length column.

Test Plan: Ran migration, no longer saw issues with reordering builtin saved searches.

Reviewers: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10614
2014-10-01 10:11:19 -07:00
epriestley
f881b5dd7f Convert DivinerLiveSymbol to text, not bytes
Summary:
Ref T1191. The `bytes` types are BINARY(...), which is fixed-length and zero-pads. These hashes are not 64 characters long, so migrating them to `binary` ends up with a bunch of zero-padding.

Instead, migrate them to `text` so we drop the zero padding. It would be vaguely nice to either introduce a `varbytes` type (ick) or change the hash size to a standard size (nicer) eventually, but this isn't very important.

Test Plan: Will adjust `secure.phabricator.com`.

Reviewers: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10613
2014-10-01 10:10:56 -07:00
epriestley
300172e799 Support AUTO_INCREMENT in bin/storage adjust
Summary:
Ref T1191. When changing the column type of an AUTO_INCREMENT column, we currently may lose the autoincrement attribute.

Instead, support it. This is a bit messy because AUTO_INCREMENT columns interact with PRIMARY KEY columns (tables may only have one AUTO_INCREMENT column, and it must be a primary key). We need to migrate in more phases to avoid this issue.

Introduce new `auto` and `auto64` types to represent autoincrement IDs.

Test Plan:
  - Saw autoincrement show up correctly in web UI.
  - Fixed an autoincrement issue on the XHProf storage table with `bin/storage adjust` safely.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10607
2014-10-01 08:24:51 -07:00
epriestley
0d7489da79 Provide bin/storage quickstart to automate generation of quickstart.sql
Summary:
Ref T1191. Currently, the `quickstart.sql` gets generated in a pretty manual fashion. This is a pain, and will become more of a pain in the world of utf8mb4.

Provide a workflow which does upgrade + adjust + dump + destroy, then massages the output to produce a workable `quickstart.sql`.

Test Plan: Inspected output; I'll test this more throughly before actually generating a new quickstart, but that's some ways away.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10603
2014-10-01 08:22:37 -07:00
epriestley
1dfa94e571 Use binary collations for most text
Summary:
Ref T1191. For most text columns, we either don't care if "a" and "A" are the same, or we expect them to be different (for example: keys, domains, secrets, etc). Default text columns to the `_bin` collation so they are compared by strict character value. This is safer in cases where we aren't sure.

For some text columns, we allow the user to sort by the column in the UI (like Maniphest task titles) or we do care that "A" and "a" are the same (for example: project names). Introduce a new class of virtual data types, the "sort..." types, to cover these columns. These are like the "text..." types but use sorting collations which treat "A" and "a" the same.

Test Plan:
  - Made an effort to identify all columns where the UI relies on database collation.
  - Ran `bin/storage adjust` and cleared all warnings.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: beng, epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10602
2014-10-01 08:18:53 -07:00
epriestley
4fcc634a99 Fix almost all remaining schemata issues
Summary:
Ref T1191. This fixes nearly every remaining blocker for utf8mb4 -- primarily, overlong keys.

Remaining issue is https://secure.phabricator.com/T1191#77467

Test Plan: I'll annotate inline.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley, hach-que

Maniphest Tasks: T6099, T6129, T6133, T6134, T6150, T6148, T6147, T6146, T6105, T1191

Differential Revision: https://secure.phabricator.com/D10601
2014-10-01 08:18:36 -07:00
epriestley
22ee8432d2 Allow bin/storage adjust to correct column types and collations
Summary:
Ref T1191. Allow `bin/storage adjust` to modify columns.

  - Although `CREATE TABLE ... colname VARCHAR(64) CHARACTER SET BINARY` works fine, it's actually a trick. Adjust the binary columns for this.

Test Plan: See comment.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T6130, T6128, T6135, T6137, T6138, T6149, T6151, T1191

Differential Revision: https://secure.phabricator.com/D10598
2014-10-01 08:17:45 -07:00
epriestley
ab6c6836f4 Remove the "note" database issue status
Summary:
Ref T1191. This was useful for annotating everything but we no longer need it; there are just two types of issues now:

  - Error: stuff we can't fix (missing or surplus tables/database/columns, bad column nullability).
  - Warning: stuff we can fix (column types, character sets, collations, missing or surplus keys, incorrectly defined keys, bad key uniqueness).

Test Plan: Saw 3,399 warnings and 0 errors.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10594
2014-10-01 08:00:11 -07:00
epriestley
03519c53bb Mark questionable column nullability for later
Summary:
Ref T1191. Ref T6203. While generating expected schemata, I ran into these columns which seem to have sketchy nullability.

  - Mark most of them for later resolution (T6203). They work fine today and don't need to block T1191. Changing them can break the application, so we can't autofix them.
  - Forgive a couple of them that are sort-of reasonable or going to get wiped out.

Test Plan: Saw 94 remaining warnings.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: hach-que, epriestley

Maniphest Tasks: T1191, T6203

Differential Revision: https://secure.phabricator.com/D10593
2014-10-01 07:59:44 -07:00
epriestley
4f87adc438 Ignore keys with trailing index on table primary key for now
Summary:
Ref T1191. We have several keys on `<x, y, id>`. When `id` is an auto-increment primary key, I believe this is exactly equivalent to a key on `<x, y>`, because the leaf nodes are implicitly sorted by `id`. We omit the implicit `id` elsewhere.

It would be nice to drop the `id` bit for consistency, but it's not doing any harm and this doesn't need to block the primary work of T1191.

Test Plan: Saw slightly fewer warnings.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10592
2014-10-01 07:55:09 -07:00
epriestley
8bf24f53b3 Destroy surplus columns
Summary:
Ref T1191. This destroys surplus columns:

  - Pholio's transaction comments have a `mockID` column, but this is not used. The `imageID` column is used instead.
  - Phragment has an unused `description` column.
  - Releeph has an unused `summary` column.

Test Plan:
  - Grepped for usage of these columns.
  - Checked that these exist in production, too.
  - Ran upgrades.
  - Added Pholio inline comments.
  - Saw fewer warnings.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley, hach-que

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10591
2014-10-01 07:54:33 -07:00
epriestley
943c62d1e9 Add missing expected keys and uniqueness
Summary:
Ref T1191.

  - Adds definitions for missing keys and keys with wrong uniqueness. Generally, I defined these before fixing the key query to actually pull all keys and support uniqueness.
  - Moves "key uniqueness" to note severity; this is fixable (probably?) and there are no remaining issues.
  - Moves "Missing Key" to note severity; missing keys are fixable and all remaining missing keys are really missing (either missing edge keys, or missing PHID keys):

{F210089}

  - Moves "Surplus Key" to note seveirty; surplus keys are fixable all remaining surplus keys are really surplus (duplicate key in Harbormaster, key on unused column in Worker):

{F210090}

Test Plan:
  - Vetted missing/surplus/unique messages.
  - 146 issues remaining.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10590
2014-10-01 07:53:50 -07:00
epriestley
2880732a49 Generate expected schemata for Search
Summary:
Ref T1191. Notable:

  - Drops a very old saved query table. See comments inline: plan was to remove it after a year. It's been ~a year and two weeks.
  - This has our only fulltext index. I'm not supporting that formally for now, but left a note.
  - This has our only MyISAM table. I'm not supporting that explicitly for now, but it shouldn't affect anything. I may deal with this in the future.
  - These tables don't actually write directly via Lisk, so there's some fiddling to get the schemata right.

Test Plan: Down to ~250 warnings. No more surplus databases or tables.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10589
2014-10-01 07:53:35 -07:00
epriestley
dc8b2ae6d2 Generate expected schemata for Fact, Owners, Herald and Diviner
Summary:
Ref T1191. Notable:

  - `HeraldApplyTranscript` is not actually a DAO and has no table (it is serialized into HeraldTranscript).

Test Plan: Down to fewer than 300 issues.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10588
2014-10-01 07:53:12 -07:00
epriestley
cfbcd69e9b Generate expected schemata for Pholio, Phortune, Phragment, Phriction and Policy
Summary: Ref T1191. Nothing too out-of-the-ordinary here.

Test Plan: Saw fewer than 500 remaining issues.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: chad, epriestley, hach-que

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10587
2014-10-01 07:52:26 -07:00
epriestley
e7b590a1cf Generate expected schemata for Harbormaster
Summary:
Ref T1191. Nothing too notable here:

  - Allow a Lisk object to specify that there's no expectation that a table exists. We have one Harbormaster object and one Token object like this.
  - Removed BuildPlanTransactionComment because it's currently unused.

Test Plan:
  - Saw ~200 fewer warnings; just ~800 left.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10583
2014-10-01 07:40:36 -07:00
epriestley
152a62db7a Generate expected Ponder schemata
Summary:
Ref T1191.

  - Removes ponder comment table. This was migrated a very long time ago.

Test Plan:
  - Grepped for removed table.
  - Saw ~100 fewer issues in web UI.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10582
2014-10-01 07:37:14 -07:00
epriestley
ac9182af58 Generate expected Project schemata
Summary:
Ref T1191. Notes:

  - Drops the project affiliation table. This is a very old membership table which was migrated to edges.
  - Drops the subproject table. This is a very old table for a removed feature.

Test Plan:
  - Grepped for dropped tables.
  - Saw ~100 fewer setup issues.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10581
2014-10-01 07:37:01 -07:00
epriestley
098d0d93d6 Generate expected schemata for User/People tables
Summary:
Ref T1191. Some notes here:

  - Drops the old LDAP and OAuth info tables. These were migrated to the ExternalAccount table a very long time ago.
  - Separates surplus/missing keys from other types of surplus/missing things. In the long run, my plan is to have only two notice levels:
    - Error: something we can't fix (missing database, table, or column; overlong key).
    - Warning: something we can fix (surplus anything, missing key, bad column type, bad key columns, bad uniqueness, bad collation or charset).
    - For now, retaining three levels is helpful in generating all the expected scheamta.

Test Plan:
  - Saw ~200 issues resolve, leaving ~1,300.
  - Grepped for removed tables.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10580
2014-10-01 07:36:47 -07:00
epriestley
3fe226f9f0 Partially modernize Doorkeeper/Asana bridge
Summary: Fixes T6201. This stuff didn't fully get updated for ApplicationTransactions. Get it working again (notably, make inline comment text publish) and clean it up a little bit.

Test Plan:
  - Published a Differential feed story into Asana with comment text.
  - Pulbished a Diffusion feed story into Asana with comment text.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T6201

Differential Revision: https://secure.phabricator.com/D10584
2014-10-01 07:09:34 -07:00
epriestley
855f752814 Support :emoji: in Remarkup
Summary: Ref T1191. This actually works without T1191, but makes emoji use on the desktop easier.

Test Plan: {F210416}

Reviewers: chad, btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10605
2014-09-29 08:31:00 -07:00
epriestley
93681fcdbc Generate expected schemata for Differential
Summary: Ref T1191. No major issues here.

Test Plan: Saw ~150 fewer issues.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10577
2014-09-28 15:12:58 -07:00
epriestley
9be2bf2119 Generate expected schemata for Releeph
Summary:
Ref T1191.

  - This drops two tables.
  - Both tables were migrated to transactions a very long time ago and no longer have readers or writers.

Test Plan: Saw ~150 fewer warnings.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10576
2014-09-28 15:12:41 -07:00
epriestley
b149cb7e99 Generate expected schemata for Repository
Summary: Ref T1191. Add specs for repository tables.

Test Plan: Saw ~300 fewer schema warnings.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10575
2014-09-28 15:12:21 -07:00
Chad Little
f74082aecd Update AphrontRequestFailure to common display libs
Summary: Moves to PHUIObjectBox, removes old CSS

Test Plan: Pull up 404 page.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D10578
2014-09-26 17:40:09 -07:00
Chad Little
3ce107fc42 Remove Date from Diff hovercard
Summary: Fixes T6184. On a Revision page we don't show the date as an important piece of information, so it's also not likely useful on a Hovercard (and confusing as to what the date means).

Test Plan: Hover over a linked Diff

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T6184

Differential Revision: https://secure.phabricator.com/D10579
2014-09-26 14:27:37 -07:00
Chad Little
5f04bb6dd9 Check calendar is installed on profile
Summary: Fixes T6199, checks if Calendar is installed and displays if so.

Test Plan: Turned Calendar on and off, tested both layouts.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T6199

Differential Revision: https://secure.phabricator.com/D10574
2014-09-26 09:28:37 -07:00
epriestley
f605780893 Export Ponder question and answer bodies as remarkup blocks during transactions
Summary: Fixes T6189. We currently don't raise these to the editor level, so files, mentions, and project stuff get ignored.

Test Plan: Verified that files added to question and answer bodies end up attached to the relevant objects.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T6189

Differential Revision: https://secure.phabricator.com/D10564
2014-09-25 13:42:46 -07:00
epriestley
9dee67618d Allow pastes to be destroyed
Summary: Fixes T6186.

Test Plan:
  - Used `bin/remove destroy Pxxx` to destroy a paste.
  - Verified file, transactions, etc., were destroyed.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T6186

Differential Revision: https://secure.phabricator.com/D10563
2014-09-25 13:42:38 -07:00
epriestley
3c527cc472 Add a setup issue to detect systems vulnerable to "Shellshock"
Summary: Ref T6185. Although it seems that we can't easily defuse or mitigate this, we can at least warn administrators.

Test Plan: Ran on my (unpatched, local) system, got a setup warning.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T6185

Differential Revision: https://secure.phabricator.com/D10561
2014-09-25 11:21:11 -07:00
Chad Little
e64612f0d0 Add actions to mobile Passphrase
Summary: Take my secrets on the road

Test Plan: View Passphrase on mobile device, see action list.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D10562
2014-09-25 10:57:44 -07:00
James Rhodes
4277123060 Increase Drydock worker time to 24 hours
Summary:
Ref T2015.  This increases the Drydock worker lease time to 24 hours.  We noticed that some leases took longer than 2 hours when leasing from AWS (the actual resource was successfully leased at around 2 hours, 19 minutes).

24 hours should be plenty enough time to actually lease anything from EC2 (or any other leases during builds).

Test Plan: Have not yet tested this.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D10544
2014-09-25 09:46:47 +10:00
James Rhodes
66950a84b2 Fix failing test in PhabricatorPolicyDataTestCase caused by membership locking
Summary: This fixes a unit test failure that started occurring due to the new membership locking feature.

Test Plan: Ran the unit tests.

Reviewers: btrahan, epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D10546
2014-09-25 09:46:17 +10:00
epriestley
502d18ede4 Generate expected scheamta for Passphrase, Paste, Phlux, Phame
Summary: Ref T1191. Nothing notable in these.

Test Plan: Viewed web UI.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10528
2014-09-24 13:50:57 -07:00
epriestley
d6639b68d5 Generate expected schemata for MetaMTA, Nuance, MetaData, OAuthServer
Summary: Ref T1191. Handful of minor things here (T6150, T6149, T6148, T6147, T6146) but nothing very noteworthy.

Test Plan: Viewed web UI, saw fewer errors.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10527
2014-09-24 13:50:00 -07:00
epriestley
cd4e3c6399 Make Releeph a normal prototype application
Summary: Fixes T6177. Now that we've reframed "Beta" into "Prototype", there's no reason this needs to be in a separate super-hidden class of application anymore.

Test Plan: Saw Releeph available as a normal Prototype application.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T6177

Differential Revision: https://secure.phabricator.com/D10550
2014-09-24 13:49:25 -07:00
Bob Trahan
93e1978e05 Support - Differential - fix rendering feed story where you removed a repository
Summary: Fixes T6176. Language here is a bit awkard but I wanted to use the verb "removed" *and* still have the object first, so I ended up adding the before details parenthetically.

Test Plan: story no longer fatal'd in my feed

Reviewers: epriestley, chad

Reviewed By: chad

Subscribers: epriestley, Korvin

Maniphest Tasks: T6176

Differential Revision: https://secure.phabricator.com/D10549
2014-09-24 12:09:59 -07:00
epriestley
84568eba84 Generate expected schemata for Maniphest
Summary:
Ref T1191.

  - Adds support for custom fields.
  - Adds support for partial indexes (indexes on a prefix of a column).
  - Drops old auxiliary storage table: this was moved to custom field storage about a year ago.
  - Drops old project table: this was moved to edges about two months ago.

Test Plan:
  - Viewed web UI, saw fewer issues.
  - Used `grep` to verify no readers/writers for storage or project table.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10526
2014-09-19 11:46:44 -07:00
epriestley
7dabc21154 Load all keys, support unique keys, and provide an "all issues" view
Summary:
Ref T1191. Three parts:

  - The old way of getting key information only got primary / unique / foreign keys, not all keys. Use `SHOW INDEXES` to get all keys instead.
  - Track key uniqueness and raise warnings about it.
  - Add a new "all issues" view to show an expanded, flat view of all issues. This is just an easier way to get a list so you don't have to dig around in the hierarchical view.

Test Plan:
{F206351}

{F206352}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10525
2014-09-19 11:46:30 -07:00
epriestley
6bfe8b5984 Generate expected schemata for Calendar
Summary:
Ref T1191.

  - There was a varchar(50) column. I changed it to `text64`, since this length is unusual.
  - There was an int(3) column. I changed it to `int32`, since this length is unusual.

Test Plan: Ran migrations, saw warnings disappear from config tool.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10524
2014-09-19 11:46:20 -07:00
epriestley
a42e4a867e Remove SlowvoteComment and storage
Summary: Ref T1191. This was migrated to transactions a very long time ago.

Test Plan: Ran migration, grepped, left comments in Slowvote.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10523
2014-09-19 05:45:36 -07:00
epriestley
7499cb24ce Generate expected schemata for Workers, XHProf, PHPAAST, Tokens, System, Slowvote
Summary: T1191. Nothing very notable here.

Test Plan: Saw more blue in web UI.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D10522
2014-09-19 05:45:24 -07:00
epriestley
e9ac3f436a Add expected schemata for Fund, Files, Flags and Legalpad
Summary: Ref T1191. Nothing too exciting in these.

Test Plan: Saw more blue in UI.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10521
2014-09-19 05:44:40 -07:00
epriestley
67fbfe6ccc Generate expected schemata for Doorkeeper, Draft, Drydock, Feed
Summary:
Ref T1191. Notable:

  - Allowed objects to remove default columns (some feed tables have no `id`).
  - Added a "note" severity and moved all the charset stuff down to that to make progress more clear.

Test Plan:
Trying to make the whole thing blue...

{F205970}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10519
2014-09-18 11:15:49 -07:00
epriestley
8d0f0d1391 Generate expected schemata for Dashboards and Conpherence
Summary:
Ref T1191.

  - Add edge schemata generation.
  - Hit a couple of mostly-minor issues (T6128, T6129, T6130).

Test Plan: Viewed schema in web UI.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10518
2014-09-18 11:15:38 -07:00
epriestley
1ead50c2cc Generate reasonable expected schemata for Chatlog, Conduit, Config, Countdown, Daemons
Summary: Ref T1191. Fills in some more of the databases. Nothing very notable here. I didn't encounter any issues or overlong keys.

Test Plan: Used web UI to click around and verify expected schemata match up against actual schemata well.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10516
2014-09-18 11:15:29 -07:00
Bob Trahan
3238f1e091 Projects - add "lock membership", which prevents people from leaving
Summary:
Fixes T5603. Puts the toggling of locking membership into the editor so we get exceptions and all that.

I think the dialogue when you try to leave a project that is locked could be a little better maybe? Right now it just says "You can't leave" and "The membership is locked" more or less; should I surface a link to the policy stuff there too?

Test Plan:
 - made a project, toggled the "lock" setting, observed stickiness and good transactions being made
 - locked a project and tried to leave as a non-editor - got a dialogue letting me know i couldn't
 - locked a project and tried to leave as an editor - left successfully

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T5603

Differential Revision: https://secure.phabricator.com/D10508
2014-09-18 11:00:50 -07:00
epriestley
9b63f84ff9 Generate reasonable expected schemata for Cache tables
Summary:
Ref T1191. Notable:

  - Rename `blob` to `bytes` for clarity.
  - Introduce raw schema specs.

Test Plan: See screenshots.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10501
2014-09-18 08:36:22 -07:00
epriestley
0f73b15a70 Generate reasonable expected schemata for Audit and Auth
Summary: Ref T1191. This fills in some more features and gets audit and auth nearly generating reasonable expected schemata.

Test Plan: See screenshots.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10500
2014-09-18 08:32:44 -07:00
epriestley
fb8da6f4af Support key schemata and column nullability
Summary:
Ref T1191. The major issue motivation here is that InnoDB keys have a maximum length of 767 bytes. When we move `utf8` colums to `utf8mb4` columns, they'll jump from 3 bytes per character to 4 bytes per character, which may make some indexes too long. Add key schema to help spot this.

Also add nullability since it doesn't hurt.

Test Plan: See screenshots.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10499
2014-09-18 08:32:21 -07:00
epriestley
aa481dba57 Begin generating meaningful expected schemata
Summary:
Ref T1191. This lays some groundwork for generating the expected schemata, so we can compare them to the actual schemata and produce a meaningful diff.

  - In general, each application will subclass `PhabricatorConfigSchemaSpec` and provide a definition of the tables it expects.
  - This class has helper methods to mostly-automatically build table definitions for Lisk and (in the future) edges.
  - When building expected schema, we specify a "data type", like "epoch". This is the type of data the application stores in the column, from the application's point of view. The SchemaSpec converts this into the best avilable storage type: for example, "text" will translate to `utf8mb4` if it's availalbe, or `binary` if not. This gives us a layer of indirection to insulate us from craziness.

Test Plan: See screenshots.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10497
2014-09-18 08:25:34 -07:00
epriestley
b24e36706d Generate expected and comparison schemata
Summary:
Ref T1191. This builds on the "view of the database as it exists" by building a view of the database as it is expected to exist (this is mostly empty for now) and comparing the two. We now render a view of the "comparison schema", which is the actual schema merged with the expected schema and annotated with the differences.

(I'm merging them like this because it makes it easier to handle both "missing" and "surpulus" warnings in a consistent way. If we tried to annotate just the actual or expected schema, the absence of components which are expected to exist is messy to handle.)

Test Plan: See screenshots.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10496
2014-09-18 08:22:54 -07:00
epriestley
12b53e003b Add a UI for reviewing database schemata
Summary:
Ref T1191. Plan here is:

  - Build a tool showing the current schemata status (this diff).
  - Have it compare the current status to the desired status (partly here, mostly in future diffs).
  - Then add a migration tool, and eventually a setup issue to tell people to run it.

Test Plan:
Reviewed current schemata.

{F204492}

{F204493}

{F204494}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10494
2014-09-18 08:22:18 -07:00
epriestley
ea602a082a Fix "are are" in explanatory text
Summary: See rP8806fb0296c2.

Test Plan:
me fail english

with bonus!

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D10514
2014-09-18 08:21:34 -07:00
epriestley
8806fb0296 Add missing "are" to explanatory text
Summary: See D10493.

Auditors: btrahan
2014-09-17 18:30:00 -07:00
epriestley
298604c9d3 Rename "beta" to "prototype" and document support policy
Summary:
Fixes T6084. Changes:

  - Rename `phabricator.show-beta-applications` to `phabricator.show-prototypes`, to reinforce that these include early-development applications.
  - Migrate the config setting.
  - Add an explicit "no support" banner to the config page.
  - Rename "Beta" to "Prototype" in the UI.
  - Use "bomb" icon instead of "half star" icon.
  - Document prototype applications in more detail.
  - Explicitly document that we do not support these applications.

Test Plan:
  - Ran migration.
  - Resolved "obsolete config" issue.
  - Viewed config setting.
  - Browsed prototypes in Applications app.
  - Viewed documentation.

Reviewers: chad, btrahan

Reviewed By: btrahan

Subscribers: epriestley, hach-que

Maniphest Tasks: T6084

Differential Revision: https://secure.phabricator.com/D10493
2014-09-17 18:25:57 -07:00
Bob Trahan
444ced16d9 Transactions - hide "mentioned in X" story if you can't see X
Summary: ...also re-jiggers all the anchor stuff to use $xaction ID. This seemed like the simplest way once I got in the code, as well as having nice properties for if / when we want to re-add some ajax stuff since the ID is a pretty solid piece of data to key off. Fixes T6083.

Test Plan: mentioned DX in private DX+1. Could see on DX the mention as me and not as the other user. For transactions, I left a comment on Paste and it worked, and I edited an existing transaction and it worked.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T6083

Differential Revision: https://secure.phabricator.com/D10488
2014-09-16 12:12:35 -07:00
Bob Trahan
936ee22de1 Differential - label unit / lint results from the commit diff as not applicable
Summary: Fixes T5536. Some bonus pht in there.

Test Plan: made a diff hovered over the stars and saw my new text.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T5536

Differential Revision: https://secure.phabricator.com/D10487
2014-09-16 12:11:54 -07:00
epriestley
7987b4b189 [Later] Drop legacyCommentID column from DifferentialTransactionComment
Summary: Ref T2222. No callsites. Holding until we're more clearly stable.

Test Plan: `grep`

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley, aran

Maniphest Tasks: T2222

Differential Revision: https://secure.phabricator.com/D8241
2014-09-14 16:29:15 -07:00
Bob Trahan
e8985fc9e7 Differential - change "closed by commit" comment to real transaction
Summary:
Implements a new transaction - still TYPE_ACTION - but using a new DifferentialAction::ACTION_COMMIT_CLOSE. Augment rendering as necessary to display this new transaction. Saves enough information so T3686 is possible but stops short of implementing a popup to display this information. Fixes T5875. Ref T3686.

One small display oddity - this new transaction now renders at the top of the transaction group whereas when it was a comment it was on the bottom. I think this is basically okay but if not how fix? (Playing with the "strength" of these actions will mess up the email too?)

Test Plan: made a diff X that fixed task Y. committed. checked diff X, task Y, and the commit pages for proper transactions and all looked good.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T3686, T5875

Differential Revision: https://secure.phabricator.com/D10485
2014-09-12 10:12:52 -07:00
epriestley
09fb5667cc Allow users to back initiatives in Fund
Summary:
Ref T5835. This is still completely made up (no payment integration), but you can "back" an initiative, type a number in the box, and generate a database row. You can then seach for backers and things you've backed and such.

Notable changes:

  - Renamed "FundBacking" to "FundBacker". The former name was sort of because you can back things multiple times, but stuff like `$backings` was just too weird.
  - I think that's it?

Test Plan:
  - Backed an initiative.
  - Viewed that I became a backer.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5835

Differential Revision: https://secure.phabricator.com/D10486
2014-09-12 06:31:11 -07:00
epriestley
e4f399b9fa Scaffolding for Fund
Summary:
Ref T5835. This is all pretty boilerplate, and does not interact with Phortune at all yet.

You can create "Initiatives", which have a title and description, and support most of the expected infrastructure (policies, transactions, mentions, edges, appsearch, remakrup, etc).

Only notable decisions:

  - Initiatives have an explicit owner. I think it's good to have a single clearly-responsible user behind an initiative.
  - I think that's it?

Test Plan:
  - Created an initiative.
  - Edited an initiative.
  - Changed application policy defaults.
  - Searched for initiatives.
  - Subscribed to an initiative.
  - Opened/closed an initiative.
  - Used `I123` and `{I123}` in remarkup.
  - Destroyed an initiative.

Reviewers: chad, btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5835

Differential Revision: https://secure.phabricator.com/D10481
2014-09-11 13:38:58 -07:00
epriestley
cae59d8345 Add an option to make it easier to debug page hangs
Summary:
Fixes T6044. We've had two cases (both the same install, coincidentally) where pages got hung doing too much data fetching.

When pages hang, we don't get a useful stack trace out of them, since nginx, php-fpm, or PHP eventually terminates things in a non-useful way without any diagnostic information.

The second time (the recent Macros issue) I was able to walk the install through removing limits on nginx, php-fpm, php, and eventually getting a profile by letting the page run for several minutes until the request completed. However, this install is exceptionally technically proficient and this was still a big pain for everyone, and this approach would not have worked if the page actually looped rather than just taking a long time.

Provide `debug.time-limit`, which should give us a better tool for reacting to this situation: by setting it to a small value (like 10), we'll kill the page after 10 seconds with a trace, before nginx/php-fpm/php/etc can kill it uselessly. Hopefully that will be enough information to find the issue (generally, getting a trace has been 95% of the problem in the two cases we've encountered).

Test Plan: Set this option to `3` and added a sleep loop, saw a termination after 3 seconds with a useful trace.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: csilvers, joshuaspence, epriestley

Maniphest Tasks: T6044

Differential Revision: https://secure.phabricator.com/D10465
2014-09-11 06:28:21 -07:00
epriestley
d3cd9115f9 Add ui.footer-items to add a custom page footer
Summary: Fixes T6052. Allow installs to link to legal documents, etc., in the page footer.

Test Plan:
  - Configured a footer.
  - Viewed workboards (no footer).
  - Viewed Conpherence (no apparent disruption, I think everything z-indexes over the footer).
  - Viewed stuff on mobile (seems OK).
  - Viewed login page (saw footer).

{F201718}

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T6052

Differential Revision: https://secure.phabricator.com/D10466
2014-09-10 14:44:34 -07:00
Bob Trahan
13834f1406 Transactions - don't let objects mention themselves.
Summary: Fixes T6059.

Test Plan: Made a comment on TX mentioning TX and TX+1. TX did not get a "mentioned" transaction while TX+1 did.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T6059

Differential Revision: https://secure.phabricator.com/D10464
2014-09-10 10:26:06 -07:00
epriestley
bee1e09fd1 Remove getPHID() from PhabricatorMentionableInterface
Summary: Some versions of PHP aren't very happy about both interfaces and superclasses defining a method. Just remove it from MentionableInterface and leave it as implicit.

Auditors: btrahan
2014-09-10 06:35:25 -07:00
Bob Trahan
c75495e63f Transactions - add infrastructure for "mentions"
Summary: Fixes T4036. Now if you say something on diff X like "This reminds me of Tx and Dy and commitHashFoo and Px." each of those objects gets a little visible transaction that the mention occurred. No feed, email, or notifications.

Test Plan: made a comment like above and verified transactions. also submitted a diff that "Fixes Tx" and Tx did not get the transaction as expected.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: joshuaspence, epriestley, Korvin

Maniphest Tasks: T4036

Differential Revision: https://secure.phabricator.com/D10451
2014-09-09 14:21:13 -07:00
Joshua Spence
0151c38b10 Apply some autofix linter rules
Summary: Self-explanatory.

Test Plan: Eyeball it.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D10454
2014-09-10 06:55:05 +10:00
epriestley
675cf3f6a3 Fix confusing documentation on maniphest.default-priority
Summary:
Fixes T6056. This documentation is out of date and not very useful.

We could probably fold this option into `maniphest.priorities` at some point.

Test Plan: Read documentation, clicked link.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T6056

Differential Revision: https://secure.phabricator.com/D10450
2014-09-09 09:01:39 -07:00
Bob Trahan
fdccb0f405 Maniphest - upgrade merging to real transactions
Summary: see title. Ref T5875.

Test Plan: Merged one task into another task - verified transactions on both tasks. Merged two tasks into another task - verified transactions on all three tasks. Checked out my feed and saw MERGE_INTO stories and MERGE_FROM stories.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T5875

Differential Revision: https://secure.phabricator.com/D10427
2014-09-08 14:17:35 -07:00
epriestley
f4f8e9bb96 Fix "Clsoed" typo
Summary: See D10112.

Test Plan: o.O

Reviewers: btrahan, chad, staticshock

Reviewed By: staticshock

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D10446
2014-09-08 13:20:35 -07:00
Joshua Spence
ee6afccb10 Fix some long lines to be less long
Summary: Self-explanatory.

Test Plan: `arc lint`

Reviewers: btrahan, #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D10438
2014-09-08 23:08:56 +10:00
epriestley
b772a2b92a Reduce the cost of loading large numbers of macros
Summary:
Ref T6013. I accidentally made this cost explosviely huge when fixing macros for logged out users in D10411.

Specifically, we'd load all the macros, which would load all the files, which would load all the macros (to do policy checks), which would fill out of cache I think (but maybe only some of the time?). Anyway, bad news.

Instead, only load the files if we need them.

Test Plan: Viewed macro main page, macro detail, used a macro, used a meme, edited a macro, edited audio.

Reviewers: btrahan, csilvers

Reviewed By: csilvers

Subscribers: epriestley, spicyj

Maniphest Tasks: T6013

Differential Revision: https://secure.phabricator.com/D10428
2014-09-05 17:30:26 -07:00
epriestley
ac4247ea59 Provide more information from diffusion.querycommits
Summary:
Ref T2783. Fixes T6039.

  - Provide `authorPHID` and `committerPHID` to resolve T6039.
  - In message parser, store author/email strings.
  - In cached results, emit author/email strings.

Test Plan: Called method with and without bypassCache. Used `reparse.php` to repopulate data on an old commit.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2783, T6039

Differential Revision: https://secure.phabricator.com/D10424
2014-09-05 12:27:55 -07:00
epriestley
25f4a23a95 When adding {Fnnn} file references by editing comments, link objects to files
Summary: Fixes T6037. We don't currently write the "this file is attached to such-and-such object" edge on comment edits.

Test Plan: Edited a comment, adding `{Fnnn}`. Verified file was not attached before the edit, but was afterward.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T6037

Differential Revision: https://secure.phabricator.com/D10423
2014-09-05 12:27:34 -07:00
epriestley
af842600ce Reword daemon configuration issue in response to user issues
Summary:
Ref T5968. Issues we've seen from users include:

  - Concern about severity ("... Need Restarting").
    - Reduce severity of explanatory text ("Different Config", "not severe").
    - Explain consequences in more detail.
    - In D10420, make "Ignore" easier to find.
    - Scope language for the multi-machine case ("at least one daemon").
  - Confusion about why daemons need restarting.
    - Unbury the lede ("Daemons and Web Have Different Config").
    - Make it clear that the root cause is a different checksum by showing the checksum. (This just hammers home that we're comparing checksums and this issue is about config checksums and we're not making it up, the checksums probably aren't that useful on their own.)
  - Difficulty understanding how to proceed when restarting does not resolve the issue:
    - Call out steps to take on the daemon console explicitly.
    - Walk through troubleshooting PHABRICATOR_ENV.
    - Walk through troubleshooting multiple `local.json`.

Test Plan: {F199245}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5968

Differential Revision: https://secure.phabricator.com/D10421
2014-09-05 12:27:20 -07:00