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

11026 commits

Author SHA1 Message Date
Chad Little
bf227f77a5 Update Phriction for PHUIDocumentViewPro
Summary: Moves Phriction to use PHUIDocumentViewPro

Test Plan: Read lots of documents, tablet, mobile, and desktop. Check ToC, non ToC, Edit a Maniphest Task, New Phriction Document, edit Phriction Document.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9826

Differential Revision: https://secure.phabricator.com/D14399
2015-11-22 13:11:20 -08:00
Jim Puls
9001d5de2c Add mask-icon for Safari pinned tab
Summary:
Addresses T9814. Adds SVG files to Celerity maps. Adds a mask-icon.svg file that
I made by pulling the existing favicon into Illustrator and running trace on it.

This hardcodes the header color from the default theme, and doesn't pay attention
to customizations of the header.

Test Plan: I pinned the tab in Safari.

Reviewers: epriestley, #blessed_reviewers, chad

Reviewed By: #blessed_reviewers, chad

Subscribers: chad, Korvin

Maniphest Tasks: T9814

Differential Revision: https://secure.phabricator.com/D14527
2015-11-22 13:04:06 -08:00
Chad Little
62e129d7a6 Allow Phame Blogs to be archived instead of deleted
Summary: Removes "delete" and uses "archive/activate" instead for Phame Blogs. Ref T9756

Test Plan: Archive a blog, see in search, activate blog, see in other search.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: joshuaspence, Korvin

Maniphest Tasks: T9756

Differential Revision: https://secure.phabricator.com/D14465
2015-11-21 08:54:22 -08:00
lkassianik
4d362ddcee Ref T6049, Add Phurl URL create capability
Summary: Ref T6049, Add Phurl URL create capability

Test Plan:
- Change {nav Home > Applications > Phurl > Configure} to allow no one to create Phurl URLs
- Attempt {nav Phurl > Shorten URL}. Should not be able to create a Phurl.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Maniphest Tasks: T6049

Differential Revision: https://secure.phabricator.com/D14510
2015-11-20 10:11:06 -08:00
cburroughs
d5cb3cd277 typo in storage message
Test Plan:
I didn't put any skill points in spelling since I need
combat skills to survive in a nuclear wasteland, but spell check says
this is better.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D14522
2015-11-19 12:40:50 -05:00
lkassianik
a41b857882 Ref T6049, Phurl object view should always display some sort of header.
Summary: Ref T6049, Phurl object view should display Phurl name or Phurl long url as header.

Test Plan:
- Create Phurl with no name. Header should show long url as header.
- Add name to Phurl. Header should be new Phurl name.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Maniphest Tasks: T6049

Differential Revision: https://secure.phabricator.com/D14502
2015-11-18 11:18:02 -08:00
epriestley
2e09a93dc1 Improve efficiency of worker task GC for huge loads
Summary:
Fixes T9808.

An instance imported a very large repository, generating approximately 4 million tasks over the course of a few days. A week later, these tasks started expiring and became candidates for garbage collection.

The GC works by deleting 100 rows at at time over and over again. It finds the rows it's going to delete by querying for old rows.

Currently, this query generates a `WHERE dateCreated < X ORDER BY id DESC` query. This query can not efficiently execute using a single key, because it relies on `dateCreated` order to find the rows, then on `id` order to sort them. With a table with 4M rows, this is slow.

This would still be OK, except that the query has to execute a lot of times since it only deletes 100 rows each time. Particularly, it needs to execute a total of ~40K times.

Instead, generate `WHERE dateCreated < X ORDER BY dateCreated DESC, id DESC`. This should have the same effect in general and the GC definitely doesn't care about the difference, but it should be more efficient at large scales.

Test Plan:
I had to `TRUNCATE` the problem table so I don't have a perfect repro to completely convincingly test this anymore. Both queries behave fine at small scales, which is why we haven't seen this before.

I was able to run the newer query in production before I nuked the table and have it complete in a reasonable amount of time, while the old query hung longer than I wanted to wait (several minutes?). The query plan for the new query was also a good one, while the query plan for the old query was terrible.

I loaded the daemon console and ran `bin/garbage collect --collector worker.tasks --trace`. I verified the queries looked reasonable and produced reasonable results in production.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9808

Differential Revision: https://secure.phabricator.com/D14505
2015-11-17 17:05:10 -08:00
lkassianik
59c5cd95e7 Remarkup links to link to short url instead of long and fix commenting on Phurl's
Summary: Ref T6049, remarkup links to use short URLs and make commenting on Phurl's actually work

Test Plan:
- Create Phurl `U123`
- Comment on that Phurl `((123))`
Comment should link to `/u/123`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Maniphest Tasks: T6049

Differential Revision: https://secure.phabricator.com/D14477
2015-11-17 11:02:13 -08:00
epriestley
06de605992 Extract PHIDs from transactions later, fixing Paste extraction/attachment
Summary:
Fixes T9787. Currently, file PHID extraction logic happens very early, before we normalize/merge/etc the transactions.

In D14390, I changed how the CONTENT transaction works: before, callers would pass in a file PHID. Afterward, they just pass in the content.

Passing in the content is generaly easier and feels more correct, but inadvertenly broke PHID extraction because converting the content into a file PHID now happened after we extracted the PHID. So we'd extract the entire text of the paste as a "file PHID", which wouldn't work.

Instead, extract file PHIDs later. This impacts a couple of other applications (Conpherence, Pholio) which receive an object or have an unusual file-oriented transaction.

Test Plan:
  - Made a new paste, verified the raw file attached to it properly.
  - Made and updated a mock, verified all the files attached properly.
  - Updated a Conpherence room image, verified the files attached properly.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9787

Differential Revision: https://secure.phabricator.com/D14494
2015-11-17 08:37:07 -08:00
epriestley
5aae89babb Fix file PHID extraction in Owners and Differential
Summary:
Ref T9787. To fix this, I want to change how file PHIDs are extracted slightly: specifically, I'm going to extract them later in the editing process.

Before doing this, clean up a couple of bad implementations:

  - Owners extracts its description as a file PHID. This is an error.
    - Extract the description as a remarkup block instead.
    - Add an edge table so stuff like file attachment works properly.
  - Differential has a no-op extract method. This is presumably just a copy/paste issue from long ago.

Test Plan:
  - Edited a revision in Differential.
  - Dropped a file into the description of an Owners package.
    - Before change: this did not attach the file.
    - After change: the file now attaches properly and shows up as "Attached" in the file details.

Reviewers: chad, joshuaspence

Reviewed By: joshuaspence

Subscribers: joshuaspence

Maniphest Tasks: T9787

Differential Revision: https://secure.phabricator.com/D14493
2015-11-17 08:36:50 -08:00
Joshua Spence
26a235ab8a Make Herald rules subscribable
Summary: Fixes T9757.

Test Plan: Created a Herald rule and then subscribed to it with a different account.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Maniphest Tasks: T9757

Differential Revision: https://secure.phabricator.com/D14468
2015-11-17 06:27:13 +11:00
Joshua Spence
cf2eb0dd5f Move some files around
Summary: Move some `PhabricatorPolicyRule` implementations to a subdirectory of the parent application.

Test Plan: N/A

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14478
2015-11-17 06:26:13 +11:00
epriestley
12dd9ec3ff Have EditEngine API methods provide the correct application to Conduit
Summary:
Fixes T9799. Currently, if you can't see an application like Paste, we fatal when trying to generate a result for `conduit.query`, because the new EditEngine-based `paste.edit` method doesn't "know" that it's a "Paste" method.

Straighten this out, and use policies and queries a little more correctly/consistently.

Test Plan:
  - Called `conduit.query` as a user who does not have permission to use Paste.
  - Before change: fatal.
  - After change: results, excluding "paste.*" methods.

Reviewers: chad

Reviewed By: chad

Subscribers: cburroughs

Maniphest Tasks: T9799

Differential Revision: https://secure.phabricator.com/D14492
2015-11-16 10:02:50 -08:00
epriestley
5963c4c9e0 Fix history link in Diffusion non-root browse views
Summary:
Fixes T9798. That task has good repro instructions.

In sub-views, we don't link the "History" icon correctly -- we only link it to `history/README` instead of `history/path/to/README`. Add the full path.

Also canonicalize the paths in a slightly prettier and more consistenty way.

Test Plan: Viewed root and non-root browse tables, saw links show up properly.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9798

Differential Revision: https://secure.phabricator.com/D14491
2015-11-16 09:00:29 -08:00
Joshua Spence
1a84a2fe4b Permanently destroy Almanac properties with the destruction engine
Summary: As suggested in D14461.

Test Plan: Used `./bin/remove destroy` on an Almanac service with properties attached, saw entries removed from the `phabricator_almanac.almanac_property` table.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14490
2015-11-15 20:58:50 +00:00
Joshua Spence
67b6c532bc Allow device bindings to be destroyed
Summary: Ref T9762. Currently it is not possible to destroy an Alamanac device because any associate bindings cannot be destroyed.

Test Plan: Destroyed an Almanac device.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Maniphest Tasks: T9762

Differential Revision: https://secure.phabricator.com/D14461
2015-11-16 07:14:55 +11:00
Joshua Spence
1f1c3f4075 Allow lint messages to be rendered as Remarkup
Summary: Some linter messages, such as those produced by `ArcanistPHPCompatibilityXHPASTLinterRule`, contain backticks but are currently rendered as Remarkup literals. I think that it is generally desirable to allow lint messages to be rendered as Remarkup, although we should ideally have a way to render Remarkup for use on the command line (I actually think that this already exists, but I don't think that `arc lint` does this when rendering linter messages).

Test Plan: Resubmitted D14481 to my dev install and saw Remarkuped lint messages.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14485
2015-11-15 19:50:10 +00:00
Joshua Spence
ca0b36c174 Rename XHPAST database
Summary: Rename the XHPAST database from `{$NAMESPACE}_xpastview` to `{$NAMESPACE}_xhpast`.

Test Plan: Ran `./bin/storage --namespace test upgrade --no-quickstart`.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14442
2015-11-14 21:41:28 +11:00
Chad Little
50d158a8c4 Fix publish time on Phame Posts
Summary: This logic is inverted. Re-vert it.

Test Plan: Write and publish a new post, see publish time.

Reviewers: epriestley, joshuaspence

Reviewed By: joshuaspence

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14464
2015-11-13 16:52:05 +00:00
Joshua Spence
feca8fbdec Use monograms for Herald URIs
Summary: I think `HeraldRule`s are the only objects which have monograms but are not accesible via `/{$monogram}`. This diff changes the `/herald/rule/{$id}` URI to `/{$monogram}`.

Test Plan: Clicked a bunch of links in Herald to ensure there were no dead links.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14469
2015-11-13 07:07:00 +11:00
Joshua Spence
a1737ef9c7 Fix a translation
Summary: Fixes T9763.

Test Plan: Merged tasks, saw translations.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Maniphest Tasks: T9763

Differential Revision: https://secure.phabricator.com/D14473
2015-11-13 07:04:48 +11:00
Aviv Eyal
e8fdf478bb JIRA Integration: Link and/or Comment
Summary:
Current JIRA integration is quite noisy in terms of email, and makes users hunt and peck for the related revisions.

Teach it to create an Issue Link on the JIRA side, and allow to disable commenting.

Test Plan: comment on revision in each of the 4 settings, check JIRA end for expected result.

Reviewers: btrahan, eMxyzptlk, epriestley, #blessed_reviewers, avivey

Reviewed By: epriestley, #blessed_reviewers

Subscribers: avivey, vhbit, jra3, eMxyzptlk, frenchs, aik099, svemir, rmuslimov, cpa199, waynea, epriestley, Korvin, hach-que

Projects: #doorkeeper

Maniphest Tasks: T5422

Differential Revision: https://secure.phabricator.com/D9858
2015-11-12 19:30:43 +00:00
epriestley
7e3d8082df Fix missing EditEngineConfig on indirect pathway through conduit.query
Summary: Fixes T9772. We now need an EditEngineConfiguration to do interesting things with EditEngine, but this public API wasn't properly making sure we have one.

Test Plan: Called `conduit.query` from web console. Fatal prior to patch; success afterward.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9772

Differential Revision: https://secure.phabricator.com/D14475
2015-11-12 11:22:37 -08:00
Joshua Spence
bb9b25a7ba Remove the PhortuneNotImplementedException class
Summary: Replace `PhortuneNotImplementedException` with `PhutilMethodNotImplementedException`.

Test Plan: N/A

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14445
2015-11-12 06:33:39 +11:00
Joshua Spence
321c61a853 Remove daemon envHash and envInfo
Summary: Ref T7053. Remove the `envHash` and `envInfo` fields, which are no longer used now that the daemons restart automagically. Depends on D14458.

Test Plan: Saw no more setup issues.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: tycho.tatitscheff, epriestley

Maniphest Tasks: T7053

Differential Revision: https://secure.phabricator.com/D14446
2015-11-11 08:54:45 +11:00
Joshua Spence
a07a8aca24 Add a daemon overseer module to restart daemons when config changes
Summary: Fixes T7053. Depends on D14452.

Test Plan:
Created a custom daemon which dumps out the config hash (by querying `PhabricatorEnv::calculateEnvironmentHash()`). Ran this daemon with `./bin/phd debug PhabricatorDebugDaemon` and saw the config hash update within 30 seconds.

{P1886}

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Maniphest Tasks: T7053

Differential Revision: https://secure.phabricator.com/D14458
2015-11-11 08:44:18 +11:00
Chad Little
9f2fc7f938 Only send Phame Post body on new creation
Summary: Right now we're attaching the body of every Phame post on each comment, at least restrict it to newly created objects only.

Test Plan: Write a new post, get full email, leave a comment, get less email.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14459
2015-11-10 13:29:19 -08:00
Chad Little
1365b37fae Make deleting a blog a little easier to recover from
Summary: We currently orphan posts when you delete a blog. Fixes some visibility and permission errors when that happens. Also... should allow you to archive posts.

Test Plan: Delete a blog, visit a post I made, still can see it.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9360

Differential Revision: https://secure.phabricator.com/D14457
2015-11-10 11:55:52 -08:00
epriestley
0398097498 Allow ApplicationEditor forms to be reconfigured
Summary:
Ref T9132. This diff doesn't do anything interesting, it just lays the groundwork for more interesting future diffs.

Broadly, the idea here is to let you create multiple views of each edit form. For example, we might create several different "Create Task" forms, like:

  - "New Bug Report"
  - "New Feature Request"

These would be views of the "Create Task" form, but with various adjustments:

  - A form might have additional instructions ("how to file a good bug report").
  - A form might have prefilled values for some fields (like particular projects, subscribers, or policies).
  - A form might have some fields locked (so they can not be edited) or hidden.
  - A form might have a different field order.
  - A form might have a limited visibility policy, so only some users can access it.

This diff adds a new storage object (`EditEngineConfiguration`) to keep track of all those customizations and represent "a form which has been configured to look and work a certain way".

This doesn't let these configurations do anything useful/interesting, and you can't access them directly yet, it's just all the boring plumbing to enable more interesting behavior in the future.

Test Plan:
ApplicationEditor forms now let you manage available forms and edit the current form:

{F959025}

There's a new (bare bones) list of all available engines:

{F959030}

And if you jump into an engine, you can see all the forms for it:

{F959038}

The actual form configurations have standard detail/edit pages. The edit pages are themselves driven by ApplicationEditor, of course, so you can edit the form for editing forms.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9132

Differential Revision: https://secure.phabricator.com/D14453
2015-11-10 10:24:40 -08:00
epriestley
b3d3130b71 Fix a potentially lax hash comparison
Summary: Via HackerOne. See D14025. I missed this comparison when making the original change.

Test Plan:
  - Used `cat mail.txt | scripts/mail/mail_handler.php --process-duplicates` to pipe mail in a whole lot of times.
  - Tried bad hashes, saw rejections.
  - Tried good hash, saw mail accepted.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D14455
2015-11-10 10:22:25 -08:00
lkassianik
64ad44cffb Always override auth.email-domains when running unit tests
Summary: Fixes T9689, Always override `auth.email-domains` when running unit tests

Test Plan:
- Set `auth.email-domains`
- Run `arc unit --everything`.
Observe no errors.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Maniphest Tasks: T9689

Differential Revision: https://secure.phabricator.com/D14456
2015-11-10 10:15:10 -08:00
Chad Little
3747a35476 Allow mail replies to Phame Posts
Summary: Adds mail reply support to Phame Posts.

Test Plan: Comment on a post, get mail.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9746

Differential Revision: https://secure.phabricator.com/D14454
2015-11-10 17:41:05 +00:00
lkassianik
2b5bb642c0 Provide a more informative alternative to 404 on invalid shortened Phurl URL
Summary: When accessing an invalid URL on the short Phurl domain, users should see informative message

Test Plan: Open URL in the previously configured Phurl short domain such as `https://www.zz.us` and see dialog with message. Open `https://www.zz.us/u/123` for a valid `U123` Phurl and access destination URL.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14450
2015-11-10 08:43:17 -08:00
Chad Little
b315f61f49 Add comments to internal Phame Posts
Summary: Adds commenting to Phame Posts, also testing a new "document comment style". Unsure about it but Phame is a prototype so good place to explore.

Test Plan: Leave some comments, see some comments, test show/hide.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9746

Differential Revision: https://secure.phabricator.com/D14451
2015-11-10 08:19:38 -08:00
David Fisher
c589af51e8 add "update" mode to Diffusion coverage Conduit
Summary:
This diff adds a new mode argument to the Diffusion Conduit API with two options:
- "overwrite": the default, maintains the current behavior of deleting all coverage
  in the specified branch before uploading the new coverage
- "update": does not delete old coverage, but will overwrite previous
  coverage information if it's for the same file and commit

`DiffusionRequest::loadCoverage` already loads a file's coverage from the
latest available commit, so uploading coverage for different files in different
commits with "update" will result in seeing the latest uploaded coverage in
Diffusion.

Test Plan: manual local verification

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14428
2015-11-09 16:52:34 -08:00
Chad Little
7fd6704fb5 Add a crumb to blog on Phame posts
Summary: Crumbies

Test Plan: View post, see blog link, click on crumb, see blog

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14449
2015-11-09 22:18:27 +00:00
Chad Little
ada7d45a00 Remove comment plugins from Phame
Summary: Cleaning up house, may revisit in a v2. Removes ability to set Disqus or Facebook comments as comment system on Phame Posts.

Test Plan: Create blog, create post, edit blog, view live pages.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: btrahan, Korvin

Maniphest Tasks: T9746

Differential Revision: https://secure.phabricator.com/D14448
2015-11-09 11:51:56 -08:00
lkassianik
d8111f828f Allow a domain other than the install domain to serve as a short Phurl domain
Summary: Ref T8995, config option for Phurl short domain to share shortened URL's

Test Plan:
- Configure Phurl short domain to something like "zz.us"
- Navigate to `zz.us`; get 404
- Navigate to `zz.us/u/3` or `zz.us/u/alias` where `U3` is an existing Phurl; redirect to correct destination

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Maniphest Tasks: T8995

Differential Revision: https://secure.phabricator.com/D14447
2015-11-09 11:34:20 -08:00
Chad Little
df23d893f7 Remove Join Policy from Phame
Summary: Drops Join Policy, uses Edit Policy where needed. Allows anyone with Blog Edit permissions to post and edit any post on that blog. Fixes T5371

Test Plan: Draft Post as chad, see post, log in with notchad, edit that post and publish it.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T5371

Differential Revision: https://secure.phabricator.com/D14444
2015-11-09 08:52:58 -08:00
Joshua Spence
a2f909f0bd Improve XHPAST handling of syntax errors
Summary: Currently, a bunch of developers are using #xhpast for writing custom linter rules. As such, we end up with a fair few `XHPASTSyntaxErrorException` in our PHP error logs. I think that throwing an exception is not quite correct in this case because it is somewhat expected that invalid PHP may be entered. Instead, catch the exception and show the user a helpful message.

Test Plan: This doesn't quite work yet... the stream and tree views render as blank but the exceptions still propogate to the error logs. Mostly, I'm not sure how the exception should be rendered for display.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14028
2015-11-09 07:03:32 +11:00
Chad Little
c3ecea9788 Add mail support to PhameBlog
Summary: Add some mailkeys, allow feed stories to be published.

Test Plan: New Blog, Edit Blog

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14434
2015-11-08 08:11:47 -08:00
epriestley
2b41ed01c6 Fix no-op transaction error on paste.create Conduit API method
Summary:
Fixes T9735. I changed how the TYPE_LANGUAGE transction works a little but that accidentally tripped an error condition in `paste.create`.

  - Don't bail on no-effect transactions to `paste.create` (like not setting a language).
  - When a transaction type has no tailored UI message, make it easier to figure out which transaction is problematic.

Test Plan: Ran `arc paste ...` locally. Got an error before the patch, clean paste creation afterward.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9735

Differential Revision: https://secure.phabricator.com/D14440
2015-11-08 07:09:53 -08:00
Chad Little
c86a514f84 Add Subscribers to Phame Blogs / Posts
Summary: Fixes T9051, adds ability to edit blogs and posts and manually add subscribers. Also fixed bug granting tokens to posts.

Test Plan: Create a new blog, subcribe chad and notchad. Write a post, both are notified. Award token for hard work.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9051

Differential Revision: https://secure.phabricator.com/D14432
2015-11-08 07:04:34 -08:00
epriestley
152ddf5709 Use unicode mode when tokenizing strings like user realnames
Summary:
Fixes T9732. We currently tokenize strings (like user realnames) in the default non-unicode mode, which can cause patterns like `\s` to work incorrectly.

Use `/u` to use unicode-aware tokenization instead.

Test Plan:
The behavior of "\s" depends upon environmental settings like LC_ALL.

With LC_ALL set to "C", `\xA0` is not considered a whitespace character.
With LC_ALL set to "en_US", it is:

```
$ php -r 'setlocale(LC_ALL, "C"); echo count(preg_split("/\s/", "\xE5\xBF\xA0")) . "\n";'
1
$ php -r 'setlocale(LC_ALL, "en_US"); echo count(preg_split("/\s/", "\xE5\xBF\xA0")) . "\n";'
2
```

To reproduce the original issue, I added an explicit:

```
setlocale(LC_ALL, "en_US");
```

...call before the `preg_split()` call. This caused "忠" to be improperly split.

I then added "/u", and observed proper tokenization.

Reviewers: chad

Reviewed By: chad

Subscribers: qiu8310

Maniphest Tasks: T9732

Differential Revision: https://secure.phabricator.com/D14441
2015-11-08 07:03:09 -08:00
Chad Little
37df419266 Add Can Create Policy Capability to Phame Blogs
Summary: Larger (open) installs may want to restrict Blog to formal entities, like with Phriction.

Test Plan: Set policy to administrators, have notchad try to create a blog. See error.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14433
2015-11-08 07:00:18 -08:00
Aviv Eyal
3dd2e1fc6d Scuttle Workboards if Maniphest is not installed
Summary: fix T9718.

Test Plan: view project page when maniphest is and isn't. Look for Workboards.

Reviewers: #blessed_reviewers, chad

Reviewed By: #blessed_reviewers, chad

Subscribers: epriestley

Maniphest Tasks: T9718

Differential Revision: https://secure.phabricator.com/D14438
2015-11-08 03:25:21 +00:00
Chad Little
97d74db98b Add PhamePost body content to emails
Summary: Sends out the body of the post along with the details.

Test Plan: Write a new post, see body in email.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9360

Differential Revision: https://secure.phabricator.com/D14431
2015-11-07 08:41:17 -08:00
lkassianik
6dda67702a Starting the Calendar user guide
Summary: Ref T7951, Starting the Calendar user guide

Test Plan: Go to {nav Diviner > Phabricator User Docs > Calendar User Guide}, read about how fabulous the Calendar application is.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T7951

Differential Revision: https://secure.phabricator.com/D13496
2015-11-07 07:50:47 -08:00
lkassianik
28b8c8e212 HTML emails for Calendar event description changes should respect remarkup rules
Summary: Ref T7964, HTML emails for Calendar event description changes should respect remarkup rules

Test Plan: Create event and edit description, check that email has a correctly formatted remarkup description section.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T7964

Differential Revision: https://secure.phabricator.com/D13554
2015-11-07 07:39:52 -08:00
Chad Little
f8b085c574 Add a transaction for PhamePost visibility
Summary: Adds ability to set visibility when authoring a Post. New default is "Visible". If you write a post and save it as a Draft, and later click publish, a feed story and mail will go out.

Test Plan: Write a new Post, see feed story and get email. Write a new Draft, get nothing. Click Publish, see story and email.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9360

Differential Revision: https://secure.phabricator.com/D14429
2015-11-07 06:52:58 -08:00
lkassianik
268fac25d5 Add Phurl Remarkup
Summary: Ref T9722, Add Phurl Remarkup as `((id))` or `((alias))`

Test Plan: Add a comment to any object as `((id))` or `((alias))`. Make sure comment renders as a link.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Maniphest Tasks: T9722

Differential Revision: https://secure.phabricator.com/D14427
2015-11-06 19:42:20 -08:00
Chad Little
6fe2377cc2 Add mail/feed support to PhamePost
Summary: Allows feed stories and mail for new Phame Posts.

Test Plan: Write Post, Get Mail

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14426
2015-11-06 17:43:46 -08:00
epriestley
80f1d01602 Fix Oblivious skin summary remarkup and partially fix title
Summary: Ref T9546. I only got the title to always show the blog title (better than nothing) -- showing the post title properly isn't trivial and is more work than I want to do right now.

Test Plan:
  - Description now has remarkup.
  - Title now shows blog title (better than nothing).

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9546

Differential Revision: https://secure.phabricator.com/D14423
2015-11-06 20:24:11 +00:00
Chad Little
3a90cb56b4 Clean up Oblivious skin
Summary: Adds Remarkup rules and CSS, cleans up some spacing a color. Ref T9546

Test Plan: Review a blog post list, and a blog

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9546

Differential Revision: https://secure.phabricator.com/D14421
2015-11-06 11:40:54 -08:00
Joshua Spence
af7b16248e Fix a translation
Summary: Fixes T9655.

Test Plan: I haven't tested this... it seems simple enough.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Maniphest Tasks: T9655

Differential Revision: https://secure.phabricator.com/D14375
2015-11-06 13:39:35 +11:00
Chad Little
5024560de1 Modernize Phame
Summary: Updates Phame for new modern methods.

Test Plan: New blog, edit blog, new post, edit post, publish post.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14419
2015-11-05 15:29:59 -08:00
Chad Little
e4806631a5 Use PHUIDocumentProView in Phame
Summary: Updates "View Post" to use PHUIDocumentViewPro, updates calls to `newPage` and other minor modernizations. Edit Page updated to show proper document display as well. Ref T9545

Test Plan:
Write a blog post, edit it.

{F945897}

{F945896}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9545

Differential Revision: https://secure.phabricator.com/D14415
2015-11-05 12:14:45 -08:00
lkassianik
9132b565d5 Updating xaction titles for Phurl updates
Summary: Ref T8992, Cleaning up and clarifying xaction titles for Phurl creation/updating.

Test Plan: Create a Phurl, update information, make sure xaction in the timeline makes sense.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Maniphest Tasks: T8992

Differential Revision: https://secure.phabricator.com/D14414
2015-11-05 10:54:45 -08:00
lkassianik
e2c0df4fb4 Preventing duplicate empty string aliases in Phurl's
Summary: Ref T8992, Make it impossible to save an empty string alias for a Phurl.

Test Plan:
- Create two Phurl's with non-empty aliases
- Delete aliases for both Phurl's
- Previously, this wouldn't allow to save the second Phurl because of a duplicate alias. Current diff should save empty alias as `null`, not empty string.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Maniphest Tasks: T8992

Differential Revision: https://secure.phabricator.com/D14413
2015-11-05 10:14:07 -08:00
Chad Little
6a035d977f Tweak grey tag color
Summary: This is a bit too grey, and doesn't match our theme well (see sequence navs)

Test Plan: Remarkup reference article, sequence navs

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14408
2015-11-04 13:53:56 -08:00
epriestley
621f806e3b Provide formal Users/Projects/Mailable fields for EditEngine
Summary: Ref T9132. This allows you to prefill EditEngine forms with stuff like `?subscribers=epriestley`, and we'll figure out what you mean.

Test Plan:
  - Did `/?subscribers=...` with various values (good, bad, mis-capitalized).
  - Did `/?projects=...` with various values (good, bad, mis-capitalized).
  - Reviewed documentation.
  - Reviewed {nav Config > HTTP Parameter Types}.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9132

Differential Revision: https://secure.phabricator.com/D14404
2015-11-04 12:05:41 -08:00
epriestley
20e4c3fbd4 Modularize complex HTTP parameter types
Summary:
Ref T9132. We have several places in the code that sometimes need to parse complex types. For example, we accept all of these in ApplicationSearch and now in ApplicationEditor:

> /?subscribers=cat,dog
> /?subscribers=PHID-USER-1111
> /?subscribers[]=cat&subscribers[]=PHID-USER-2222

..etc. The logic to parse this stuff isn't too complex, but it isn't trivial either.

Right now it lives in some odd places. Notably, `PhabricatorApplicationSearchEngine` has some weird helper methods for this stuff. Rather than give `EditEngine` the same set of weird helper methods, pull all this stuff out into "HTTPParameterTypes".

Future diffs will add "Projects" and "Users" types where all the custom parsing/lookup logic can live. Then eventually the Search stuff can reuse these.

Generally, this just breaks the code up into smaller pieces that have more specific responsibilities.

Test Plan: {F944142}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9132

Differential Revision: https://secure.phabricator.com/D14402
2015-11-04 12:05:21 -08:00
epriestley
9de4bc6f3a Slightly improve organization of PhabricatorApplicationEditEngine
Summary: Ref T9132. This just moves code around, breaks it up into some smaller chunks, tries to reduce duplication, and adds a touch of documentation.

Test Plan: Created and edited pastes.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9132

Differential Revision: https://secure.phabricator.com/D14398
2015-11-04 12:05:06 -08:00
Aviv Eyal
1898864b6c add initiator.phid parameter to HM builds
Summary:
Fix T9662.

Record who initiated the build, and allow this information as a parameter.

In this implementation, a 're-run' keeps the original initiator, which we maybe not desired?

Test Plan:
Make a HTTP step with initiator.phid, trigger manually, via HM, via ./bin/harbormaster build.
Look at requests made.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Maniphest Tasks: T9662

Differential Revision: https://secure.phabricator.com/D14380
2015-11-04 18:32:18 +00:00
lkassianik
5c6d2be18f Helper method for max text field length and validate alias length
Summary: Ref T8992, Validate alias text field length.

Test Plan: Create Phurl with alias of more than 64 characters. Get error. Reduce length of alias to successfully save Phurl.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Maniphest Tasks: T8992

Differential Revision: https://secure.phabricator.com/D14403
2015-11-04 10:22:23 -08:00
Chad Horohoe
e80970eba0 Allow editing hosting policies via command line
Summary:
Exposes the serve-over-http and serve-over-ssh options for a repository
to the `bin/repository edit` endpoint.

Test Plan: Ran `bin/repository` with the new options over several hundred repos

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, chasemp, 20after4, epriestley

Differential Revision: https://secure.phabricator.com/D14250
2015-11-04 10:15:42 -08:00
lkassianik
262d7b7780 Check that Phurl alias is unique
Summary: Ref T8992, Phurl aliases must be unique. Otherwise throw an error.

Test Plan: Create two Phurl's both with alias 'asdf'. When saving second Phurl, form should show an error about the duplicate alias.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Maniphest Tasks: T8992

Differential Revision: https://secure.phabricator.com/D14401
2015-11-04 09:05:37 -08:00
Aviv Eyal
18f0371b71 Remove Certificate page
Summary: Closes T9703. This page has become redundant 10 months ago, at D10988.

Test Plan: Look at /settings page, don't see word "Certificate".

Reviewers: epriestley, #blessed_reviewers, chad

Reviewed By: #blessed_reviewers, chad

Subscribers: Korvin

Maniphest Tasks: T9703

Differential Revision: https://secure.phabricator.com/D14400
2015-11-04 06:35:22 +00:00
lkassianik
2b05f7cc43 Add an alias to Phurl URL's
Summary: Ref T8992, Add an alias to Phurl URL's that can be used to redirect to link.

Test Plan: Add an alias to Phurl object, and navigate to `local.install.com/u/<newalias>`. This should redirect to the Phurl's URL.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: joshuaspence, Korvin

Maniphest Tasks: T8992

Differential Revision: https://secure.phabricator.com/D14395
2015-11-03 19:09:42 -08:00
Chad Little
39f8feab5a PHUIDocumentViewPro tweaks
Summary: Use in MailCommands and HTTP Parameters

Test Plan: Tested MailCommands in Paste, HTTP Parameters in Paste, Legalpad, Diviner. Mobile and Desktop breakpoints.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14397
2015-11-03 13:43:26 -08:00
epriestley
6b194af669 Default newPage() to device-ready
Summary:
Ref T9690. The "meta viewport" tag got dropped by accident because of the sort of weird logic on the old flow.

Make the default device-ready, then just turn it off for the tiny number of non-device pages.

Test Plan:
  - Verified meta viewport tag appears on normal pages again.
  - Verified it doesn't show up on non-mobile pages like Maniphest Reports.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9690

Differential Revision: https://secure.phabricator.com/D14396
2015-11-03 20:51:12 +00:00
epriestley
5030ba0401 Roughly generate transaction-oriented API methods from EditEngines
Summary:
Ref T5873. Ref T9132. This is really rough and feels pretty flimsy at the edges (missing validation, generality, modularity, clean error handling, etc) but gets us most of the way toward generating plausible "whatever.edit" Conduit API methods from EditEngines.

These methods are full-power methods which can do everything the edit form can, automatically support the same range of operations, and update when new fields are added.

Test Plan:
  - Used new `paste.edit` to create a new Paste.
  - Used new `paste.edit` to update an existing paste.
  - Applied a variety of different transactions.
  - Hit a reasonable set of errors.

{F941144}

{F941145}

{F941146}

{F941147}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T5873, T9132

Differential Revision: https://secure.phabricator.com/D14393
2015-11-03 10:12:37 -08:00
epriestley
3dec4c7dbd Provide contextual documentation explaining how to prefill ApplicationEditor create forms
Summary:
Ref T9132. Although forms do generally support prefilling right now, you have to guess how to do it.

Provide an explicit action showing you which values are supported and how to prefill them. This is generated automatically when an application switches to ApplicationEditor.

Test Plan:
{F939804}

{F939805}

{F939806}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9132

Differential Revision: https://secure.phabricator.com/D14392
2015-11-03 10:12:17 -08:00
epriestley
105cbaaee1 Implement a basic version of ApplicationEditor in Paste
Summary:
Ref T9132. Ref T4768. This is a rough v0 of ApplicationEditor, which replaces the edit workflow in Paste.

This mostly looks and works like ApplicationSearch, and is heavily modeled on it.

Roughly, we define a set of editable fields and the ApplicationEditor stuff builds everything else.

This has no functional changes, except:

  - I removed "Fork Paste" since I don't think it's particularly useful now that pastes are editable. We could restore it if users miss it.
  - Subscribers are now editable.
  - Form field order is a little goofy (this will be fixed in a future diff).
  - Subscribers and projects are now race-resistant.

The race-resistance works like this: instead of submitting just the new value ("subscribers=apple, dog") and doing a set operation ("set subscribers = apple, dog"), we submit the old and new values ("original=apple" + "new=apple, dog") then apply the user's changes as an add + remove ("add=dog", "remove=<none>"). This means that two users who do "Edit Paste" at around the same time and each add or remove a couple of subscribers won't overwrite each other, unless they actually add or remove the exact same subscribers (in which case their edits legitimately conflict). Previously, the last user to save would win, and whatever was in their field would overwrite the prior state, potentially losing the first user's edits.

Test Plan:
  - Created pastes.
  - Created pastes via API.
  - Edited pastes.
  - Edited every field.
  - Opened a paste in two windows and did project/subscriber edits in each, saved in arbitrary order, had edits respected.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4768, T9132

Differential Revision: https://secure.phabricator.com/D14390
2015-11-03 10:11:54 -08:00
epriestley
1b00ef08a0 Remove some low-hanging buildStandardPageResponse() methods
Summary: Ref T9690. I wanted to do an example of how to do these but it looks like most of them are trivial (no callsites) and the rest are a little tricky (weird interaction with frames, or in Releeph).

Test Plan:
  - Used `grep` to look for callsites.
  - Hit all applications locally, everything worked.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9690

Differential Revision: https://secure.phabricator.com/D14385
2015-11-03 10:11:36 -08:00
epriestley
300c74c49d Make mobile navigation work properly by default in more cases
Summary:
Fixes T5752. This obsoletes a bunch of old patterns and I'll follow up on those with a big "go do a bunch of mechanical code changes" task. Major goals are:

  - Don't load named queries multiple times on search pages.
  - Don't require extra code to get standard navigation right on mobile.
  - Reduce the amount of boilerplate in ListControllers.
  - Reduce the amount of boilerplate around navigation/menus in all controllers.

Specifically, here's what this does:

  - The StandardPage is now a smarter/more structured object with `setNavigation()` and `setCrumbs()` methods. More rendering decisions are delayed until the last possible moment.
    - It uses this to automatically add crumb actions to the application menu.
    - It uses this to automatically reuse one SearchEngine instead of running queries multiple times.
  - The new preferred way to build responses is `$this->newPage()` (like `$this->newDialog()`), which has structured methods for adding stuff (`setTitle()`, etc).
  - SearchEngine exposes a new convenience method so you don't have to do all the controller delegation stuff.
  - Building menus is generally simpler.

Test Plan:
  - Tested paste list, view, edit, comment, raw controllers for functionality, mobile menu, crumbs, navigation menu.
  - Edited saved queries.
  - Tested Differential, Maniphest (no changes).
  - Verified the paste pages don't run any duplicate NamedQuery queries.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T5752

Differential Revision: https://secure.phabricator.com/D14382
2015-11-03 10:11:24 -08:00
Chad Little
2ca269cb31 Replace Roboto Slab with Aleo for PHUIDocumentView
Summary: These fonts are functionally very similar, but in diagnosing a problem with mobile Safari/Chrome, it turned out that our use of "bold" with the "normal" font build created a "semibold" look when on desktop and a "normal" look on mobile. The "semibold" feel is more important, so finding a lighter "bold" font was the impetus for this font switch. As it turns out **Aleo** is built by the same author as **Lato** (our other font) and is intended as it's companion. So stylistically, this is the more correct font.

Test Plan:
Test Phriction, Legalpad, Diviner, Desktop and Mobile

{F938013}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14391
2015-11-02 20:02:42 -08:00
lkassianik
60cf71e724 Validate new Phurl URL
Summary: Closes T9691, Validate URL on Phurl objects for using valid protocols.

Test Plan: Create or edit URL. Change URL to "asdf" and observe error. Change back to "http://google.com" and observe no error.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Maniphest Tasks: T9691

Differential Revision: https://secure.phabricator.com/D14389
2015-11-02 13:53:19 -08:00
Chad Little
0476140f3c Add highlight rules to diviner
Summary: Adds highlight commands to Remarkup book. Fixes T5560

Test Plan: build books

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T5560

Differential Revision: https://secure.phabricator.com/D14387
2015-11-02 13:44:05 -08:00
Chad Little
8bbcd896b8 Add styling for new Remarkup highlighter
Summary: Adds some basic style to new !!Remarkup Highlighter!! Ref T5560

Test Plan: Wait for next diff.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T5560

Differential Revision: https://secure.phabricator.com/D14383
2015-11-02 13:20:07 -08:00
lkassianik
99daadb251 Phurl URL object should show a banner if the URL is invalid
Summary: Ref T8989, Phurl URL should always show an info banner if the URL isn't valid

Test Plan: Phurl objects with URL "google.com" should show an error banner, but objects with URL "http://google.com" should not show banner.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Maniphest Tasks: T8989

Differential Revision: https://secure.phabricator.com/D14386
2015-11-02 13:09:15 -08:00
lkassianik
809453a3e1 Ref T8989, Phurl "Visit URL" link should route through a separate controller.
Summary: Ref T8989, Phurl "Visit URL" should now route to an access controller that decides if the URL is valid whether to open it, or redirect back to Phurl object. New route is `local.install.com/u/1` to open link.

Test Plan:
- open Phurl object with invalid URL, "Visit URL" link should redirect back to object
- open Phurl object with valid URL, "Visit URL" link should open the link
- open `local.install.com/u/1` for `U1` with valid URL should open the link
- open `local.install.com/u/1` for `U1` with invalid URL should redirect to `local.install.com/U1`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: joshuaspence, Korvin

Maniphest Tasks: T8989

Differential Revision: https://secure.phabricator.com/D14381
2015-11-02 12:10:37 -08:00
Joshua Spence
c35b564f4d Various translation improvements
Summary: Depends on D14070.

Test Plan: Eyeball it.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, hach-que

Differential Revision: https://secure.phabricator.com/D14073
2015-11-03 07:02:46 +11:00
Joshua Spence
495cb7a2e0 Mark PhabricatorPHIDType::getPHIDTypeApplicationClass() as abstract
Summary: Fixes T9625. As explained in a `TODO` comment, seems reasonable enough.

Test Plan: Unit tests.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, hach-que

Maniphest Tasks: T9625

Differential Revision: https://secure.phabricator.com/D14068
2015-11-03 06:47:12 +11:00
lkassianik
09d4ea884f Ref T8989, Add a "Visit URL" link to Phurl items.
Summary: Ref T8989, Add a "Visit URL" link to Phurl items and make it actionable if the URI has a valid protocol.

Test Plan:
- Create a Phurl object with a URI of "google.com".
- "Visit URL" action in action view should be greyed out.
- Edit object to have URI "http://google.com" and save. "Visit URL" link should be available and should redirect to the intended URL.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: chad, Korvin

Maniphest Tasks: T8989

Differential Revision: https://secure.phabricator.com/D14379
2015-11-02 16:40:56 +00:00
epriestley
4e112537b2 Probable fix for ElasticSearch 2.0 type strictness
Summary: Fixes T9670.

Test Plan: Will follow up on task.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9670

Differential Revision: https://secure.phabricator.com/D14370
2015-11-02 16:21:43 +00:00
Chad Little
b7a4d3b9a5 Redesign Legalpad
Summary: Rolls out PHUIDocumentViewPro to Legalpad. Minor tweaks to provide space around Preamble and Signature blocks. Otherwise, straight forward.

Test Plan:
Build a new document with and without Preamble, sign document.

{F933386}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14377
2015-11-01 16:04:56 -08:00
Chad Little
c45ba30416 Redesign Diviner
Summary:
This implements `PHUIDocumentViewPro` which should move to be the base for all documents (Phame, Phriction, Legalpad, Diviner). Overall this feels really good to me, but I'd like to roll it out into Diviner specifically first to work through the issues and then move into other apps and drop `PHUIDocumentView` once everything is converted. Some features are:

 - White Background, no border on page
 - Table of Contents is move to hidden menu (more space for documentation)
 - Property List sits under the document

Some design decisions above are in anticipation of Phriction v3 and Unbeta Phame, specifically commenting and maybe some cool new Remarkup text layout options for Phame.

Test Plan:
Went through tons of pages on Diviner on Desktop, Tablet, Mobile. Bounce back to Phriction to make sure DocumentView CSS changes actually look better there.

{F930518}

{F930519}

{F930520}

{F930521}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: tycho.tatitscheff, joshuaspence, Korvin

Differential Revision: https://secure.phabricator.com/D14374
2015-11-01 08:58:33 -08:00
Aviv Eyal
2c2d1d13e3 arc liberate 2015-10-31 00:14:10 -07:00
Joshua Spence
3a046384e9 Drop the metamta_mailinglist table
Summary: We haven't seen any issues here, remove the table and schema spec.

Test Plan: Not yet tested.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14067
2015-10-31 11:20:59 +00:00
Joshua Spence
4626fb4ef0 Update "should not run as root" message
Summary: These should be fine to land whenever.

Test Plan: N/A

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14066
2015-10-31 11:20:23 +00:00
Joshua Spence
98a301a59b Set $can_edit for Harbormaster steps
Summary: Sets the `$can_edit` value correctly (previously it was hardcoded to `true`).

Test Plan: Went to http://phabricator.local/harbormaster/step/view/1/ and saw "Edit Step" disabled.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14373
2015-10-31 04:54:16 +00:00
epriestley
4d13b6c6a8 Add a setup warning for major clock skew issues
Summary: See IRC. A user had a database set to 8 hours ahead of their web host. Try to catch and warn about these issues.

Test Plan: Artificially adjusted skew, saw setup warning.

Reviewers: avivey, chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D14371
2015-10-30 12:09:26 -07:00
epriestley
f48a833704 Fix an issue with incorrect authorization handling in Working Copy build steps
Summary:
Fixes T9669. Two issues:

  - We were using `repositoryPHIDs` instead of `blueprintPHIDs` for the list of allowed blueprints. Use the correct value.
  - We weren't enforcing `allowedBlueprintPHIDs` fully correctly. We //did// require an authorization, so the net effect was correct in nearly all cases, but we could have selected from too large a pool in the case where the application itself was doing the authorization (e.g., from the command line).

Test Plan: Ran a build through Drydock/Harbormaster locally.

Reviewers: chad, tycho.tatitscheff

Reviewed By: chad, tycho.tatitscheff

Subscribers: tycho.tatitscheff

Maniphest Tasks: T9669

Differential Revision: https://secure.phabricator.com/D14368
2015-10-30 16:02:35 +00:00
epriestley
096117aacd Allow any {icon} to spin
Summary: We are greedily hoarding this for ourselves, when we could enrich the world.

Test Plan: Used `{icon cog spin}`.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D14369
2015-10-30 16:02:19 +00:00
epriestley
2c3dbc48ee Move "Next Step" to a custom field in Differential
Summary:
Fixes T9672. This was never turned into a custom field, for no particular reason. Convert it into one.

This is substantially similar to the existing "Apply Patch" field, which does the same thing (only shows a command).

We might rethink or remove this eventually (e.g., in a post-"Land Revision" world) but this makes it easier, at the very least.

Test Plan:
  - Viewed a non-accepted revision (no hint).
  - Viewed an accepted revision from a raw diff source (no hint).
  - Viewed an accepted revision from Git (`arc land` hint).

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9672

Differential Revision: https://secure.phabricator.com/D14367
2015-10-30 16:00:53 +00:00
epriestley
1b8337871b Correct the handle URI for build steps
Summary: Fixes T9674. This was wrong to start with (URI is `/edit/X/`, not `/X/edit/`) but we have a new view page anyway.

Test Plan:
  - Visited an exmaple URI in my browser.
  - Followed a build step link from "Authorized By: ..." in Drydock.

Reviewers: joshuaspence, chad

Reviewed By: chad

Maniphest Tasks: T9674

Differential Revision: https://secure.phabricator.com/D14366
2015-10-30 15:54:10 +00:00
Aviv Eyal
724f6ddda5 return this in DiffusionCommitQuery
Test Plan: chain another call after this

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D14364
2015-10-28 23:25:41 +00:00
Chad Little
526aa48f8b Widen PHUIPropertyListView when ActionList isn't attached
Summary: This makes PHUIPropertyList display wider when an ActionList isn't present.

Test Plan: Review Diff Details in a Diff. Test mobile and desktop layouts.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13568
2015-10-28 11:19:42 -07:00
Chad Little
218ab398b0 Allow ObjectLists to be set to Dialogs
Summary: Better formatting for object lists when in a dialog (like subscribers).

Test Plan:
Test a subscription list.

{F911522}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14353
2015-10-27 19:32:35 +00:00
Chad Little
4b5de5135c Fix landing icon
Summary: This is //hilarious//.

Test Plan: Test icon on local install.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14351
2015-10-27 12:07:28 -07:00
epriestley
198bf1198d Fix "Accepted" status constant in landing
Summary: I didn't test the positive version of this -- the constant has value `2` but when we read it from the database it's `"2"` or whatever. Just do this for now and maybe someday we'll use strings.

Test Plan: will do production things

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D14352
2015-10-27 12:06:48 -07:00
epriestley
1c7443f8f2 Make "Land Revision" button state consistent, prevent non-accepted lands
Summary:
Ref T182. Make the disabled state of the button more accurately reflect whether clicking it will work.

Don't allow "land" to proceed unless the revision is accepted.

Test Plan: Saw button in disabled state, clicked it, got "only accepted revisions" message.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T182

Differential Revision: https://secure.phabricator.com/D14350
2015-10-27 18:51:59 +00:00
epriestley
a763f9510e Add some Drydock documentation plus "Test Configuration" for repository automation
Summary:
Ref T182. Ref T9252.

  - Adds a "Test" repository operation that just runs `git status` to see if things work.
  - Adds a button for it in Edit Repository.
  - Shows operation status on the operation detail view to make this workflow work a little better.
  - Adds a lot of words. Words words words words.

Test Plan:
  - Tested repository operation.
  - Read words.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T182, T9252

Differential Revision: https://secure.phabricator.com/D14349
2015-10-27 18:04:02 +00:00
epriestley
cea633f698 Don't show error operations after a successful land operation
Summary:
Ref T182. When viewing a revision, if there are several error operations and then a success operation, we currently show the last error. This is misleading.

Instead, don't show anything if there's a success (this may require tuning eventually if you can land multiple times onto different branches or whatever, but should be reasonable for now).

Also make the table a little nicer, particularly for merge failure output.

Test Plan: {F910385}

Reviewers: chad, Mnkras

Reviewed By: Mnkras

Maniphest Tasks: T182

Differential Revision: https://secure.phabricator.com/D14348
2015-10-26 21:27:04 +00:00
Michael Krasnow
6e7ceb996b Set a property so that unit tests run on PHP7
Summary: Without this change PHP throws because idx() is passed null as the property is not intialzied

Test Plan: arc unit --everything

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D14345
2015-10-26 21:15:45 +00:00
epriestley
bbf4ce79e3 Provide a username and email when running git merge --squash
Summary:
Ref T182. This command should never actually generate a commit because `--squash` prevents that, but `git` seems to sometimes hit a check for username/email configuration (maybe when merging a non-fastforward?).

Give it some dummy values to placate it. This command shouldn't commit anything so these values should never actually be used.

Test Plan: Landed rGITTESTd8c8643cb02bbe60048c6c206afc2940c760a77e.

Reviewers: chad, Mnkras

Reviewed By: Mnkras

Maniphest Tasks: T182

Differential Revision: https://secure.phabricator.com/D14347
2015-10-26 21:12:16 +00:00
epriestley
5a35dd233b Don't use --ff-only inside "Land Revision"
Summary:
Ref T182. I lifted this logic out of `arc`, but the context is a little different there, and this option is too strict in "Land Revision".

Specifically, it prevents `git` from merging unless the merge is //strictly// a fast-foward, even with `--squash`. That means revisions can't merge unless they're rebased on the current `master`, even if they have no conflicts.

(This whole process will probably need additional refinement, but the behavior without this flag is more reasonable overall than the behavior with it for now.)

Test Plan: Will land stuff in production~~

Reviewers: chad, Mnkras

Reviewed By: Mnkras

Maniphest Tasks: T182

Differential Revision: https://secure.phabricator.com/D14346
2015-10-26 20:26:56 +00:00
epriestley
0b24a6e200 Make "Land Revision" show merge conflicts more clearly
Summary:
Ref T182. We just show "an error happened" right now. Improve this behavior.

This error handling chain is a bit ad-hoc for now but we can formalize it as we hit other cases.

Test Plan:
{F910247}

{F910248}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T182

Differential Revision: https://secure.phabricator.com/D14343
2015-10-26 20:11:21 +00:00
epriestley
2326d5f8d0 Show lease on Repository Operation detail view and awaken on failures
Summary:
Ref T182. Couple of minor improvements here:

  - Show the Drydock lease when viewing a Repository Operation detail screen. This just makes it easier to jump around between relevant objects.
  - When tasks are waiting for a lease, awaken them when it breaks or is released, not just when it is acquired. This makes the queue move forward faster when errors occur.

Test Plan:
  - Viewed a repository operation and saw a link to the lease.
  - Did a bad land (intentional merge problem) and got an error in about ~3 seconds instead of ~17.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T182

Differential Revision: https://secure.phabricator.com/D14341
2015-10-26 20:00:49 +00:00
epriestley
a0fba642b3 Show the oldest non-failing revision land operation, or the newest failure
Summary:
Ref T182.

  - We just show the oldest operation right now, but we usually care about the oldest non-failure.
  - Only query for actual land operations when rendering the revision operations dialog (maybe eventually we'll show more stuff?).
  - For now, prevent multiple lands / repeated lands or queueing up lands while other lands are happening.

Test Plan: Landed a revision. Tried to land it more / again.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T182

Differential Revision: https://secure.phabricator.com/D14338
2015-10-26 19:58:37 +00:00
epriestley
9c39493796 Make WorkingCopyBlueprint responsible for performing merges
Summary:
Ref T182. Currently, the "RepositoryLand" operation is responsible for performing merges when landing a revision.

However, we'd like to be able to perform these merges in a larger set of cases in the future. For example:

  - After Releeph is revamped, when someone says "I want to merge bug fix X into stable branch Y", it would probably be nice to make that a Buildable and let tests run against it without requring that it actually be pushed anywhere.
  - Same deal if we want a merge-from-Diffusion or cherry-pick-from-Diffusion operation.
  - Similar deal if we want a "random web UI edits from Diffusion".

Move the merging part into WorkingCopy so more applications can share/use it in the future.

A big chunk of this is me making stuff up for now (the ol' undocumented dictionary full of arbitrary magic keys), but I anticipate formalizing it as we move along.

Test Plan: Pushed rGITTEST0d58eef3ce0fa5a10732d2efefc56aec126bc219 up from my local install via "Land Revision".

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T182

Differential Revision: https://secure.phabricator.com/D14337
2015-10-26 12:40:16 -07:00
epriestley
c059149eb9 Remove Drydock host resource limits and give working copies simple limits
Summary:
Ref T9252. Right now, we have very strict limits on Drydock: one lease per host, and one working copy per working copy blueprint.

These are silly and getting in the way of using "Land Revision" more widely, since we need at least one working copy for each landable repository.

For now, just remove the host limit and put a simple limit on working copies. This might need to be fancier some day (e.g., limit working copies per-host) but it is generally reasonable for the use cases of today.

Also add a `--background` flag to make testing a little easier.

(Limits are also less important nowadays than they were in the past, because pools expand slowly now and we seem to have stamped out all the "runaway train" bugs where allocators go crazy and allocate a million things.)

Test Plan:
  - With a limit of 5, ran 10 concurrent builds and saw them finish after allocating 5 total resources.
  - Removed limit, raised taskmaster concurrency to 128, ran thousands of builds in blocks of 128 or 256.
    - Saw Drydock gradually expand the pool, allocating a few more working copies at first and a lot of working copies later.
    - Got ~256 builds in ~140 seconds, which isn't a breakneck pace or anything but isn't too bad.
    - This stuff seems to be mostly bottlenecked on `sbuild` throttling inbound SSH connections. I haven't tweaked it.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14334
2015-10-26 12:39:47 -07:00
epriestley
3f193cb9e0 Give Harbormaster build steps a "View" page
Summary:
Fixes T9519. Right now, build steps go straight from the build to the edit screen.

This means that there's no way to see their edit history or review details without edit permission. In particular, this makes it a bit harder to catch the Drydock Blueprint authorization warnings from T9519.

  - Add a standard view screen.
  - Add a little warning callout to blueprint authorizations.

This also does a bit of a touchup on the weird dropshadow element from T9586. Maybe not totally design-approved now but it's less ugly, at least.

Test Plan:
{F906695}

{F906696}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9519

Differential Revision: https://secure.phabricator.com/D14330
2015-10-26 12:38:32 -07:00
epriestley
5ee4a1a306 Give Harbormaster Build Plans real policies
Summary:
Ref T9614. Currently, a lot of Build Plan behavior is covered by a global "can manage" policy.

One install in particular is experiencing difficulty with warring factions within engineering aborting one another's builds.

As a first step to remedy this, and also generally make Harbormaster more flexible and bring it in line with other applications in terms of policy power:

  - Give Build Plans normal view/edit policies.
  - Require "Can Edit" to run a plan manually.

Having "Can View" on plans may be a little weird in some cases (the status of a Buildable might be bad because of a build you can't see) but we can cross that bridge when we come to it.

Next change here will require "Can Edit" to abort a build. This will reasonably allow installs to reserve pause/abort for administrators/adults. (I might let anyone restart a plan, though?)

Test Plan:
  - Created a new build plan.
  - Verified defaults were inherited from application defaults (swapped them around, too).
  - Saved build plan.
  - Edited policies.
  - Verified autoplans get the right policies.
  - Verified old plans got migrated properly.
  - Tried to run a plan I couldn't edit (denied).
  - Ran a plan from CLI with `bin/harbormaster`.
  - Tried to create a plan with an unprivileged user.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9614

Differential Revision: https://secure.phabricator.com/D14321
2015-10-26 12:38:21 -07:00
epriestley
43569d4e27 Make WorkingCopy build step slightly more durable
Summary: Fixes T9631. Build steps created before I added this option may not have it specified, which could throw later. Make handling a little more robust.

Test Plan: Will ask @yelirekim to report back.

Reviewers: chad

Reviewed By: chad

Subscribers: yelirekim

Maniphest Tasks: T9631

Differential Revision: https://secure.phabricator.com/D14336
2015-10-25 14:53:24 -07:00
epriestley
2beeb2fab0 Write more detailed documentation about Differential inlines
Summary: Ref T9628. The porting feature has been fairly stable for a while, so make some reasonable effort to document how it works and some of the tradeoffs it involves.

Test Plan: Generated and read documentation.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9628

Differential Revision: https://secure.phabricator.com/D14335
2015-10-25 14:51:50 -07:00
epriestley
59c9317101 Prevent mailing lists from being bin/auth recover'd
Summary:
Fixes T9610.

  - We currently permit you to `bin/auth recover` users who can not establish web sessions (but this will never work). Prevent this.
  - We don't emit a tailored error if you follow one of these links. Tailor the error.

Even with the first fix, you can still hit the second case by doing something like:

  - Recover a normal user.
  - Make them a mailing list in the DB.
  - Follow the recovery link.

The original issue here was an install that did a large migration and set all users to be mailing lists. Normal installs should never encounter this, but it's not wholly unreasonable to have daemons or mailing lists with the administrator flag.

Test Plan:
  - Tried to follow a recovery link for a mailing list.
  - Tried to generate a recovery link for a mailing list.
  - Generated and followed a recovery link for a normal administrator.

{F906342}

```
epriestley@orbital ~/dev/phabricator $ ./bin/auth recover tortise-list
Usage Exception: This account ("tortise-list") can not establish web sessions, so it is not possible to generate a functional recovery link. Special accounts like daemons and mailing lists can not log in via the web UI.
```

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9610

Differential Revision: https://secure.phabricator.com/D14325
2015-10-24 18:12:56 -07:00
a39ec26a67 Provide an application link for Ponder Answer PHID type
Summary: Ref T9625. I want this to be fixed ASAP hence here's the patch.

Test Plan:
 - ~~Apply D14323~~ (This patch was made before it was merged)
 - Apply this patch
 - voila! Now I see the Ponder answer has correct logo.

{F906357}

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, revi

Maniphest Tasks: T9625

Differential Revision: https://secure.phabricator.com/D14331
2015-10-24 18:12:34 -07:00
epriestley
d0098bc436 Provide an application link for the Macro PHID type
Summary: Ref T9625. This is an example of how to fill in the missing calls.

Test Plan:
  - Verified that an icon is now shown for feed stories.
  - Verified that an icon is now shown in the "PHID Types" module panel in Config.

{F906325}

{F906326}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9625

Differential Revision: https://secure.phabricator.com/D14324
2015-10-24 09:41:13 -07:00
epriestley
58957e62c1 Show applications and icons for PHID types in config table
Summary: Ref T9625. Some PHID types are missing application or icon specifications. This makes it easier to spot them.

Test Plan: {F906321}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9625

Differential Revision: https://secure.phabricator.com/D14323
2015-10-24 08:16:23 -07:00
epriestley
b3d8ea88ec Update a couple of links in "Feature Requests" documentation
Summary:
These are a little out of date:

  - Link to Starmap since it explicitly exists now.
  - Link to "Planning" instead of the old task.
  - Link to "Prioritization" instead of telling anyone to build stuff themselves.

Test Plan: Read documentation.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D14328
2015-10-24 08:13:28 -07:00
epriestley
1582bb54f6 Move version numbers to a dedicated "Versions" panel
Summary:
Currently, Version numbers are sort of randomly shown on "All Settings" beacuse we didn't have any better place to put them.

Now that we have modules, expose them as a config module.

Test Plan:
{F906426}

Grepped for "all settings" to look for other references to the old location, but didn't get any relevant hits.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D14327
2015-10-24 08:13:22 -07:00
epriestley
32dc62955a Disable "Send Message" profile action if viewer is logged out
Summary: Fixes T9598.

Test Plan:
  - Used "Send Message" as a logged-in user.
  - Used "Send Message" as a logged-out user. The action was disabled and clicking it popped up a login dialog.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9598

Differential Revision: https://secure.phabricator.com/D14326
2015-10-24 08:13:14 -07:00
epriestley
ad53e7b878 Record how long storage patches took to apply
Summary:
It's hard for us to predict how long patches and migrations will take in the general case since it varies a lot from install to install, but we can give installs some kind of rough heads up about longer patches. I'm planning to just put a sort of hint for things in the changelog, something like this:

{F905579}

To make this easier, start storing how long stuff took. I'll write a little script to dump this into a table for the changelog.

Test Plan:
Ran `bin/storage status`:

{F905580}

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D14320
2015-10-24 05:58:44 -07:00
epriestley
b038041dc6 Prevent duplicate account links from being created by swapping logins and then refreshing the link
Summary:
Fixes T6707. Users can currently do this:

  - Log in to a service (like Facebook or Google) with account "A".
  - Link their Phabricator account to that account.
  - Log out of Facebook, log back in with account "B".
  - Refresh the account link from {nav Settings > External Accounts}.

When they do this, we write a second account link (between their Phabricator account and account "B"). However, the rest of the codebase assumes accounts are singly-linked, so this breaks down elsewhere.

For now, decline to link the second account. We'll permit this some day, but need to do more work to allow it, and the need is very rare.

Test Plan:
  - Followed the steps above, hit the new error.
  - Logged back in to the proper account and did a link refresh (which worked).

{F905562}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T6707

Differential Revision: https://secure.phabricator.com/D14319
2015-10-24 04:50:36 -07:00
epriestley
4afeebe834 Don't store IP addresses in content sources
Summary:
We don't use these for anything, we're inconsistent about recording them, and there's some mild interaction with privacy concerns and data retention. Every other log we store any kind of information in can be given a custom retention policy after recent GC changes.

If we did put this back eventually it would probably be better to store a session identifier anyway, since that's more granular and more detailed.

You can fetch this info out of access logs anyway, too.

Test Plan: Left a couple of comments.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D14315
2015-10-21 12:37:37 -07:00
epriestley
5b619862cb Show a more reasonable status element for pull requests
Summary:
Ref T182. Replace the total mess we had before with a sort-of-reasonable element.

This automatically updates using "javascript".

Test Plan:
{F901983}

{F901984}

Used "Land Revision", saw the land status go from "Waiting" -> "Working" -> "Landed" without having to mash reload over and over again.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T182

Differential Revision: https://secure.phabricator.com/D14314
2015-10-21 11:28:26 -07:00
Giedrius Dubinskas
421c2453e5 Truncate long source lines in Paste search result list snippets
Summary:
An attempt to resolve T9600.

- `PhabricatorPasteQuery` builds truncated snippet when requested using `needSnippet()`.
- `PhabricatorPasteSearchEngine` uses Paste snippet istead of content.
- `PhabricatorSourceCodeView` accepts truncated source and type instead of line limit.

Test Plan: Generated some content for Paste application and also added huge JSON oneliner. Checked Paste application pages in browser.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Maniphest Tasks: T9600

Differential Revision: https://secure.phabricator.com/D14313
2015-10-20 19:07:04 +00:00
epriestley
4c1463eb56 Probably fix bad URI construction for Diffusion symbols
Summary: Ref T9532.

Test Plan: I don't have this configured locally but this seems very likely to be the correct fix. This list should be a list of PHIDs, but is a list of PHIDs followed by one PhabricatorRepository object.

Reviewers: avivey, chad

Reviewed By: chad

Maniphest Tasks: T9532

Differential Revision: https://secure.phabricator.com/D14311
2015-10-20 09:03:47 -07:00
Chad Little
09ab82faef Update Search for handleRequest
Summary: Ref T8628. Updates Search.

Test Plan: Did various searches, saved new queries, reordered, ran new queries.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T8628

Differential Revision: https://secure.phabricator.com/D14268
2015-10-20 09:02:55 -07:00
epriestley
22b9b76079 Fix control state for custom application policies with template types
Summary:
Fixes T9118. When populating some policy controls like "Default Can View" for repositories, we do some special logic to add object policies which are valid for the target object type.

For example, it's OK to set the default policy for an object which has subscribers to "Subscribers".

However, this logic incorrectly //removed// custom policies, so the form input ended up blank.

Instead, provide both object policies and custom policies.

Test Plan:
  - Set default view policy to a custom policy.
  - Hit "Edit" again, saw control correctly reflect custom policy after change.
  - Set default edit policy to a different custom policy.
  - Saved, edited, verified both policies stuck.
  - Set both policies back.
  - Checked some other object types to make sure object policies still work properly.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9118

Differential Revision: https://secure.phabricator.com/D14310
2015-10-20 06:56:11 -07:00
Chad Little
bbbda23678 In PHUIInfoView, only show list UI if more than 1 item
Summary: We often just setError as an array even if it's only one error. This just makes the UI a little cleaner in these cases.

Test Plan: Remove all reviewers from a diff, see status error without list styling.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14308
2015-10-19 20:08:30 -07:00
epriestley
4cb2ec1120 Update support documentation for modern times
Summary:
Basically similar to D13941 but a little more extreme:

  - Really strongly emphasize reproducibility for bug reports, and set users up for rejection if they don't satisfy this.
  - Really strongly emphasize problem descriptions for feature requests, and set users up for rejection.
  - Get rid of various "please give us feedback"; we get plenty of feedback these days.
  - Some modernization tweaks.
  - Split the support document into:
    - Stuff we actually support for free (security / good bug reports / feature requests).
    - Stuff you can pay us for (hosting / consulting / prioritization).
    - A nebulous "community" section, with appropriate (low) expectations that better reflects reality.

My overall goals here are:

  - Set expectations better, so users don't show up in IRC expecting it to be a "great place to get amazing support" or whatever the docs said in 2011.
  - Possibly move the needle slightly on bug reports / feature request quality, maybe.

Test Plan: Read changes carefully.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D14305
2015-10-19 13:29:24 -07:00
epriestley
fbd365d571 Remove scattered links to "Support" document
Summary:
I'm going to do some version of D13941. Clean up extra links to the old document first.

These were just randomly links from various places that we no longer really want feedback on and/or are now better covered by other documents.

Test Plan:
- `grep`
- Reviewed Config/Welcome screen.
- Reviewed `uri.allowed-editor-protocols`.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D14303
2015-10-19 13:27:47 -07:00
Chad Little
ec485de8f9 Restrict Workboard initialization to CAN_EDIT
Summary: Make Workboard initialization more restrictive.

Test Plan: Log out, see "No Workboard", Log in with permissions, see "New Workboard", Log in with notchad, see "No Workboard".

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T7410

Differential Revision: https://secure.phabricator.com/D14306
2015-10-19 13:22:13 -07:00
Chad Little
267e718dfe Don't allow logged out users to initialize a Workboard
Summary: Right now logged out users can enable a workboard on a project.

Test Plan: Log out, view a public project, click on Workboard, get not set up dialog. Click Cancel, return to project details.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14304
2015-10-19 12:12:52 -07:00
epriestley
d784bf1ea8 Make disk-based setup caches more correct (but slower)
Summary:
Fixes T9599. When APC/APCu are not available, we fall back to a disk-based cache.

We try to share this cache across webserver processes like APC/APCu would be shared in order to improve performance, but are just kind of guessing how to coordinate it. From T9599, it sounds like we don't always get this right in every configuration.

Since this is complicated and error prone, just stop trying to do this. This cache has bad performance anyway (no production install should be using it), and we have much better APC/APCu setup instructions now than we did when I wrote this. Just using the PID is simpler and more correct.

Test Plan:
  - Artificially disabled APC.
  - Reloaded the page, saw all the setup stuff run.
  - Reloaded the page, saw no setup stuff run (i.e., cache was hit).
  - Restarted the webserver.
  - Reloaded the page, saw all the setup stuff run.
  - Reloaded again, got a cache hit.

I don't really know how to reproduce the exact problem with the parent PID not working, but from T9599 it sounds like this fixed the issue and from my test plan we still appear to get correct behavior in the standard/common case.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9599

Differential Revision: https://secure.phabricator.com/D14302
2015-10-19 11:14:46 -07:00
Chad Little
057d62d570 Update Phlux for handleRequest
Summary: Ref T8628. Updates Phlux

Test Plan: New var, list vars, edit vars

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T8628

Differential Revision: https://secure.phabricator.com/D14267
2015-10-18 16:08:20 -07:00
Chad Little
a8e9da4a56 Update Conduit for handleRequest
Summary: Ref T8628. Updates Conduit for handleRequest

Test Plan: Use Conduit, test list, method calls, try a query, post this diff.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T8628

Differential Revision: https://secure.phabricator.com/D14265
2015-10-18 16:07:07 -07:00
Chad Little
4782491470 Fix fatal in Maniphest
Summary:
Fixes T9596.

Was unable to navigate to a task in Maniphest.

Test Plan: navigate to that task.

Reviewers: #blessed_reviewers, epriestley, avivey, tycho.tatitscheff

Reviewed By: avivey, tycho.tatitscheff

Subscribers: tycho.tatitscheff, avivey, Korvin

Maniphest Tasks: T9596

Differential Revision: https://secure.phabricator.com/D14300
2015-10-18 14:43:29 -07:00
tycho
0e8ed0c616 Desactivate subtask when logged out.
Summary: Fixes T9592.

Test Plan: Log out ! Navigates to a task. See the add button grey-ed out !

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Maniphest Tasks: T9592

Differential Revision: https://secure.phabricator.com/D14299
2015-10-18 04:22:05 -07:00
epriestley
92a626fc1c Add a basic list view for repository operations
Summary: Ref T182. Nothing fancy, just make these slightly easier to work with.

Test Plan: {F884754}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T182

Differential Revision: https://secure.phabricator.com/D14295
2015-10-16 18:47:05 -07:00
Aviv Eyal
c9e3dd98d1 Fix message about pygments being in $PATH
Test Plan: read it

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14269
2015-10-16 09:51:39 -07:00
epriestley
cdd5e3f7dd Initialize $assign_phid properly in the "!assign" email action
Summary: If you `!assign cahd` when you meant to `!assign chad`, we'll hit an "Undefined variable: assign_phid" a little further down.

Test Plan: Eyeballed it. See IRC.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D14291
2015-10-16 06:39:31 -07:00
epriestley
4b43667086 Introduce PHUIRemarkupView, a sane way to work with Remarkup
Summary:
Fixes T9273. Remarkup has reasonably good fundamentals but the API is a giant pain to work with.

Provide a `PHUIRemarkupView` to make it easier. This object is way simpler to use by default.

It's not currently as powerful, but we can expand the power level later by adding more setters.

Eventually I'd expect to replace `PhabricatorRemarkupInterface` and `PhabricatorMarkupOneOff` with this, but no rush on those.

I converted a few callsites as a sanity check that it works OK.

Test Plan:
- Viewed remarkup in Passphrase.
- Viewed remarkup in Badges.
- Viewed a Conduit method.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9273

Differential Revision: https://secure.phabricator.com/D14289
2015-10-15 10:20:19 -07:00
epriestley
034ff3c870 Remove "_-_" -> "-" slug behavior
Summary: Fixes T9573. This incorrectly affected Phriction. I could restore it for only projects, but you didn't like the rule very much anyway and I don't feel strongly about it.

Test Plan: Unit tests.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9573

Differential Revision: https://secure.phabricator.com/D14287
2015-10-15 07:04:14 -07:00
Chad Little
f1552f54a0 Link Timeline image to profile
Summary: Ref T9336. Links the timeline photo to user profile. Presume this always exists?

Test Plan: Review a few timelines, click on heads.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9336

Differential Revision: https://secure.phabricator.com/D14283
2015-10-14 16:28:10 -07:00
epriestley
f3f3d95702 When landing revisions via repository automation, use better metadata
Summary: Ref T182. Make a reasonable attempt to get the commit message, author, and committer data correct.

Test Plan: BEHOLD: rGITTEST810b7f17cd0c909256a45d29a5062fcf417d0489

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T182

Differential Revision: https://secure.phabricator.com/D14280
2015-10-14 10:50:53 -07:00
epriestley
3a91e64897 Preserve "Space" UI control value when editing Passphrase credentials
Summary: Fixes T9568. We just weren't setting this properly so it would default away from the proper value.

Test Plan:
  - Edited a credential in a non-default space, edit form populated properly.
  - Changed "Space", introduced an error, saved form, got error with sticky value for "Space" properly.
  - Saved form with new space value.
  - Created a new credential.

Reviewers: chad

Reviewed By: chad

Subscribers: revi

Maniphest Tasks: T9568

Differential Revision: https://secure.phabricator.com/D14278
2015-10-14 08:15:14 -07:00
epriestley
ac7edf54af Fix bad counting in SQL when enforcing Drydock allocator soft limits
Summary:
Ref T9252. This fixes a bug from D14236. D14272 discusses the observable effects of the bug, primarily that the window for racing is widened from ~a few milliseconds to several minutes under our configuration.

This SQL query is missing a `GROUP BY` clause, so all of the resources get counted as having the same status (specifically, the alphabetically earliest status any resource had, I think). For test cases this often gets the right result since the number of resources may be small and they may all have the same status, but in production this isn't true. In particular, the allocator would sometimes see "35 destroyed resources" (or whatever), when the real counts were "32 destroyed resources + 3 pending resources".

Since this allocator behavior is soft/advisory this didn't cause any actual problems, per se (we do expect races here occasionally), it just made the race very very easy to hit. For example, Drydock in production currently has three pending working copy resources. Although we do expect this to be //possible//, getting 4 resources when the configured limit is 1 should be hard (not lightning strike / cosmic radiaion hard, but "happens once a year" hard).

Also exclude destroyed resources since we never care about them.

Test Plan:
Followed the plan from D14272 and restarted two Harbormaster workers at the same time.

After this patch was applied, they no longer created two different resources (we expect it to be possible for this to happen, just very hard).

We should still be able to force this race by putting something like `sleep(10)` right before the query, then `sleep(10)` right after it. That would prevent the allocators from seeing one another (so they would both think there were no other resources) and push us down the pathway where we exceed the soft limit.

Reviewers: chad, hach-que

Reviewed By: hach-que

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14274
2015-10-14 06:18:10 -07:00
epriestley
083a321dad Fix an issue where newly created Drydock resources could be improperly acquired
Summary:
Ref T9252. This is mostly a fix for an edge case from D14236. Here's the setup:

  - There are no resources.
  - A request for a new resource arrives.
  - We build a new resource.

Now, if we were leasing an existing resource, we'd call `canAcquireLeaseOnResource()` before acquiring a lease on the new resource.

However, for new resources we don't do that: we just acquire a lease immediately. This is wrong, because we now allow and expect some resources to be unleasable when created.

In a more complex workflow, this can also produce the wrong result and leave the lease acquired sub-optimally (and, today, deadlocked).

Make the "can we acquire?" pathway consistent for new and existing resources, so we always do the same set of checks.

Test Plan:
  - Started daemons.
  - Deleted all working copy resources.
  - Ran two working-copy-using build plans at the same time.
  - Before this change, one would often [1] acquire a lease on a pending resource which never allocated, then deadlock.
  - After this change, the same thing happens except that the lease remains pending and the work completes.

[1] Although the race this implies is allowed (resource pool limits are soft/advisory, and it is expected that we may occasionally run over them), it's MUCH easier to hit right now than I would expect it to be, so I think there's probably at least one more small bug here somewhere. I'll see if I can root it out after this change.

Reviewers: chad, hach-que

Reviewed By: hach-que

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14272
2015-10-14 06:16:21 -07:00
epriestley
4169d7bfd5 Fix an issue where Harbormaster might cycle while saving
The way custom field interact with storage is a little odd, and can send us
down a bad path when applying external effect while saving changes.
2015-10-14 02:56:39 -07:00
epriestley
43bee4562c If the stars align, make "Land Revision" kind of work
Summary:
Ref T182. If 35 other things are configured completely correctly, make it remotely possible that this button may do something approximating the thing that the user wanted.

This primarily fleshes out the idea that "operations" (like landing, merging or cherry-picking) can have some beahavior, and when we run an operation we do whatever that behavior is instead of just running `git show`.

Broadly, this isn't too terrible because Drydock seems like it actually works properly for the most part (???!?!).

Test Plan: {F876431}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T182

Differential Revision: https://secure.phabricator.com/D14270
2015-10-13 15:46:30 -07:00
epriestley
b4af57ec51 Rough cut of DrydockRepositoryOperation
Summary:
Ref T182. This doesn't do anything interesting yet and is mostly scaffolding, but here's roughly the workflow. From previous revision, you can configure "Repository Automation" for a repository:

{F875741}

If it's configured, a new "Land Revision" button shows up:

{F875743}

Once you click it you get a big warning dialog that it won't work, and then this shows up at the top of the revision (completely temporary/placeholder UI, some day a nice progress bar or whatever):

{F875747}

If you're lucky, the operation eventually sort of works:

{F875750}

It only runs `git show` right now, doesn't actually do any writes or anything.

Test Plan:
  - Clicked "Land Revision".
  - Watched `phd debug task`.
  - Saw it log `git show` to output.
  - Verified operation success in UI (by fiddling URL, no way to get there normally yet).

Reviewers: chad

Reviewed By: chad

Subscribers: revi

Maniphest Tasks: T182

Differential Revision: https://secure.phabricator.com/D14266
2015-10-13 15:46:12 -07:00
epriestley
df5a031b54 Allow "Repository Automation" to be configured for repositories
Summary:
Ref T182. This allows you to assign blueprints that a repository can use to perform working copy operations. Eventually, this will support "merge this" in Differential, etc.

This is just UI for now, with no material effects.

Most of this diff is just taking logic that was in the existing "Blueprints" CustomField and putting it in more general places so Diffusion (which does not use CustomFields) can also access it.

Test Plan:
  - Configured repository automation for a repository.
  - Removed repository automation for a repository.

Reviewers: chad

Reviewed By: chad

Subscribers: avivey

Maniphest Tasks: T182

Differential Revision: https://secure.phabricator.com/D14259
2015-10-13 15:45:59 -07:00
Chad Little
6ff1354ac1 Fix errors when mentioning others in Ponder
Summary: Fixes T9552. We need to set a questionID and the question object (for policy) when initializing a new Answer.

Test Plan: Write an answer that mentions another user.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9552

Differential Revision: https://secure.phabricator.com/D14263
2015-10-13 09:09:07 -07:00
epriestley
0b6c031042 Work around an issue with custom "users" fields in Maniphest
Summary:
Fixes T9558. The recent changes to validate PHID fields don't work cleanly with this gross hack.

This can probably be unwound now but it will definitely get fixed in T9132 so I may just wait for that.

Test Plan: Edited a custom "users" field in Maniphest. This should only affect Maniphest because it has a weird hack.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9558

Differential Revision: https://secure.phabricator.com/D14264
2015-10-13 08:41:49 -07:00
epriestley
3f3626c11a Write some documentation about Drydock security and repository automation
Summary: Ref T182. Ref T9519. Some of what this describes doesn't exist yet, but should soon.

Test Plan: Read documentation.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T182, T9519

Differential Revision: https://secure.phabricator.com/D14258
2015-10-12 17:54:11 -07:00
Christopher Speck
812c41a18a Conditionally use hg files vs. hg locate depending on version of Mercurial
Summary:
In Mercurial 3.2 the `locate` command was deprecated in favor of `files` command. This change updates the DiffusionLowLevelMercurialPathsQuery command to conditionally use `locate` or `files` based on the version of Mercurial used.

Closes T7375

Test Plan:
My test/develop Phabricator instance is setup to run Mercurial 3.5.1.

The test procedure to verify valid file listings are being returned:
 1. I navigated to `http://192.168.0.133/conduit/method/diffusion.querypaths/`
 2. I populated the following fields:
  - path: `"/"`
  - commit: `"d721d5b57fc9ef72e47ff9d4e0c583d74a46590c"`
  - callsign: `"HGTEST"`
 3. I submitted request and verified that result contained all files in the repository:
```
{
  "0": "README",
  "1": "alpha/beta/trifle",
  "2": "test/Chupacabra.cow",
  "3": "test/socket.ks"
}
```

I repeated the above steps after setting up Mercurial 2.6.2, which I installed in the following manner:
 1. I downloaded Mercurial 2.6.2 source and run `make local` which will only compile it to work from its own directory (`/opt/mercurial-2.6.2`)
 2. I linked `/usr/local/bin/hg -> /opt/mercurial-2.6.2/hg` (there's also a `/usr/bin/hg` which is a link to `/usr/local/bin/hg`)
 3. I navigated to my home directory and verify that `hg --version` returns 2.6.2.
 4. I restarted phabricator services (probably unnecessary).

With the Multimeter application active
 1. I verified that `/usr/local/bin/hg` referred to version 2.6
 2. I ran the same conduit call from the conduit application
 3. I verified that `http://192.168.0.133/multimeter/?type=2&group=label` incremented values for `bin.hg locate`.
 4. I swapped out mercurial versions for 3.5.1
 5. I ran the same conduit call from the conduit application
 6. I verified that `http://192.168.0.133/multimeter/?type=2&group=label` incremented values for `bin.hg files`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Maniphest Tasks: T7375

Differential Revision: https://secure.phabricator.com/D14253
2015-10-12 17:50:26 -07:00
epriestley
cd8be8106b Improve ruleset for generating project hashtags
Summary:
Ref T9551. We currently use the same logic for generating project hashtags and Phriction slugs, but should be a little more conservative with project hashtags.

Stop them from generating with stuff that won't parse in a "Reviewers:" field or generally in commments (commas, colons, etc).

Test Plan:
Created a bunch of projects with nonsense in them and saw them generate pretty reasonable hashtags.

{F873456}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9551

Differential Revision: https://secure.phabricator.com/D14261
2015-10-12 17:02:58 -07:00
epriestley
3ff5ca789a Fix /tag/aa%20bb project URIs
Summary:
Ref T9551. To set things up:

  - Name a project `aa bb`. This will have the tag `aa_bb`.
  - Try to visit `/tag/aa%20bb`.

Here's what happens now:

  - You get an Aphront redirect error as it tries to add the trailing `/`. Add `phutil_escape_uri()` so that works again.
  - Then, you 404, even though this tag is reasonably equivalent to the real project tag and could be redirected. Add a fallback to lookup, resolve, and redirect if we can find a hit for the tag.

This also fixes stuff like `/tag/AA_BB/`.

Test Plan: Visited URIs like `/tag/aa%20bb`, `/tag/aa%20bb/`, `/tag/Aa_bB/`, etc. None of them worked before and now they all do.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9551

Differential Revision: https://secure.phabricator.com/D14260
2015-10-12 17:02:42 -07:00
epriestley
1bdf225354 Use Drydock authorizations when acquiring leases
Summary:
Ref T9519. When acquiring leases on resources:

  - Only consider resources created by authorized blueprints.
  - Only consider authorized blueprints when creating new resources.
  - Fail with a tailored error if no blueprints are allowed.
  - Fail with a tailored error if missing authorizations are causing acquisition failure.

One somewhat-substantial issue with this is that it's pretty hard to figure out from the Harbormaster side. Specifically, the Build step UI does not show field value anywhere, so the presence of unapproved blueprints is not communicated. This is much more clear in Drydock. I'll plan to address this in future changes to Harbormaster, since there are other related/similar issues anyway.

Test Plan: {F872527}

Reviewers: hach-que, chad

Reviewed By: chad

Maniphest Tasks: T9519

Differential Revision: https://secure.phabricator.com/D14254
2015-10-12 17:02:35 -07:00
Chad Little
dac16264e4 Update metamta for handleRequest
Summary: Updates metamta for handleRequest

Test Plan: Unable to test this, but looks safe?

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14256
2015-10-12 12:02:11 -07:00
Chad Little
44e61a2397 Update home for handleRequest
Summary: Updates /home/ for handleRequest

Test Plan: Visit /home/creat/

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14257
2015-10-12 12:01:02 -07:00
Chad Little
02f42628c3 Update Harbormaster for handleRequest
Summary: Updates Harbormaster for handleRequest over processRequest

Test Plan: Went through various Harbormaster areas, buildables, actions.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14255
2015-10-12 11:39:01 -07:00
Chad Little
bb37ad65a2 Update Differential for handleRequest
Summary: Moves from processRequest to handleRequest.

Test Plan: New diff, edit diff, leave comment, view list, browse revisions, etc.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14252
2015-10-11 08:18:42 -07:00
epriestley
2f6d3119f5 Rough cut of "Blueprint Authorizations"
Summary:
Ref T9519. This is like 80% of the way there and doesn't fully work yet, but roughly shows the shape of things to come. Here's how it works:

First, there's a new custom field type for blueprints which works like a normal typeahead but has some extra logic. It's implemented this way to make it easy to add to Blueprints in Drydock and Build Plans in Harbormaster. Here, I've added a "Use Blueprints" field to the "WorkingCopy" blueprint, so you can control which hosts the working copies are permitted to allocate on:

{F869865}

This control has a bit of custom rendering logic. Instead of rendering a normal list of PHIDs, it renders an annotated list with icons:

{F869866}

These icons show whether the blueprint on the other size of the authorization has approved this object. Once you have a green checkmark, you're good to go.

On the blueprint side, things look like this:

{F869867}

This table shows all the objects which have asked for access to this blueprint. In this case it's showing that one object is approved to use the blueprint since I already approved it, but by default new requests come in here as "Authorization Requested" and someone has to go approve them.

You approve them from within the authorization detail screen:

{F869868}

You can use the "Approve" or "Decline" buttons to allow or prevent use of the blueprint.

This doesn't actually do anything yet -- objects don't need to be authorized in order to use blueprints quite yet. That will come in the next diff, I just wanted to get the UI in reasonable shape first.

The authorization also has a second piece of state, which is whether the request from the object is active or inactive. We use this to keep track of the authorization if the blueprint is (maybe temporarily) deleted.

For example, you might have a Build Plan that uses Blueprints A and B. For a couple days, you only want to use A, so you remove B from the "Use Blueprints: ..." field. Later, you can add B back and it will connect to its old authorization again, so you don't need to go re-approve things (and if you're declined, you stay declined instead of being able to request authorization over and over again). This should make working with authorizations a little easier and less labor intensive.

Stuff not in this diff:

  - Actually preventing any allocations (next diff).
  - Probably should have transactions for approve/decline, at least, at some point, so there's a log of who did approvals and when.
  - Maybe should have a more clear/loud error state when no blueprints are approved?
  - Should probably restrict the typeahead to specific blueprint types.

Test Plan:
  - Added the field.
  - Typed some stuff into it.
  - Saw the UI update properly.
  - Approved an authorization.
  - Declined an authorization.
  - Saw active authorizations on a blueprint page.
  - Didn't see any inactive authroizations there.
  - Clicked "View All Authorizations", saw all authorizations.

Reviewers: chad, hach-que

Reviewed By: chad

Maniphest Tasks: T9519

Differential Revision: https://secure.phabricator.com/D14251
2015-10-10 07:15:25 -07:00
Christopher Speck
32d4ae8cb2 Added an intercept to Mercurial's capabilities command to remove bundle2.
Summary:
If Mercurial 3.4+ is used to host repositories in Phabricator, any clients using 3.5+ will receive an exception after the bundle is pushed up. Clients will also fail to update phases for changesets pushed up.

Before directly responding to mercurial clients with all capabilities, this change filters out the 'bundle2' capability so the client negotiates using a legacy bundle wire format instead.

Test Plan:
Server: Mercurial 3.5
Client: Mercurial 3.4

Test with both HTTP and SSH protocols:
1. Create a local commit on client
2. Push commit to server
3. Verify the client emits something like:
```
searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 1 changes to 1 files
```

Closes T9450

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Maniphest Tasks: T9450

Differential Revision: https://secure.phabricator.com/D14241
2015-10-10 07:14:48 -07:00
epriestley
5a874ba0a8 Put cows and figlet bannners in <pre> in HTML mail bodies
Summary: Fixes T9538. Ref T9408. `cowsay` and `figlet` Remarkup rules are being mangled in HTML mail right now. Put them in <pre> to unmangle them.

Test Plan:
Sent myself a cow + figlet in mail.

Used `bin/mail show-outbound --id ... --dump-html > dump.html` + open that HTML file in Safari to preview HTML mail.

Saw linebreaks and monospaced formatting.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9538, T9408

Differential Revision: https://secure.phabricator.com/D14248
2015-10-08 20:03:15 -07:00
Chad Little
4549afbdce Link Ponder Answer header to user
Summary: Fixes T9509

Test Plan: View a Ponder Question, hover over answerer name, get URL.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9509

Differential Revision: https://secure.phabricator.com/D14238
2015-10-06 14:15:50 -07:00
epriestley
2bfa0e087e Improve consistency and Harbormaster integration of Diffusion
Summary:
Ref T9123. Two major Harbormaster-related UI changes in Diffusion:

  - Tags table now shows tag build status.
  - Branches table now shows branch build status.

Then some minor consistency / qualtiy of life changes:

  - Picked a nicer looking "history" icon?
  - Branches table now uses the same "history" icon as other tables.
  - Tags table now has a "history" link.
  - Browse table now has a "history" link.
  - Dates now use more consistent formatting.
  - Column order is now more consistent.
  - Use of style is now more consistent.

Test Plan:
{F865056}

{F865057}

{F865058}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9123

Differential Revision: https://secure.phabricator.com/D14242
2015-10-06 07:38:15 -07:00
epriestley
03fea70497 Fix some header formatting in bin/storage probe
Summary: Ref T9514. I missed these when I swapped out the console stuff recently.

Test Plan: Ran `bin/storage probe`, saw bold instead of escape sequences.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9514

Differential Revision: https://secure.phabricator.com/D14240
2015-10-06 07:38:09 -07:00
epriestley
4d5278af11 Put Drydock build steps into their own group in Harbormaster
Summary: Ref T9252. Move these into a new "Drydock" group.

Test Plan: Clicked "Add Build Step", saw Drydock steps in a Drydock group.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14237
2015-10-05 15:59:35 -07:00
epriestley
ee937e99fb Fix unbounded expansion of allocating resource pool
Summary:
Ref T9252. I think there's a more complex version of this problem discussed elsewhere, but here's what we hit today:

  - 5 commits land at the same time and trigger 5 builds.
  - All of them go to acquire a working copy.
  - Working copies have a limit of 1 right now, so 1 of them gets the lease on it.
  - The other 4 all trigger allocation of //new// working copies. So now we have: 1 active, leased working copy and 4 pending, leased working copies.
  - The 4 pending working copies will never activate without manual intervention, so these 4 builds are stuck forever.

To fix this, prevent WorkingCopies from giving out leases until they activate. So now the leases won't acquire until we know the working copy is good, which solves the first problem.

However, this creates a secondary problem:

  - As above, all 5 go to acquire a working copy.
  - One gets it.
  - The other 4 trigger allocations, but no longer acquire leases. This is an improvement.
  - Every time the leases update, they trigger another allocation, but never acquire. They trigger, say, a few thousand allocations.
  - Eventually the first build finishes up and the second lease acquires the working copy. After some time, all of the builds finish.
  - However, they generated an unboundedly large number of pending working copy resources during this time.

This is technically "okay-ish", in that it did work correctly, it just generated a gigantic mess as a side effect.

To solve this, at least for now, provide a mechanism to impose allocation rate limits and put a cap on the number of allocating resources of a given type. As hard-coded, this the greater of "1" or "25% of the active resources in the pool".

So if there are 40 working copies active, we'll start allocating up to 10 more and then cut new allocations off until those allocations get sorted out. This prevents us from getting runaway queues of limitless size.

This also imposes a total active working copy resource limit of 1, which incidentally also fixes the problem, although I expect to raise this soon.

These mechanisms will need refinement, but the basic idea is:

  - Resources which aren't sure if they can actually activate should wait until they do activate before allowing leases to acquire them. I'm fairly confident this rule is a reasonable one.
  - Then we limit how many bookkeeping side effects Drydock can generate once it starts encountering limits.

Broadly, some amount of mess is inevitable because Drydock is allowed to try things that might not work. In an extreme case we could prevent this mess by setting all these limits at "1" forever, which would degrade Drydock to effectively be a synchronous, blocking queue.

The idea here is to put some amount of slack in the system (more than zero, but less than infinity) so we get the performance benefits of having a parallel, asyncronous system without a finite, manageable amount of mess.

Numbers larger than 0 but less than infinity are pretty tricky, but I think rules like "X% of active resources" seem fairly reasonable, at least for resources like working copies.

Test Plan:
Ran something like this:

```
for i in `seq 1 5`; do sh -c '(./bin/harbormaster build --plan 10 rX... &) &'; done;
```

Saw 5 plans launch, acquire leases, proceed in an orderly fashion, and eventually finish successfully.

Reviewers: hach-que, chad

Reviewed By: chad

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14236
2015-10-05 15:59:16 -07:00
epriestley
b2e89a9e48 Fix several error handling issues with Subversion commits in Diffusion
Summary:
Ref T9513. I checked this briefly but didn't do a very thorough job of it.

  - Don't try to query merges for Subversion, since it doesn't support them.
  - Fix up "existsquery" to work properly (and efficiently) for both hosted and imported repositories.
  - Fix up "parentsquery" to have similar behavior on invalid commits to other VCSes (throw an exception).

Test Plan:
  - No more merges warning on SVN.
  - Hosted SVN gets the right exists result now.
  - Visiting "r23980283789287" now 404's instead of "not parsed yet".

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9513

Differential Revision: https://secure.phabricator.com/D14239
2015-10-05 15:57:41 -07:00
epriestley
de2bbfef7d Allow PhabricatorWorker->queueTask() to take full $options
Summary:
Ref T9252. Currently, `queueTask()` accepts `$priority` as its third argument. Allow it to take a full range of `$options` instead. This API just never got updated after we expanded avialable options.

Arguably this whole API should be some kind of "TaskQueueRequest" object but I'll leave that for another day.

Test Plan:
  - Grepped for `queueTask()` and verified no other callsites are affected by this API change.
  - Ran some daemons.
  - See also next diff.

Reviewers: hach-que, chad

Reviewed By: hach-que, chad

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14235
2015-10-05 09:46:29 -07:00
epriestley
4cf1270ecd In Harbormaster, make sure artifacts are destroyed even if a build is aborted
Summary:
Ref T9252. Currently, Harbormaster and Drydock work like this in some cases:

  # Queue a lease for activation.
  # Then, a little later, save the lease PHID somewhere.
  # When the target/resource is destroyed, destroy the lease.

However, something can happen between (1) and (2). In Drydock this window is very short and the "something" would have to be a lighting strike or something similar, but in Harbormaster we wait until the resource activates to do (2) so the window can be many minutes long. In particular, a user can use "Abort Build" during those many minutes.

If they do, the target is destroyed but it doesn't yet have a record of the artifact, so the artifact isn't cleaned up.

Make these things work like this instead:

  # Create a new lease and pre-generate a PHID for it.
  # Save that PHID as something that needs to be cleaned up.
  # Queue the lease for activation.
  # When the target/resource is destroyed, destroy the lease if it exists.

This makes sure there's no step in the process where we might lose track of a lease/resource.

Also, clean up and standardize some other stuff I hit.

Test Plan:
  - Stopped daemons.
  - Restarted a build in Harbormaster.
  - Stepped through the build one stage at a time using `bin/worker execute ...`.
  - After the lease was queued, but before it activated, aborted the build.
  - Processed the Harbormaster side of things only.
  - Saw the lease get destroyed properly.

Reviewers: chad, hach-que

Reviewed By: hach-que

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14234
2015-10-05 05:58:53 -07:00
epriestley
0db86cce7d Improve Diffusion behavior for no-longer-existing commits
Summary:
Ref T9028. When users push a commit, then later delete it (e.g., by deleting the branch which contained it) we currently explode when trying to view it.

Instead, degrade gradually if some information is not available.

Test Plan:
  - Looked at valid commits with parents, refs, branches and merges.
  - Looked at invalid commits.
  - Looked at a previously valid, now-deleted + gc'd commit:

{F859273}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9028

Differential Revision: https://secure.phabricator.com/D14227
2015-10-02 16:11:03 -07:00
epriestley
14d6325394 Acccept any HTTP 2xx status as success in Harbormaster
Summary: Ref T9478. This should probably be configurable eventually, but for now treat any 200-block status as success. Also show the result code.

Test Plan:
  - Hit a bad URI, saw "HTTP 503" + failure.
  - Hit a good URI, saw "HTTP 200" + success.

Reviewers: chad, hach-que

Reviewed By: chad, hach-que

Maniphest Tasks: T9478

Differential Revision: https://secure.phabricator.com/D14226
2015-10-02 09:17:51 -07:00
epriestley
9c798e5cca Provide bin/garbage for interacting with garbage collection
Summary:
Fixes T9494. This:

  - Removes all the random GC.x.y.z config.
  - Puts it all in one place that's locked and which you use `bin/garbage set-policy ...` to adjust.
  - Makes every TTL-based GC configurable.
  - Simplifies the code in the actual GCs.

Test Plan:
  - Ran `bin/garbage collect` to collect some garbage, until it stopped collecting.
  - Ran `bin/garbage set-policy ...` to shorten policy. Saw change in web UI. Ran `bin/garbage collect` again and saw it collect more garbage.
  - Set policy to indefinite and saw it not collect garabge.
  - Set policy to default and saw it reflected in web UI / `collect`.
  - Ran `bin/phd debug trigger` and saw all GCs fire with reasonable looking queries.
  - Read new docs.

{F857928}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9494

Differential Revision: https://secure.phabricator.com/D14219
2015-10-02 09:17:24 -07:00
epriestley
bb4667cb84 Fix WorkingCopy step to read correct commit variables
Summary: Ref T9252. This variable was always wrong but we fell back to just resetting to `HEAD` before. Use the correct variable name.

Test Plan: Verified variable name.

Reviewers: chad, hach-que

Reviewed By: hach-que

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14224
2015-10-02 06:37:17 -07:00
epriestley
2728a9f964 Allow builds to have parameters
Summary: Ref T9352. See D13635. Build targets can have variables already, but let builds have them too. This mostly enables future use cases (sub-builds, more sophisticated build triggers).

Test Plan: With a custom Herald rule + action like the one in T9352, updated a revision and saw it generate multiple builds with varying parameters.

Reviewers: chad, hach-que

Reviewed By: hach-que

Maniphest Tasks: T9352

Differential Revision: https://secure.phabricator.com/D14222
2015-10-02 06:32:08 -07:00
epriestley
878a493301 Begin standardizing garbage collectors
Summary: Ref T9494. Improve support infrastructure for garbage collectors.

Test Plan:
  - Ran `bin/phd debug trigger`, saw collectors execute.

{F857852}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9494

Differential Revision: https://secure.phabricator.com/D14218
2015-10-01 16:58:43 -07:00
epriestley
e431ab2189 Use getPhobjectClassConstant() to access class constants
Summary: Ref T9494. Depends on D14216. Remove 10 copies of this code.

Test Plan: Ran `arc unit --everything`, browsed Config > Modules, clicked around Herald / etc.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9494

Differential Revision: https://secure.phabricator.com/D14217
2015-10-01 16:56:21 -07:00
epriestley
c95fcb8970 Add a little Drydock documentation
Summary: Ref T9252. Provide some general descriptions of Drydock in the docs.

Test Plan: Reading.

Reviewers: hach-que, chad

Reviewed By: chad

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14215
2015-10-01 16:55:24 -07:00
epriestley
4496176924 Add staging area support to Harbormaster/Drydock + various fixes
Summary:
Ref T9252. This primarily allows Harbormaster to request (and Drydock to fulfill) working copies with a patch from a staging area. Doing this means we can do builds on in-review changes from `arc diff`.

This is a little cobbled-together but should basically work.

Also fix some other issues:

  - Yielded, awakend workers are fine to update but could complain.
  - We can't log slot lock failures to resources if we don't end up saving them.
  - Killing the transaction would wipe out the log.
  - Fix some TODOs, etc.

Test Plan: Ran Harbormaster builds on a local revision.

Reviewers: hach-que, chad

Reviewed By: chad

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14214
2015-10-01 16:55:01 -07:00
epriestley
d4a0b1c870 Remove names from Drydock resources
Summary:
Ref T9252. Long ago you sometimes manually created resources, so they had human-enterable names. However, users never make resources manually any more, so this field isn't really useful any more.

In particular, it means we write a lot of untranslatable strings like "Working Copy" to the database in the default locale. Instead, do the call at runtime so resource names are translatable.

Also clean up a few minor things I hit while kicking the tires here.

It's possible we might eventually want to introduce a human-choosable label so you can rename your favorite resources and this would just be a default name. I don't really have much of a use case for that yet, though, and I'm not sure there will ever be one.

Test Plan:
  - Restarted a Harbormaster build, got a clean build.
  - Released all leases/resources, restarted build, got a clean build with proper resource names.

Reviewers: hach-que, chad

Reviewed By: hach-que, chad

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14213
2015-10-01 08:13:43 -07:00
epriestley
b219bcfb3d Improve error and exception handling for Drydock leases
Summary:
Ref T9252. See companion change in D14211. This does the same thing for leases.

Particularly, most of the TODOs about error handling can just be removed because they'll do the right things by default now.

This and D14211 also move slot lock release to after resource destruction. This feels cleaner than trying to release early at release/break.

Test Plan: Restarted a Harbormaster build, got a clean build result. This needs more vetting but I'll clean up any issues as I hit them.

Reviewers: chad, hach-que

Reviewed By: hach-que

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14212
2015-10-01 08:13:20 -07:00
epriestley
e589d15231 Improve error and exception handling for Drydock resources
Summary:
Ref T9252. Currently, error handling behavior isn't great and a lot of errors aren't dealt with properly. Try to improve this by making default behaviors better:

  - Yields, slot lock exceptions, and aggregate or proxy exceptions containing an excpetion of these types turn into yields.
  - All other exceptions are considered permanent failures. They break the resource and

This feels a little bit "magical" but I want to try to get the default behaviors to align reasonably well with expectations so that blueprints mostly don't need to have a ton of error handling. This will probably need at least some refinement down the road, but it's a reasonable rule for all exception/error conditions we currently have.

Test Plan: I did a clean build, but haven't vetted this super thoroughly. Next diff will do the same thing to leases, then I'll work on stabilizing this code better.

Reviewers: chad, hach-que

Reviewed By: hach-que

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14211
2015-10-01 08:12:51 -07:00
epriestley
6b775e6090 Add more Drydock log types and some additional logging
Summary: Ref T9252. Add a bit more logging and improve some behaviors.

Test Plan: Restarted a build, got a good result.

Reviewers: chad, hach-que

Reviewed By: hach-que

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14210
2015-10-01 08:11:42 -07:00
epriestley
4ac82be5ed Merge the DrydockLease workers into a single worker
Summary:
Ref T9252. This is the same as D14201, but for lease stuff instead of resource stuff.

This one is a little heavier but still feels pretty reasonable to me at the end of the day (worker is <1K lines and has a ton of comment stuff).

Also fixes a few random bugs I hit in the task queue.

Test Plan:
  - Restarted some Harbormaster builds, saw them go through cleanly.
  - Released pre-activation resources/leases.
  - Probably still kinda buggy but I'll iron the details out over time.

Logs are starting to look somewhat plausible:

{F855747}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14202
2015-10-01 08:11:02 -07:00
epriestley
91e5ca0ee2 Merge the DrydockResource workers into a single worker
Summary:
Ref T9252. Currently, Drydock Leases and Resources have several workers:

  - Resources: ResourceWorker, ResourceUpdateWorker, ResourceDestroyWorker
  - Leases: AllocatorWorker, LeaseWorker, LeaseUpdateWorker, LeaseDestroyWorker

This is kind of a lot of stuff, and it creates some problems.

In particular, leases and resources in early lifecycle phases (pending/allocating/acquiring) can't process commands yet, because that code is only in the "UpdateWorker" classes. If they aren't able to move forward because of a bug, they also can't be released because they can't react to the release command until later in their lifecycle. This creates a soft hang where I have to go wipe stuff out of the database since there's no other way to get rid of it.

Instead, I want leases and resources to be releasable from any (pre-release / pre-destroy) phase of their lifecycle. To support this, all the workers before the "UpdateWorker" need to be able to process commands.

A second, similar issue is that logging and exception handling behaviors are underpowered right now. Elsewhere I began improving this, but ran into issues where all of the workers needed to share very similar exception code. Merging them will make this future change simpler.

This diff fixes this for resources: it merges the Worker, UpdateWorker and DestroyWorker logic into UpdateWorker and throws away the other two workers.

Test Plan: Nothing substantive yet, see next diff. I'll do the same thing for Leases, then test both more thoroughly.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14201
2015-10-01 08:10:40 -07:00
epriestley
8bf5905024 Add Drydock log types and more logging
Summary: Ref T9252. Make log types modular so they can be translated and have complicated rendering logic if necessary (currently, none have this).

Test Plan: {F855330}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14198
2015-10-01 08:10:07 -07:00
epriestley
06f9272502 Garbage collect Drydock logs after 30 days
Summary:
Ref T9252. Drydock logs are almost exclusively useful as a diagnostic tool for debugging immediate problems, so GC them fairly aggressively.

(I expect 99% of the usefulness of these logs to be within the first 24 hours, basically "why isn't my thing working". I can't really think of any cases where having old logs would be useful.)

Test Plan:
  - Ran GC, saw it hit the log table (with no effect).
  - Changed TTL from 30 days to 30 seconds, ran GC, saw it wipe recent logs.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14197
2015-10-01 08:09:27 -07:00
epriestley
2ef5b5321d Move Drydock logs to PHIDs and increased structure
Summary:
Ref T9252. Several general changes here:

  - Moves logs to use PHIDs instead of IDs. This generally improves flexibility (for example, it's a lot easier to render handles).
  - Adds `blueprintPHID` to logs. Although you can usually figure this out from the leasePHID or resourcePHID, it lets us query relevant logs on Blueprint views.
  - Instead of making logs a top-level object, make them strictly a sub-object of Blueprints, Resources and Leases. So you go Drydock > Lease > Logs, etc., to get to logs.
    - I might restore the "everything" view eventually, but it doesn't interact well with policies and I'm not sure it's very useful. A policy-violating `bin/drydock log` might be cleaner.
  - Policy-wise, we always show you that logs exist, we just don't show you log content if it's about something you can't see. This is similar to seeing restricted handles in other applications.
  - Instead of just having a message, give logs "type" + "data". This will let logs be more structured and translatable. This is similar to recent changes to Herald which seem to have worked well.

Test Plan:
Added some placeholder log writes, viewed those logs in the UI.

{F855199}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14196
2015-10-01 08:06:23 -07:00
epriestley
9d997df964 Reset Drydock git working copies better
Summary: Ref T9252. We're currently resetting to the local branch, but should be resetting to the origin branch.

Test Plan: Restarted a build, had it run `git show`, saw proper HEAD.

Reviewers: chad

Reviewed By: chad

Subscribers: hach-que

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14194
2015-09-30 07:45:02 -07:00
epriestley
8f2f841d17 Fix some links to "Adding New Classes" in docs
Summary: Fixes T9483. This bookname is `phabcontrib`, not `contributor`.

Test Plan: `grep` / clicked these links.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9483

Differential Revision: https://secure.phabricator.com/D14195
2015-09-30 07:44:54 -07:00
Chad Little
ae082c6033 Make Ponder Emails a little more consistently delivered
Summary: Ref T9271, maybe fixes it. This restores feed publishing for answers (broken in D13951) and sends the author of the question an email for new answers. Also, unsure how to pull all question subsribers to the answer email, or is it automagical?

Test Plan: notchad asks a question, chad answers, log into notchad and see that mail was delivered, see feed story.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: revi, Korvin

Maniphest Tasks: T9271

Differential Revision: https://secure.phabricator.com/D14171
2015-09-29 14:25:28 -07:00
Ray Lillywhite
1ac919c29c Improved example setting for differential.generated-paths
Summary: This is to make it more obvious how to ignore a folder that may be at the root, and it resolves https://secure.phabricator.com/T8894

Test Plan: Just a documentation change

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, nornagon

Differential Revision: https://secure.phabricator.com/D14193
2015-09-29 14:14:31 -07:00
epriestley
45a5ea7bf5 Show lease owner in Drydock UI
Summary: Replaces D13687. Leases track an owner but don't currently show it.

Test Plan:
Looked at a lease.

{F851223}

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D14191
2015-09-29 09:51:06 -07:00
epriestley
6d5c9e897d Hide "Revision" column in Diffusion history view if Differential is uninstalled
Summary: Fixes T9481. If the viewer does not have access to Differential (for example, because it is not installed), hide the "Revision" column in Diffusion.

Test Plan:
  - Viewed history, saw "Revision" column.
  - Uninstalled Differential, reloaded, no "Revision" column.

Reviewers: chad

Reviewed By: chad

Subscribers: revi

Maniphest Tasks: T9481

Differential Revision: https://secure.phabricator.com/D14188
2015-09-29 07:09:12 -07:00
epriestley
be83d62375 Fix button for "All Problem Commits" on Owners packages
Summary:
Ref T9482. This button goes to the wrong place and this table conditionally hides itself so I missed it.

Instead:

  - Always show the table, with an empty string if there are no relevant commits.
  - Link to a working UI.

Test Plan: Saw table. Clicked button.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9482

Differential Revision: https://secure.phabricator.com/D14189
2015-09-29 06:43:55 -07:00
epriestley
fa943f744b Stop all object mentions from matching after "@"
Summary:
Fixes T9479. Currently, `@aaaaaaaa` may try to match as a commit hash, and `@C123456` may try to match as a Countdown reference. These should only match as user mentions.

Prevent object mention rules from matching after `@`. We already prevent them after `-` and `#`, and already prevented the username rule after `@` (i.e., preventing `@@user`).

Test Plan:
Created some "interesting" users locally and `@mentioned` them:

{F850779}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9479

Differential Revision: https://secure.phabricator.com/D14186
2015-09-29 06:43:49 -07:00
epriestley
21021b55c4 Update configuring_file_domain.diviner's cloudflare link
Summary: [[ https://cloudflare.net | https://cloudflare.net ]] generates SSL certification error, and even if I click "ignore it", the page is 403 forbidden afterwards. Their domain has moved to .com, therefore update it to reflect this.

Test Plan:
Go to [[ https://secure.phabricator.com/book/phabricator/article/configuring_file_domain/ | Configuring a File Domain ]], click [[ https://cloudflare.net | CloudFlare]].
Then, apply the patch. Refresh the page, and the new link works.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: revi, epriestley

Differential Revision: https://secure.phabricator.com/D14172
2015-09-29 03:35:59 -07:00
epriestley
55767aac0f Fix an issue where followup tasks could fail to queue with string priorities
Auditors: chad
2015-09-28 19:46:41 -07:00
epriestley
a5c4177160 Fix an issue with BuildLogs and web UI during builds
Summary:
Ref T9123. After recent changes, viewing a live build log from the web UI throws a CSRF exception.

Check `start` ("this object is an active log"), not `live` ("this log is open somewhere").

Test Plan: Will push / etc.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9123

Differential Revision: https://secure.phabricator.com/D14185
2015-09-28 19:11:51 -07:00
epriestley
efaa8170c3 Simplify value decoding for PHID custom fields
Summary:
Ref T9123. The handling in D14183 didn't deal with new field values properly.

Make all this handling more consistent.

Test Plan: Created a new WorkignCopy build plan with some repos.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9123

Differential Revision: https://secure.phabricator.com/D14184
2015-09-28 18:44:40 -07:00
epriestley
bfaa93aa9b Allow Harbormaster build plans to request additional working copies
Summary:
Ref T9123. To run upstream builds in Harbormaster/Drydock, we need to be able to check out `libphutil`, `arcanist` and `phabricator` next to one another.

This adds an "Also Clone: ..." field to Harbormaster working copy build steps so I can type all three repos into it and get a proper clone with everything we need.

This is somewhat upstream-centric and a bit narrow, but I don't think it's totally unreasonable, and most of the underlying stuff is relatively general.

This adds some more typechecking and improves data/type handling for custom fields, too. In particular, it prevents users from entering an invalid/restricted value in a field (for example, you can't "Also Clone" a repository you don't have permission to see).

Test Plan: Restarted build, got a Drydock resource with multiple repositories in it.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9123

Differential Revision: https://secure.phabricator.com/D14183
2015-09-28 17:57:41 -07:00
epriestley
0438a481e1 Fix issue with "Publish/Notify" handling in repositories
Summary:
Fixes T8728. As far as I can tell, I simply got this wrong in D11826. This is not the proper name for the preference.

That change primarily focused on the "spammy junk during import" issue, and the code did get the importing flag right. It looks like my testing in D11827 focused on "during import" and just missed this case.

Test Plan: Grepped for `disable-herald`. Grepped for `herald-disable`.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8728

Differential Revision: https://secure.phabricator.com/D14181
2015-09-28 11:17:04 -07:00
epriestley
33be8f719f Allow WorkingCopy resources to have multiple working copies
Summary:
Ref T9252. For building Phabricator itself, we need to have `libphutil/`, `arcanist/` and `phabricator/` next to one another on disk.

Expand the Drydock WorkingCopy resource so that it can have multiple repositories if the caller needs them.

I'm not sure if I'm going to put the actual config for this in Harbormaster or Drydock yet, but the WorkingCopy resource itself should work the same way in either case.

Test Plan: Restarted a Harbormaster build which leases a working copy, saw it build as expected.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14180
2015-09-28 09:35:58 -07:00
epriestley
9b29d46e60 Make Drydock lease infrastructure more nimble
Summary:
Ref T9252. Currently, Harbormaster does this when trying to acquire a working copy:

  - Ask for a working copy.
  - Yield for 15 seconds.
  - Check if we have a working copy yet.

That's OK, but Drydock takes ~1s to acquire a working copy lease if a resource is already available, so we end up doing this:

  - T+0: Ask for a working copy.
  - T+0: Yield for 15 seconds.
  - T+1: Working copy lease activates.
  - T+15: Working copy lease is used.
  - T+16: Build finishes.

So we end up spending about 2 seconds doing work and 14 seconds sleeping.

One way to fix this would be to fiddle with the yield duration, so we yield for 1, 2, 4, ... seconds or something. This probably isn't a bad idea for longer leases (i.e., wait for 15, 30, 45 ... seconds or similar) but it implies a lot of churn for short leases.

Instead, let tasks "awaken" other tasks when they complete. The "awaken" operation means: if a task is in a yielded state (no failures, no owner, explicitly yielded, future expires time), pretend it only yielded until right now instead of whenever it really yielded to.

Basically, this rewrites history so that even though Harbormaster did a `yield(15)`, we pretend it did a `yield(4)` after we activate the lease if lease activation took 4 seconds.

If this misses, it's fine: we fall back to the normal yield behavior and things move forward normally a few seconds later.

If it hits, we get a more nimble process pretty cleanly.

Test Plan:
  - Restarted a build plan (lease working copy + run `ls`) with this patch no-op'd, took about 16 seconds.
  - Restarted a build plan with this patch active, took about 1 second.

Reviewers: hach-que, chad

Reviewed By: chad

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14178
2015-09-28 09:35:40 -07:00
epriestley
cd2dd2a08f Give visual feedback when a Drydock resource or lease is releasing
Summary: Ref T9252. Show the user when a resource or lease has a pending release command in queue.

Test Plan: Released a resource and lease from the web UI. In both cases, saw a "releasing" tag and the action disable.

Reviewers: hach-que, chad

Reviewed By: chad

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14177
2015-09-28 09:35:26 -07:00
epriestley
ec6d69e74d Give Drydock resources a proper expiry mechanism
Summary:
Fixes T6569. This implements an expiry mechanism for Drydock resources which parallels the mechanism for leases.

A few things are missing that we'll probably need in the future:

  - An "EXPIRES" command to update the expiration time. This would let resources be permanent while leased, then expire after, say, 24 hours without any leases.
  - A callback like `shouldActuallyExpireRightNow()` for resources and leases that lets them decide not to expire at the last second.
  - A callback like `didAcquireLease()` for resource blueprints, to parallel `didReleaseLease()`, letting them clear or extend their timer.

However, this stuff would mostly just let us tune behaviors, not really open up new capabilities.

Test Plan: Changed host resources to expire after 60 seconds, leased one, saw it vanish 60 seconds later.

Reviewers: hach-que, chad

Reviewed By: chad

Maniphest Tasks: T6569

Differential Revision: https://secure.phabricator.com/D14176
2015-09-28 09:35:14 -07:00
Chad Little
a3b49053c0 Allow polls to be public
Summary: Fixes T9474

Test Plan: Make a poll, log out, still see it.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9474

Differential Revision: https://secure.phabricator.com/D14179
2015-09-28 07:55:28 -07:00
epriestley
ffbcefb629 Fix a doc typo
Summary: chack spels

Test Plan: typey typey

Reviewers: chad, hach-que

Reviewed By: hach-que

Differential Revision: https://secure.phabricator.com/D14175
2015-09-28 04:13:36 -07:00
epriestley
24845c70b9 Refine error behavior of bin/search index
Summary: Fixes T5991. If //all requested documents// failed to index, consider this a catastrophic failure and exit with an error code.

Test Plan:
  - Ran `bin/search index --type TASK`, observed successful exit despite a small number of un-indexable documents.
  - Ran `bin/search index PHID-TASK-xxx` for an invalid task, observed exception on exit after complete failure.
  - Ran normal indexing through daemons.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T5991

Differential Revision: https://secure.phabricator.com/D14174
2015-09-27 13:11:11 -07:00
epriestley
c99508cfe2 Explain upstream attitudes toward CLI exit codes
Summary: Ref T5991. See D14116. We are consistent but nonstandard in our use of exit codes. This document explains what we use exit codes for and why we do this.

Test Plan: Read it.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T5991

Differential Revision: https://secure.phabricator.com/D14173
2015-09-27 13:10:44 -07:00
epriestley
99d972fc81 Fix Herald rule actions on empty custom PHID fields
Summary: Fixes T9260. That task has a good description of the issue.

Test Plan: Followed steps in T9260 to reproduce the issue. Applied patch; issue went away.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9260

Differential Revision: https://secure.phabricator.com/D14169
2015-09-25 15:00:55 -07:00
epriestley
3e60740c7c Slightly modernize transaction diff controller
Summary: Ref T9272. This doesn't fix anything, just a little cleanup while I was looking at it.

Test Plan: Clicked "Show Details" on a couple description changes, got the same effect for less code.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9272

Differential Revision: https://secure.phabricator.com/D14168
2015-09-25 11:15:57 -07:00
epriestley
b7ca5a2d29 Provide a stable URI for getting raw paste content
Summary: Fixes T9312. This is a bit fluff, but does simplify the view controller slightly and seems reasonable/useful in general.

Test Plan: Clicked "View Raw File" on a paste, got redirected to the raw file via a stable URI.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9312

Differential Revision: https://secure.phabricator.com/D14167
2015-09-25 10:45:01 -07:00
epriestley
d735c7adf2 Allow Harbormaster to run commands on Drydock working copies
Summary: Ref T9252. This mostly cleans up future and log handling, and edges us closer to being able to do useful work with Harbormaster / Drydock.

Test Plan:
  - Added a "Run `ls -alh`" step to my trivial build plan.
  - Ran it a bunch of times.
  - Worked great.
  - Also did an HTTP plan.

{F835227}

{F835228}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14161
2015-09-25 10:43:32 -07:00
epriestley
bd546f44a9 Load audit requests when querying audits
Summary: Fixes T9434. I'm not sure exactly what changed behavior here, but we need a `needAuditRequests()`.

Test Plan: Ran a query which hit the exception (empty query was good enough, locally), then applied this patch; saw exception go away.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9434

Differential Revision: https://secure.phabricator.com/D14162
2015-09-25 10:43:17 -07:00
epriestley
36d9908e6c Move commits to the "COMMIT" mail prefix
Summary:
Fixes T9427. Currently, replies to audits/commits go to "Cxxx", but so do replies to countdowns.

There is non real non-disruptive approach available here and this seems least-bad.

Test Plan:
  - Made a comment on a commit.
  - Fished the reply-to address out of `bin/mail list-oubound` + `bin/mail show-outbound` (it was now "COMMIT...").
  - Sent mail to that address.
  - Grabbed the raw message and wrote it to `mail.txt`.
  - Ran `cat mail.txt | ./scripts/mail/mail_handler.php --process-duplicates`.
  - Used `bin/mail list-inbound` + `bin/mail show-inbound` to verify receipt.
  - Saw comment appear on audit.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9427

Differential Revision: https://secure.phabricator.com/D14163
2015-09-25 10:43:11 -07:00
epriestley
8d3bb92b91 Make some Herald errors more spider-resistant
Summary:
Fixes T9328. There's no way to hit these error states by clicking things in the UI that I could find, but if you mash stuff into your URL bar or "Inspect Element..." and then edit the form to be full of garbage you can hit them.

Make them a little more informative and don't send them to the log, since these are pretty much just fancy 404s.

Test Plan: Bashed my fist on the URL bar to hit all these messages.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9328

Differential Revision: https://secure.phabricator.com/D14164
2015-09-25 10:43:04 -07:00
epriestley
8ce90a7c42 Allow lint codes to be up to 128 bytes long
Summary:
Fixes T9145. We currently restrict lint codes to 32 bytes, but PHPCS generates codes like "PHPCS.E.PEAR.Comments.Messages.Line.TooLong".

These codes seem reasonable as codes, and we don't currently have any key-length problems or other technical concerns with simply raising the size of this column.

Test Plan: Ran `bin/storage upgrade` to pick up adjustments.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9145

Differential Revision: https://secure.phabricator.com/D14166
2015-09-25 10:42:57 -07:00
epriestley
284fe0fe51 Allow Harbormaster to lease working copies from Drydock
Summary: Ref T9252. This is still crude in a few ways but basically works, at least for commits.

Test Plan:
  - Made a build plan with just this build step.
  - Ran `bin/harbormaster build --plan 10 ...` on a commit.
  - It actually built a working copy, leased it, took no action, and released the lease. MAGIC~~~

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14160
2015-09-24 17:29:47 -07:00
epriestley
381fa611fd Check that the viewer can actually create badges before letting them create badges
Summary: Fixes T9467.

Test Plan: Set policy to "no one", got blocked.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9467

Differential Revision: https://secure.phabricator.com/D14159
2015-09-24 15:34:09 -07:00
epriestley
64ed971039 Show recent active leases on Drydock resource detail
Summary: Ref T9252. This is the same as D14157, just for Resources and their leases.

Test Plan: Viewed a resource, saw only active leases, clicked "View All Leases", queried, clicked around, used crumbs.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14158
2015-09-24 15:28:59 -07:00
epriestley
3b2f4c258f Show recent active resources on Drydock blueprint detail, with link to all
Summary:
Ref T9252. Currently, Drydock blueprint pages:

  - show all resources, even if there are a million;
  - show resources in all states, although destroyed resources are usually uninteresting;
  - have some junky `$pager` code.

Instead, show the few most recent active resources and link to a filtered resource view in ApplicationSearch.

Test Plan:
  - Viewed some blueprints.
  - Clicked "View All Resources".
  - Saw all resources.
  - Used query / crumbs / etc.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14157
2015-09-24 13:52:43 -07:00
epriestley
b441e8b81e Allow Drydock blueprints to be disabled
Summary: Ref T9252. If you have a blueprint and you do not like that blueprint very much, you can disable it.

Test Plan: Disabled / enabled some blueprints.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14156
2015-09-24 10:18:17 -07:00
epriestley
1491269b72 Modernize Drydock SearchEngine implementations
Summary:
Ref T9252. Move these to the more modern stuff to pick up ordering and interface support for free.

Also work around the blueprint / custom field integration a little more gracefully.

Test Plan: Searched for blueprints, resources and leases.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14155
2015-09-24 09:56:49 -07:00
epriestley
b71ce90b9c Straighten out Drydock policies for Resources
Summary: Ref T9252. Resources always have a corresponding blueprint, and it makes sense to use the same policies for both.

Test Plan: Viewed resources in web UI.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14154
2015-09-24 09:56:35 -07:00
epriestley
e117ace8c7 Convert Drydock lease and resource constants to strings
Summary:
Ref T9252. Drydock currently uses integer statuses, but there's no reason for this (they don't need to be ordered) and it makes debugging them, working with them, future APIs, etc., more cumbersome.

Switch to string instead.

Also rename `STATUS_OPEN` to `STATUS_ACTIVE` and `STATUS_CLOSED` to `STATUS_RELEASED` for consistency. This makes resources and leases have more similar states, and gives resource states more accurate names.

Test Plan: Browsed web UI, grepped for changed constants, applied patch, inspected database.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14153
2015-09-24 07:57:05 -07:00
epriestley
c6aade4392 Give Drydock leases a resourcePHID instead of a resourceID
Summary:
Ref T9252. Leases currently have a `resourceID`, but this is a bit nonstandard and generally less flexible than giving them a `resourcePHID`.

In particular, a `resourcePHID` is easier to use when rendering interfaces, since you can get handles out of a PHID.

Add a PHID column, copy over all the PHIDs that correspond to existing IDs, then drop the ID column.

Test Plan:
  - Browsed web UIs.
  - Inspected database during/after migration.
  - Grepped for `resourceID`.
  - Allocated a new lease with `bin/drydock lease`.

Reviewers: chad, hach-que

Reviewed By: hach-que

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14151
2015-09-24 04:19:27 -07:00
epriestley
309aadc595 Rename Drydock Lease STATUS_EXPIRED to STATUS_DESTROYED
Summary: Ref T9252. This is now more consistent (same as the equivalent Resource state) and accurate (leases can end up in this state a bunch of ways, including by expiring).

Test Plan: `grep`, browsed around web UI.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14150
2015-09-23 20:48:51 -07:00
epriestley
3379904237 Allow Drydock leases to expire after a time limit
Summary: Ref T6569. If a lease is activated with an expiration date, schedule a task to try to clean it up after that time.

Test Plan:
  - Used `bin/drydock lease ... --until ...` to activate a lease in the near future.
  - Waited for a bit.
  - Saw it expire and get destroyed at the scheduled time.

Reviewers: hach-que, chad

Reviewed By: chad

Maniphest Tasks: T6569

Differential Revision: https://secure.phabricator.com/D14148
2015-09-23 13:54:27 -07:00
epriestley
fcb6d1e2fa Strip some obsolete code out of Drydock
Summary:
Ref T9252. This simplifies some Drydock code.

Most of this code relates to the old notion of Drydock being able to enumerate all the tasks it needs to complete in order to acquire a lease. The code has stepped back from this, since it's unnecessary, the queue is more powerful than it used to be, and it would be a lot of work to keep track of.

The ~only thing that should ever wait for leases in modern code is `bin/drydock lease`, and it's fine for it to just sit there sleeping, so this just does that.

This reduces the granularity of logging, but I'll address that separately in future logging-focused changes.

Test Plan: Used `bin/drydock lease` to acquire a lease, saw it acquire cleanly.

Reviewers: hach-que, chad

Reviewed By: chad

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14147
2015-09-23 13:21:41 -07:00
Chad Little
be9cc235b2 Add Application Routes to Phame AppSearch queries
Summary: Fixes T9388, lays in basic ApplicationSearch.

Test Plan: Build a dashboard with Posts and Blogs, click on search icon, get sent to correct page.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9388

Differential Revision: https://secure.phabricator.com/D14146
2015-09-23 12:48:19 -07:00
epriestley
1f311d64c6 Give Drydock resources and leases a real "destroy" lifecycle phase
Summary: Ref T9252. Some leases or resources may need to remove data, tear down VMs, etc., during cleanup. After they are released, queue a "destroy" phase for performing teardown.

Test Plan:
  - Used `bin/drydock lease ...` to create a working copy lease.
  - Used `bin/drydock release-lease` and `bin/drydock release-resource` to release the lease and then the working copy and host.
  - Saw working copy and host get destroyed and cleaned up properly.

Reviewers: hach-que, chad

Reviewed By: chad

Maniphest Tasks: T6569, T9252

Differential Revision: https://secure.phabricator.com/D14144
2015-09-23 11:20:20 -07:00
epriestley
0a37145072 [drydock/core] Show blueprints / resources as links in Drydock view controllers
Summary: Ref T2015. This updates the blueprint / resource references in the Drydock view controllers to render as handles.

Test Plan: Viewed the controllers, saw links.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: devurandom, joshuaspence, Korvin, epriestley

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D10873
2015-09-23 10:52:23 -07:00
epriestley
789df89c84 Add a command queue to Drydock to manage lease/resource release
Summary:
Ref T9252. Broadly, Drydock currently races on releasing objects from the "active" state. To reproduce this:

  - Scatter some sleep()s pretty much anywhere in the release code.
  - Release several times from web UI or CLI in quick succession.

Resources or leases will execute some release code twice or otherwise do inconsistent things.

(I didn't chase down a detailed reproduction scenario for this since inspection of the code makes it clear that there are no meaningful locks or mechanisms preventing this.)

Instead, add a Harbormaster-style command queue to resources and leases. When something wants to do a release, it adds a command to the queue and schedules a worker. The workers acquire a lock, then try to consume commands from the queue.

This guarantees that only one process is responsible for writes to active resource/leases.

This is the last major step to giving resources and leases a single writer during all states:

  - Resource, Unsaved: AllocatorWorker
  - Resource, Pending: ResourceWorker (Possible rename to "Allocated?")
  - Resource, Open: This diff, ResourceUpdateWorker. (Likely rename to "Active").
  - Resource, Closed/Broken: Future destruction worker. (Likely rename to "Released" / "Broken"; maybe remove "Broken").
  - Resource, Destroyed: No writes.
  - Lease, Unsaved: Whatever wants the lease.
  - Lease, Pending: AllocatorWorker
  - Lease, Acquired: LeaseWorker
  - Lease, Active: This diff, LeaseUpdateWorker.
  - Lease, Released/Broken: Future destruction worker (Maybe remove "Broken"?)
  - Lease, Expired: No writes. (Likely rename to "Destroyed").

In most phases, we can already guarantee that there is a single writer without doing any extra work. This is more complicated in the "Active" case because the release buttons on the web UI, the release tools on the CLI, the lease requestor itself, the garbage collector, and any other release process cleaning up related objects may try to effect a release. All of these could race one another (and, in many cases, race other processes from other phases because all of these get to act immediately) as this code is currently written. Using a queue here lets us make sure there's only a single writer in this phase.

One thing which is notable is that whatever acquires a lease **can not write to it**! It is never the writer once it queues the lease for activation. It can not write to any resources, either. And, likewise, Blueprints can not write to resources while acquiring or releasing leases.

We may need to provide a mechinism so that blueprints and/or resource/lease holders get to attach some storage to resources/leases for bookkeeping. For example, a blueprint might need to keep some kind of cache on a resource to help it manage state. But I think we can cross that bridge when we come to it, and nothing else would need to write to this storage so it's technically straightforward to introduce such a mechanism if we need one.

Test Plan:
  - Viewed buttons in web UI, checked enabled/disabled states.
  - Clicked the buttons.
  - Saw commands show up in the command queue.
  - Saw some daemon stuff get scheduled.
  - Ran CLI tools, saw commands get consumed and resources/leases release.

Reviewers: hach-que, chad

Reviewed By: chad

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14143
2015-09-23 07:42:08 -07:00
epriestley
8ded0927aa Recover gracefully from Conduit failure when building "Tags" field in commit mail
Summary:
Ref T9458. This is basically the same as D13319, but the "Tags" field didn't get covered in that change.

Specifically, the issue is:

  - We try to generate mail to a disabled user (later, we'll drop it without delivering it, but that filtering doesn't happen yet).
  - The disabled user doesn't have permission to use Conduit (or any other Conduit-related problem occurs).
  - We fail here, then retry generating the mail again later.

Instead, just degrade to not building the field and showing what went wrong.

Test Plan:
  - Pushed some commits, saw mail generate.
  - Added a fake exception to the field, saw the mail generate with an error message.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9458

Differential Revision: https://secure.phabricator.com/D14142
2015-09-22 13:03:29 -07:00
Chad Little
799d86dc65 Show file UI box as collapsed in Diffusion
Summary: This UI should have a Collapsed PHUIObjectBoxView.

Test Plan: review a file in sandbox

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14139
2015-09-21 12:29:17 -07:00
Chad Little
b8567f1764 Use setTable on File Transforms tables
Summary: Minor, but nicer.

Test Plan: Review File Transforms page, see new UI.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14140
2015-09-21 12:29:05 -07:00
June Rhodes
d5dc4588fc [harbormaster/abort-builds] Support aborting builds in Harbormaster
Summary: Ref T1049.  This adds support for aborting builds in Harbormaster.

Test Plan: Tested it in production.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: yelirekim, traviscline, joshuaspence, Korvin, epriestley

Projects: #harbormaster

Maniphest Tasks: T1049

Differential Revision: https://secure.phabricator.com/D11870
2015-09-21 12:07:38 -07:00
epriestley
f1119ffcf5 Support working copies and separate allocate + activate steps for resources/leases in Drydock
Summary:
Ref T9253. For resources and leases that need to do something which takes a lot of time or requires waiting, allow them to allocate/acquire first and then activate later.

When we allocate a resource or acquire a lease, the blueprint can either activate it immediately (if all the work can happen quickly/inline) or activate it later. If the blueprint activates it later, we queue a worker to handle activating it.

Rebuild the "working copy" blueprint to work with this model: it allocates/acquires and activates in a separate step, once it is able to acquire a host.

Test Plan: With some power of imagination, brought up a bunch of working copies with `bin/drydock lease --type working-copy ...`

Reviewers: hach-que, chad

Reviewed By: hach-que, chad

Maniphest Tasks: T9253

Differential Revision: https://secure.phabricator.com/D14127
2015-09-21 04:46:24 -07:00
epriestley
6a0eb9d84b Allow AlmanacHost blueprints to build a meaningful CommandInterface
Summary: Ref T9253. Provide a meaningful command interface for Almanac hosts.

Test Plan:
Configued and leased a real host (`sbuild001.phacility.net`) and ran a command on it.

```
$ ./bin/drydock command --lease 90 -- ls /
bin
boot
core
dev
etc
home
initrd.img
lib
lib64
lost+found
media
mnt
opt
proc
root
run
sbin
srv
sys
tmp
usr
var
vmlinuz
```

Reviewers: chad, hach-que

Reviewed By: chad, hach-que

Maniphest Tasks: T9253

Differential Revision: https://secure.phabricator.com/D14126
2015-09-21 04:46:02 -07:00
epriestley
9a270efe8a Tidy up some Drydock UI
Summary: Ref T9253. We had some un-modern use of UI elements, clean that up. Add a tab for showing slot locks so you don't have to fish around in the database.

Test Plan: Looked at blueprints, resources and leases. Looked at slot locks.

Reviewers: chad, hach-que

Reviewed By: chad, hach-que

Maniphest Tasks: T9253

Differential Revision: https://secure.phabricator.com/D14119
2015-09-21 04:45:43 -07:00
epriestley
3ac99006bf Implement optimistic "slot locks" in Drydock
Summary:
See discussion in D10304. There's a lot of context there, but the general idea is:

  - Blueprints should manage locks in a granular way during the actual allocation/acquisition phase.
  - Optimistic "slot locks" might a pretty good primitive to make that easy to implement and reason about in most cases.

The way these locks work is that you just pick some name for the lock (like the PHID of a resource) and say that it needs to be acquired for the allocation/acquisition to work:

```
...
->needSlotLock("mylock(PHID-XYZQ-...)")
...
```

When you fire off the acquisition or allocation, it fails unless it could acquire the slot with that name. This is really simple (no explicit lock management) and a pretty good fit for most of the locking that blueprints and leases need to do.

If you need to do limit-based locks (e.g., maximum of 3 locks) you could acquire a lock like this:

```
mylock(whatever).slot(2)
```

Blueprints generally only contend with themselves, so it's normally OK for them to pick whatever strategy works best for them in naming locks.

This may not work as well if you have a huge number of slots (e.g., 100TB you want to give out in 1MB chunks), or other complex needs for locks (like you have to synchronize access to some external resource), but slot locks don't need to be the only mechanism that blueprints use. If they run into a problem that slot locks aren't a good fit for, they can use something else instead. For now, slot locks seem like a good fit for the problems we currently face and most of the problems I anticipate facing.

(The release workflows have other race issues which I'm not addressing here. They work fine if nothing races, but aren't race-safe.)

Test Plan:
To create a race where the same binding is allocated as a resource twice:

  - Add `sleep(10)` near the beginning of `allocateResource()`, after the free bindings are loaded but before resources are allocated.
  - (Comment out slot lock acquisition if you have this patch.)
  - Run `bin/drydock lease ...` in two windows, within 10 seconds of one another.

This will reliably double-allocate the binding because both blueprints see a view of the world where the binding is free.

To verify the lock works, un-comment it (or apply this patch) and run the same test again. Now, the lock fails in one process and only one resource is allocated.

Reviewers: hach-que, chad

Reviewed By: hach-que, chad

Differential Revision: https://secure.phabricator.com/D14118
2015-09-21 04:45:25 -07:00
epriestley
6e03419593 Implement a rough AlmanacService blueprint in Drydock
Summary:
Ref T9253. Broadly, this realigns Allocator behavior to be more consistent and straightforward and amenable to intended future changes.

This attempts to make language more consistent: resources are "allocated" and leases are "acquired".

This prepares for (but does not implement) optimistic "slot locking", as discussed in D10304. Although I suspect some blueprints will need to perform other locking eventually, this does feel like a good fit for most of the locking blueprints need to do.

In particular, I've made the blueprint operations on `$resource` and `$lease` objects more purposeful: they need to invoke an activator on the appropriate object to be implemented correctly. Before they invoke this activator method, they configure the object. In a future diff, this configuration will include specifying slot locks that the lease or resource must acquire. So the API will be something like:

  $lease
    ->setActivateWhenAcquired(true)
    ->needSlotLock('x')
    ->needSlotLock('y')
    ->acquireOnResource($resource);

In the common case where slot locks are a good fit, I think this should make correct blueprint implementation very straightforward.

This prepares for (but does not implement) resources and leases which need significant setup steps. I've basically carved out two modes:

  - The "activate immediately" mode, as here, immediately opens the resource or activates the lease. This is appropriate if little or no setup is required. I expect many leases to operate in this mode, although I expect many resources will operate in the other mode.
  - The "allocate now, activate later" mode, which is not fully implemented yet. This will queue setup workers when the allocator exits. Overall, this will work very similarly to Harbormaster.
  - This new structure makes it acceptable for blueprints to sleep as long as they want during resource allocation and lease acquisition, so long as they are not waiting on anything which needs to be completed by the queue. Putting a `sleep(15 * 60)` in your EC2Blueprint to wait for EC2 to bring a machine up will perform worse than using delayed activation, but won't deadlock the queue or block any locks.

Overall, this flow is more similar to Harbormaster's flow. Having consistency between Harbormaster's model and Drydock's model is good, and I think Harbormaster's model is also simply much better than Drydock's (what exists today in Drydock was implemented a long time ago, and we had more support and infrastructure by the time Harbormaster was implemented, as well as a more clearly defined problem).

The particular strength of Harbormaster is that objects always (or almost always, at least) have a single, clearly defined writer. Ensuring objects have only one writer prevents races and makes reasoning about everything easier.

Drydock does not currently have a clearly defined single writer, but this moves us in that direction. We'll probably need more primitives eventually to flesh this out, like Harbormaster's command queue for messaging objects which you can't write to.

This blueprint was originally implemented in D13843. This makes a few changes to the blueprint itself:

  - A bunch of code from that (e.g., interfaces) doesn't exist yet.
  - I let the blueprint have multiple services. This simplifies the code a little and seems like it costs us nothing.

This also removes `bin/drydock create-resource`, which no longer makes sense to expose. It won't get locking, leasing, etc., correct, and can not be made correct.

NOTE: This technically works but doesn't do anything useful yet.

Test Plan: Used `bin/drydock lease --type host` to acquire leases against these blueprints.

Reviewers: hach-que, chad

Reviewed By: hach-que, chad

Subscribers: Mnkras

Maniphest Tasks: T9253

Differential Revision: https://secure.phabricator.com/D14117
2015-09-21 04:43:53 -07:00
epriestley
bb28f94f9b Reduce garbage-level of Drydock Allocator implementation
Summary:
Ref T9253. The Drydock allocator is very pseudocodey right now. Particularly, it was written before Blueprints were concrete.

Reorganize it to make its responsibilities and error handling behaviors more clear.

In particular, the Allocator does not manage locks. It's primarily trying to reject allocations which can not possibly work. Blueprints are responsible for locks. See some discussion in D10304.

NOTE: This code probably doesn't work as written, see future diffs.

Test Plan: See future diffs.

Reviewers: hach-que, chad

Reviewed By: hach-que, chad

Subscribers: cburroughs

Maniphest Tasks: T9253

Differential Revision: https://secure.phabricator.com/D14114
2015-09-21 04:43:25 -07:00
epriestley
5362d3366c Modernize Drydock Query + Attach code
Summary:
Ref T9253. Some of the Drydock code is pretty old. This applies standard modernizations to it:

  - Modernize Query classes to use stuff like `buildWhereClauseParts()` and `loadStandardPage()`.
  - Modernize all the getX() / attachX() stuff. In particular:
    - Require and attach implementations to Blueprints.
    - Require and attach Blueprints to Resources.
    - BlueprintImplementations are now always unique per-Blueprint so they can store/cache state if they want without running over one another.
    - BlueprintImplementations are now passed a `$blueprint`, like other similar APIs (this could go various ways but I generally like this as a balance of concerns).

NOTE: This probably doesn't run on its own, I'm just trying to split the next diff (core allocator stuff) up a bit and these pieces are all pretty standard.

Test Plan:
  - Not much; see next revision or two.
  - Clicked around Resource and Blueprint lists.

Reviewers: chad, hach-que

Reviewed By: chad, hach-que

Maniphest Tasks: T9253

Differential Revision: https://secure.phabricator.com/D14113
2015-09-21 04:42:04 -07:00
epriestley
635e9c6075 Provide a generic "Datasource" StandardCustomField
Summary:
Ref T9253. See discussion in D13843.

I want to let Drydock blueprints for Almanac services choose those services from a typeahead, but only list appropriate services in the typeahead. To do this:

  - Provide a StandardCustomField for an arbitrary datasource.
  - Adjust the AlmanacServiceDatasource to allow filtering by service class.

This implementation is substantially the same as the one in D13843, with some adjustments:

  - I lifted most of the code in the `Users` standard custom field into a new `Tokenizer` standard custom field.
  - The `Users` and `Datasource` custom fields now extend the `Tokenizer` custom field and can share most of the code it uses.
  - I exposed this field fully as a configurable field. I don't think anyone will ever use it, but this generality costs us nearly nothing and improves consistency.
  - The code in D13843 didn't actually pass the parameters over the wire, since the object that responds to the request is not the same object that renders the field. Use the "parameters" mechanism in datasources to get things passed over the wire.

Test Plan:
  - Created a custom "users" field in Maniphest and made sure it still wokred.
  - Created a custom "almanc services" field in Maniphest and selected some services for a task.
  - With additional changes from D13843, selected an appropriate Almanac service in a new Drydock blueprint.

Reviewers: hach-que, chad

Reviewed By: hach-que, chad

Maniphest Tasks: T9253

Differential Revision: https://secure.phabricator.com/D14111
2015-09-21 04:41:52 -07:00
epriestley
c44f9d80de Remove DrydockPreallocatedHostBlueprintImplementation
Summary:
Ref T9253. This comes from a time before Almanac. Now that we have Almanac, it makes much more sense to put this logic there than to try to put it in Drydock itself.

Remove the preallocated host blueprint, a relic of a bygone time.

Test Plan: Grepped for callsites.

Reviewers: hach-que, chad

Reviewed By: hach-que, chad

Maniphest Tasks: T9253

Differential Revision: https://secure.phabricator.com/D14110
2015-09-21 04:41:40 -07:00
epriestley
d6514321b1 Add an Almanac service type for Drydock to lease against
Summary: Ref T9253. See D13843 for some discussion. This is very bare-bones for now since I believe that almost all interesting configuration (e.g., credentials) should live in Drydock, although I imagine it getting some configuration eventually.

Test Plan: Used {nav Almanac > Services > Create Service} to create a new service of this type.

Reviewers: hach-que, chad

Reviewed By: hach-que, chad

Maniphest Tasks: T9253

Differential Revision: https://secure.phabricator.com/D14109
2015-09-21 04:41:23 -07:00
epriestley
a0ed843d47 Don't allow welcome mail to be sent to users who can't login
Summary:
Fixes T9446. We allow administrators to send "Welcome" mail to bots and mailing lists.

This is harmless (these links do not function), but confusing.

Instead, disable this option in the UI and explain why it is disabled when it is clicked. Also prevent generation of this mail lower in the stack.

Test Plan:
  - Viewed a bot page, saw action disabled, clicked it, got explanation.
  - Viewed a normal user page, saw action enabled, clicked it, sent welcome email.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9446

Differential Revision: https://secure.phabricator.com/D14134
2015-09-20 04:28:33 -07:00
Chad Little
666f19e504 Make icon setting in Section Headers easier/consistent
Summary: You can already pass other icons, but this makes it a bit simpler.

Test Plan: Test Maniphest, Badges

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14131
2015-09-19 11:29:01 -07:00
Chad Little
9c43853815 Restore the delicate balance of the universe 2015-09-18 13:59:11 -07:00
Chad Little
36c8df3ef9 Add pageObjects to Macro
Summary: Fixes T9442

Test Plan: Like a macro, log out, switch to notchad, clear notification by visiting page

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9442

Differential Revision: https://secure.phabricator.com/D14129
2015-09-18 13:58:07 -07:00
Chad Little
f899762364 Better Paste layout on mobile
Summary: Builds a container of paste, makes it smaller on mobile.

Test Plan: View on desktop, tablet, mobile.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14122
2015-09-17 08:22:40 -07:00
Chad Little
2e0cbaa366 Usability updates to ActionPanel
Summary: Wraps entire element in the anchor tag, gives a hover state, makes icons bounce.

Test Plan: Hover and click.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14124
2015-09-17 08:22:23 -07:00
Chad Little
23b2653f52 More ActionPanel colors, hardening
Summary: Adds full ROYGBIVP color spectrum, adds basic overflow, collapse protection.

Test Plan: Review small and large panels are various breakpoints.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14120
2015-09-16 09:22:31 -07:00
Chad Little
a62337dcd8 Update PHUIActionPanelView
Summary: Making these a little more fun, a little more flexible and better looking. Will have an update for rSAAS in a bit.

Test Plan:
Make lots of them. Click.

{F815658}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14115
2015-09-15 18:32:01 -07:00
epriestley
0449a07f53 Add bin/auth unlimit and clean up a TODO
Summary:
I stumbled across this TODO and was worried that there was a glaring hole in MFA that I'd somehow forgotten about, but the TODO is just out of date.

These actions are rate limited properly by `PhabricatorAuthTryFactorAction`, which permits a maximum of 10 actions per hour.

  - Remove the TODO.
  - Add `bin/auth unlimit` to make it easier to reset rate limits if someone needs to do that for whatever reason.

Test Plan:
  - Tried to brute force through MFA.
  - Got rate limited properly after 10 failures.
  - Reset rate limit with `bin/auth unlimit`.
  - Saw the expected number of actions clear.

{F805288}

Reviewers: chad

Reviewed By: chad

Subscribers: joshuaspence

Differential Revision: https://secure.phabricator.com/D14105
2015-09-14 07:03:39 -07:00
epriestley
6bd8ee861c Use PEAR Text_Figlet to render figlet fonts
Summary:
Ref T7785. Makes Figlet available without installing the `figlet` package.

The PEAR Text_Figlet code is really sketchy and includes this API, which is quite marvelous:

```
    function loadFont($filename, $loadgerman = true)
```

At some point, this should probably be rewritten into a modern style, but it's not trivial since the figlet file format and rendering engine are somewhat complicated. I made some adjustments:

  - Broke the dependency on the PEAR core.
  - Prevented it from doing any wrong HTML escaping.
  - Looked through it for any glaring security or correctness problems.

This code isn't very pretty or modern, but as far as I can tell it's safe and does render Figlet fonts in a reasonable way.

Test Plan: {F803268}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9408, T7785

Differential Revision: https://secure.phabricator.com/D14102
2015-09-13 12:31:07 -07:00
epriestley
c705c8011e Use PHP implementation of Cowsay for cowsay rule
Summary:
Ref T7785. Convert the Cowsay Remarkup rule to use a PHP implementation so we don't have to execute an external `cowsay` binary.

I removed some of the default ".cow" files that come with Cowsay because they:

  - include Perl code which we can not interpret; or
  - are primarily in-jokes or standalone visual puns or artwork rather than usable actors on the grand stage of cowsay; or
  - offended my delicate sensibilities.

Users can add new cows to `resources/cows/custom/` if they want to make new cows available.

I have included a majestic original artwork depicting the "Companion Cube" character from //Portal//.

Test Plan: {F802535}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9408, T7785

Differential Revision: https://secure.phabricator.com/D14100
2015-09-13 12:27:30 -07:00
epriestley
c02f750267 Remove dot/Graphviz Remarkup rule
Summary: Ref T9408. This rule is unsafe in principle, and a practical vulnerability has been found by a security researcher.

Test Plan: `grep`

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9408

Differential Revision: https://secure.phabricator.com/D14103
2015-09-13 12:27:23 -07:00
Chad Little
d199560a6b Add a box around the pager in Diffusion
Summary: Fixes T9392, adds some sweet sweet margin to the pager.

Test Plan: See pager with new padding, test different pages, breakpoints.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9392

Differential Revision: https://secure.phabricator.com/D14098
2015-09-11 08:59:56 -07:00
epriestley
1c45a7d8e2 Revert "Allow search results to be snippeted, roughly"
Summary:
This reverts commit 1583738842.

See T8646 for discussion. This version of the feature feels terrible on real data.

Test Plan: Strict revert.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D14097
2015-09-10 20:57:26 -07:00
epriestley
4e181a5611 Clean up browse/history links in Diffusion
Summary:
Fixes T9126. In particular:

  - Add "Browse" links to all history views.
  - Use icons to show "Browse" and "History" links, instead of text.
  - Use FontAwesome.
  - Generally standardize handling of these elements.

This might need a little design attention, but I think it's an improvement overall.

Test Plan:
  - Viewed repository history.
  - Viewed branch history.
  - Viewed file history.
  - Viewed table of contents on a commit.
  - Viewed merged changes on a merge commit.
  - Viewed a directory containing an external.
  - Viewed a deleted file.

{F788419}

{F788420}

{F788421}

{F788422}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9126

Differential Revision: https://secure.phabricator.com/D14096
2015-09-10 19:28:49 -07:00
epriestley
1583738842 Allow search results to be snippeted, roughly
Summary:
Ref T8646. This is fairly rough:

This interface is very niche, and not really flexible enough to accommodate other result customization (but I don't think we have any plans here)?

I'm just //summarizing// the content of documents, basically showing the first paragraph of their content, summary, etc. This isn't what Google does: it shows snippets surrounding the actual search terms. However, this is more involved and might be less useful in structured data: for example, I'd imagine that the first line of most phriciton documents, maniphest tasks and Differential revisions really might be the best machine-generatable summary of them. The actual contextual snippeting in Google doesn't often seem hugely useful to me. But this might also not be very useful.

There's not much design, not sure if you had any ideas.

I only implemented this for tasks, revisions and the wiki since those seem most useful.

I'm generally on the fence about this, but it's not a ton of work to swap out for something else later. Maybe we can see how it feels? But happy to toss it or rethink the approach.

Test Plan: {F788026}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8646

Differential Revision: https://secure.phabricator.com/D14095
2015-09-10 19:06:36 -07:00
Mihir Kedia
ae0348aac9 Add dialog to purge opcode/data caches
Summary: Reachable via the cache config page, restricted to admins only. This makes it convenient to hotfix phabricator without requiring a restart.

Test Plan:
  - Local dev machine doesn't have apc, so I get the not installed message.
  - Faked the name and isEnabled parameters, verified dialog shows up as expected.
  - Didn't test clear code

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: tycho.tatitscheff, joshuaspence, Korvin

Differential Revision: https://secure.phabricator.com/D14064
2015-09-10 14:19:02 -07:00
epriestley
f8080ce931 Add CustomField support to Owners
Summary: Fixes T9351. This is straightforward since this application is now relatively modern and doesn't have any bizarre craziness.

Test Plan:
{F787981}

{F787982}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9351

Differential Revision: https://secure.phabricator.com/D14093
2015-09-10 13:32:31 -07:00
epriestley
093a625698 Show users what's wrong when they try to edit an inline with an editor already open
Summary: Fixes T8572. Ideally we would probably just permit this, but clean up the behavior until the day arrives when inline code is actually rewritten.

Test Plan:
  - Tried to launch editors in Differential and Diffusion while comments were already open.
  - Verified that "Jump to inline" works in both cases.

{F788008}

{F788009}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8572

Differential Revision: https://secure.phabricator.com/D14094
2015-09-10 11:36:38 -07:00
epriestley
738cb1fa78 Fix Mercurial unable to authenticate with HTTP when pulling
Summary: As described in T7959, it looks like Diffusion does not provide Mercurial the required HTTP credentials when pulling from an external repository.

Test Plan: Add an external Mercurial repository to Diffusion, that requires HTTP authentication. A private BitBucket repository for example.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley

Projects: #mercurial, #diffusion

Differential Revision: https://secure.phabricator.com/D14092
2015-09-10 05:40:14 -07:00
epriestley
25786df3a1 Give "Arcanist Client Results" a more clear name
Summary: Fixes T9380. See that task for discussion. This doesn't feel awesome but is maybe the least-bad fix? I think this name is clearer.

Test Plan: Looked at autoplan in Harbormaster, saw new name.

Reviewers: meitros, chad

Reviewed By: chad

Maniphest Tasks: T9380

Differential Revision: https://secure.phabricator.com/D14088
2015-09-09 19:18:08 -07:00
epriestley
de01f3e2e0 Add Maniphest Task email creator to CCs
Summary: Fixes T9369.

Test Plan:
  - Sent a mail with Mail.app to `bugs@local.phacility.com`.
  - Used "View Raw Mail", copy-pasted it into `mail.txt` on disk.
  - Ran `cat mail.txt | ./scripts/mail/manage_mail.php --process-duplicates`.
  - Saw task get created and me get added as CC.
  - Changed "To" to include another user, ran command again, saw task get created and other user get added as CC.

Reviewers: chad

Reviewed By: chad

Subscribers: Korvin

Maniphest Tasks: T9369

Differential Revision: https://secure.phabricator.com/D14086
2015-09-09 14:07:07 -07:00
epriestley
345cc66f0f Fix some missing "@" in doclinks
Summary: Fixes T9368.

Test Plan: Grepped for "Adding New Classes".

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9368

Differential Revision: https://secure.phabricator.com/D14087
2015-09-09 14:06:49 -07:00
epriestley
7425407c12 Improve bin/config set errors for complex values
Summary:
  - Fix missing space before "For example:".
  - Fix instruction to run `bin/config set value` instead of `bin/config set key value`.
  - Minor cleanup.

Test Plan: Tried to set `files.image-mime-types`, `load-libraries`.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D14080
2015-09-08 08:49:33 -07:00
epriestley
6915011067 Provide an AphrontController implementation of willSendResponse()
Summary: This is required by Aphront now but not given a default implementation in the base class.

Test Plan: CORGI sites now work.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D14079
2015-09-07 17:18:35 -07:00
epriestley
5dccc14bbf Modularize generation of supplemental login messages
Summary:
Ref T9346. This mostly allows us to give users additional advice based on which instance they are trying to log in to in the Phacility cluster.

It's also slightly more flexible than `auth.login-message` was, and maybe we'll add some more hooks here eventually.

This feels like it's a sidegrade in complexity rather than really an improvement, but not too terrible.

Test Plan:
  - Wrote the custom handler in T9346 to replicate old config functionality.
  - Wrote a smart handler for Phacility that can provide context-sensitive messages based on which OAuth client you're trying to use.

See new message box at top (implementation in next diff):

{F780375}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9346

Differential Revision: https://secure.phabricator.com/D14057
2015-09-04 10:34:39 -07:00
epriestley
6f372943db Add support for temporary files to file.allocate
Summary:
Ref T7148. I can do most of the export stuff by only modifying the Instances codebase, but want to upload all the backups and exports as temporary files and can't currently do this via the API.

Make the necessary API changes so that the export workflow can use them when it gets built out.

Test Plan: See next diff. Uploaded files with `arc upload --temporary` and saw them upload as temporary files.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T7148

Differential Revision: https://secure.phabricator.com/D14055
2015-09-04 10:34:32 -07:00
Chad Little
7641c9c7bc Build LauncherButton for PHUIObjectItemView
Summary: There are a handful of places I've been wanting to use a button here. Adds that ability and uses in app launcher.

Test Plan:
Test Applicatons->Launcher at desktop, mobile, tablet breakpoints

{F780453}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14059
2015-09-04 10:34:25 -07:00
epriestley
cd2f9786bf Shuffle various parts of the config edit UI around
Summary:
Fixes T9339.

  - Don't show edit control for locked config at all.
  - Don't show a "Cancel" button either.
  - Change "Value" label to "Database Value" for non-custom config.
  - Highlight effective value.
  - Move examples under current state.
  - Tweak some formatting.

Test Plan: {F777878}

Reviewers: chad, avivey

Reviewed By: chad, avivey

Subscribers: avivey

Maniphest Tasks: T9339

Differential Revision: https://secure.phabricator.com/D14054
2015-09-03 12:15:30 -07:00
Chad Little
1e1551d970 Add CCs to Phriction Edit page
Summary: Fixes T4099. Allows prepopulating CCs when building Phriction pages.

Test Plan: Add notchad, remove notchad.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T4099

Differential Revision: https://secure.phabricator.com/D14042
2015-09-03 10:55:17 -07:00
Chad Little
4428a25a7c Minor Ponder Comment tweaks
Summary: Makes the New Comment, See Comments more obviously placed to find.

Test Plan: Review new CSS, answer question, comment, etc.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14043
2015-09-03 10:53:16 -07:00
epriestley
9d0332c2c0 Modernize OAuthserver and provide more context on "no permission" exception
Summary:
Ref T7173. Depends on D14049. Now that Phacility can install custom exception handlers, this puts enough information on the exception so that we can figure out what to do with it.

  - Generally modernize some of this code.
  - Add some more information to PolicyExceptions so the new RequestExceptionHandler can handle them properly.

Test Plan: Failed authorizations, then succeeded authorizations. See next diff.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T7173

Differential Revision: https://secure.phabricator.com/D14050
2015-09-03 10:05:23 -07:00
epriestley
1fc60a9a6e Modularize Aphront exception handling
Summary:
Ref T1806. Ref T7173. Depends on D14047.

Currently, all exception handling is in this big messy clump in `AphrontDefaultApplicationConfiguration`.

Split it out into modular classes. This will let a future change add new classes in the Phacility cluster which intercept particular exceptions we care about and replaces the default, generic responses with more useful, tailored responses.

Test Plan:
{F777391}

- Hit a Conduit error (made a method throw).
- Hit an Ajax error (made comment preview throw).
- Hit a high security error (tried to edit TOTP).
- Hit a rate limiting error (added a bunch of email addresses).
- Hit a policy error (tried to look at something with no permission).
- Hit an arbitrary exception (made a randomc ontroller throw).

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T1806, T7173

Differential Revision: https://secure.phabricator.com/D14049
2015-09-03 10:04:42 -07:00
epriestley
20ce1a905f Replace AphrontUsageException with AphrontMalformedRequestException
Summary:
Ref T1806. Ref T7173. Context here is that I want to fix "you can not log in to this instance" being a confusing mess with an opaque error. To do this without hacks, I want to:

  - clean up some exception handling behavior (this diff);
  - modularize exception handling (next diff);
  - replace confusing, over-general exceptions with tailored ones in the Phacility cluster, using the new modular stuff.

This cleans up an awkward "AphrontUsageException" which does some weird stuff right now. In particular, it is extensible and extended in one place in Diffusion, but that extension is meaningless.

Realign this as "AphrontMalformedRequestException", which is a better description of what it is and does: raises errors before we can get as far as normal routing and site handling.

Test Plan: Hit some of these exceptions, saw the expected "abandon all hope" error page.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T1806, T7173

Differential Revision: https://secure.phabricator.com/D14047
2015-09-03 10:04:17 -07:00
epriestley
7ebbe0fe71 Add a "Printable Version" link to Phortune invoices
Summary:
Ref T9309. This is a minor quality of life improvement, hopefully. We already have print CSS, just expose it more clearly.

Also, hide actions (these never seem useful?) and footers from printable versions. I opened the printable version in a new window since it now doesn't have any actions.

Test Plan:
{F777241}

{F777242}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9309

Differential Revision: https://secure.phabricator.com/D14045
2015-09-03 10:03:50 -07:00
epriestley
28621244ad Fix abrupt failure mode for uncloned repositories in Diffusion
Summary:
Fixes T9080. We try to list alternatives for the current ref (for example, if you're viewing a branch named "master" but there's also a tag named "master", or, in Mercurial, there are several branches named "master") but fail to abruptly if we can't get the list.

It's fine if we can't get the list; just continue. This is common when the repository hasn't cloned yet.

Test Plan: In a local repository with bad credentials, tried to do anything before and after. Before: completely blocked by error; after: things work normally.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9080

Differential Revision: https://secure.phabricator.com/D14044
2015-09-03 10:03:31 -07:00
epriestley
a13db0a3ec Allow Controllers to return a wider range of "response-like" objects
Summary:
Ref T1806. Ref T5752. Currently, `handleRequest()` needs to return an `AphrontResponse`, but sometimes it's really convenient to return some other object, like a Dialog, and let that convert into a response elsewhere.

Formalize this and clean up some of the existing hacks for it so there's less custom/magical code in Phabricator-specific classes and more general code in Aphront classes.

More broadly, I want to clean up T5752 before pursuing T9132, since I'm generally happy with how `SearchEngine` works except for how it interacts with side navs / application menus. I want to fix that first so a new Editor (which will have a lot in common with SearchEngine in terms of how controllers interact with it) doesn't make the problem twice as bad.

Test Plan:
  - Loaded a bunch of normal pages.
  - Loaded dialogs.
  - Loaded proxy responses (submitted empty comments in Maniphest).

Reviewers: chad

Reviewed By: chad

Subscribers: joshuaspence

Maniphest Tasks: T1806, T5752

Differential Revision: https://secure.phabricator.com/D14032
2015-09-01 15:52:52 -07:00
epriestley
29948eaa5b Use phutil_hashes_are_identical() when comparing hashes in Phabricator
Summary: See D14025. In all cases where we compare hashes, use strict, constant-time comparisons.

Test Plan: Logged in, logged out, added TOTP, ran Conduit, terminated sessions, submitted forms, changed password. Tweaked CSRF token, got rejected.

Reviewers: chad

Reviewed By: chad

Subscribers: chenxiruanhai

Differential Revision: https://secure.phabricator.com/D14026
2015-09-01 15:52:44 -07:00
epriestley
13516cf35f Fix an issue with "packages(...)" in typeaheads
Summary:
Fixes T9302. This datasource wasn't resolving package PHIDs correctly for the actual query.

Also fixes an issue with the "Affected packages that need audit" Herald rule.

Test Plan: Ran a "Needs Audit" query with only packages, and only `packages(user)`.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9302

Differential Revision: https://secure.phabricator.com/D14029
2015-09-01 15:35:25 -07:00
epriestley
809c7fb4f3 Fix an issue where paths could bleed across repos in Owners
Summary:
Ref T8320. I missed this a while ago and then it came to me in a dream.

Only consider paths in the same repo when looking at ownership.

(I think this is rarely reachable in practice.)

Test Plan: Verified that files and commits still listed ownership properly.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8320

Differential Revision: https://secure.phabricator.com/D14022
2015-09-01 08:07:06 -07:00
epriestley
ce7c2097b2 Update Owners docs a bit
Summary:
Fixes T9218. Fixes T8320. Fixes T8661. This isn't exhaustive but documents the stuff that cropped up in this iteration as needing documentation. In particular:

  - Be explicit about multiple ownership.
  - Explain value of having one place to update your giant regexp of a trillion paths.

Test Plan: Read documentation.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8320, T8661, T9218

Differential Revision: https://secure.phabricator.com/D14023
2015-08-31 16:01:01 -07:00
epriestley
bce0698a0f Modernize Audit search engine
Summary:
Fixes T9279. Modernizes the SearchEngine and Query classes. User-facing changes:

  - Added order by commit date, default to order by commit date with newest commits first.
  - Added explicit "Needs Audit by".
  - Added new `packages(...)` typeahead function.
  - Picked up automatic subscribers, projects, and order fields.

This changes behavior a little bit: we previously attempted to exclude, e.g., commits which a package you own needs to audit, but which you have resigned from. This is difficult in general and I think it needs a more comprehensive solution. This shouldn't impact users much, anyway.

Test Plan: {F767628}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9279

Differential Revision: https://secure.phabricator.com/D14013
2015-08-31 10:17:54 -07:00
epriestley
e67c438943 Rename "Edit Column" to "Column Details"
Summary: Ref T9089. This link leads to a detail page, not an edit page, and is always visible by users with permission to see the column.

Test Plan: Clicked "Column Details" with and without edit permission.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9089

Differential Revision: https://secure.phabricator.com/D14016
2015-08-31 10:17:44 -07:00
epriestley
e9614df76e Fix permission check for "Create Task" on workboards
Summary: Fixes T9090. You don't need to be able to edit a project to create tasks on its workboard. Being able to view the project is sufficient, and the user certianly can if they got this far.

Test Plan: Viewed workboard, hit "Create Task".

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9090

Differential Revision: https://secure.phabricator.com/D14015
2015-08-31 10:17:37 -07:00
epriestley
51c52f50fd Prevent users from hiding unpublished inlines
Summary: Fixes T9135. This is (probably) never intended and can be confusing.

Test Plan: Saw no hide button on unpublished inlines. Saw hide button on published inlines. Clicked hide button.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9135

Differential Revision: https://secure.phabricator.com/D14014
2015-08-31 10:17:30 -07:00
Chad Little
506168c307 Show "Login to Answer" in Ponder if viewer is logged out
Summary: Fixes T9278. Logged out viewers shouldn't see a form field to answer, just a login button.

Test Plan: Log out, go to question, click Login to Answer, login, get redirected back.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9278

Differential Revision: https://secure.phabricator.com/D14012
2015-08-31 09:14:11 -07:00
epriestley
bcc5e55af2 Push construction of routing maps into Sites
Summary:
This enables CORGI.

Currently, `AphrontSite` subclasses can't really have their own routes. They can do this sort of hacky rewriting of paths, but that's a mess and not desirable in the long run.

Instead, let subclasses build their own routing maps. This will let CORP and ORG have their own routing maps.

I was able to get rid of the `PhameBlogResourcesSite` since it can really just share the standard resources site.

Test Plan:
  - With no base URI set, and a base URI set, loaded main page and resources (from main site).
  - With file domain set, loaded resources from main site and file site.
  - Loaded a skinned blog from a domain.
  - Loaded a skinned blog from the main site.
  - Viewed "Request" tab of DarkConsole to see site/controller info.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D14008
2015-08-31 04:01:01 -07:00
Chad Little
2665970762 Basic Answer Wiki for Ponder
Summary: Adds an additional field for questions, an answer wiki, should should usually be community editable.

Test Plan: New question, edit question, no wiki, lots of wiki.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14003
2015-08-29 13:59:33 -07:00
Chad Little
96e7f766ff Nudge users to close their question if it's been answered
Summary: Adds a notice reminding viewers of their own question to resolve it and mark the correct answer.

Test Plan:
View my own open question, see notice. Resolve question, notice goes away.

{F743481}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D13958
2015-08-29 11:18:22 -07:00
Chad Little
4c77ff68aa Update Releeph for handleRequest
Summary: Updates Releeph callsites to handleRequest

Test Plan: Bounce around Releeph, cut a branch, edit a product, view history

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14001
2015-08-29 08:33:25 -07:00
Chad Little
a339e6de9e Update Conpherence layout for logged out view
Summary: Fixes T9217, adds detection for logged in users and adjusts the layout accordingly.

Test Plan: View logged in and logged out Conpherence

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9217

Differential Revision: https://secure.phabricator.com/D14002
2015-08-29 08:29:53 -07:00
Chad Little
d718415868 Swap duplicate close status on Ponder for invalid
Summary: Until we have a proper close as duplicate workflow for Ponder, remove the option with something more sensible.

Test Plan: Closed a question as invalid, saw it closed and in feed.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14007
2015-08-29 08:29:23 -07:00
Joshua Spence
7904d4c29c Add some missing translations
Summary: Fixes T8862.

Test Plan: Eyeballed it.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Maniphest Tasks: T8862

Differential Revision: https://secure.phabricator.com/D14005
2015-08-29 23:29:16 +10:00
Joshua Spence
ff6ccd5f68 Remove leftover code for "postponed" lint and unit status
Summary: Ref T9134. It looks like this functionality was removed in D13848.

Test Plan: Submitted a diff successfully.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Maniphest Tasks: T9134

Differential Revision: https://secure.phabricator.com/D13869
2015-08-29 22:19:28 +10:00
Chad Little
fd189f14fb Fix diviner symbols documentation
Summary: Fixes T9267. Removes preceeding r.

Test Plan: Ran Sample, did not get error.

Reviewers: epriestley, joshuaspence

Reviewed By: epriestley, joshuaspence

Subscribers: Korvin

Maniphest Tasks: T9267

Differential Revision: https://secure.phabricator.com/D14000
2015-08-28 15:05:05 -07:00
cburroughs
786b135a66 variable days back for bin/mail volume
Summary:
Email is so exciting I can't wait 30 days for initial results.

ref T9161

Test Plan:
 * `./bin/mail volume --days 60` took longer and gave plausibly larger
   results.
 * `./bin/mail volume --days 0` quickly told me no mail had been sent.
 * `./bin/mail volume` Said it was still looking 30 days back.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley

Maniphest Tasks: T9161

Differential Revision: https://secure.phabricator.com/D13901
2015-08-27 04:40:45 -07:00
epriestley
55b44f53f8 Fix possible recursive embeds in Dashboard text panels
Summary:
We currently detect tab panels embedding themselves, but do not detect text panels embedding themselves with `{Wxx}`.

Detect these self-embedding panels.

I had to add a bit of a hack to pass the parent panel PHIDs to the rule. Generally, I got the Markup API kind of wrong and want to update it, I'll file a followup with details about how I'd like to move forward.

Test Plan:
Created a text panel embedding itself, a tab panel embedding a text panel embedding itself, a tab panel embedding a text panel embedding the tab panel, etc.

Rendered all panels standalone and as `{Wxx}` from a different context.

{F761158}

{F761159}

{F761160}

{F761161}

{F761162}

Reviewers: chad, jbeta

Reviewed By: chad, jbeta

Differential Revision: https://secure.phabricator.com/D13999
2015-08-26 17:59:47 -07:00
epriestley
10966519e2 Prevent "commit message magic words" parser from exploding on "reverts aaaa.....aaz"
Summary:
Fixes T9268. Currently, we try to match any string like "a2f313f1" as a commit/revision, so short hashes will get picked up.

However, we don't require a word boundary or terminal after the match, so for input like "aaa...aaaaz" the engine can get stuck trying to split the string into sub-matches.

That is, in the original case, the input "aaaz" had valid matches against `[rA-Z0-9a-f]+` up to "z" of:

  aaa
  aa a
  a aa
  a a a

All of these will fail once it hits "z", but it has to try them all. This complexity is explosive with longer strings.

Instead, require a word boundary or EOL after the match, so this is the only valid match:

  aaa

Then the engine sees the "z", says "nope, no match" and doesn't have to backtrack across all possible combinations.

Test Plan: Added a failing unit test, applied patch, clean test.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9268

Differential Revision: https://secure.phabricator.com/D13997
2015-08-26 09:35:23 -07:00
epriestley
779a612e41 Fix mail parameter error with old migrations
Summary:
Fixes T9251. Old mail could get saved with bad parameters for two reasons that I can come up with:

  - Nothing ever set a parameter on it -- not sure this could ever actually happen; or
  - some field contained non-UTF8 data prior to D13939 and we silently failed to encode it.

My guess is that the second case is probably the culprit here.

In any case, recover from this so `20150622.metamta.5.actor-phid-mig.php` can proceed.

Test Plan: Same effective patch as user patch in T9251; looked at some mail to make sure it was still pulling parameters properly.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9251

Differential Revision: https://secure.phabricator.com/D13990
2015-08-24 09:37:48 -07:00
epriestley
c612579854 Add very basic routing to Nuance
Summary:
Ref T8783. Sort out some relationships and fields:

  - Make Items 1:1 with Queues: each item is always in exactly one queue. Minor discussion on T8783. I think this is easier to understand and reason about (and implement!) and can't come up with any real cases where it isn't powerful enough.
  - Remove "QueueItem", which allowed items to be in multiple queues at once.
  - Remove "dateNuanced", which is equivalent to "dateCreated" in all cases.

Then add really basic routing:

  - Add "Default Queue" for Sources. New items from the source route into that queue.
  - (Some day there will be routing rules, but for now the rule is "always route into the default queue".)
  - Show queue on items.
  - Show more / more useful edit history and transactions in several UIs.

Test Plan:
{F749445}

{F749446}

{F749447}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8783

Differential Revision: https://secure.phabricator.com/D13988
2015-08-24 09:21:56 -07:00
June Rhodes
e55a197dd6 Fix issues where Drydock queries didn't work correctly with empty arrays
Summary: Ref T2015.  This fixes issues where the Drydock queries wouldn't filter (or throw an exception) when passed empty arrays for their `with` methods.  In addition, this also adds `array_unique` to the resource and lease subqueries so that we don't pull in a bunch of stuff if logs or leases have the same related objects.

Test Plan: Tested it by using DarkConsole on the log controller.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: joshuaspence, Korvin, epriestley

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D10879
2015-08-24 21:23:04 +10:00
June Rhodes
0d4f9363a0 Improve Drydock log search engine
Summary: Ref T2015.  This allows searching based on blueprints, resources or leases when viewing the logs, which helps when searching for events that occured to a particular blueprint / resource / lease.  Unlike the logs shown on the resource / lease pages, the search engine supports paging properly, which means it can be used to find entries in the past.

Test Plan: Used the Drydock log search page.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: joshuaspence, Korvin, epriestley

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D10874
2015-08-24 21:13:20 +10:00
June Rhodes
ea3d528c4c Show time on Drydock logs
Summary: Show the time in addition to the date in the Drydock logs.

Test Plan: Brought forward from D10479.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: joshuaspence, Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D10909
2015-08-24 17:22:32 +10:00
June Rhodes
254b394f2c Associate Harbormaster build target with leases
Summary: Ref T1049.  This ensures the Harbormaster build target is associated with leases, so in the future we can query things and find out whether builds are still running with associated leases.

Test Plan: Leased a host, checked the DB and saw the field populated.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: joshuaspence, Korvin, epriestley

Maniphest Tasks: T1049

Differential Revision: https://secure.phabricator.com/D10870
2015-08-24 17:20:59 +10:00
epriestley
c69d465891 Add basic "View" and "Edit" features to Nuance
Summary:
Ref T8783.

The "View" UI is where a user would check their request for feedback or a resolution, if it's something that makes sense for them to interact with from the web UI.

The "Edit" UI is the manage/admin UI where you'd respond to a request. It's similar to the view UI but will have actions and eventually some queue UI, etc.

(I don't think items need a normal "Edit" UI -- it doesn't make sense to "Edit" a tweet or inbound email -- but maybe this will shuffle around a little eventually.)

Test Plan:
View

{F747218}

Edit

{F747219}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8783

Differential Revision: https://secure.phabricator.com/D13980
2015-08-23 08:34:52 -07:00
epriestley
9e3f3e692d Use didRejectResult() when querying workboard columns
Summary: Fixes T9250. Ref T4345.

Test Plan:
Faked a policy error:

{F748975}

Reviewers: joshuaspence, chad

Reviewed By: chad

Maniphest Tasks: T4345, T9250

Differential Revision: https://secure.phabricator.com/D13981
2015-08-23 08:31:53 -07:00
epriestley
459e0d2fa3 Tune document details in Legalpad
Summary:
Fixes T9245. These picked up some possibly-confusing metadata, like in the screenshot on T9245 where "Subscribers" appears in the middle of the page for no obvious reason.

  - Make these pages a little cleaner by removing elements which aren't important for signing agreements.
  - Use the last time the actual document text was updated as the modification time, not the last time the "Document" object was modified. The latter will change for trivial things like altering the view/edit policy, but that could be confusing if you see that a TOS was "last updated yesterday" but can't figure out what actually changed (since nothing changed).

Test Plan: Viewed signature page for a document.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9245

Differential Revision: https://secure.phabricator.com/D13982
2015-08-23 08:31:47 -07:00
epriestley
5caeb5c4db Allow Nuance source definitions to add actions to source views
Summary:
Ref T8783. If you have a source (like a "report bug" form), let it put a link (like "View Form") on the source detail page.

This also straightens out getting definitions from sources, which had a bug with the modern way we do `PhutilClassMapQuery`.

Specifically, if you called the old mechanism on two different sources, they'd return the same definition object, but they need to return different definitions.

Test Plan:
{F747093}

{F747092}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8783

Differential Revision: https://secure.phabricator.com/D13966
2015-08-23 07:39:04 -07:00
epriestley
b5672e7e55 Add a main page to Nuance
Summary: Ref T8783. There's nothing at `/nuance/` right now, put something basic there.

Test Plan: {F747078}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8783

Differential Revision: https://secure.phabricator.com/D13965
2015-08-23 07:19:35 -07:00
epriestley
3ef270b292 Allow transaction publishers to pass binary data to workers
Summary:
Ref T8672. Ref T9187. Root issue in at least one case is:

  - User makes a commit including a file with some non-UTF8 text (say, a Japanese file full of Shift-JIS).
  - We pass the file to the TransactionEditor so it can inline or attach the patch if the server is configured for these things.
    - When inlining patches, we convert them to UTF8 before inlining. We must do this since the rest of the mail is UTF8.
    - When attaching patches, we send them in the original encoding (as file attachments). This is correct, and means we need to give the worker the raw patch in whatever encoding it was originally in: we can't just convert it to utf8 earlier, or we'd attach the wrong patch in some cases.
  - TransactionEditor does its thing (e.g., creates the commit), then gets ready to send mail about whatever it did.
  - The publishing work now happens in the daemon queue, so we prepare to queue a PublishWorker and pass it the patch (with some other data).
  - When we queue workers, we serialize the state data with JSON.

So far, so good. But this is where things go wrong:

  - JSON can't encode binary data, and can't encode Shift-JIS. The encoding silently fails and we ignore it.

Then we get to the worker, and things go wrong-er:

  - Since the data is bad, we fatal. This isn't a permanent failure, so we continue retrying the task indefinitely.

This applies several fixes:

  # When queueing tasks, fail loudly when JSON encoding fails.
  # In the worker, fail permanently when data can't be decoded.
  # Allow Editors to specify that some of their data is binary and needs special handling.

This is fairly messy, but some simpler alternatives don't seem like good ways forward:

  - We can't convert to UTF8 earlier, because we need the original raw patch when adding it as an attachment.
  - We could encode //only// this field, but I suspect some other fields will also need attention, so that adding a mechanism will be worthwhile. In particular, I suspect filenames //may// be causing a similar problem in some cases.
  - We could convert task data to always use a serialize()-based binary safe encoding, but this is a larger change and I think it's correct that things are UTF8 by default, even if it makes a bit of a mess. I'd rather have an explicit mess like this than a lot of binary data floating around.

The change to make `LiskDAO` will almost certainly catch some other problems too, so I'm going to hold this until after `stable` is cut. These problems were existing problems (i.e., the code was previously breaking or destroying data) so it's definitely correct to catch them, but this will make the problems much more obvious/urgent than they previously were.

Test Plan:
  - Created a commit with a bunch of Shift-JIS stuff in a file.
  - Tried to import it.

Prior to patch:

  - Broken PublishWorker with distant, irrelevant error message.

With patch partially applied (only new error checking):

  - Explicit, local error message about bad key in serialized data.

With patch fully applied:

  - Import went fine and mail generated.

Reviewers: chad

Reviewed By: chad

Subscribers: devurandom, nevogd

Maniphest Tasks: T8672, T9187

Differential Revision: https://secure.phabricator.com/D13939
2015-08-22 15:14:05 -07:00
Chad Little
1edc64c869 Hide answer box if you asked the question in Ponder
Summary: Fixes T9241. Users have a tendancy to assume Ponder is a "forum", make replying to your own question take an additional click.

Test Plan:
View my own question, see notice, click open answer box, reply. Visit not my question, see box as normal.

{F743412}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: cspeckmim, Korvin

Maniphest Tasks: T9241

Differential Revision: https://secure.phabricator.com/D13957
2015-08-21 15:00:57 -07:00
epriestley
4b1815d6cc Add a "Startup" to DarkConsole
Summary: Ref T8588. It looks like something slow is happening //before// we start DarkConsole. Add some crude reporting to try to narrow it down.

Test Plan: {F743050}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8588

Differential Revision: https://secure.phabricator.com/D13956
2015-08-21 14:53:29 -07:00
epriestley
d825aae87d Use pink for "Unbreak Now" priority instead of indigo
Summary:
Fixes T9237. A while ago, the old (more-pink) indigo got split into "pink" (more pink) and "indigo" (more purple), but we didn't change this color config in Maniphest.

This generally made the color more purple, and it's now pretty simliar to the "needs triage" color (violet).

Make it "pink" instead.

Test Plan: {F742617}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9237

Differential Revision: https://secure.phabricator.com/D13954
2015-08-21 08:04:37 -07:00
Chad Little
ed77b639f0 Fix Ponder Answer email reply handler
Summary: Should fix all email reply issues, but no solid means of testing at home (how do you local reply test?)

Test Plan: Check for answer mail in /mail/ and see proper headers. Make sure question mail works too.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T3846

Differential Revision: https://secure.phabricator.com/D13951
2015-08-21 07:04:17 -07:00
Chad Little
ad93af8389 Fix Ponder Answer query joins, builtins
Summary: Fixes T9234. The joins method was still the old method and the builtin was calling the wrong key.

Test Plan: Test authored builtin, custom search

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9234

Differential Revision: https://secure.phabricator.com/D13953
2015-08-21 06:58:06 -07:00
Chad Little
22dc3c1be2 Allow public on Ponder Questions, History pages
Summary: Ref T9234, these should allow being publicly visible

Test Plan: log out, see page

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9234

Differential Revision: https://secure.phabricator.com/D13952
2015-08-21 06:49:49 -07:00
Chad Little
89336197e3 Correct link in Badges email
Summary: Fixes T9231, adds a correct link

Test Plan: read

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9231

Differential Revision: https://secure.phabricator.com/D13950
2015-08-20 14:49:57 -07:00
Chad Little
5317f77f30 Fix some quirkiness with Answer comments in Ponder
Summary: There is still some general buginess with answer comments, trying to work them out. This replaces timeline rendering into one offs (less performant) but resolves many bugs. Or if there is a more performant way, let me know? Also when leaving an answer comment, you currently get redirected back to the page, but both the comment form is still populated and you dont see your answer without a reload. I feel like I'm missing some magical parameter to pass, so just redirecting back to the question itself.

Test Plan: Leave lots of answer comments.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D13946
2015-08-20 11:23:30 -07:00
Chad Little
b35f538bc4 Use dateModified for Answer headers in Ponder
Summary: Fixes T9226, shows the update time, not the creation time.

Test Plan: Update an answer, see new date.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9226

Differential Revision: https://secure.phabricator.com/D13945
2015-08-20 08:24:57 -07:00
Chad Little
167eb9a256 Remove Files Widget from Conpherence
Summary: Fixes T8834. Removes everywhere I could find references to Files.

Test Plan: Use Conpherence, send a message, attach a file, try durable column, send message, send file. Seems snappy.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T8834

Differential Revision: https://secure.phabricator.com/D13936
2015-08-20 08:24:42 -07:00
epriestley
9790f93a83 Show all packages with a claim on a file in the table of contents view
Summary:
Ref T9218. See discussion there for rationale; I think this is the right behavior to pursue.

The screenshot below is pretty ugly. I think it's a lot worse than most real-world cases will be, since you have to sort of opt-in to having crazy levels of overlapping packages, and it's perfectly normal/reasonable for files owned by one package. Owners is powerful enough to let you specify sub-packages with exclusive ownership.

That said, this may be more typical than I hope. I don't think we can reduce the complexity here much for free, but it would might be reasonable to add some view options (e.g.: group by package?, show only packages I own?, show packages as icons with a tooltip?) if it's an issue.

Test Plan: {F734956}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9218

Differential Revision: https://secure.phabricator.com/D13940
2015-08-20 04:46:17 -07:00
Chad Little
c87d463093 Remove Calendar from Conpherence
Summary: Ref T8834, cleanly removes "Calendar" widget from Conpherence. RIP. :(

Test Plan: Bounce around Conpherence, no Calendar. grep for "calendar" in apps folder, css, js

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T8834

Differential Revision: https://secure.phabricator.com/D13934
2015-08-18 19:55:22 -07:00
Chad Little
a1d1cf77a7 Remove call to loadDrydockLease
Summary: Fixes T9219... I think.

Test Plan: swagging a guess for epriestley

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9219

Differential Revision: https://secure.phabricator.com/D13932
2015-08-18 17:52:55 -07:00
Chad Little
e0faa66772 Allow Owners Packages to be archived
Summary: Fixes T8428. Adds status to packages, allows setting and application search. I presume though these need checked elsewhere?

Test Plan: New package, edit package, archive package, run search queries.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T8428

Differential Revision: https://secure.phabricator.com/D13925
2015-08-18 13:36:05 -07:00
epriestley
0a509ea7ec Fix Owners package specificity ordering
Summary: This algorithm isn't quite right with respect to ordering more-specific packages correctly.

Test Plan: {F729864}

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D13929
2015-08-18 12:12:51 -07:00
Chad Little
13346ea904 Unbeta Ponder
Summary: Pending other diffs, this actually removes Ponder as a prototype. Fixes T3578

Test Plan: No longer listed as a prototype

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T3578

Differential Revision: https://secure.phabricator.com/D13920
2015-08-18 10:51:17 -07:00
epriestley
b21270d498 Probably fix bad loadArtifactLease() call
Summary: Ref T9205. This is a likely fix.

Test Plan: This isn't straightforward to test in the upstream unless you have custom code on top of it.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9205

Differential Revision: https://secure.phabricator.com/D13928
2015-08-18 10:46:41 -07:00
Chad Little
bd0bbc713a Sort Ponder Answers by voteCount
Summary: Fixes T9207. I think this is correct? Sorts based on vote count and reverses the order of the array so higher is first.

Test Plan: Test vote ordering on a number of sample tasks.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9207

Differential Revision: https://secure.phabricator.com/D13924
2015-08-17 11:48:29 -07:00
Chad Little
ee8e436390 Add ability to reply to Ponder Answer emails
Summary: Ref T9068, Ref T3846. Maybe fixes both, but I'm having issues testing email replies in a sandbox. Moves answer feed/mail generation to the AnswerEditor, hides it in QuestionEditor.

Test Plan: Write an answer, see feed story, check /mail/ for mail generation.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T3846, T9068

Differential Revision: https://secure.phabricator.com/D13905
2015-08-17 10:22:54 -07:00
epriestley
6010e80e5c Show packages in table of contents views in Diffusion and Differential
Summary:
Fixes T8004.

  - For paths which are part of a package, show the package.
  - Highlight paths which are part of a package you (the viewer) have authority over.

Test Plan:
{F725418}

  - Viewed owned and unowned chagnes in Diffusion and Differential.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8004

Differential Revision: https://secure.phabricator.com/D13923
2015-08-17 10:14:22 -07:00
epriestley
6cfeb9e540 Further modernize OwnersPackageQuery
Summary:
Ref T8320.

  - Add needOwners().
  - Split withOwnerPHIDs() [exact owners] and withAuthorityPHIDs() [indirect authority] apart.
  - Restore searching by path.

Test Plan: Browsed pacakges, edited packages, edited paths.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8320

Differential Revision: https://secure.phabricator.com/D13922
2015-08-17 10:09:17 -07:00
Chad Little
f5ea5ba9fe Simplify Countdown mailtags
Summary: These were a little silly, simplify them

Test Plan: New countdown, edit preferences, etc.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D13888
2015-08-17 10:08:52 -07:00
epriestley
fd61702d6e Remove "Primary Owner" from Owners
Summary:
Ref T8320. This field doesn't have any special effects and has no reason to exist. Primary owners are always already owners.

This makes one minor implicit change to Owners: it is now possible to create a package with no owners. That seems fine; it is reasonable to create a package purely as an organizational tool and use it in, e.g., Herald.

Test Plan: Created and edited packages.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8320

Differential Revision: https://secure.phabricator.com/D13921
2015-08-17 10:08:54 -07:00
epriestley
a3393c3ecb Fix Owners lookups for the repository root
Summary:
Ref T9201. At the root of a repository the current path is `null`, but the OwnersQuery wants strings.

This could be resolved a couple different ways, but just cast the arguments to strings since that seems reasonable enough.

Test Plan: Browsed root of a repository.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9201

Differential Revision: https://secure.phabricator.com/D13919
2015-08-16 17:59:14 -07:00
epriestley
cfd1348975 Fix an issue with Table of Contents construction for copied files
Summary: Ref T9201.

Test Plan: Inspection.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9201

Differential Revision: https://secure.phabricator.com/D13918
2015-08-16 17:59:02 -07:00
Chad Little
e29255650c Fix Macro active query
Summary: When using the active query in Macro, all Macros are returned. Properly set the status query.

Test Plan: Review active macros, don't see archived macros.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D13912
2015-08-16 17:50:23 -07:00
Chad Little
5590642a1d Simplify some transaction translations
Summary: Ref T8700, I don't believe we need to be specific here about the object, since it displays on the object.

Test Plan: Change policy a few times on a task, see new translation

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T8700

Differential Revision: https://secure.phabricator.com/D13913
2015-08-16 17:47:58 -07:00
epriestley
36a50ccbae Provide a more modern way to load packages owning a set of files
Summary:
Ref T8320. Ref T8004. This just tries to generally modernize

It also replaces the nonfunctional "Find Owners" link with a new property that just shows owning packages.

Test Plan:
  - Created and edited packages.

{F720478}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8004, T8320

Differential Revision: https://secure.phabricator.com/D13911
2015-08-15 13:06:10 -07:00
epriestley
8149399312 Convert commits to use unified table of contents
Summary:
Fixes T2183. We now use the same rendering element in both places.

Intentional changes:

  - Package highlighting is out, coming back to both apps in next diff.
  - removed redundant-feeling "Change" link. The information is now shown with a character ("M", "V", etc.) and the page is a click away under "History". Clicking the path also jumps you to substantially similar content. (We could restore it fairly easily, I just think it's probably the least useful thing in the table right now.)

Test Plan: Viewed a bunch of commits in Diffusion.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T2183

Differential Revision: https://secure.phabricator.com/D13910
2015-08-15 12:57:20 -07:00
epriestley
cb912d1735 Convert DifferentialRevision view to new PHUIDiffTableOfContentsListView
Summary:
Ref T2183. Introduces a new View which can (in theory) unify the Revision, Diff and Commit table of contents views.

This has the same behavior as before, but accepts slightly more general primitives and parameters and has somewhat cleaner code.

I've made one intentinoal behavior change: removing the "Open All in Editor" button. I suspect this is essentially unused, and is a pain to keep around. We can look at restoring it if anyone notices.

Test Plan: Looked at a bunch of revisions, no changes from before.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T2183

Differential Revision: https://secure.phabricator.com/D13908
2015-08-15 11:43:12 -07:00
Chad Little
fca716d699 More Ponder Answer polish
Summary: Fixes T9099, I think this is as much as I can come up with for unbeta. Cleans up the answer header (profile image, smaller font, smaller header). Cleans up voting (new, with color), and makes it a bit more readable.

Test Plan:
Review a number of answers in ponder with and without votes, comments.

{F720189}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9099

Differential Revision: https://secure.phabricator.com/D13907
2015-08-15 10:55:38 -07:00
epriestley
7a1bbe6634 Add basic support for Herald outbound rules
Summary: Ref T5791. This is still very basic (no global actions, no support for matching headers/bodies/recipients/etc) but gets the core in.

Test Plan:
{F715209}

{F715211}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T5791

Differential Revision: https://secure.phabricator.com/D13897
2015-08-15 10:54:33 -07:00
epriestley
bb0d13345d Remove unused revisionID and whitespace properties from diff TOC view
Summary: Ref T2183. These properties are not used and not useful.

Test Plan: Grepped for callsites and uses. Loaded revisions.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T2183

Differential Revision: https://secure.phabricator.com/D13906
2015-08-15 10:54:27 -07:00
epriestley
74bf0d6ec6 Show external build links in applications
Summary: Fixes T8659. This isn't //explicitly// documented but I'm going to wait for a bit until the "Harbormaster" doc splits into internal/external builds to add docs for it. There's other similar stuff coming soon anyway.

Test Plan:
{F716439}

{F716440}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8659

Differential Revision: https://secure.phabricator.com/D13903
2015-08-15 07:29:26 -07:00
epriestley
57b0353034 Add harbormaster.createartifact
Summary:
Ref T8659. In the general case, this eventually allows build processes to do things like:

  - Upload build results (like a ".app" or ".exe" or other binary).
  - Pass complex results between build steps (e.g., build step A does something hard and build step B uses it to do something else).

Today, we're a long way away from having the infrastructure for that. However, it is useful to let third party build processes (like Jenkins) upload URIs that link back to the external build results.

This adds `harbormaster.createartifact` so they can do that. The only useful thing to do with this method today is have your Jenkins build do this:

  params = array(
    "uri": "https://jenkins.mycompany.com/build/23923/details/",
    "name": "View Build Results in Jenkins",
    "ui.external": true,
  );
  harbormaster.createartifact(target, 'uri', params);

Then (after the next diff) we'll show a link in Differential and a prominent link in Harbormaster. I didn't actually do the UI stuff in this diff since it's already pretty big.

This change moves a lot of code around, too:

  - Adds PHIDs to artifacts.
  - It modularizes build artifact types (currently "file", "host" and "URI").
  - It formalizes build artifact parameters and construction:
    - This lets me generate usable documentation about how to create artifacts.
    - This prevents users from doing dangerous or policy-violating things.
  - It does some other general modernization.

Test Plan:
{F715633}

{F715634}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8659

Differential Revision: https://secure.phabricator.com/D13900
2015-08-15 07:28:56 -07:00
epriestley
8692f4857b Fix an issue with ClassMap handling of DivinerAtomizers
Fixes T9193.
2015-08-15 06:59:18 -07:00
Chad Little
3a6c3cc5ca Fix new Question in Ponder
Summary: I derped here and broke new questions, also remove old Answer constants

Test Plan: Ask a new question, see it save

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D13899
2015-08-14 09:51:52 -07:00
Chad Little
603c91e08a Add ability to hide answers in Ponder
Summary: Ref T9173, adds basic hide support for answers. Answer authors and Moderators can hide answers, unhide them.

Test Plan: Hide answer, log into other account, see hidden message. Mark as visible, see answer again.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9173

Differential Revision: https://secure.phabricator.com/D13894
2015-08-14 09:25:02 -07:00
epriestley
3b987a93ce Consolidate outbound mail status in a new class
Summary: Ref T5791. This collects outbound mail status in one place and makes the list view a little spiffier.

Test Plan: Looked at list and detail views. Grepped for changed classes/constants.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T5791

Differential Revision: https://secure.phabricator.com/D13884
2015-08-14 04:31:42 -07:00
Chad Little
9e306710b3 Clean up misc Ponder details
Summary: Ref T3578, Changes "Ask Away" to just "Submit", Changes Description to Details, check for is_new when offering closed state on question edit.

Test Plan: New Question, Edit Question

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T3578

Differential Revision: https://secure.phabricator.com/D13891
2015-08-13 18:23:33 -07:00
Chad Little
489c7ce048 Remove unused mailtag in badges
Summary: grep for MAILTAG_NAME in badges, not used.

Test Plan: view edit preferences, grep

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D13887
2015-08-13 18:23:03 -07:00
Joshua Spence
368f359114 Use PhutilClassMapQuery instead of PhutilSymbolLoader
Summary: Use `PhutilClassMaQuery` instead of `PhutilSymbolLoader`, mostly for consistency. Depends on D13588.

Test Plan: Poked around a bunch of pages.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13589
2015-08-14 07:49:01 +10:00
Joshua Spence
7938d9a529 Add some missing translation strings
Summary: Self explanatory.

Test Plan: N/A

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D13880
2015-08-14 07:40:09 +10:00
Chad Little
3db9e4b4e5 Add mailtags to Ponder
Summary: Ref T3578  Adds mailtags to Ponder, answer stuff not quite ready, but that's another diff.

Test Plan: set preferences to notify, second account updates a question, get notification on first.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T3578

Differential Revision: https://secure.phabricator.com/D13886
2015-08-13 13:00:47 -07:00
epriestley
8c06d89070 Flesh out web UI for mail a bit to prepare for Herald outbound rules
Summary:
Ref T9141. Ref T5791. Ref T7013. Major changes here is:

  - Currently, we don't store the headers we actually sent, or the reasons we actually did or did not deliver a mail.
    - Start storing these (as `headers.sent` and `actors.sent`).
    - Show them in the web UI.
    - Show them in `bin/mail show-outbound` (previously, we sort of re-computed them in a hacky way).
    - Take them into account in `bin/mail volume`.

Then some minor changes:

  - Show mail bodies.
  - Show more mail information.
  - Start renaming "MetaMTA" to "Mail", at least in the web UI.

Test Plan:
{F707501}
{F707502}
{F707503}
{F707504}
{F707505}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T5791, T7013, T9141

Differential Revision: https://secure.phabricator.com/D13878
2015-08-12 12:27:31 -07:00
Chad Little
9a7beadd22 Clean up some Ponder language
Summary:
Ref T9099.

 - Remove unused function
 - Fix celerity resource include
 - Add a note when an answer's been closed
 - Clean up architecture a little
 - Add a better notice when you've already answered.

Test Plan: Test with and without answers, with answering, with being closed.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9099

Differential Revision: https://secure.phabricator.com/D13875
2015-08-12 07:56:31 -07:00
Chad Little
f18537ce0b Change Ponder default query to 'Recent'
Summary: In Ponder, I think the right default query is "good" questions. That being recently asked, and either open or resolved. For browsing this seems correct. For moderators, I presume they use saved queries accordingly. This is similar to stack overflow and quora.

Test Plan: Review queries in my dev box, all seems to run correctly

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D13877
2015-08-12 07:56:10 -07:00
Chad Little
306af6fb28 Update Ponder Answer layout
Summary: Ref T9099, A step forward for the main Ponder UI. Mostly moving stuff into View classes and reducing clutter. Took a pass at keeping comments and helpfuls, but unclear what the 'final' UI will be (I'm just designing as I use the product).

Test Plan:
Review a number of questions and answers.

{F702495}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9099

Differential Revision: https://secure.phabricator.com/D13872
2015-08-11 10:42:40 -07:00
epriestley
53ffaaa889 Load buildables in DiffViewController
Summary: Fixes T9128. I missed this when converting other controllers to look in Harbormaster for lint/unit data.

Test Plan: Copy/pasted a diff successfully.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9128

Differential Revision: https://secure.phabricator.com/D13865
2015-08-11 06:39:05 -07:00
Joshua Spence
2cf9ded878 Various linter fixes
Summary: Self explanatory.

Test Plan: `arc lint`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D13863
2015-08-11 22:36:55 +10:00
epriestley
5485fb8aa9 Read modern coverage information for tables of contents
Summary:
Ref T8096. This modernizes the last thing which was reading the old datasource.

Also fix a bug where it didn't work.

Test Plan: {F698405}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8096

Differential Revision: https://secure.phabricator.com/D13852
2015-08-10 15:24:15 -07:00
Chad Little
b4e038d2af Add similiar questions sidebar to Ponder
Summary: Ref T9099. Testing out a two column layout in Ponder, with the main idea being creating a more browsable, discoverable product. I'd like the side column though to be a little smarter and provide project based searching. Ideally, if I'm reading Resolved Maniphest questions, other Resolved Maniphest questions are likely interesting. Another scenario is if I'm answering questions, in which case browsing more Open questions would also be interesting. Ponder "Main Column" still needs to be redesigned.

Test Plan: Browse open questions, resolved questions.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9099

Differential Revision: https://secure.phabricator.com/D13849
2015-08-10 14:55:43 -07:00
epriestley
efa8855e03 Read Differential changeset coverage information from Harbormaster
Summary: Ref T8096. This information has moved into Harbormaster.

Test Plan:
Pushed some test results in; see right margin:

{F698394}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8096

Differential Revision: https://secure.phabricator.com/D13850
2015-08-10 14:16:36 -07:00
epriestley
60a529b9d1 Remove some obsolete lint and unit support
Summary:
Ref T8096.

Long ago, support for "postponed" lint and unit tests got hacked in. `arc` would publish a bunch of ghost results, and then something else would fill the results in later.

This was always a hack. It is not nearly as powerful or flexible as having a real build system, and is obsolete with Harbormaster, which supports these operations in a more reasonable and straightforward way.

This was used (only? almost only?) at Facebook.

  - Remove `differential.finishpostponedlinters`. This only served to update postponed linters.
  - Remove lint magic in `differential.setdiffproperty`. This magic only made sense in the context of postponed linters.
  - Remove `differential.updateunitresults`. The only made sense for postponed unit tests.

And one minor change: when a diff contains >100 affected files, we hide the content by default, but show content for files with inline comments. Previously, we'd do this for lint inlines, too. I don't tink this is too useful, and it's much simpler to just remove it. We could add it back at some point, but I think large changes often trigger a lot of lint and no one actually cares. The behavior for actual human inlines is retained.

Test Plan: `grep`

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8096

Differential Revision: https://secure.phabricator.com/D13848
2015-08-10 14:16:25 -07:00
epriestley
2b13da88ce Read synthetic inline comments from Harbormaster
Summary: Ref T8096. These are still reading out of the old diff property, but should read from Harbormaster instead.

Test Plan: {F698346}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8096

Differential Revision: https://secure.phabricator.com/D13847
2015-08-10 14:16:14 -07:00
epriestley
c2c8b00c5c Always show build target tabs, even if they have no data
Summary:
Ref T8096. Hit this on IRC:

> epriestley: what's in the Messages tab?
> jdoe: what Messages tab??!
> epriestley: ughhhh

Test Plan: Clicked "Messages" tab, saw helpful "no messages" message.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8096

Differential Revision: https://secure.phabricator.com/D13846
2015-08-10 14:15:43 -07:00
epriestley
a1431e53cc Link to Harbormaster build targets from the Daemon worker page
Summary:
Fixes T7370. Two changes:

  - Make the default to show nothing, instead of showing all the data. This is a better default because the data is sometimes sensitive. Workers should have to opt in to revealing it.
  - For TargetWorkers, link to the target (technically the build, for now, since there's no dedicated target detail page).

Test Plan: {F698325}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T7370

Differential Revision: https://secure.phabricator.com/D13845
2015-08-10 14:15:19 -07:00
epriestley
a1499ceb8f Don't let autoplans be run manually
Summary: Ref T8096. Like stop/start, autoplans are pushed into the system from outside (normally by `arc`) so it doesn't make any sense to run them manually.

Test Plan:
  - Tried to run an autoplan from web UI, got an error.
  - Ran a normal plan from web UI.
  - Tried to run an autoplan from CLI, got an error.
  - Ran a noraml plan from CLI.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8096

Differential Revision: https://secure.phabricator.com/D13844
2015-08-10 14:14:52 -07:00
Chad Little
2752419160 Add Mark as Helpful to PonderAnswer
Summary: Ref T6920, this adds a basic controller for marking an answer as helpful and removes the negative voting. Any current positive vote is kept as helpful. New UI is needed here, but there is a separate task for redesigning Ponder overall.

Test Plan: Mark an answer as helpful, see count go up, remove helpful, see count go down. Test endpoint manually.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T6920

Differential Revision: https://secure.phabricator.com/D13834
2015-08-10 09:09:07 -07:00
Chad Little
0e7efceb51 Update Meta for handleRequest
Summary: Updates Applications application for handleRequest

Test Plan: Install, Uninstall an application

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D13839
2015-08-10 09:08:33 -07:00
Chad Little
97e30c1d06 Update Celerity for handleRequest
Summary: Updates Celerity controllers

Test Plan: View Phabricator, change to high contrast, change to larger fonts. Everything seems ok?

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D13838
2015-08-10 09:08:21 -07:00
Chad Little
803e5dc7e2 Update Doorkeeper for handleRequest
Summary: Updates Doorkeeper

Test Plan: Peer Review

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D13837
2015-08-10 09:08:04 -07:00
Chad Little
b92e6d3582 Update Dashboards for handleRequest
Summary: Updates Dashboards app

Test Plan: Click on Manage Dashboard, page load a.ok

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D13836
2015-08-10 09:07:51 -07:00
Chad Little
384cae4942 Update Daemons for handleRequest
Summary: Updates the Daemon application calls

Test Plan: Click on various things in the Daemon app

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D13835
2015-08-10 09:07:40 -07:00
Chad Little
7e7e38e9c0 Remove VotableInterface from PonderQuestion
Summary: Ref T6920, This removes the PonderVotableInterface from PonderQuestion and assocaited code. Also... never used?

Test Plan: Visit Ponder, See List, New Question, Add Answer.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T6920

Differential Revision: https://secure.phabricator.com/D13833
2015-08-08 20:29:37 -07:00
Chad Little
0c3f74663c Remove Ponder voting UI
Summary: Ref T6920, This just removes the old voting UI from Ponder.

Test Plan: Visit a Question, no voting UI

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T6920

Differential Revision: https://secure.phabricator.com/D13827
2015-08-08 14:04:26 -07:00
Chad Little
f98f5a081e Add a default moderation policy to Ponder
Summary: This allows installs to essentially set a "moderator" for Ponder, who can clean up answers. Fixes T9098

Test Plan: Edit an answer I don't own.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9098

Differential Revision: https://secure.phabricator.com/D13818
2015-08-08 12:20:01 -07:00
Chad Little
22de31c56d Fix Ponder feed story transaction
Summary: These transactions were missed, add in all closed states.

Test Plan: Closed a Question, see title in Feed.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D13831
2015-08-08 11:17:10 -07:00
Chad Little
44f18cfb12 Update Project for handleRequest
Summary: Updates Projects to use handleRequest

Test Plan: New Project, Edit Project, Archive, Watch, Create Workboards, Import Workboards, Edit Column, New Column, Change Icon, Add/Remove Members

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D13829
2015-08-08 10:34:55 -07:00
Chad Little
d2ef273ecd Add additional statuses to Ponder
Summary: Ref T9096. This is a first cut at adding additional statuses, happy to add or subtract as needed... maybe even configurable? Also, the dialog doesn't seem to fire, I'll keep debugging.

Test Plan: Close and Reopen many questions. Test applicationSearch params by seeing resolved questions, all questions.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9096

Differential Revision: https://secure.phabricator.com/D13826
2015-08-08 10:23:33 -07:00
Chad Little
dc687dbd92 Add basic Herald support to Ponder
Summary: Ref T6919, Just a basic herald adapter (new questions) for Ponder

Test Plan: Created a Personal Rule, got subscribed to new question, saw transcript.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T6919

Differential Revision: https://secure.phabricator.com/D13828
2015-08-08 10:22:18 -07:00
Chad Little
3d1783b2da Add application search for Paste status
Summary: Fixes T9076. This adds the ability to search for active, archived, or all Pastes.

Test Plan: Search for active, archived, all Pastes.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9076

Differential Revision: https://secure.phabricator.com/D13809
2015-08-08 09:46:21 -07:00
epriestley
da1e711abb Hide skipped tests by default in Differential build result summary view
Summary: Ref T8096. Currently, we hide passing tests by default (they aren't interesting) but should also hide skipped tests by default (they aren't interesting either).

Test Plan: {F694485}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8096

Differential Revision: https://secure.phabricator.com/D13821
2015-08-08 07:43:08 -07:00
Joshua Spence
79f2e81f38 Various linter fixes
Summary: Self-explanatory.

Test Plan: Eyeball it.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D13808
2015-08-08 10:19:45 +10:00
Chad Little
af71eba5cc Mark UIExamples as a prototype
Summary: Ref T9103. This application is only useful for developing Phabricator, and in general is not kept "production ready". Mark it as a prototype.

Test Plan: visit /applications/, see it marked as prototype.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9103

Differential Revision: https://secure.phabricator.com/D13822
2015-08-07 08:17:33 -07:00
Chad Little
f7b16c3bf9 SetUser on Timeline UIExample
Summary: Fixes T9103, sets the user

Test Plan: visit uiexamples timeline

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9103

Differential Revision: https://secure.phabricator.com/D13823
2015-08-07 08:14:20 -07:00
Chad Little
58b622852f Fix Up Paste transactions
Summary: We're using the wrong constants here, bad copy and paste job. Also add colors, icons.

Test Plan: Archive a Paste, check transactions.

Reviewers: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D13817
2015-08-06 18:46:17 -07:00
Chad Little
2c2eeed65d Fix Paste transactions
Summary: We're using the wrong constants here, bad copy and paste job.

Test Plan: Archive a Paste, check transactions.

Reviewers:

Subscribers:
2015-08-06 18:44:48 -07:00
Chad Little
31cfdef0f7 Reduce colors in ApplicationTransactions for subscriptions
Summary: Remove previously added colors.

Test Plan: Load page, see less color (task)

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D13816
2015-08-06 17:30:47 -07:00
Chad Little
cd0402dce2 Remove AphrontTwoColumnView
Summary: Never used.

Test Plan: grep

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D13814
2015-08-06 12:11:58 -07:00
epriestley
50e084dcda Add a rough bin/mail volume command for showing mail volume
Summary: Ref T7013. This might help us understand the problem better.

Test Plan:
```
$ ./bin/mail volume
+==============+============+
| User         | Unfiltered |
+==============+============+
| admin        | 136        |
| dog          | 31         |
| epriestley   | 24         |
| ducksey      | 18         |
| saurus       | 8          |
| example-list | 7          |
| squeakybirdo | 3          |
| nnn          | 3          |
| facebooker   | 2          |
+==============+============+

Mail sent in the last 30 days.
"Unfiltered" is raw volume before preferences were applied.
```

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T7013

Differential Revision: https://secure.phabricator.com/D13813
2015-08-06 11:32:17 -07:00
epriestley
580790cd6e Prevent Harbormaster autobuilds from being stopped, paused or restarted
Summary: Fixes T8657. "Auto" builds are pushed into Harbormaster by an external system (currently, `arc`) so it does not make sense to stop or resume them: Harbormaster has no way to control the external system.

Test Plan:
  - Tried to restart an autobuild, got an error.
  - Restarted a normal build.
  - Did "Restart All" on a buildable, got restarts on non-autoplans and no restarts on autoplans.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8657

Differential Revision: https://secure.phabricator.com/D13812
2015-08-06 09:54:17 -07:00
epriestley
a9763062f7 Unprototype Harbormaster
Summary: Ref T8089. There's still some cleanup but none of it needs to block this.

Test Plan: Viewed `/applications/`, read documentation.

Reviewers: chad

Reviewed By: chad

Subscribers: devurandom, swisspol

Maniphest Tasks: T8089

Differential Revision: https://secure.phabricator.com/D13811
2015-08-06 09:54:00 -07:00
epriestley
8860f4724f Lump Harbormaster build steps into groups
Summary:
Ref T8089. We have a lot of broken/confusing/prototype build steps that I want to hide from users when we unprototype Harbormaster.

The dialog is also just kind of unwieldy.

Organize this UI a little better and put all the sketchy junk in a "prototypes" group that you can't see unless prototypes are enabled.

This doesn't break anything (the old steps will still work fine), but should reduce user confusion.

Test Plan:
Old UI:

{F691439}

New UI (prototypes off):

{F691440}

New UI (prototypes on):

{F691441}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8089

Differential Revision: https://secure.phabricator.com/D13803
2015-08-06 04:19:42 -07:00
Chad Little
5eeda6040e Allow setting of Archive/Active on Paste
Summary: Ref T9076, adds basic plumbing for setting the state of a Paste.

Test Plan: Archive Paste, Activate Paste, New Paste

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9076

Differential Revision: https://secure.phabricator.com/D13801
2015-08-05 13:44:55 -07:00
Chad Little
425c12dc97 Send correct result in Phortune Charge List
Summary: Fixes T9074, we're sending $table and should send $result

Test Plan: Vast Wealth fake CC charge!

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9074

Differential Revision: https://secure.phabricator.com/D13802
2015-08-05 13:40:44 -07:00
Chad Little
2383e741aa Add user icons / colors for subscriber transactions
Summary: Adds additional icon states for subscriber transactions. Also updated "eraser" to "trash" (man that icon is bad).

Test Plan: add a subscriber, remove a subscriber.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D13800
2015-08-05 12:40:47 -07:00
Chad Little
b34dc6164a Add Subscribers to Passphrase
Summary: Fixes T9078, Adds SubscribableInterface to Passphrase.

Test Plan: Create a new passphrase, see myself subscribed. Subscribe to other Passphrases.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9078

Differential Revision: https://secure.phabricator.com/D13799
2015-08-05 11:59:38 -07:00
Chad Little
e05e539a9c Clean up Ponder CSS
Summary: Ref T3578, Removes old cruft and updates Ponder UI very slightly.

Test Plan: Use Ponder alot, new answers, comments, questions. Grep for removed CSS.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T3578

Differential Revision: https://secure.phabricator.com/D13786
2015-08-05 09:42:39 -07:00
Chad Little
a3b955f948 Add Spaces to Ponder
Summary: Ref T8493, Ref T3578. Adds spaces support to ponder.

Test Plan: Ask a question in a new space, see new question.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T3578, T8493

Differential Revision: https://secure.phabricator.com/D13792
2015-08-05 09:38:14 -07:00
Chad Little
fdc1662bfd Add Projects to Ponder Search View
Summary: Ref T3578 Allows display of projects if available on individual ponder search results.

Test Plan: Added projects to my questions, see them display on search results.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T3578

Differential Revision: https://secure.phabricator.com/D13793
2015-08-05 09:31:37 -07:00
Chad Little
135d0c9ee7 Add Edit/View Policy to Ponder Questions
Summary: Ref T3578, adds ability to set a default edit and view policy for questions. Not sure what to set viewPolicy to ?

Test Plan: Test an old question, edit policy still on myself. Test a new question, see new default.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T3578

Differential Revision: https://secure.phabricator.com/D13791
2015-08-04 15:41:09 -07:00
epriestley
630fb06c42 Document how to use harbormaster.sendmessage to report lint and unit results
Summary: Fixes T7419. This doesn't really do anything, just adds documentation.

Test Plan:
  - Read the documentation:

{F688899}

  - Created a build plan which makes an HTTP request to `example.com` and waits for a result.
  - Ran that build plan manually.
  - Called `harbormaster.sendmessage` manually with the example lint/unit values to provide a result.
  - Saw the results report correctly and the message ("fail") process as expected:

{F688902}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T7419

Differential Revision: https://secure.phabricator.com/D13789
2015-08-04 13:05:52 -07:00
Chad Little
4e7b5defc3 Add mailKeys to Ponder Answer
Summary: Ref T3846. Adds mailkey generation and migration.

Test Plan: Ran the migration, see keys in mysql.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T3846

Differential Revision: https://secure.phabricator.com/D13785
2015-08-04 10:49:15 -07:00
Chad Little
328210a1a6 Add mobile menu to Ponder
Summary: Ref T3578, adds mobile menus to Ponder

Test Plan: Test Ponder on mobile and desktop, click in Ask Question links

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T3578

Differential Revision: https://secure.phabricator.com/D13784
2015-08-04 10:48:48 -07:00
Chad Little
ec7a0837d5 Update XHPhast for handleRequest
Summary: Updates XHPhast

Test Plan: Ran a few queries

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13776
2015-08-04 09:33:13 -07:00
Chad Little
f5be68c59c Update Notifications for handleRequest
Summary: Updates Notifcations for handleRequest

Test Plan: Test as much as I could, mark all, view, lists.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8628

Differential Revision: https://secure.phabricator.com/D13767
2015-08-04 09:32:56 -07:00
Chad Little
ba2cc4f2ee Update Settings for handleRequest
Summary: Run through the Settings controllers

Test Plan: Test various settings pages, save some settings.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13775
2015-08-04 09:32:21 -07:00
Chad Little
1b744d9cb6 Remove device=false from Daemons application
Summary: Fixes T9064, marks page as mobile ready.

Test Plan: Shrink Page

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9064

Differential Revision: https://secure.phabricator.com/D13783
2015-08-04 09:31:29 -07:00
epriestley
386d2b62f8 Fix some copy/paste slop with BLOCK actions in Herald transcripts
Summary: Fixes T9060. These actions still work fine, but the transcripts got messed up a bit.

Test Plan: Viewed transcripts with blocking actions.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9060

Differential Revision: https://secure.phabricator.com/D13782
2015-08-04 07:32:19 -07:00
epriestley
46bd6b30f8 Fix undefined ACTION_BLOCK class constant in Herald
Summary: Fixes T9054. This didn't get fully cleaned up.

Test Plan: Edited several rules, saw actions faithfully represented.

Reviewers: joshuaspence, chad

Reviewed By: chad

Maniphest Tasks: T9054

Differential Revision: https://secure.phabricator.com/D13781
2015-08-03 17:05:21 -07:00
epriestley
05c571794b Put spaces back in condition rendering
Summary: Fixes T9055. I mostly tested with "Always" rules so I missed this.

Test Plan: {F687280}

Reviewers: chad, joshuaspence

Reviewed By: joshuaspence

Maniphest Tasks: T9055

Differential Revision: https://secure.phabricator.com/D13780
2015-08-03 15:49:10 -07:00
Joshua Spence
4139305f73 Mark renderActionDescription as abstract
Summary:
I got caught by this... my custom Herald action doesn't implement this method and now I am hitting this exception:

```
Call to undefined method HeraldHipChatNotificationAction::renderActionDescription()

/usr/src/phabricator/src/applications/herald/adapter/HeraldAdapter.php:896
```

Test Plan: N/A

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D13779
2015-08-04 08:33:01 +10:00
epriestley
5f76c71d78 Share target filtering code in HeraldAction
Ref T8726. This shares some target filtering code with the base class.
2015-08-03 14:34:37 -07:00
epriestley
a3e2f655eb Modularize the Diffusion/Differential "Block" Herald actions
Also removes HeraldCustomAction. This completes action modularization.

Ref T8726.
2015-08-03 14:33:28 -07:00
epriestley
6f6d88794b Modularize the Diffusion "Add Auditors" Herald action
Ref T8726.
2015-08-03 14:33:27 -07:00
epriestley
776caa507b Modularize the Harbormaster "Run build plan" Herald action
Ref T8726. Modularizes "Run build plan" in Differential and Diffusion.
2015-08-03 14:33:26 -07:00
epriestley
fdd379a026 Modularize the Legalpad "Require Signature" Herald Action
Ref T8726. Modularizes "Require Signatures" for Legalpad.
2015-08-03 14:33:26 -07:00
epriestley
a335004a91 Modularize Differential Reviewer actions in Herald
Ref T8726. Modularizes the "Add Reviewers" and "Add Blocking Reviewers" Herald actions.
2015-08-03 14:33:25 -07:00
epriestley
8d8ee18ce0 Modularize Maniphest Herald "Assign Task" action
Summary: Ref T8726. No surprises here.

Test Plan:
  - Created rules using this action.
  - Applied migration.
  - Verified rules still work.

{F659324}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: joshuaspence, epriestley

Maniphest Tasks: T8726

Differential Revision: https://secure.phabricator.com/D13706
2015-08-03 14:33:25 -07:00
epriestley
3782992670 Modularize "add projects" and "remove projects" Herald actions
Summary: Ref T8726. Convert these to be modular.

Test Plan:
  - Created rules using these actions.
  - Upgraded them.
  - Verified they still work.

{F659266}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: joshuaspence, epriestley

Maniphest Tasks: T8726

Differential Revision: https://secure.phabricator.com/D13705
2015-08-03 14:33:24 -07:00
epriestley
51fead17cf Modularize "Send an Email" Herald actions
Summary: Ref T8726. No surprises.

Test Plan:
Created rules using both action variants, applied upgrade, saw rules still work correctly.

{F658842}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: joshuaspence, epriestley

Maniphest Tasks: T8726

Differential Revision: https://secure.phabricator.com/D13701
2015-08-03 14:33:23 -07:00
epriestley
8ae08a3de7 Make "Add Subscribers" and "Remove Subscribers" Herald actions modular
Summary: Ref T8726. Converts these actions to be modular. No real surprises in this change.

Test Plan:
{F658709}

  - Wrote some rules.
  - Migrated them forward.
  - Used a bunch of these rules.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: joshuaspence, epriestley

Maniphest Tasks: T8726

Differential Revision: https://secure.phabricator.com/D13699
2015-08-03 14:33:22 -07:00
epriestley
8d9bd791f7 Modularize Herald "flag" action, plus update transcripts
Summary:
Ref T8726. This modularizes "Mark with flag", plus rebuilds transcripts in a more modern/flexible way. The big transcript stuff is:

  - Transcripts are now translatable.
  - Transcripts can now show multiple outputs from a single action. For example, an action like "add A, B, C to subscribers" can now say "added A; B is invalid; C was already subscribed".

Test Plan: {F637784}

Reviewers: chad, btrahan

Reviewed By: btrahan

Subscribers: joshuaspence, eadler, epriestley

Maniphest Tasks: T8726

Differential Revision: https://secure.phabricator.com/D13649
2015-08-03 14:33:21 -07:00
epriestley
56dd5211f0 Make Herald action modularization more aggressive
Summary:
Ref T8726. Herald actions are technically sort-of modular already, but make them more aggressively modular similar to `HeraldField`.

I plan to obsolete and replace `HeraldCustomAction`.

Test Plan: Saw actions in nice groups; created and ran a "Do Nothing" action. Transcripts are a bit rough for now.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: joshuaspence, epriestley

Maniphest Tasks: T8726

Differential Revision: https://secure.phabricator.com/D13646
2015-08-03 14:33:20 -07:00
epriestley
b4b5d60f77 Fix 'key'/'type' swap in email reset / one-time-login controller
Summary: Fixes T9046. These got swapped around during refactoring.

Test Plan:
  - Used `bin/auth recover` prior to patch (failed).
  - Used `bin/auth recover` after patch (worked).

Reviewers: joshuaspence, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T9046

Differential Revision: https://secure.phabricator.com/D13778
2015-08-03 08:01:43 -07:00
lkassianik
f0269d696c Calendar list objects that are ghost events should link to a ghost event, not the parent
Summary: Fixes T9034, Calendar list objects that are ghost events should link to a ghost event, not the parent.

Test Plan: Open All Events in Calendar, make sure ghost objects open the ghost instance, not the parent instance.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T9034

Differential Revision: https://secure.phabricator.com/D13764
2015-08-03 07:01:42 -07:00
Chad Little
3b0ca7b769 Partially update Maniphest for handleProcess
Summary: Starts conversion of Maniphest to handleProcess, chopping up to reduce errors.

Test Plan: New Task, Edit Task, Change Priority, Move on workboard, view reports, batch edit tasks

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8628

Differential Revision: https://secure.phabricator.com/D13773
2015-08-01 17:06:57 -07:00
Chad Little
f087bce27d Update Audit for handleRequest
Summary: Updates Audit controllers for handleRequest

Test Plan: See list of audits, raise concern, clear concern, comment.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8628

Differential Revision: https://secure.phabricator.com/D13771
2015-08-01 16:57:18 -07:00
Chad Little
36103dfa18 Update Auth for handleRequest
Summary: Updates Auth app for handleRequest

Test Plan: Tested what I could, Log in, Log out, Change Password, New account, Verify account... but extra eyes very helpful here.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8628

Differential Revision: https://secure.phabricator.com/D13748
2015-08-01 16:49:27 -07:00
Chad Little
1d2c47f110 Update Phortune for handleRequest
Summary: Updates Phortune controllers for handleRequest

Test Plan: New Invoice, new merchant, new subscriptions, manual bill, pay bill, anything I could find to test.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8628

Differential Revision: https://secure.phabricator.com/D13768
2015-08-01 15:43:47 -07:00
Chad Little
2ff4601584 Update Calendar for handleRequest
Summary: Run through Calendar and update/cleanup processRequest

Test Plan: New Event, Edit, etc.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8628

Differential Revision: https://secure.phabricator.com/D13747
2015-08-01 15:43:14 -07:00
Chad Little
917fa250d0 Update Paste for handleRequest
Summary: Updates Paste

Test Plan: New paste, edit, view lists

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8628

Differential Revision: https://secure.phabricator.com/D13766
2015-08-01 15:42:47 -07:00
Chad Little
eea94aaf67 Update XHProf for handleRequest
Summary: Updates XHProf for handleRequest

Test Plan: Use XHProf

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8628

Differential Revision: https://secure.phabricator.com/D13770
2015-08-01 15:41:57 -07:00
Chad Little
6d59f3d1f2 Update Herald for handleRequest
Summary: Update Herald for handleRequest

Test Plan: New rule, test console, logs, lists.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8628

Differential Revision: https://secure.phabricator.com/D13765
2015-08-01 15:41:36 -07:00
Chad Little
42c0dd2b8e Add mail/feed to Slowvote
Summary: Adds mailkeys, basic structure for publishing to feed, sending mail.

Test Plan: New Poll, vote, comment, etc.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13749
2015-08-01 15:41:08 -07:00
Chad Little
9c39a9b361 Update UIExamples for handleRequest
Summary: Updates UIExamples

Test Plan: Visit application, click on different examples

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8628

Differential Revision: https://secure.phabricator.com/D13769
2015-08-01 15:40:26 -07:00
Chad Little
deb06727ea Update Help for handleRequest
Summary: Updates Help for handleRequest

Test Plan: Launch help dialog, close dialog

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8628

Differential Revision: https://secure.phabricator.com/D13772
2015-08-01 15:40:03 -07:00
Chad Little
e5bf2ac373 Update Pholio for handleRequest
Summary: Run through and update Pholio

Test Plan: New Mock, Edit Mock, Inline Comment, Normal Comment, replace mock, view lists.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13774
2015-08-01 15:39:29 -07:00
Chad Little
deb20d6dae Update Chatlog for handleRequest
Summary: Updates Chatlog

Test Plan: Use Chatlog

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13763
2015-07-31 09:14:44 -07:00
Chad Little
d902dd6589 Update Nuance for handleRequest
Summary: Updates Nuance controllers

Test Plan: Read carefully, lint.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13762
2015-07-31 09:14:33 -07:00
Chad Little
360eb85249 Update to FontAwesome 4.4.0
Summary: New Calendar icons!

Test Plan: Try new icons. See new icons.

Reviewers: lpriestley, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13761
2015-07-30 11:04:51 -07:00
Chad Little
38259f0cc2 Don't reset message if missing Room Title in New Conpherence Room
Summary: Fixes T9000, sets a variable.

Test Plan: Try to make a new room without a title, but with a message.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T9000

Differential Revision: https://secure.phabricator.com/D13754
2015-07-29 17:05:46 -07:00
Chad Little
082ef68d85 Clean up Phame a little
Summary: Remove redundent UI, use standard components, remove unused CSS.

Test Plan: Use Phame

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13755
2015-07-29 17:03:13 -07:00
Chad Little
77ababadcb Update Legalpad for handleRequest
Summary: Updates Legalpad for handleRequest instead of processRequest

Test Plan: New Document, Sign Document, Add exemption, view signatures.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13756
2015-07-29 17:02:10 -07:00
Chad Little
cdf03b0f7a Update Flag for handleRequest
Summary: Updates Flag app for handleRequest

Test Plan: Flag, Unflag, list flags, remove flag

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13757
2015-07-29 17:00:31 -07:00
Chad Little
a66be3fa28 Update Fund for handleProcess
Summary: Updates the Fund application

Test Plan: New Initiative, Back, Close, View Backers

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13758
2015-07-29 16:58:48 -07:00
lkassianik
b24935df2f Uninstalling an application, as a non-admin, should give the same modal as clicking "Edit Policies"
Summary: Fixes T8893, Uninstalling an application, as a non-admin, should give the same modal as clicking "Edit Policies".

Test Plan: Open `/applications/view/PhabricatorAuditApplication/` and confirm that "Edit Policies" and "Uninstall" result in the same modal.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T8893

Differential Revision: https://secure.phabricator.com/D13753
2015-07-28 20:21:12 -07:00
Chad Little
fb13692bd3 Add Priority to Maniphest Hovercard
Summary: Fixes T5524, adds priority to Maniphest's hovercard. Also fixes Blocking language.

Test Plan: Hover over a task, see new stuff.

Reviewers: lpriestley, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T5524

Differential Revision: https://secure.phabricator.com/D13750
2015-07-28 19:42:26 -07:00
Chad Little
3d4df1fe8f Add toolip to Mock History in Pholio
Summary: Fixes T8985, Adds a tooltip with the filename

Test Plan: Update a few Pholio mocks, see names when hovering

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8985

Differential Revision: https://secure.phabricator.com/D13746
2015-07-28 10:41:42 -07:00
epriestley
bbc1074ced Allow upload of arbitrary text files
Summary:
Fixes T8984. Because of how drag-and-drop upload works, the text file with content `code` is interpreted as a forbidden variable. Disable this check for the drop upload controller.

(The risk here is a general one where the controller redirects and bundles paramters; this controller does not do that, so it's safe to make this change.)

Test Plan: Uploaded a text file containing only the string "code" (no quotes) by using drag-and-drop.

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T8984

Differential Revision: https://secure.phabricator.com/D13744
2015-07-28 08:04:13 -07:00
Chad Little
eb152d3053 Allow Tokens on Badge
Summary: Might as well for consistency.

Test Plan: Given a token to a badge.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13716
2015-07-28 07:57:15 -07:00
Chad Little
84b92afe08 Fix sending mail on Badges
Summary: Hopefully fixes mail issues. Don't have a local way of testing email replies, though.

Test Plan: Comment on a badge, get mail!

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: seayoung1112, epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13717
2015-07-28 07:56:59 -07:00
Chad Little
a3a5176b7e Add basic countdown timer to object list
Summary: Allows a rough setting of a number and noun for object item list view.

Test Plan:
Use in countdown, set various times.

{F670267}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13742
2015-07-28 07:47:42 -07:00
Chad Little
62e052f3fc Remove View Log action from Herald List
Summary: Fixes T8979. I beleive this explicit page was merged into view, at least I can't find any place to link it now.

Test Plan: View a Herald list, no icon.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8979

Differential Revision: https://secure.phabricator.com/D13743
2015-07-28 07:44:55 -07:00
Chad Little
ebc3811bed Cleaner Countdown widget UI
Summary: Adds the launch date, normalize spacing a bit.

Test Plan:
Test a normal and embeded countdowns.

{F670199}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13740
2015-07-27 20:47:23 -07:00
Chad Little
84049e6d07 Fix public/private profile edit note
Summary: Fixes T8976. Checks state of note before applying to box.

Test Plan: Set policy to login, edit profile.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8976

Differential Revision: https://secure.phabricator.com/D13739
2015-07-27 15:12:03 -07:00
epriestley
8d53f15115 Put the HeraldActionRecord table back on the shelf
Summary:
Fixes T8958. I renamed this class and table (in D13644), but the migration `20150606.mlist.1.php` needs to load records from the table before the table rename applies.

Put the table back and accept a tiny bit of cruft here to fix this problem. We can no-op the migration after a while.

I'll cherry-pick this to `stable`.

Test Plan: Applied migration. Created Herald rules. Reviewed existing Herald rules.

Reviewers: btrahan

Subscribers: epriestley

Maniphest Tasks: T8958

Differential Revision: https://secure.phabricator.com/D13736
2015-07-27 15:08:01 -07:00
Chad Little
6802549355 Fix mail title in Countdown
Summary: Fixes T8959. Countdown now makes feed stories and emails.

Test Plan: Comment on, edit, a countdown.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8959

Differential Revision: https://secure.phabricator.com/D13738
2015-07-27 09:56:03 -07:00
Chad Little
e90379dd2d Update Files for handleRequest
Summary: Update Files application

Test Plan: Upload a file, edit a file, view details, transforms, delete file

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13735
2015-07-27 09:41:53 -07:00
Chad Little
075705f565 Update Countdown for handleRequest
Summary: Updates a couple of callsites

Test Plan: View list, see countdowns

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13728
2015-07-27 09:13:41 -07:00
Chad Little
9643e3b244 Update Facts for handleRequest
Summary: Updated Facts Controllers

Test Plan: Viewed Facts

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13733
2015-07-27 09:12:35 -07:00
Chad Little
564aa2c4ba Update Config app for handleRequest
Summary: Update all found callsites in Config.

Test Plan: Check setup issues, databases, edit a value, remove a warning, everything I could click on.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8628

Differential Revision: https://secure.phabricator.com/D13727
2015-07-27 09:06:26 -07:00
Chad Little
6fb43305be Convert Passhrase to handleRequest
Summary: Converts Passphrase

Test Plan: New Cred, Edit Cred, Lock, view, destroy

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8628

Differential Revision: https://secure.phabricator.com/D13726
2015-07-27 09:06:01 -07:00
Chad Little
18a9fe85c8 Convert Macro to handleRequest
Summary: Converts Macro app

Test Plan: Make Macro, Make meme

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8628

Differential Revision: https://secure.phabricator.com/D13724
2015-07-27 09:04:08 -07:00
Chad Little
55b685d3fc Update Feed for handleRequest
Summary: Updated Feed

Test Plan: Visit feed, see feed

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13734
2015-07-27 08:07:12 -07:00
Chad Little
c026152833 Update Drydock for handleRequest
Summary: Poked through the Drydock controllers and updated the codes.

Test Plan: Built random fake stuff in Drydock

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13731
2015-07-27 07:56:52 -07:00
Chad Little
559bcc42c2 Add tipDirection to PHUIBadgeMiniView
Summary: Makes PHUIBadgeMiniView a little easier to dictate layout. Apply in Timeline.

Test Plan: Tested supercalifragilisticexpialidocious as a badge, saw it align properly.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13729
2015-07-27 07:51:53 -07:00
Chad Little
bccdbacf44 Add tokens to Macro
Summary: A foolish consistency is the hobgoblin of little minds, adored by little statesmen and philosophers and divines.

Test Plan: Award a token to a macro.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13725
2015-07-27 07:51:37 -07:00
Chad Little
7fa4e455b6 Update Slowvote for handleRequest
Summary: Moves to use handleRequest

Test Plan: Make a new poll, edit, see list

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13720
2015-07-27 07:42:40 -07:00
Chad Little
2d35d6053a Update Releeph Branch for handleProcess
Summary: Updates Releeph Branch controllers

Test Plan: bounce around releeph, arc lint

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13721
2015-07-27 07:42:29 -07:00
Chad Little
37893ed774 Countdown mail support part
Summary: I still can't figure out why feed/mail aren't firing, but this needs fixed regardless. (honestly, I spent 2 hours on it last night. ghosts)

Test Plan: lint

Reviewers: eadler, epriestley

Reviewed By: eadler, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13723
2015-07-27 07:19:52 -07:00
Chad Little
c8977d580e Remove viewPolicy from Badges
Summary: Drops the sql column.

Test Plan: View logged in and logged out badges, edited some too.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13715
2015-07-25 16:41:41 -07:00
Chad Little
a962aeaf85 Add mailKeys to Countdown
Summary: Adds mailkeys and reply handler support

Test Plan: Edit Countdown, New Countdown, no errors.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13713
2015-07-25 15:47:07 -07:00
Chad Little
82edde8876 Add MAILTAGs to Badges
Summary: Still doesn't mail yet, but the settings now show up.

Test Plan: View email settings, see Badges options.

Reviewers: eadler, epriestley

Reviewed By: eadler, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13712
2015-07-25 13:34:43 -07:00
Chad Little
6337fa99a3 Render description changes in countdown timeline
Summary: Renders standard description was changed timeline transaction in Countdown

Test Plan: Edit Description, see transaction and change dialog.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13711
2015-07-25 12:21:50 -07:00
Chad Little
36fc6a622c Fix missing mailtags in PHUrl
Summary: Adds in missing mailtag constants in PHUrl

Test Plan: view email settings page

Reviewers: epriestley, lpriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13709
2015-07-24 21:30:16 -07:00
epriestley
343801d449 Show badges on timelines
Summary: Ref T8941.

Test Plan: {F659486}

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T8941

Differential Revision: https://secure.phabricator.com/D13708
2015-07-24 16:04:44 -07:00
Chad Little
17fe8511d7 Add Comments to Countdown
Summary: 3, 2, 1, Liftoff! (Adds basic commenting to countdown)

Test Plan: asdf asdf asdf

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8895

Differential Revision: https://secure.phabricator.com/D13707
2015-07-24 15:40:55 -07:00
lkassianik
930b6fec25 DRAFT - throw together Phurl skeleton.
Summary: DRAFT - throw together Phurl skeleton.

Test Plan: The idea is that `some/long/url` will become `install/Udet4d` and can be viewed and edited at `install/Udet4d/view` and `install/Udet4d/edit`, respectively?

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: joshuaspence, chad, epriestley, Korvin

Maniphest Tasks: T6049

Differential Revision: https://secure.phabricator.com/D13681
2015-07-24 11:06:27 -07:00
Chad Little
2ada395ea9 Have Badges use getMostOpenPolicy for View
Summary: Fixes T8938. Sets by default for new badges, getMostOpenPolicy. Removes ability to edit viewPolicy.

Test Plan: Create a new badge, see its public, assign it, log out, still able to view it.

Reviewers: btrahan, epriestley

Reviewed By: btrahan

Subscribers: epriestley, Korvin

Maniphest Tasks: T8938

Differential Revision: https://secure.phabricator.com/D13702
2015-07-24 11:03:43 -07:00
Chad Little
0ba6569959 Add Badges to Hovercards
Summary: Fixes T8942, Makes Badges if installed show up on your hovercard.

Test Plan: Give a badge, mention myself, see badge on hovercard.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8942

Differential Revision: https://secure.phabricator.com/D13703
2015-07-24 10:58:13 -07:00
epriestley
65bef30eb8 Correct rendering of "Another Herald Rule" conditions in Herald
Summary: Fixes T8920. These are semi-magical and need to be slightly special cased, now.

Test Plan: {F654502}

Reviewers: chad, btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8920

Differential Revision: https://secure.phabricator.com/D13696
2015-07-24 10:57:03 -07:00
Chad Little
10fb011a49 Add commenting to Badges
Summary: Fixes T8949. Adds the ability to render honors on those who have fought and received badges of distinction and honor.

Test Plan: Write 'asdf'. See 'asdf'.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8949

Differential Revision: https://secure.phabricator.com/D13704
2015-07-24 10:56:08 -07:00
Chad Little
7f2d27fed3 Fix countdown mailtag
Summary: misnamed variable crashes email settings page

Test Plan: visit email settings, see page

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13697
2015-07-23 16:24:20 -07:00
Chad Little
c22d6c7beb Add ability to archive a Dashboard
Summary: Let's people archive unused Dashboards (if they have permission).

Test Plan: Archive and Unarchive a dashboard, view history, view search, build new filters.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T6443

Differential Revision: https://secure.phabricator.com/D13683
2015-07-23 14:22:56 -07:00
epriestley
e0861bf240 Rename "HeraldAction" to "HeraldActionRecord"
Summary:
Ref T8726. I want to modularize actions like fields, but the base class should be "HeraldAction".

Eventually, "HeraldCondition" should probably be "HeraldFieldRecord", and then both Action and Condition should just be rolled into Rule, probably, but that can wait and doesn't block anything.

Test Plan: Ran migration, poked around UI, used `git grep`.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8726

Differential Revision: https://secure.phabricator.com/D13644
2015-07-23 13:26:40 -07:00
epriestley
37b6436384 Fix UI strings in Config help for "environment.append-paths"
Summary: Fixes T8939. The parameters on this pht() just got juggled around at some point.

Test Plan: {F654408}

Reviewers: btrahan, avivey, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T8939

Differential Revision: https://secure.phabricator.com/D13694
2015-07-23 13:05:15 -07:00
Chad Little
ded654b8e2 Badges ... on your profile
Summary: Shows badges on profile if you have them. Check if app is installed, show badges.

Test Plan:
Gave myself a liberal selection of badge. Gave notchad one badge. Gave chadtwo absolutely nothing.

{F651069}

Reviewers: btrahan, lpriestley, epriestley

Reviewed By: epriestley

Subscribers: johnny-bit, epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13692
2015-07-23 11:46:34 -07:00
Chad Little
875dc54516 Add Description field to Countdowns
Summary: Allows countdowns to have a description.

Test Plan: Use description, edit description. Check timeline, etc.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13691
2015-07-23 10:56:18 -07:00
Chad Little
062f38e163 Mmmm, Countdown Tokens
Summary: Allow Countdowns to reveive tokens

Test Plan: Give token, see token.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13688
2015-07-23 10:56:00 -07:00
Chad Little
3bfb436296 Modernize Slowvote Search
Summary: Updates slowvote search forms and results. Note I can't seem to get the Joins clause to fire anymore, is there a modern equiv?

Test Plan: Search on polls by state, votes, author, projects.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13666
2015-07-22 16:27:53 -07:00
Chad Little
ffadf64751 Badges v0.1
Summary:
Basic plumbing for Badges application.

 - You can make Badges.
 - You can look at a list of them.
 - They can be edited.
 - They can be assigned to people.
 - You can revoke them from people.
 - You can subscribe to them.

Test Plan: Make Badges with various options. Give them to people. Take them away from people.

Reviewers: lpriestley, epriestley

Reviewed By: epriestley

Subscribers: tycho.tatitscheff, johnny-bit, epriestley, Korvin

Maniphest Tasks: T6526

Differential Revision: https://secure.phabricator.com/D13626
2015-07-22 13:37:20 -07:00
Chad Little
fdd6351a64 Moderize Countdown
Summary:
[DRAFT] Ref T8895. Makes a reasonable attempt at:

 - Project Support
 - Timeline / History
 - Better Search
 - Better ObjectItemLists

Test Plan: Needs better testing (I'm sleepy)

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: eadler, epriestley, Korvin

Maniphest Tasks: T8895

Differential Revision: https://secure.phabricator.com/D13660
2015-07-22 13:35:34 -07:00
Chad Little
1643685e72 Modernize Phame process handlers
Summary: Converts Phame to use handleRequest where appropriate.

Test Plan: Write some blog posts, publish, edit, view.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8628

Differential Revision: https://secure.phabricator.com/D13677
2015-07-22 13:32:25 -07:00
Chad Little
22740f1752 PhameBlogSearchEngine
Summary: Modernize PhameBlogQuery, create a skeleton Search Engine.

Test Plan: Built a dashboard for testing, verify view pages still work.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T6269

Differential Revision: https://secure.phabricator.com/D13670
2015-07-22 13:31:47 -07:00
Chad Little
44d5dff832 Update Tokens for handleRequest
Summary: Update callsites

Test Plan: View tokens leaders and givens. Gave a new token to a task.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8628

Differential Revision: https://secure.phabricator.com/D13678
2015-07-22 13:30:13 -07:00
Chad Little
0bbcd3888c Update Dashboard for handleRequest
Summary: Updates Dashboards

Test Plan: Bounced around lists, installed, history, create panel, create dashboard, etc.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8628

Differential Revision: https://secure.phabricator.com/D13680
2015-07-22 13:27:30 -07:00
Chad Little
b72b6eb18f Allow XHPAST to be viewed public
Summary: Ref T4830. Not sure this //should// be public (consume resources?)

Test Plan: View logged out.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T4830

Differential Revision: https://secure.phabricator.com/D13674
2015-07-22 13:26:13 -07:00
Chad Little
96cecebf65 Update Phriction for handleRequest
Summary: Updates Phriction calls to handleRequest

Test Plan: Create, Delete, Move a Phriction Document. Check history, diff.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8628

Differential Revision: https://secure.phabricator.com/D13682
2015-07-22 13:25:36 -07:00
Chad Little
1aed0e67a9 Update Ponder for handleRequest
Summary: Update all Ponder callsites.

Test Plan: New Question, New Comment, New Answer, Vote Up and Down

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8628

Differential Revision: https://secure.phabricator.com/D13679
2015-07-22 13:23:11 -07:00
Chad Little
cf83db15d6 Allow public viewing of profiles and people calendars
Summary: Ref T4830, this allows profile view and calendar profile view to be publicly visible. Also adds a note reminding the user of visibility.

Test Plan: Log out, visit a profile and various links.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T4830

Differential Revision: https://secure.phabricator.com/D13676
2015-07-22 09:32:54 -07:00
Chad Little
602bc4e2fd PhamePostSearchEngine
Summary: A very basic search engine for Phame Posts

Test Plan: Built a dashboard to test various queries. Saw posts.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T6269

Differential Revision: https://secure.phabricator.com/D13671
2015-07-22 07:30:52 -07:00
Chad Little
d415641b02 Allow XHProf to be publicly viewable
Summary: I guess... because PHP? Ref T4830

Test Plan: Log out, see pages.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T4830

Differential Revision: https://secure.phabricator.com/D13673
2015-07-22 07:17:18 -07:00
epriestley
a8e247528c Document that hypothetical requests aren't helpful
Summary: Fixes T8908. We sometimes receive hypothetical requests (usually when existing companies are thinking about adopting Phabricator) in the form of "No users have actually done this yet, but bad thing Y might happen". We can almost never move forward with these. Explain this in detail.

Test Plan: Reading.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T8908

Differential Revision: https://secure.phabricator.com/D13663
2015-07-22 07:14:56 -07:00
Chad Little
a9e8e03524 Modernize Ponder Search
Summary: Use new search hotness.

Test Plan: Tested searching open, closed, answered, by project, etc.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: r.ksiazek87, epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13667
2015-07-22 07:14:49 -07:00
Chad Little
690463b037 Add Projects to Phame Blog and Phame Post
Summary: Allows setting of Projects to Blogs and Posts.

Test Plan: Set a Project on a post and a blog, see on view page.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13669
2015-07-22 07:08:00 -07:00
Chad Little
a8cf612fe0 Make Phame Blogs and Posts Flaggable
Summary: Will attempt at modernizing Phame in smaller pieces. First up, flagging.

Test Plan: Flag a Post, Flag a Blog

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13668
2015-07-22 07:04:21 -07:00
Chad Little
1985ef390b Add Subscribers to Phame Posts and Blogs
Summary: Makes it possible to subscribe to blogs and posts

Test Plan: Verify I can subscribe to blogs and posts.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13672
2015-07-22 07:00:36 -07:00
Chad Little
6be53bd916 Add Projects to Dashboards and Panels
Summary: Making an attempt here. This adds the ability to set Projects on Dashboards and Dashboard Panels. Most of this went smooth, but I can't figure out why the queries don't automatically show searching by Projects. I'm stumped. Rest seems fine.

Test Plan: Assign a Project to a Dashboard and a Panel, see Project show up, edit it, see transactions.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13656
2015-07-21 12:01:19 -07:00
epriestley
f1222f956a Correctly clear draft markers when deleting an inline comment
Summary:
Fixes T8917. Prior to T2618, deleting inlines prompted users, then really deleted the rows.

After T2618, we delete immediately and offer "Undo". However, some interactions with drafts were missed, and we were only clearing the "this revision has a draft" flag on one of the delete pathways (when you delete all the comment text, then save the comment).

Make both the "Delete" action and the "Delete All Comment Text + Save" workflows do the same thing: mark the row as deleted, and clear any relevant drafts.

Test Plan:
  - Made an inline comment on a clean revision with no "draft comments" marker in the list view.
  - Used "delete" to delete it.
  - After applying the patch, verified that no "draft commetns" marker appears in the list view.
  - Used Delete and Edit + Remove Text + Save to delete comments in Differential and Diffusion.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T8917

Differential Revision: https://secure.phabricator.com/D13665
2015-07-21 11:36:46 -07:00
epriestley
ffa4cae627 Modularize config modules + add edges, phid modules
Summary: Fixes T6859. Adds a readout in `/config/` of installed edge and PHID types. See also D13626.

Test Plan: {F643222}

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T6859

Differential Revision: https://secure.phabricator.com/D13662
2015-07-20 17:08:37 -07:00
Chad Little
d83dce9893 Allow People to be Flagged
Summary: Ref T8888, Makes People Flaggable (and makes me wonder if we should rename Flags->Bookmarks).

Test Plan: Flag myself. Get excited.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: joshuaspence, epriestley, Korvin

Maniphest Tasks: T8888

Differential Revision: https://secure.phabricator.com/D13654
2015-07-20 13:43:58 -07:00
Chad Little
c3e16e26c9 Fix header object call in Releeph
Summary: These were recently removed and are hard to find.

Test Plan: I honestly didn't test this.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13657
2015-07-19 07:43:20 -07:00
Chad Little
3937d34ca2 Make Passphrase Credentials Flaggable
Summary: Ref T8888, Makes Passphrase credentials flaggable.

Test Plan: Flag a credential

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8888

Differential Revision: https://secure.phabricator.com/D13655
2015-07-18 12:40:23 -07:00
Chad Little
ad7760061d Make Countdown Flaggable
Summary: Ref T8888. Cool man, like, more flags.

Test Plan: Flag it, Tag it, and Bag it.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8888

Differential Revision: https://secure.phabricator.com/D13653
2015-07-18 12:19:32 -07:00
Chad Little
82b2caf1ac Make Dashboards and Panels Flaggable
Summary: Ref T8888, makes these two objects flaggable.

Test Plan: Set Flag, See Flag.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8888

Differential Revision: https://secure.phabricator.com/D13652
2015-07-18 12:19:17 -07:00
Chad Little
f53128cab4 Remove setObjectName from PHUIHeaderView
Summary: This isn't used much (once?) and it's not needed. Fixes T8876

Test Plan: Grep for setObjectName and see if its PHUIHeaderView.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8876

Differential Revision: https://secure.phabricator.com/D13645
2015-07-17 10:31:38 -07:00
Chad Little
039be71b87 Fix a phutil_json_decode call in CustomField PHID
Summary: I assume this is correct, it fixes my test case and was inconsistent with the rest of the file.

Test Plan: Add and Remove a CustomFieldPHID in Maniphest, no longer get errors.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8866

Differential Revision: https://secure.phabricator.com/D13642
2015-07-16 21:02:01 -07:00
Chad Little
d082c33a5d Add Badges to PHUIHeaderView
Summary: Adds the ability to add Badges to Headers

Test Plan: UIExamples.

Reviewers: epriestley, btrahan

Subscribers:
2015-07-16 18:06:12 -07:00
Chad Little
02edef95af Add Badge support to Hovercards
Summary: Let's you add Badges to Hovercards

Test Plan: UIExamples

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T7992

Differential Revision: https://secure.phabricator.com/D13623
2015-07-16 17:17:21 -07:00
Chad Little
a34e075e16 Update login icons
Summary: Smaller footprint, flat style, updated logos.

Test Plan: Buttons in UIExamples.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13622
2015-07-16 17:14:50 -07:00
epriestley
0306eb70ed Group and order Herald fields
Summary:
Ref T8726. Some adapters now have a large number of fields, and we lost the sort-of-human-readable implicit ordering when fields were modularized.

Instead, group and sort fields.

Test Plan: {F603066}

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T8726

Differential Revision: https://secure.phabricator.com/D13619
2015-07-16 14:13:13 -07:00
epriestley
97ccd93670 Support "Select" custom fields in Herald rules
Summary: Fixes T5016. Ref T655. Ref T8434. Ref T8726. For "select" custom fields, permit construction of Herald rules.

Test Plan: {F602997}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T655, T5016, T8434, T8726

Differential Revision: https://secure.phabricator.com/D13618
2015-07-16 14:12:54 -07:00
epriestley
715233fb61 Fully modularize Herald field values
Summary: Ref T8726. This gets rid of all the `VALUE_*` constants and lets Fields provide arbitrary typeaheads without upstream/JS changes.

Test Plan: Used all tokenizers. Used "Another Herald Rule". Grepped for all removed constants.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8726

Differential Revision: https://secure.phabricator.com/D13616
2015-07-16 14:12:44 -07:00
epriestley
ed3dfd491f Further modularize Herald values
Summary: Ref T8726. Modularize action values. Fully modularize "text", "none" and "select" controls. Only tokenizers remain.

Test Plan:
  - Used all affected value types in UI.
  - Reviewed rules using new modular rendering, saw sensible output.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8726

Differential Revision: https://secure.phabricator.com/D13614
2015-07-16 14:12:23 -07:00
epriestley
a9caab49f7 Begin modularizing Herald field values
Summary:
Ref T8726. I'm primarily trying to modularize tokenizer values so we don't have to update JS to add a new one.

This is ultimately the blocker for "select" custom fields working in Herald.

This inches us toward that. I'm //not// modularizing conditions or control types in this round, but hope to end up with hard-coded conditions (which are highly general and very rarely change), hard-coded control types (which are also highly general and very rarely change) and completely modular fields and values (which have mid-to-low generality and change frequently).

Test Plan: Used UI to interact with "none", "text", and new-style "select" controls. No actual support for tokenizers yet.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8726

Differential Revision: https://secure.phabricator.com/D13613
2015-07-16 14:12:00 -07:00
epriestley
b2b739c709 Reduce code duplication in Herald fields
Summary:
Ref T8726. I want to modularize values and reduce how hard-coded / copypasta'd they are.

  - Rename `get...StandardCondition()` to `get...StandardType()`, since we can drive both conditions and values from it.
  - Rename `STANDARD_LIST` to `STANDARD_PHID_LIST` for consistency: all "lists" are lists of PHIDs.
  - For all standard types which don't require typehaeads, lift their logic into the base class.
  - I'll lift typeaheads soon, but need to generalize them first.

Test Plan: Edited various Herald rules, saw value UI generate correctly.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8726

Differential Revision: https://secure.phabricator.com/D13612
2015-07-16 14:11:44 -07:00
epriestley
fc72b000f0 Add repository list-paths and repository move-paths
Summary: Ref T7149. These formalize the local path adjustment step for cluster imports, rather than relying on an ad-hoc script.

Test Plan: Used `list-paths` and `move-paths` to list and move repositories.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7149

Differential Revision: https://secure.phabricator.com/D13621
2015-07-16 14:11:33 -07:00
epriestley
ef556090f8 Document project tone formally
Summary: Standards and practices.

Test Plan: Read carefully.

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D13641
2015-07-16 12:57:06 -07:00
Paul Kassianik
ae281301ca Implementing Spaces in Countdown
Summary: Implements T8734

Test Plan: Verify that countdowns can have spaces associated with them. Verify that non-default spaces are displayed in the header of the countdowns in the result of the query.

Reviewers: lpriestley, epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13634
2015-07-15 10:17:52 -07:00
Paul Kassianik
a40437a531 Implements Spaces application in Slowvote
Summary: Implements T8733

Test Plan: Verify that spaces policies can be implemented in the creation and editing of polls.

Reviewers: lpriestley, epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13537
2015-07-14 07:45:49 -07:00
Chad Little
bb54957d96 PHUIBadgeMiniView
Summary: Mini teeny little badges. With Timeline integration.

Test Plan:
Made some, UIExamples.

{F603564}

{F603565}

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13620
2015-07-10 10:49:28 -07:00
Chad Little
26faa8f1f6 PHUIBadgeView
Summary: Resonable sketchout of a "Badge" UI for Profiles/Projects/Achievements.

Test Plan:
weee

{F602729}

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T7992

Differential Revision: https://secure.phabricator.com/D13615
2015-07-09 15:12:11 -07:00
epriestley
2f2d58049f Fix "au4tocomplete" typo
Summary: Fixes T8815.

Test Plan: Page no longer fatals.

Reviewers: chad, joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Maniphest Tasks: T8815

Differential Revision: https://secure.phabricator.com/D13617
2015-07-09 15:07:58 -07:00
epriestley
e8f063de25 Modularize Herald Diffusion pre-commit content fields
Summary: Ref T8726. The gruntwork part of this is finally over.

Test Plan:
  - Made a huge rule with every field.
  - Applied migration.
  - Verified the rule was still the same.
  - Pushed a bunch of commits and verified transcripts.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8726

Differential Revision: https://secure.phabricator.com/D13601
2015-07-08 12:26:57 -07:00
epriestley
f9134fc331 Modularize all Herald pre-commit ref fields
Summary: Ref T8726. Just (pre-commit content) one more left.

Test Plan:
  - Created a big rule with every field.
  - Migrated it.
  - Verified the rule was still the same.
  - Pushed a bunch of changes and reviewed the transcripts.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8726

Differential Revision: https://secure.phabricator.com/D13600
2015-07-08 12:26:00 -07:00
epriestley
00b98eca54 Modularize all DifferentialRevision fields
Summary: Ref T8726. Make all the DifferentialRevision stuff modular.

Test Plan:
  - Created a rule with all fields.
  - Ran upgrade.
  - Saw all fields preserved with new modular versions.
  - Used test console to run rule with all fields, verified field values as broadly sensible.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8726

Differential Revision: https://secure.phabricator.com/D13598
2015-07-08 12:25:48 -07:00
epriestley
c013108675 Modernize all Herald DifferentialDiff fields
Summary: Ref T8726. This deals with all the Differential diff fields, same deal as previous changes.

Test Plan:
  - Wrote a rule with every field.
  - Migrated it.
  - Saw the same rule working.
  - Rigged the hell out of transcripts (diffs normally do not generate transcripts, because the only action is "block" and they don't exist yet when Herald runs).
  - Verified that all fields looked sensible in the transcript.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8726

Differential Revision: https://secure.phabricator.com/D13590
2015-07-08 12:25:38 -07:00
epriestley
ae81f86a67 Fix some Releeph jankiness in interacting with the redesign
Summary: Releeph does some really old sketchy stuff in result rendering. Modernize it, remove the holdover/oldschool interface (these were the last two implementors) and make errors a little softer.

Test Plan: Viewed Releeph products and branches.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D13604
2015-07-08 08:10:58 -07:00
epriestley
50491d2057 Use standard project rendering in Diffusion
Summary: Fixes T8791.

Test Plan: {F599915}

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T8791

Differential Revision: https://secure.phabricator.com/D13603
2015-07-08 07:00:17 -07:00
Joshua Spence
0036670329 Remove remaining arcanist project code
Summary: Fixes T7604. This is the big scary change which drops the "arcanist project" fields from the database permanently.

Test Plan:
`grep`ped for the following to ensure that I had found all remaining references:

  - `/arcanistProject/i`
  - `/arcanist_project/i`
  - `/projectName/i`
  - `/project_name/i`
  - `/project_id/i`

WARNING: Wait at least one month before landing this.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T7604

Differential Revision: https://secure.phabricator.com/D12899
2015-07-08 19:37:28 +10:00
Jason C. McDonald
980f22d97d Fixed ENRAGE typo. :)
Summary: "Enrage in Deliberations" button on Slowvote should say "Engage in Deliberations".

Test Plan: Make sure the button says the right thing now.

Reviewers: chad, #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13591
2015-07-08 00:17:37 -07:00
epriestley
e587dbe9da Clean up some old "www.phabricator.com" references
Summary: We've decomissioned this host.

Test Plan: `git grep www.phabricator.com`

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D13585
2015-07-07 13:35:57 -07:00
epriestley
64611e9dc6 Fix issue with almanac service type map keying
Summary: Ref T8780. I think this fixes the issue.

Test Plan: @chad

Reviewers: chad

Reviewed By: chad

Subscribers: chad, epriestley

Maniphest Tasks: T8780

Differential Revision: https://secure.phabricator.com/D13584
2015-07-07 13:21:04 -07:00
epriestley
9979952e71 Refine "invalid cursor" exception to have a little more information
Summary: Ref T8780.

Test Plan: See @chad.

Reviewers: chad

Reviewed By: chad

Subscribers: chad, epriestley

Maniphest Tasks: T8780

Differential Revision: https://secure.phabricator.com/D13583
2015-07-07 12:52:12 -07:00
epriestley
308f60a7cd Clear "X awarded a token to event Y" stories when visiting event page
Summary: These detail pages don't have a "pageObjects" configuration, so we don't clear, e.g., token stories correctly when users load them.

Test Plan: Will clear a token story in production.

Reviewers: btrahan, lpriestley, chad

Reviewed By: chad

Subscribers: chad, epriestley

Differential Revision: https://secure.phabricator.com/D13582
2015-07-07 12:06:28 -07:00
epriestley
98ac0a022c Modularize all Diffusion commit Herald fields
Summary: Ref T8726.

Test Plan:
Created a giant rule with every commit field:

{F594686}

Ran the upgrade, got the same rule with new fields:

{F594688}

Used "Test Console" to run transcripts, saw all the fields populate correctly.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8726

Differential Revision: https://secure.phabricator.com/D13567
2015-07-07 11:53:17 -07:00
epriestley
1a001ca033 Render ApplicationSearch errors correctly
Summary:
Fixes T8774. When an ApplicationSearch page returned an error (e.g., using a "viewer()" query while logged out), we would try to add action links to a box without a header. Instead:

  - If a box has no header, but has show/hide actions, just create an empty header so the view renders. This is a little silly looking but does what the caller asks.
  - Always set the title on the result box, so we get a header.

Test Plan: Did an invalid (logged out, with viewer()) search. Did a valid search.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T8774

Differential Revision: https://secure.phabricator.com/D13576
2015-07-07 11:52:06 -07:00
Aviv Eyal
99fd5e99ef Update symbols docs
Summary: Update manual to reflect T7984 and T8302.

Test Plan: Not many new red squigly lines.

Reviewers: joshuaspence, epriestley, #blessed_reviewers

Reviewed By: joshuaspence, epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13551
2015-07-07 06:22:49 -07:00
epriestley
b36d4025cb Fix a typo in the new "ApplicationEmailHeraldField"
Summary: This rule isn't quite right.

Test Plan: Shipped email in with a rule in effect, saw correct value in transcript.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D13578
2015-07-07 06:22:19 -07:00
Joshua Spence
0ffc7a8ab6 Add a trivial test case for HeraldField
Summary: Adds a trivial test case to ensure that `HeraldField` subclasses are properly implemented.

Test Plan: `arc unit`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13577
2015-07-07 23:05:03 +10:00
Joshua Spence
12a088d8b7 Fix a broken class reference
Summary: This was broken in D13374. Also rearranged a few classes.

Test Plan: `arc lint`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13575
2015-07-07 22:53:13 +10:00
Joshua Spence
a1c46d2586 Minor linter and stylistic fixes
Summary: Self-explanatory.

Test Plan: `arc lint`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13574
2015-07-07 22:52:59 +10:00
Joshua Spence
f695dcea9e Use PhutilClassMapQuery
Summary: Use `PhutilClassMapQuery` where appropriate.

Test Plan: Browsed around the UI to verify things seemed somewhat working.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13429
2015-07-07 22:51:57 +10:00
Mihir Kedia
6a3c1ba05c Fix bin/lipsum
Summary:
- Set a default edit policy to match view policy for projects
- It seems like initializeNew* is a better init function than new Phabricator*,
  so ported two classes to use it and spot-checked the others (this also fixed
  a fatal.)
- Other minor bugs

Test Plan: Ran lipsum for a while without any fatals

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, jhurwitz, Korvin

Differential Revision: https://secure.phabricator.com/D13559
2015-07-07 05:33:03 -07:00
Chad Little
6d404c8219 Link to Diffusion for Ubuntu/Red Hat install scripts
Summary: Fixes T8751, Swaps out links to Diffusion. Also upped font size on Document monospace.

Test Plan: Rebuild Diviner docs, click on new links.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8751

Differential Revision: https://secure.phabricator.com/D13566
2015-07-06 14:17:11 -07:00
epriestley
68de3dae9a Modularize all remaining Phriction Herald fields
Summary: Ref T8726.

Test Plan:
  - Created a rule using all the fields.
  - Updated documents, saw rule apply, reviewed transcript.
  - Migrated stuff.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: eadler, epriestley

Maniphest Tasks: T8726

Differential Revision: https://secure.phabricator.com/D13514
2015-07-06 13:17:50 -07:00
epriestley
415e4d4cc1 Modularize all remaining Pholio Herald fields
Summary: Ref T8726. Use modular fields for the Pholio adapter.

Test Plan:
  - Created rule using all the old fields.
  - Migrated, saw upgrade apply correctly.
  - Created mock, reviewed transcript.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: eadler, epriestley

Maniphest Tasks: T8726

Differential Revision: https://secure.phabricator.com/D13513
2015-07-06 13:17:33 -07:00
epriestley
83c0fda280 Modularize all remaining Maniphest Herald fields
Summary:
Ref T8726. The only notable bit here is that the "body" / "title" fields (which are currently shared across a bunch of types) are getting split into application variants.

Among other things, this will let us label the field "Commit message" for commits, for example.

Test Plan:
  - Created a rule using all four fields.
  - Applied patch, saw rule break ("unknown field").
  - Ran storage upgrade, saw rule fix itself in the migration.
  - Edited tasks, triggered rule, viewed transcripts.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: eadler, joshuaspence, epriestley

Maniphest Tasks: T8726

Differential Revision: https://secure.phabricator.com/D13501
2015-07-06 13:17:14 -07:00
epriestley
c02c83108d Modularize Herald task status/priority fields
Summary: Ref T8726. These are a bit involved because they have custom rendering and editor values.

Test Plan: Created new rule using these fields, edited tasks to trigger them, viewed transcripts.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: eadler, joshuaspence, epriestley

Maniphest Tasks: T8726

Differential Revision: https://secure.phabricator.com/D13500
2015-07-06 13:17:01 -07:00
epriestley
9f220995b2 Modularize Application Email Herald field
Summary:
Ref T8726. There's no interface we can check for this, so the adapter needs to opt in.

Also fix a spelling mistake.

Test Plan: Created rules with "Application Email" fields.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8726

Differential Revision: https://secure.phabricator.com/D13499
2015-07-06 13:16:26 -07:00
epriestley
bfbc0e638d Remove vestigal "tags" stuff from Herald
Summary: Ref T8726. No clue what this was.

Test Plan: Grepped for usage, found none.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: eadler, epriestley

Maniphest Tasks: T8726

Differential Revision: https://secure.phabricator.com/D13498
2015-07-06 13:16:14 -07:00
epriestley
4c23d5cfae Make Herald custom field integration modular
Summary: Ref T8726. The existing implementation is largely made redundant by the newer modular implementation.

Test Plan: Created a custom field rule, set custom field to various values until it matched, saw effect and proper transcripts.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: eadler, joshuaspence, epriestley

Maniphest Tasks: T8726

Differential Revision: https://secure.phabricator.com/D13497
2015-07-06 13:15:58 -07:00
epriestley
59c294457f Modularize more Herald fields
Summary: Ref T8726. Continue making Herald fields more modular than they currently are.

Test Plan:
  - Created a rule using all the affected fields.
  - Ran the rule.
  - Saw reasonable object field values.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: eadler, joshuaspence, epriestley

Maniphest Tasks: T8726

Differential Revision: https://secure.phabricator.com/D13495
2015-07-06 13:15:47 -07:00
epriestley
b266412f3e Begin modularizing Herald fields
Summary:
Ref T8726. This lays groundwork for modularizing Herald fields and modularizes the "Content source" field.

This doesn't touch conditions or values yet.

Test Plan: Created a rule with a "content source" field, created a new task, saw rule apply.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: eadler, joshuaspence, epriestley

Maniphest Tasks: T8726

Differential Revision: https://secure.phabricator.com/D13488
2015-07-06 13:15:33 -07:00
epriestley
db6b729cf9 Tailor the "No Access" message for logged-out users of Spaces
Summary: Fixes T8759.

Test Plan: {F593519}

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T8759

Differential Revision: https://secure.phabricator.com/D13560
2015-07-06 09:20:29 -07:00
Joshua Spence
f2435fd1d0 Return $this from setter methods
Summary: Return `$this` from setter methods for consistency. I started writing a [[https://secure.phabricator.com/differential/diff/32506/ | linter rule]] to detect this, but I don't think it is trivial to do this properly.

Test Plan: Eyeball it.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13422
2015-07-06 22:53:43 +10:00
Joshua Spence
acb1eb81cc Move some PhabricatorSearchField subclasses
Summary: Move some `PhabricatorSearchField` subclasses to be adjacent to the application to which they belong. This seems generally better to me than lumping them all together in the `src/applications/search/field/` directory. I was also wondering if it makes sense to rename these subclasses as `PhabricatorXSearchField` rather than `PhabricatorSearchXField` (as per T5655), but wasn't really sure if these objects are meant to be search-fields, or just fields belonging to the #search application.

Test Plan: N/A.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13374
2015-07-06 22:52:05 +10:00
Chad Little
0cd5031ada Add hidpi media query for mozilla browsers
Summary: Modern mozilla browsers use min-resolution.

Test Plan: Regernate sprites, use site in Firefox, see correct header image.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13555
2015-07-05 12:24:57 -07:00
epriestley
7cc8a73d1e Merge 2015 Redesign ("redesign-2015" -> "master")
For discussion, see T8549.
2015-07-05 05:16:09 -07:00
epriestley
7c6320d211 Fix an issue with the Spaces roadblock
If a user has access to exactly one space, the "exist" call is wrong.

Auditors: btrahan
2015-07-05 04:35:34 -07:00
Chad Little
9615f0a629 [Redesign] Fix Pager on Phriction History
Summary: Ref T8099, Fixes layout of the Pager, all adds distinction to the current pager button.

Test Plan: Edit a Phriction document 100 times. Get a pager.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13549
2015-07-04 13:17:35 -07:00
Chad Little
54194acd39 [Redesign] Set a max-width on Graphviz
Summary: Ref T8750, Adds a maxwidth class for Graphviz images.

Test Plan: Generate a Graphviz image, really big, see it scale to the viewport.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8750

Differential Revision: https://secure.phabricator.com/D13548
2015-07-04 13:17:12 -07:00
epriestley
fe4bcde59e Merge branch 'master' into redesign-2015 2015-07-03 13:05:16 -07:00
epriestley
e8a213512a Unprototype Spaces
Summary: Ref T8449. Also, fix annoying inconsistency between "Spaces" and "spaces": "Spaces" is the application, the things it creates are just "spaces", similar to how "Maniphest" creates "tasks".

Test Plan: Mostly reading. Viewed `/applications/`.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: eadler, epriestley

Maniphest Tasks: T8449

Differential Revision: https://secure.phabricator.com/D13547
2015-07-03 13:04:14 -07:00
epriestley
bcfbc5cfbf Remove CHECKREQUEST event
Summary: Fixes T8749.

Test Plan: `grep`

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8749

Differential Revision: https://secure.phabricator.com/D13546
2015-07-03 13:03:49 -07:00
epriestley
bc22413fa7 When an install has spaces but a user has no access, roadblock them
Summary:
Ref T8449. If a user doesn't have access to any spaces, most applications just don't work, and they fail in confusing ways.

Just lock users out of everything explicitly up front with a clear message instead of letting them stumble into a big broken mess.

Test Plan: Locked a user out of all spaces, saw error to that effect.

Reviewers: btrahan, eadler

Reviewed By: eadler

Subscribers: eadler, epriestley

Maniphest Tasks: T8449

Differential Revision: https://secure.phabricator.com/D13545
2015-07-03 13:03:33 -07:00
epriestley
92b73fed6b Don't apply space constraints to omnipotent-viewer queries
Summary:
Fixes T8743. Fixes T8746. When running queries with the omnipotent viewer and no explicit space constraints, don't add implicit space constraints.

This prevents us from fataling when running older pre-space migrations and trying to load space-aware objects.

Test Plan: Manually ran migrations with `--trace`, verified no `WHERE spacePHID = ...`.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: eadler, epriestley

Maniphest Tasks: T8743, T8746

Differential Revision: https://secure.phabricator.com/D13542
2015-07-03 10:59:48 -07:00
epriestley
4034c24b43 Fix redesign branch repository controller for Subversion
Summary: We access this variable, but may never initialize it.

Test Plan: Viewed SVN repository.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D13544
2015-07-03 10:19:43 -07:00
epriestley
a7cfc58353 Explicitly document that lists can start at a number other than 1
Summary: Fixes T8584.

Test Plan: {F582256}

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T8584

Differential Revision: https://secure.phabricator.com/D13543
2015-07-03 10:19:32 -07:00
Chad Little
18e1bd2e45 [Redesign] Clean up <select>
Summary: Ref T8099, Ref T8449. Adds a min width to selects (can't think of anything this breaks in ui) and adds space around space select.

Test Plan: Review a number of selects in different UIs, forms, dialogs.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8099, T8449

Differential Revision: https://secure.phabricator.com/D13523
2015-07-02 14:25:45 -07:00
epriestley
1f4cd900f3 Fix "Add Project" in bulk editor
Summary: Fixes T8740. This data is required for now, and didn't get brought across properly from the original standalone foreground editor.

Test Plan: Did a bulk editor "add project", got a clean result.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8740

Differential Revision: https://secure.phabricator.com/D13533
2015-07-02 14:24:15 -07:00
epriestley
5ce433074c Fix a couple of minor Nuance / transaction publisher issues
Summary: I got a couple of tasks stuck in my local queue a while ago when touching Nuance, fix a couple minor issues to clean them up.

Test Plan: Ran tasks in queue, got clean results.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D13532
2015-07-02 14:24:07 -07:00
epriestley
9623f9b5cf Allow unit test duration to be submitted as a float or an int
Summary: Fixes T8736. It's OK for duration to be something that comes out of JSON as an int, like `1`.

Test Plan: Will make @hach-que verify.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley, hach-que

Maniphest Tasks: T8736

Differential Revision: https://secure.phabricator.com/D13531
2015-07-02 14:24:00 -07:00
Chad Little
9478af1845 [Redesign] Clean up Config Issue UI
Summary: Ref T8099, Missed a few various edge cases here. Cleans up the 'next' UI.

Test Plan: Review a current setup issue, then ignore it.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13529
2015-07-02 10:31:46 -07:00
Chad Little
997ba9ddc5 [Redesign] Update Phame UI
Summary: Ref T8099, Updates Phame to be more ObjectBox-y

Test Plan: Review Phame in random ways

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13520
2015-07-01 16:06:47 -07:00
epriestley
10ba64e892 Merge branch 'master' into redesign-2015 2015-07-01 15:07:16 -07:00
epriestley
6a996d76fd Remove "feed.public" and sort out feed policies
Summary:
Ref T6817. Fixes T8731. On the old `secure` host, `feed.public` was set to `true`. I didn't bring the option over, which caused the secondary issue in T8731.

Specifically, when `feed.public` is off, a logged-out user looking at feed can't see //any// stories, so they query all of feed until they hit the time limit.

To fix this immediately, just use the most open policy, which is basically equivalent but always correct.

To fix this more thoroughly:

  - Remove `feed.public`, which violates policies and has been slated for removal for a while (see T6817).
  - Clean up policy handling.

Test Plan:
  - As a logged-out user, viewed feed on a public install with `feed.public` off; no longer saw all stories get queried + no feed shown.
  - Grepped for `feed.public`.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: chad, epriestley

Maniphest Tasks: T6817, T8731

Differential Revision: https://secure.phabricator.com/D13518
2015-07-01 15:06:55 -07:00
epriestley
7f67bd8aff Fix some pht-strings
Summary: This correct some bad strings for translations

Test Plan:
merge similar stings
removes some word wraps

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8700

Differential Revision: https://secure.phabricator.com/D13464
2015-07-01 14:54:43 -07:00
epriestley
f7edabbc6a Merge branch 'master' into redesign-2015 2015-07-01 14:23:01 -07:00
epriestley
d5e4d96086 Don't put objects into the query workspace by default
Summary:
Ref T8731. I think the issue is that some `ProjectQuery` (without needImages()) populates the query workspace, then the "real" one hits the workspace.

Instead, only populate the workspace from ObjectQuery, so we know that objects in the workspace always have whatever ObjectQuery attaches to them.

Test Plan: Verified this didn't destroy the cache hitrate, but I can't repro the original issue locally per se.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: chad, epriestley

Maniphest Tasks: T8731

Differential Revision: https://secure.phabricator.com/D13516
2015-07-01 14:22:48 -07:00
Chad Little
66afb92fb3 [Redesign] Add color to diff Table of Contents
Summary: Ref T8099. I think these colors make sense, but if any seem wrong, lmk. Colors the type of file change.

Test Plan: Test a few diffs locally, read carefully, ask epriestley.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13502
2015-07-01 11:33:31 -07:00
Chad Little
3b755115c2 [Redesgin] Misc Inline Comment tweaks
Summary: Ref T8099. Better alignment with TODO and Ghost Icons.

Test Plan: Test more states of inline comments, ghosts, todos, unsubmitted, etc.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13515
2015-07-01 11:32:32 -07:00
Chad Little
70d5e82253 [Redesign] Clean up borders on ObjectItems
Summary: Ref T8099. A wild border appears!

Test Plan: Remove border when `barColor` is present. Test workboards and Maniphest.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13494
2015-06-30 15:24:07 -07:00
Chad Little
f2f168cceb [Redesign] Use status icons in Maniphest task list
Summary: Ref T8099, Fixes T8339. This lets us pull in the status icon and display in lists and object headers.

Test Plan: Look at a list of open and closed tasks, see icons match state (duplicate, spite, defaults).

Reviewers: epriestley, btrahan

Reviewed By: btrahan

Subscribers: epriestley, Korvin

Maniphest Tasks: T8099, T8339

Differential Revision: https://secure.phabricator.com/D13490
2015-06-30 13:42:27 -07:00
lkassianik
28e0af5a62 Commenting on instances of a recurring event should create a new event with its own comments
Summary: Closes T8696, Commenting on instances of a recurring event should create a new event with its own comments

Test Plan: Open recurring event instance (not exception), should see no timeline, leave a comment, an exception to event should be created.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8696

Differential Revision: https://secure.phabricator.com/D13481
2015-06-30 11:47:53 -07:00
epriestley
09d392fdbb Merge branch 'master' into redesign-2015 2015-06-30 11:42:42 -07:00
epriestley
1bb306348c Fix infinite loop in renderAccessDenied()
Summary:
Fixes T8727. When I added `setParentQuery()`, I increased the cache hit rate but also accidentally propagated policy exception settings.

Instead, make the policy exception beahvior explicit: no exceptions should be raised when querying handles.

Test Plan: Will test production.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8727

Differential Revision: https://secure.phabricator.com/D13489
2015-06-30 11:42:31 -07:00
epriestley
4b298c1c44 Merge branch 'master' into redesign-2015 2015-06-30 11:20:16 -07:00
epriestley
a8f5e10b79 Cache remarkup engines in Feed
Summary: Ref T8631. This method uses cached settings.

Test Plan: Saw 40% performance improvement locally (reduced 200ms of 500ms).

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8631

Differential Revision: https://secure.phabricator.com/D13480
2015-06-30 11:19:58 -07:00
epriestley
4adaf53bf0 Dramatically increase cache hit rate for feed
Summary:
Ref T8631. The query plan for feed stories is really bad right now, because we miss caches we should be hitting:

  - The workspace cache is stored at each query, so adjacent queries can't benefit from the cache (only subqueries). Feed has primarily sibling queries.
    - There is no technical reason to do this. Store the workspace cache on the root query, so sibling queries can hit it.
  - In `ObjectQuery`, we check the workspace once, then load all the PHIDs. When the PHIDs are a mixture of transactions and objects, we always miss the workspace and load the objects twice.
    - Instead, check the workspace after loading each type of object.
  - `HandleQuery` does not set itself as the parent query for `ObjectQuery`, so handles never hit the workspace cache.
    - Pass it, so they can hit the workspace cache.
  - Feed's weird `PhabricatorFeedStory::loadAllFromRows()` method does not specify a parent query on its object/handle queries.
    - Just declare the object query to be the "root" query until this eventually gets cleaned up.

Test Plan: Saw queries for each object drop from 4-6x to 1x in `/feed/`.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8631

Differential Revision: https://secure.phabricator.com/D13479
2015-06-30 11:19:41 -07:00
epriestley
0ef1d4bc17 Don't try to load profile images for projects with no profile image
Summary: Ref T8631. Projects may not have a profile image PHID; don't try to load it if they don't.

Test Plan: Saw `WHERE phid IN ('')` query stop happening on a local feed story page.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8631

Differential Revision: https://secure.phabricator.com/D13476
2015-06-30 11:19:24 -07:00
epriestley
594690ade9 Don't require missing fields be present in order to subscribe to an object
Summary: Fixes T8719. It's fine to subscribe to objects that don't have all their required fields filled in.

Test Plan: Subscribed/unsubscribed from an object.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8719

Differential Revision: https://secure.phabricator.com/D13484
2015-06-30 11:19:16 -07:00
Chad Little
2c922ca230 [Redesign] Fix Maniphest subpriority editing
Summary: Ref T8099, Fixes T8338. This allows re-ordering of Maniphest Tasks in the redesign. Somehow seems more fragile, but I couldn't break anything with it.

Test Plan: Try ordering into first position after header, last position, changing priority outright, everything I can drag.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8099, T8338

Differential Revision: https://secure.phabricator.com/D13487
2015-06-30 09:37:12 -07:00
epriestley
9eda21451a Let PhabricatorPlatformSite catch unconfigured requests
Summary: Fix T8717. If the install didn't configure base-uri, assume they want Phabricator; We'll later show the setup warning about it.

Test Plan: Set base-uri to something else, see short error. Delete it, see Phabricator.

Reviewers: laomoi, #blessed_reviewers, epriestley

Reviewed By: laomoi, #blessed_reviewers, epriestley

Subscribers: laomoi, epriestley, Korvin

Maniphest Tasks: T8717

Differential Revision: https://secure.phabricator.com/D13482
2015-06-30 07:24:06 -07:00
epriestley
12c6e63d5b Don't put the entire corpus into project edit feed stories
Summary: Fixes T8723. We override timeline titles for these fields to shorten them, but the parent class shows full values for feed edits, which can lead to screen-sized notifications.

Test Plan: Edited a project, saw a reasonably-sized notification for it.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T8723

Differential Revision: https://secure.phabricator.com/D13485
2015-06-30 06:05:30 -07:00
Chad Little
92c97b6a4e [Redesign] Fix Spaces Policy Dialog
Summary: Ref T8099, Missed this when testing Spaces. Adds proper list formatting.

Test Plan: Review Policy when object is higher or lower than default.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13478
2015-06-29 15:22:36 -07:00
Chad Little
6fef37ddb5 [Redesign] Update Inline Comment UI
Summary: Ref T8099, Simplifies the button bar with a `borderless` option and implements in Differential Inline Commenting.

Test Plan:
Review new and old comments, submitted, unsubmitted, ghosts, done.

{F562765}

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13475
2015-06-29 14:42:29 -07:00
epriestley
262be61ee5 Merge branch 'master' into redesign-2015 2015-06-29 14:07:58 -07:00
epriestley
6b7183a762 Modularize Aphront "sites"
Summary:
Fixes T5702. The path here is long and windy:

  - I want to move `blog.phacility.com` to the new `secure` host.
  - That host has `security.require-https` set, which I want to keep set (before, this was handled in a sort of hacky way at the nginx/preamble level, but I've cleaned up everything else now).
  - Currently, that setting forces blogs to HTTPS too, which won't work.
  - To let blogs be individually configurable, we need to either modularize site config or make things hackier.
  - Modularize rather than increasing hackiness.
  - Also add a little "modules" panel in Config. See T6859. This feels like a reasonable middle ground between putting this stuff in Applications and burying it in `bin/somewhere`.

Test Plan:
  - Visited normal site.
  - Visited phame on-domain site.
  - Visited phame off-domain site.
  - Viewed static resources.

{F561897}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5702

Differential Revision: https://secure.phabricator.com/D13474
2015-06-29 14:04:48 -07:00
Chad Little
626c7bc906 [Redesign] Clean up AphrontDialog
Summary: Ref T8099, Cleans up UI issues, adds `appendList` and renders lists and paragraphs with Remarkup UI.

Test Plan: Test Policy Dialogs, other various dialogs.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13463
2015-06-29 12:49:21 -07:00
Chad Little
10dd27cac9 [Redesign] Update Workboards
Summary: Ref T8099, Cleans up Workboard UI, fixes button icon spacing

Test Plan: Review workboards on desktop, mobile

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13473
2015-06-29 12:31:49 -07:00
Chad Little
08ec0f1704 [Redesign] Remove AphrontTable restriction on Search Engine
Summary: Ref T8099, functionally I prefer to be able to set anything 'table-like' with `setTable` for design consistency. This looses the restriction and did some light grepping for other missed cases.

Test Plan: Test new UI, grep for other missing cases.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13471
2015-06-29 12:28:55 -07:00
Bob Trahan
12b966f44e Spaces + Diffusion - make creating a new repository work again
Summary: Fixes T8702. Needed to teach these controls how to serialize / unserialize themselves in that they are storing two values (policy phid + space phid) nowadays

Test Plan: made a new repo successfully with policy as described in T8702. Also edited policy successfully.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8702

Differential Revision: https://secure.phabricator.com/D13472
2015-06-29 11:55:52 -07:00
epriestley
b39f5d651c Modernize transaction comment editor
Summary: Fixes T8703. The URI handling here was a little unusual.

Test Plan:
  - Edited and deleted comments in several applications, including Macro.
  - As an admin, deleted others' comments.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8703

Differential Revision: https://secure.phabricator.com/D13469
2015-06-29 11:30:27 -07:00
epriestley
e576ef4bfe Fix Push Log rendering of query results in redesign
Summary: Fixes T8698. This isn't actually a table.

Test Plan: Viewed push log, no more fatal.

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T8698

Differential Revision: https://secure.phabricator.com/D13468
2015-06-29 06:50:35 -07:00
epriestley
1e3c49086e Merge branch 'master' into redesign-2015 2015-06-28 07:41:46 -07:00
epriestley
ae00d08b88 Fix GC threshold for mail to be 90 days instead of 0 seconds
See D13408.
2015-06-28 07:39:36 -07:00
lkassianik
76e69f0be5 Events should offer Spaces as the view policy options
Summary: Ref T8687, Events should offer Spaces as the view policy options

Test Plan: Create event, choose default Space, save, edit, choose different Space, save, new policy should be reflected on Event.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T8687

Differential Revision: https://secure.phabricator.com/D13459
2015-06-27 10:26:24 -07:00
lkassianik
109fa94011 Popup datepicker should respect user preferred week start day
Summary: Fixes T8605, Popup datepicker should respect user preferred week start day

Test Plan: Edit event, open datepicker, calendar weeks should start on Sunday by default, and another day, if specified in User Preferences.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8605

Differential Revision: https://secure.phabricator.com/D13419
2015-06-27 10:06:48 -07:00
Eitan Adler
2536febed3 Remove duplicated duplicated words
Test Plan: eyeball it

Reviewers: joshuaspence, #blessed_reviewers, epriestley

Reviewed By: joshuaspence, #blessed_reviewers, epriestley

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D13462
2015-06-27 08:43:44 -07:00
epriestley
b9abb277ca Allow the omnipotent viewer to see objects in uninstalled applications
Particularly, in the cluster, it needs to be able to see Almanac services.
This permission may be conflated with the logged-out viewer, since neither
have PHIDs.

Auditors: btrahan
2015-06-27 04:26:38 -07:00
epriestley
7c3a7f47cd Fix Alamanc service paging
Summary: Ref T8686. This method has the wrong name and calls a nonexistent method on `$service`.

Test Plan: Set page size to 5, paged locally, hit error, applied changes, got clean paging.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8686

Differential Revision: https://secure.phabricator.com/D13460
2015-06-26 15:45:43 -07:00
lkassianik
b1a843b21a Set event policies like other event properties
Summary: Closes T8028, Set event policies like other event properties

Test Plan: Create and edit events, make sure edit and view policies get populated and saved correctly.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T8028

Differential Revision: https://secure.phabricator.com/D13415
2015-06-26 10:41:26 -07:00
Chad Little
1c84d2719c [Redesign] Larger Font PostProcessor
Summary: Ref T8099, Ref T8614. Reasonable attempt at a larger font size PostProcessor, will need additional UI cleanup (places where we fix height) but overall very decent.

Test Plan: Use lots of the UI elements with new font sizes.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8099, T8614

Differential Revision: https://secure.phabricator.com/D13457
2015-06-26 09:33:03 -07:00
epriestley
cee1835bb0 Don't try to strlen() an array
This is definitely an array now.

Auditors: joshuaspence
2015-06-25 16:18:16 -07:00
Bob Trahan
0094343556 Conpherence - move crumb-based room edit to widget; other cleanup
Summary:
We use a non-standard way to invoke the edit dialogue (title, picture, etc) via the crumb. Stop doing that and instead use the widget technology to invoke the dialogue.

This requires making the widget handling code a bit more nuanced as nothing has wanted to pop a dialogue before. I plan to clean this up as I add the action to "Mark as Favorite" to the UI. In particular, I want to stop rendering the un-used DOM and make a workflow-based widget action a property as opposed to something hardcoded. This may be too ambitious depending on how similar these workflows are....

This also updates the ThreadSearchEngine to be a bit more modern. Additionally, go through making some user-facing strings a bit more sensical.

Test Plan: changed settings from conpherence full and durable column successfully.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D13449
2015-06-25 15:59:52 -07:00
Chad Little
22c8397013 [Redesign] Tweak bluebackground to be more useful
Summary: Ref T8099, Makes bluebackground more useful, add to hovercards, documents

Test Plan: Hovercards, Phriction

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13450
2015-06-25 15:58:00 -07:00
epriestley
5f84f14eab Merge branch 'master' into redesign-2015 2015-06-25 15:55:04 -07:00
epriestley
14229042a2 Do all push mail in a bunch at the end, too
Summary: Same deal as transaction mail. Improves robustness.

Test Plan: Pushed stuff.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D13451
2015-06-25 15:54:56 -07:00
lkassianik
42fd13e793 Set display mode for Upcoming Events builtin query so that no $max_range is set on the query
Summary: Fixes T8675, Set display mode for Upcoming Events builtin query so that no `$max_range` is set on the query

Test Plan: Open Upcoming Events builtin query, max events returned should be size of the page (100 objects)

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T8675

Differential Revision: https://secure.phabricator.com/D13447
2015-06-25 14:40:06 -07:00
epriestley
26a007f879 Merge branch 'master' into redesign-2015 2015-06-25 13:59:08 -07:00
epriestley
6cfbf481a5 Provide more detailed guidance on upgrading Phabricator and the "stable" branch
Summary: Maintaining "stable" is worthwhile now that we're running the cluster, so document its existence.

Test Plan: Reading.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D13446
2015-06-25 13:57:19 -07:00
Bob Trahan
541e3d9e1c Conpherence - remove room vs message distinction as far as users are concerned
Summary:
Ref T8488, T8469, T8485.

This is done in regards to T8488 as far as users are concerned. There's still some classes, and etc. that should be re-named probably. T8469 and T8485 are basically moot now though.

Rather than having "Send Message" exposed, just expose "Create Room". Users get the full form. One change is "title" is now required.

This diff removes the concept of "isRoom" entirely.

Test Plan: Verifed a user with no conpherences had sensible data in both column view and full conpherence view. Created rooms with various policies and things worked well.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: chad, epriestley, Korvin

Maniphest Tasks: T8469, T8485, T8488

Differential Revision: https://secure.phabricator.com/D13351
2015-06-25 13:14:20 -07:00
Chad Little
aa22a578d0 [Redesign] Clean up Slowvote
Summary: Ref T8099, A cleaner, more standard UI for Slowvotes. Because Slowvote is important.

Test Plan: Test a number of poll layouts and embeds.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13445
2015-06-25 12:17:33 -07:00
Chad Little
e053cdd903 [Redesign] Update PHUIRemarkupPreviewPanel
Summary: Ref T8099, Adds DocumentView support, and cleans up headers.

Test Plan: Review preview in Legalpad, Phriction, and Maniphest.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13442
2015-06-25 10:17:22 -07:00
epriestley
14a395ed8e Merge branch 'master' into redesign-2015 2015-06-25 10:06:50 -07:00
epriestley
db1bc7fd7f Carefully avoid the harbormaster/differential race
Summary: Ref T8650. This should stop the problem, but isn't a root cause fix. See discussion on the task.

Test Plan: Made some local diffs, but this is a bit hard to reproduce reliably.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8650

Differential Revision: https://secure.phabricator.com/D13441
2015-06-25 10:05:37 -07:00
epriestley
5f99d79c5d Fix type spec for 'coverage'
Summary: Ref T8670. The spec for "coverage" is incorrect, it's a map of paths to coverage information.

Test Plan: See next diff.

Reviewers: joshuaspence, btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8670

Differential Revision: https://secure.phabricator.com/D13435
2015-06-25 10:05:21 -07:00
epriestley
1192f309b0 Fix an issue with handling of null feed URIs
Summary: Ref T8658. Caught this in the logs. This value may be set to `null`. Handle that gracefully.

Test Plan: Will check logs.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8658

Differential Revision: https://secure.phabricator.com/D13432
2015-06-25 10:01:24 -07:00
epriestley
8b9428b6da Fix a possible undefined variable
Summary:
I pulled this out of the logs; not sure how anyone hit it, but this controller could bump into an undefined variable here:

```
2015/06/24 22:59:55 [error] 10150#0: *172493 FastCGI sent in stderr: "PHP message: [2015-06-24 22:59:55] EXCEPTION: (RuntimeException) Undefined variable: subscriber_phids at [<phutil>/src/error/PhutilErrorHandler.php:210]
PHP message: arcanist(head=master, ref.master=b697a3b80bdc), phabricator(head=redesign-2015, ref.master=0fd0f171f10f, ref.redesign-2015=1a5f986d73dd), phutil(head=master, ref.master=74c9cb3a266e)
PHP message:   #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer, array) called at [<phabricator>/src/applications/subscriptions/controller/PhabricatorSubscriptionsListController.php:32]
PHP message:   #1 <#2> PhabricatorSubscriptionsListController::processRequest() called at [<phabricator>/src/aphront/AphrontController.php:33]
PHP message:   #2 <#2> AphrontController::handleRequest(AphrontRequest) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:226]
PHP message:   #3 phlog(RuntimeException) called at [<phabricator>/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php:229]
PHP message:   #4 AphrontDefaultApplicationConfiguration::handleException(RuntimeException) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:230]
PHP message:   #5 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:140]
PHP message:   #6 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phabricator>/webroot/index.php:21]" while reading response header from upstream, client: 167.114.156.198, server: , request: "GET /subscriptions/list/phid-wiki-366842d394398204f305/ HTTP/1.1", upstream: "fastcgi://unix:/core/var/pool/fpm.sock:", host: "secure.phabricator.com"
```

Clean things up a bit.

Test Plan: Clicked "6 others" subscriber link on a task with a bunch of subscribers.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D13430
2015-06-25 10:01:05 -07:00
Chad Little
a89483ee5b [Redesign] Swap Slabo for Roboto Slab
Summary: Ref T8099, Moving to Roboto Slab for Document Headers. It's a little less serif-y and fits well with Lato. Also took a pass at cleaning up edge cases in Documents, Diviner, Phriction, Legalpad, and Welcome Screen.

Test Plan: Test Phriction, Diviner, Legalpad, Welcome Screen

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13439
2015-06-25 09:20:51 -07:00
Chad Little
f8755ff8a4 [Redesign] Fix Maniphest closed header tags
Summary: Ref T8099, Fixes padding and spacing when status tags are coming from Maniphest. Also, maybe remove this?

Test Plan: Test closed tasks in Maniphest.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13434
2015-06-25 06:55:24 -07:00
epriestley
190e290d98 Fix Drydock lease list view in redesign branch
Summary: Fixes T8655. This isn't actually a table -- just use `setContent()`.

Test Plan: Loaded leases in redesign-2015.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T8655

Differential Revision: https://secure.phabricator.com/D13431
2015-06-25 06:54:46 -07:00
Bob Trahan
189fb2660a MetaMTA - make sure mail garbage collection also cleans up recipient edges
Summary: Ref T5791. This edge table grows 2+X faster than the corresponding mail table depending on usage. Ergo, lets make sure to clean that up too in the delete code.

Test Plan: careful thought

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T5791

Differential Revision: https://secure.phabricator.com/D13408
2015-06-24 11:44:49 -07:00
epriestley
fcb35a55fd Support Spaces in Diffusion
Summary:
Ref T8493. Diffusion is probably the strongest upstream use case we have for Spaces right now, so I want to get us on it to kick the tires a bit.

Small amount of hackiness around the multi-page form thing but it shouldn't create any problems.

Test Plan:
  - Created a new repo.
  - Edited a repo.
  - Tried invalid edits, saw value preserved.
  - Viewed edit full detail screen, saw space info.
  - Viewed repo detail view, saw space.
  - Viewed repo list view, saw space.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8493

Differential Revision: https://secure.phabricator.com/D13414
2015-06-24 10:56:46 -07:00
Bob Trahan
c1dca8238f MetaMTA - make the new mail app UI a little less bad
Summary: Ref T5791. Makes the result page a little less ugly and adds the time created. Makes the detail page include more useful information about the message.

Test Plan: viewed results page and detail page and they looked better

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T5791

Differential Revision: https://secure.phabricator.com/D13410
2015-06-23 18:30:05 -07:00
lkassianik
8ccd280889 Fixing an overlooked counter
Summary: Fixing an overlooked counter.

Test Plan: Make sure month view daily event lists actually display only 15 events per day

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13411
2015-06-23 17:48:29 -07:00
Eitan Adler
3c7f4e5c5b Remove duplicate duplicate words which are not requires
Summary: Change 'the the' to 'the' where appropriate.

Test Plan: eyeball it

Reviewers: joshuaspence, chad, #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D13412
2015-06-23 17:26:14 -07:00
epriestley
1a5f986d73 Merge branch 'master' into redesign-2015 2015-06-23 17:12:41 -07:00
epriestley
520e70a3cf Fix a bad method call which slipped by
Fixes T8650.
2015-06-23 17:11:59 -07:00
epriestley
729606ba93 Update BulkJob and MetaMTA search engines for redesign-2015 2015-06-23 13:39:27 -07:00
epriestley
075f041bec Merge branch 'master' into redesign-2015 2015-06-23 13:36:47 -07:00
epriestley
3215899925 Execute Maniphest batch edits in the background with a web UI progress bar
Summary:
Ref T8637. This does nothing interesting, just has empty scaffolding for a bulk job queue.

Basic idea is that when you do something like a batch edit in Maniphest, we:

  - Create a BulkJob with all the details.
  - Queue a worker to start the job.
  - Send you to a progress bar page for the job.

In the background:

  - The "start job" worker creates a ton of Task objects, then queues worker tasks to do the work.

In the foreground:

  - Fancy ajax animates the progress bar and it goes wooosh.

In general:

  - Big jobs actually work.
  - Jobs get logged.
  - You can monitor jobs.
  - Terrible junk like T8637 should be much harder to write and much easier to catch and diagnose.

Test Plan:
No interesting code/beahavior yet. Clean `storage adjust`.

{F526411}

Reviewers: chad, btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8637

Differential Revision: https://secure.phabricator.com/D13392
2015-06-23 13:36:16 -07:00
epriestley
716bd4e4b4 Improve lint/unit limit, sort, view all, collapse behaviors
Summary:
Ref T8096. Various tweaks here:

  - Sort result lists by importance (even lint -- "errors first" seems better than "alphabetical by file", I think?).
  - Do sane stuff with display limits.
  - Add a "view all" view.
  - Don't show a huge table of passing tests in Differential.
  - Link to full results.

Test Plan: See screenshots.

Reviewers: chad, btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8096

Differential Revision: https://secure.phabricator.com/D13407
2015-06-23 13:34:25 -07:00
epriestley
9656e6e6b1 Link prominently to Harbormaster Buildables in build result output
Summary: Ref T8096. We don't currently link to the buildable, which I think contributes to Harbormaster feeling a little scattered.

Test Plan: {F528095}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8096

Differential Revision: https://secure.phabricator.com/D13405
2015-06-23 13:33:53 -07:00
epriestley
b074cdeb4c Reduce Lint/Unit rendering duplication
Summary: Ref T8096. No functional changes, just a bit less code.

Test Plan: Viewed some revisions, saw the same stuff as before.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8096

Differential Revision: https://secure.phabricator.com/D13404
2015-06-23 13:33:09 -07:00
Bob Trahan
7e0249d68c MetaMTA - more progress to mail app
Summary:
Ref T5791. This diff adds a "sensitive" flag to `PhabricatorMetaMTAMail`, defaults it to true in the constructor, and then sets it to false in teh application transaction editor. Assumption here is that sensitive emails are basically all the emails that don't flow through the application transaction editor.

This diff also gets a basic "mail view" page up and going.

This diff also fixes a bug writing recipient edges; the actor was being included.

This bug also fixes a querying bug; we shouldn't do the automagic join of $viewer is recipient or $viewer is actor if folks are querying for recipients or actors already. The bug manifested itself as having the "inbox" be inbox + outbox.

Test Plan: viewd list of messages. viewed message detail.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T5791

Differential Revision: https://secure.phabricator.com/D13406
2015-06-23 12:55:44 -07:00
Bob Trahan
dfef8e2f07 MetaMTA - more progress towards a mail application
Summary:
Ref T5791. This diff does a few things...

 - Adds code to write recipients to edges on save
 - Makes Query performance for policy filtering okay-ish
 - Adds a Search Engine for PhabricatorMetaMTAMail
 - Adds "working" List Controller
   - Inbox and Outbox both work
 - Adds stub View Controller

Test Plan: ran `./bin/storage upgrade` and saw my inbox and outbox start getting data. played with application and saw new entries in inbox and outbox

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T5791

Differential Revision: https://secure.phabricator.com/D13397
2015-06-23 11:37:14 -07:00
epriestley
524aa39aa2 Merge branch 'master' into redesign-2015 2015-06-23 10:26:47 -07:00
epriestley
de30e15b7e Make Differential load lint/unit data from Harbormaster
Summary: Fixes T8095. Still needs UI/UX work (see T8096) but this has all the core features now.

Test Plan: Saw Harbormaster lint/unit data as though it was Differential lint-unit data.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8095

Differential Revision: https://secure.phabricator.com/D13401
2015-06-23 10:23:52 -07:00
epriestley
c4eef3dfcb Sketch out unit/lint displaying on builds
Summary: Ref T8096. Show basic lint/unit info on builds. This is still pretty rough.

Test Plan: {F524839}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8096

Differential Revision: https://secure.phabricator.com/D13383
2015-06-23 10:23:36 -07:00
epriestley
c31e25d5ce Smooth out some UI/UX issues in Harbormaster
Summary:
Ref T8096. Fixes a few bugs and glitches.

  - Set build completion time when handling a message.
  - Format duration information in a more human-readable way.
  - Use a table for build variables.
  - Fix up container PHIDs on diffs (a touch hacky, should be OK for now though).

Test Plan: Browsed around the UI.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8096

Differential Revision: https://secure.phabricator.com/D13382
2015-06-23 10:23:35 -07:00
epriestley
41b3f9236a Allow lint and unit results to be reported via harbormaster.sendmessage
Summary:
Ref T8095. When build results are reported for a target, allow them to include unit and lint results.

There is no real way to see this stuff in the UI yet, either in Harbormaster or Differential.

Test Plan: Manually called this method with some results, saw Harbormaster update appropriately.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8095

Differential Revision: https://secure.phabricator.com/D13380
2015-06-23 10:23:33 -07:00
epriestley
831c18e6be Remove weird "Differential Results Table" view
Summary: Ref T8095. This weird grey table has no remaining callsites and can be removed.

Test Plan: Grepped for symbols.

Reviewers: chad, btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8095

Differential Revision: https://secure.phabricator.com/D13379
2015-06-23 10:23:30 -07:00
epriestley
b72deb332c Render unit results as Harbormaster unit messages
Summary:
Ref T8095. Same as D13377, but for unit results.

This is a bit rough and there's some duplication between this and unit results. I'll likely merge them later, but I think some of it is superficial since these iterations are still a little crude.

Test Plan: {F523499}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8095

Differential Revision: https://secure.phabricator.com/D13378
2015-06-23 10:23:29 -07:00
epriestley
e618b672d2 Render lint results as Harbormaster lint messages
Summary:
Ref T8095. Render lint results in a future-ready way.

This makes the renderer accept `HarbormasterBuildLintMessage` objects. If we have legacy data instead, it converts it into `HarbormasterBuildLintMessage` objects.

Design is a bit rough but will be cleaned up later after T7739.

This moves away from "postponed linters", which are obsolete after Harbormaster (and were only ever used by Facebook).

Test Plan: {F523429}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8095

Differential Revision: https://secure.phabricator.com/D13377
2015-06-23 10:23:28 -07:00
Paul Kassianik
54888e1aa8 Implemented Mentionable interface in Pholio
Summary: closes T8486

Test Plan: Create a pholio mock. In an already existing object mention the pholio mock. Verify that the reference to the object exists in the pholio mock's timeline.

Reviewers: lpriestley, #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8486

Differential Revision: https://secure.phabricator.com/D13402
2015-06-23 10:05:45 -07:00
Chad Little
d27b3146d2 [Redesign] Normalize header policy and object tags
Summary: Ref T8099, This adds a consistent background color to object and policy tags, and highlights them when they deviate from the normal. Still likely worth revamping 'closed' and 'review' state colors.

Test Plan: Review lots of diffs and tasks.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13399
2015-06-23 12:03:46 +01:00
lkassianik
40714bb0ec Formatting event dates in list view
Summary: Closes T8639, Formatting event dates in list view

Test Plan: List view should show dates in wide and narrow lists.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8639

Differential Revision: https://secure.phabricator.com/D13398
2015-06-22 18:44:08 -07:00
epriestley
1ccdb941b9 Merge branch 'master' into redesign-2015 2015-06-22 15:52:40 -07:00
Bob Trahan
4be568d346 MetaMTA - save actorPHID as its own column
Summary: Ref T5791. This should make performance snappy wrt policy checks in some future diff where the Query is updated and in use somewhere in the application.

Test Plan: ran `./bin/storage upgrade`. commented on a task and saw actorPHID populated correctly in underlying MetaMTAMail object database entry

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T5791

Differential Revision: https://secure.phabricator.com/D13396
2015-06-22 14:14:21 -07:00
Chad Little
dbdeca58fc [Redesign] Fix People Log Query
Summary: Fixes T8642, This is a table, but not returned as one. Set it to Content for now with a Collapsed layout.

Test Plan: Test /people/logs/

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8642

Differential Revision: https://secure.phabricator.com/D13395
2015-06-22 22:10:07 +01:00
Bob Trahan
ea5462fb60 MetaMTA - lay some ground work for having an application
Summary:
Ref T5791. This does a few bits there. Namely:

 - Adds PHID column to PhabricatorMetaMTAMail
   - Implements a PhabricatorMetaMTAMailPHIDType
   - Script to backpopulate them.
 - Makes PhabricatorMetaMTAMail implement PolicyInterface.
   - View policy is NOONE and the author and recipients have automatic view capabilities
   - No edit capability.
 - Adds a PhabricatorMetaMTAMailQuery for PhabricatorMetaMTAMail.

Test Plan: ran `./bin/storage upgrade` successfully. commented on a maniphest task and verifed the metamta mail object in the database was created successfully with a shiny new phid

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T5791

Differential Revision: https://secure.phabricator.com/D13394
2015-06-22 13:46:26 -07:00
lkassianik
c3efa261f9 Refactor Calendar Search, and implement Projects on events
Summary: Ref T7950, Refactor Calendar Search, and implement Projects on events

Test Plan: Verify that all queries in Calendar search still work, and that events can now have associated Projects that you can search by in Calendar Search.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T7950

Differential Revision: https://secure.phabricator.com/D13393
2015-06-22 13:27:37 -07:00
Bob Trahan
1bb2978a89 Desktop Notification support
Summary:
Fixes T4139. Adds a "Desktop Notifications" panel to settings. For now, we start with "Send Desktop Notifications Too" functionality. We can try to be fancy later and only send desktop notifications if the web app doesn't have focus, etc.

Test Plan:
Made some comments as a test user on a task and got purdy desktop notifications using Chrome. Then did it again with Firefox.

Played around with permissions form with Chrome and got helpful information about what was up. Played around with Firefox and got similar results, except canceling the dialogue didn't invoke my handler code somehow. Oh Firefox!

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: rbalik, tycho.tatitscheff, joshuaspence, epriestley, Korvin

Maniphest Tasks: T4139

Differential Revision: https://secure.phabricator.com/D13219
2015-06-22 13:11:37 -07:00
epriestley
b55f9b6120 Merge branch 'master' into redesign-2015 2015-06-22 12:26:41 -07:00
epriestley
95fe4f9451 Add a repository import troubleshooting guide
Summary: Fixes T8615. Basic overview of the pipeline, where to look for errors, and how to identify/understand/fix/force your way through.

Test Plan: Read documentation.

Reviewers: btrahan, joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Maniphest Tasks: T8615

Differential Revision: https://secure.phabricator.com/D13376
2015-06-22 12:26:18 -07:00
epriestley
487e12101a Make ManiphestTaskQuery more modern and safe
Summary: Ref T8637. This class has some really old parameter handling which can send `withIDs(array())` down a "fetch everything" pathway. Clean up most of it.

Test Plan: Issued every ApplicationSearch query.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8637

Differential Revision: https://secure.phabricator.com/D13390
2015-06-22 11:54:51 -07:00
epriestley
0597aba33e Add hard stops on empty batch edit sets
Summary:
Ref T8637. If a user tries to batch edit a list of tasks which can't be edited, we fall through to `withIDs(array())`, which can affect //everything//.

Explicitly stop batch editing if we don't have valid IDs or valid tasks.

The UI sort-of warns you that something is wrong, but this is ultimately a pretty severe UX issue. I'll fix the underlying Query in the next diff.

Test Plan: Tried to batch edit a list of tasks I didn't have permission to edit.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: lloyd.oliver, epriestley

Maniphest Tasks: T8637

Differential Revision: https://secure.phabricator.com/D13388
2015-06-22 11:47:58 -07:00
epriestley
d1983560a6 Show when objects have a non-default policy
Summary:
Fixes T6787. I'm kind of cheating a little bit here by not unifying default selection with `initializeNew(...)` methods, but I figure we can let this settle for a bit and then go do that later. It's pretty minor.

Since we're not doing templates I kind of want to swap the `'template'` key to `'type'` so maybe I'll do that too at some point.

@chad, freel free to change these, I was just trying to make them pretty obvious. I //do// think it's good for them to stand out, but my approach is probably a bit inconsistent/heavy-handed in the new design.

Test Plan:
{F525024}

{F525025}

{F525026}

{F525027}

Reviewers: btrahan, chad

Reviewed By: btrahan

Subscribers: johnny-bit, joshuaspence, chad, epriestley

Maniphest Tasks: T6787

Differential Revision: https://secure.phabricator.com/D13387
2015-06-22 11:46:59 -07:00
epriestley
e6b7f655ee Support Spaces in Passphrase
Summary: Ref T8493. This stuff mostly takes care of itself now.

Test Plan: Shifted stuff between spaces, verified transactions/headers showed up correctly. Queried by space.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: joshuaspence, epriestley

Maniphest Tasks: T8493

Differential Revision: https://secure.phabricator.com/D13386
2015-06-22 11:28:54 -07:00
epriestley
85af4b01b9 Save authorPHID on Passphrase Credentials to support "Credential Author" object policy
Summary:
Fixes T5135. Currently, when you create a credential, we default the policies to your PHID. This means we can't have an application-level configurable default because there's no way to select "the actor's PHID" as a policy.

Start tracking the credential author's PHID and add an object policy for it, so there is such a setting.

Then, add policy defaults.

This mostly unblocks T6787. This obsoletes T6860.

Test Plan:
  - Created a credential with "Credential Author" policy.
  - Verified I can see/edit it, but other users can not.
  - Changed default policies to something else.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5135

Differential Revision: https://secure.phabricator.com/D13385
2015-06-22 11:28:33 -07:00
epriestley
bc6d0478b4 Move Passphrase to SearchField
Summary: Prepares for bringing spaces and a new object policy here.

Test Plan: Used all search controls dozens of times.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D13384
2015-06-22 11:28:15 -07:00
epriestley
76194a0dc1 Add "Autoplans" to Harbormaster
Summary:
Ref T8095. Two general problems:

  - I want Harbormaster to own all lint and unit test results.
  - I don't want users to have to configure anything for `arc` to keep working automatically.

These are in conflict because generic lint/unit test ownership in Harbormaster requires that build targets exist which we can attach build results to. However, we can't currently create build targets on demand: Harbormaster assumes it is responsible for creating targets, then running code or making third-party service calls to actually run the builds.

I considered two broad approaches to let `arc` push results into Harbormaster without requiring administrators to configure some kind of "arc results" build plan:

  # Add magic target PHIDs like `PHID-MAGIC-this-is-really-arc-unit`.
  # Add new code to build real targets with real PHIDs.

(1) is probably a bit less work to get off the ground, but I think it's worse overall and very likely to create more problems in the long run. I particularly worry that it will lead to a small amount of special casing in a very large number of places, which seems more fragile.

(2) is more work upfront but I think does a better job of putting all the special casing in one place that we can, e.g., more reasonably unit test, and letting the rest of the code rarely/never care about this case since it's just dealing with normal plans/steps/targets as far as it can tell.

This diff introduces "autoplans", which are source templates for plans/steps. This let us "push" these targets into Harbormaster. Hypthetically, any process "like" arc can use autoplans to upload test/lint/etc results. In practice, probably only `arc` will ever use this, but I think it's still quite a bit cleaner than the alternative despite all the generality.

Workflow is basically:

  - `arc` creates a diff.
  - `arc` calls `harbormaster.queryautotargets`, passing the diff PHID and saying "I have some lint and unit results I want to stick on this thing".
  - Harbormaster builds the plan, steps, and targets (if any of them don't already exist), and hands back the target PHIDs so `arc` has a completely standard-looking place to put results.
  - `arc` uploads the test results to the right targets, as though Harbormaster had asked it to run unit/lint in the first place.

(This doesn't actually do any of that yet, just sets things up.)

I'll maybe doc turn that ^^^^^^ into a doc for posterity since I think it's hard to guess what an "autotarget" is, but I'm going to grab some lunch first.

Test Plan:
  - Added unit tests to make sure we can build these things properly.
  - Used `harbormaster.queryautotargets` to build autotargets for a bunch of diffs.
  - Verified targets come up in "waiting for message" state.
  - Verified plans and steps are not editable.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: hach-que, epriestley

Maniphest Tasks: T8095

Differential Revision: https://secure.phabricator.com/D13345
2015-06-21 09:04:21 -07:00
epriestley
081300c7f8 Modernize some Harbormaster Controller/Policy infrastructure
Summary:
Ref T8095. This is just general groundwork for more exciting changes:

  - Use more modern conventions around controllers, UI elements, and dialogs.
  - Provide real CAN_EDIT policies and policy checks (they just don't do anything yet).

Test Plan:
  - Used all affected controllers.
  - Faked CAN_EDIT to POLICY_NOONE and verified everything was greyed out and unselectable.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8095

Differential Revision: https://secure.phabricator.com/D13344
2015-06-21 09:02:44 -07:00
epriestley
7ad4c9c056 Replace Harbormaster "BuildItem" with Lint/Unit messages
Summary:
Ref T8095.

Harbormaster has a `BuildItem` class, but it has no table and is unused. This was an earlier idea about representing lint/unit results and some other possible types of messages, but I think we want to be more specific than this.

Remove `BuildItem` and add `Lint` and `Unit` storage. These tables roughly parallel how we store lint/unit messages today, with some guesses about how where they'll go in the future.

Test Plan: Ran `bin/storage upgrade` and got a clean adjust out of it.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: hach-que, epriestley

Maniphest Tasks: T8095

Differential Revision: https://secure.phabricator.com/D13329
2015-06-21 09:00:00 -07:00
epriestley
3d075b5b0e Merge branch 'master' into redesign-2015 2015-06-21 05:56:35 -07:00
Chad Little
eba1153e7e [Redesign] Provide more color to object states in headers
Summary: Ref T8099, Now that we have cleaner headers, we can add more pop to important items, like the state of an Object. This makes it easier to just note the color and generally understand the state of the object (closed, returned, accepted, open). @epriestley, I think you previously thought this was a bug, but if it still feels bad, let me know.

Test Plan:
Review Differential, Maniphest, Polls for various object states.

{F520973}

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13369
2015-06-21 13:38:07 +01:00
Chad Little
f93ba518d2 [Redesign] Full High Contrast Mode
Summary: Ref T8099, Ref T8614. Adds a more complete full contrast mode.

Test Plan: Bop through UIExamples, check tokens, diffs, tasks, workboards, buttons, info views, looks sharp.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8099, T8614

Differential Revision: https://secure.phabricator.com/D13375
2015-06-21 13:34:33 +01:00
Chad Little
133263cec8 [Redesign] Render full priority names on Maniphest icons
Summary: Ref T8099, Adds more infomation to the icon in Maniphest Task Lists.

Test Plan: Hover over icons in a Maniphest Task

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13367
2015-06-21 10:24:30 +01:00
Chad Little
7787c50da9 [Redesign] Clean up timeline images
Summary: Ref T8099, Timeline images should be 28 and 50, I previously had a border adding the additonal size, but changed that to an inset shadow.

Test Plan: Staring. Intensifies.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13368
2015-06-21 10:23:44 +01:00
Joshua Spence
f9e838024c Hide repository from atom view if it hasn't been set
Summary: Fixes T8626. I guess that `$this->getViewer()->renderHandle(null)` renders as "Unknown Object", which is somewhat odd to me.

Test Plan: Viewed an atom from a book without a repository linked to it.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T8626

Differential Revision: https://secure.phabricator.com/D13370
2015-06-21 11:08:54 +10:00
Joshua Spence
b24bdf0288 Remove a broken documentation link
Summary: From IRC, this article was removed in D12713.

Test Plan: N/A

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13371
2015-06-21 11:08:36 +10:00
Paul Kassianik
b1f64d9356 Adds details to Calendar event feed titles
Summary: Closes T8340

Test Plan: Verify that calendar event feed titles have more detail that before.

Reviewers: lpriestley, #blessed_reviewers, epriestley

Reviewed By: lpriestley, #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8340

Differential Revision: https://secure.phabricator.com/D13352
2015-06-20 09:45:37 -07:00
epriestley
803c65663d Merge branch 'master' into redesign-2015 2015-06-20 06:10:54 -07:00
epriestley
bb58a123e6 Modularize Celerity postprocessors
Summary: Not sure if we want this, but it seems to work fine.

Test Plan: {F516736}

Reviewers: joshuaspence, chad

Reviewed By: joshuaspence, chad

Subscribers: joshuaspence, epriestley

Differential Revision: https://secure.phabricator.com/D13363
2015-06-20 06:10:42 -07:00
epriestley
b22fba1ab5 Provide general documentation on how to use perfomance tools
Summary: Ref T8617. Provide general documentation with tools for debugging hangs and slow pages. Update DarkConsole docs and discuss how to use Services and XHProf. Explain what Multimeter is for and how to use it. Update XHProf docs and provide some usage hints.

Test Plan: Read documentation.

Reviewers: joshuaspence, btrahan

Reviewed By: joshuaspence, btrahan

Subscribers: joshuaspence, epriestley

Maniphest Tasks: T8617

Differential Revision: https://secure.phabricator.com/D13359
2015-06-20 05:30:17 -07:00
epriestley
04516d256b Add an "--importing" flag to bin/repository reparse
Summary: Fixes T6839. Sometimes, worker tasks go astray for whatever reason. This automates the step of `bin/repository importing | xargs | mangle mangle | bin/repostiory reparse`.

Test Plan: Ran various flavors of the command, got good looking results.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T6839

Differential Revision: https://secure.phabricator.com/D13362
2015-06-20 05:25:44 -07:00
epriestley
85083c88c1 Update the translations document
Summary:
Fixes T8616. The rules for contributors have come up a few times recently, so update this document to give more complete advice.

Also try to do a better job with "adding new classes" (previously: libphutil libraries blah blah no one cares).

Test Plan: Read documents.

Reviewers: btrahan, joshuaspence

Reviewed By: btrahan, joshuaspence

Subscribers: joshuaspence, epriestley

Maniphest Tasks: T8616

Differential Revision: https://secure.phabricator.com/D13358
2015-06-20 05:25:08 -07:00
Chad Little
b942075205 [Redesign] Darken things when dark header is used
Summary: Ref T8099, uses original bgcolor when dark headers are used.

Test Plan: Switch between light and dark Phabricator, see new colors.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13361
2015-06-20 13:16:47 +01:00
Joshua Spence
9921cbc41a Allow atoms to be queried by book
Summary: Ref T4558. Allows querying for atoms from specified books. Depends on D13091.

Test Plan: Poked around at `/diviner/query/`.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T4558

Differential Revision: https://secure.phabricator.com/D13303
2015-06-20 18:35:50 +10:00
J Rhodes
44dee47c28 Show build plan name on Harbormaster plan view controller
Summary: Ref T8096.  This shows the build plan name on the Harbormaster build plan view controller.  Without this, the name is not displayed anywhere on the page when you're viewing a build plan's configuration (which makes things confusing if you're updating a bunch of build plans at once).

Test Plan: Viewed a build plan, saw the build plan name on the page.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Projects: #harbormaster

Maniphest Tasks: T8096

Differential Revision: https://secure.phabricator.com/D13356
2015-06-20 14:22:23 +10:00
Chad Little
67a3cc36d1 [Redesign] Slight border inset on all profile photos
Summary: Ref T8099, Cleans up profile photos around the site in a more consistent way.

Test Plan: grep for 'background-size: 100%'

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13360
2015-06-19 20:44:08 +01:00
epriestley
6585381769 Merge branch 'master' into redesign-2015 2015-06-19 09:00:53 -07:00
epriestley
65cdfa292f Probably fix Diviner atom collisions
Ref T8618. I think this was just typoed in D13070.

Immediate issue is that we're looking for symbols with the book name as a "phid".

Auditors: joshuaspence
2015-06-19 08:59:15 -07:00
epriestley
7d7e13d79b Merge branch 'master' into redesign-2015 2015-06-19 08:33:30 -07:00
Paul Kassianik
40851e5b25 Adds Remarkup Rendering to Calendar Events' Descriptions.
Summary: Closes T8032

Test Plan: Verify that when editing a calendar event's description, there is a UI bar helping with adding markup to the description. Also verify that markup is displayed correctly on the event page once the event has been updated.

Reviewers: lpriestley, #blessed_reviewers, epriestley

Reviewed By: lpriestley, #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8032

Differential Revision: https://secure.phabricator.com/D13355
2015-06-19 08:32:51 -07:00
Chad Little
67950cddb0 [Redesign] Misc batch of UI buggypoos
Summary:
Minor layout updates to Ref T8099
- Timeline tweaks
- Use Lato headers in Document Obj Headers
- Minor Remarkup
- Add Audit Icons

(Unclear if Audit is "correct", ie Status vs. Commit Status) But added icons anyways if needed.

Test Plan: Review each of the updated elements

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13357
2015-06-19 13:18:42 +01:00
Chad Little
fcbf119f60 Owners Results package 2015-06-19 11:47:29 +01:00
Chad Little
801607381d [Redesign] PhabricatorApplicationSearchResultView
Summary: Ref T8099. This adds a new class which all search engines return for layout. I thought about this a number of ways, and I think this is the cleanest path. Each Engine can return whatever UI bits they needs, and AppSearch or Dashboard picks and lays the bits out as needed. In the AppSearch case, interfaces like Notifications, Calendar, Legalpad all need more custom layouts. I think this also leaves a resonable path forward for NUX as well. Also, not sure I implemented the class correctly, but assume thats easy to fix?

Test Plan: Review and do a search in each application changed. Grep for all call sites.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13332
2015-06-19 11:46:20 +01:00
Joshua Spence
69d12f64ba Add repositories to Diviner
Summary: Fixes T8352. Associate Diviner books and atoms with a repository. This relationship is not really surfaced anywhere in the UI but provides metadata that contextualises search results. Depends on D13091.

Test Plan: Ran `diviner generate --repository ARC` and then went to `/diviner/book/arcanist/`.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7703, T8352

Differential Revision: https://secure.phabricator.com/D13070
2015-06-19 17:52:28 +10:00
J Rhodes
70a82017b3 Drop Windows-specific escaping in preallocated host
Summary: This drops the Windows-specific escaping code for the creation of directories when acquiring a lease.  This is basically the change from D10378 without the other, no longer necessary changes.

Test Plan: This code hasn't been run in a production environment for a while (any instances of Phabricator using Drydock / Harbormaster with Windows have had this code removed by the D10378 patch for a while).

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Projects: #drydock

Differential Revision: https://secure.phabricator.com/D13341
2015-06-19 15:06:32 +10:00
J Rhodes
827aa05a67 Drop Windows-specific SSH code
Summary: Ref T2015.  This code is only relevant when attempting to run commands on a Windows host over SSH.  Since SSH on Windows is extremely fragile and hard to maintain, and WinRM is a better long-term solution, drop this code (which will end up being unused when later diffs introduce the WinRM command interface).

Test Plan: This code won't be used when D10495 lands.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Projects: #drydock

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D13340
2015-06-19 15:05:39 +10:00
Joshua Spence
68bb60e52f Use PhutilConsoleTable in ./bin/storage probe
Summary: Fixes T8477. Use `PhutilConsoleTable` to render the output from `./bin/storage probe`.

Test Plan: Ran `./bin/storage probe` and saw tabulated output.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T8477

Differential Revision: https://secure.phabricator.com/D13339
2015-06-19 13:09:22 +10:00
epriestley
1851ca2d71 Make owners typeahead mostly reasonable
Summary: Ref T8320. Fixes T8427. This is still a little funky because Owners has weird name rules, but should fix the bugs (unselectable packages) in T8427.

Test Plan: Browsed Owners typaheads, used various search functions.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8320, T8427

Differential Revision: https://secure.phabricator.com/D13349
2015-06-18 17:16:37 -07:00
epriestley
b12f13efd8 Force date/time preferences to valid values
Summary:
Fixes T8601. To reproduce the problem:

  - Set your time preference to `""` (the empty string). This isn't possible from the modern UI, but can be done with "Right Click > Inspect Element", or users may have carried it forward from an older setting (this is the case with me and @hach-que on this install).
  - Load Calendar with some events.
  - This parses an epoch, which sets `valueTime` to `""` (since there are no format characters in the preference) and then `getEpoch()` fails because `strlen($time)` is 0.
  - Since `getEpoch()` failed, `getDateTime()` also fails.

To fix this:

  - Only permit the date and time preferences to have valid values.

Test Plan:
  - Loaded page before patch, saw fatal.
  - Applied patch.
  - No more fatal.
  - Viewed tooltips, dates/times, dates/times in other apps.
  - Changed my preferences, saw them respected.

Reviewers: lpriestley

Reviewed By: lpriestley

Subscribers: epriestley, hach-que

Maniphest Tasks: T8601

Differential Revision: https://secure.phabricator.com/D13346
2015-06-18 15:11:01 -07:00
epriestley
e96cd29eff Reduce badness in viewing large files in the Diffusion web UI
Summary:
Fixes T8597. Second issue there is that if you look at a huge file in Diffusion (like `/path/to/300MB.pdf`) we pull the whole thing over Conduit upfront, then try to shove it into file storage.

Instead, pull no more than the chunk limit (normally 4MB) and don't spend more than 10s pulling data.

If we get 4MB of data and/or time out, just fail with a message in the vein of "this is a really big file".

Eventually, we could improve this:

  - We can determine the //size// of very large files correctly in at least some VCSes, this just takes a little more work. This would let us show the true filesize, at least.
  - We could eventually stream the data out of the VCS, but we can't stream data over Conduit right now and this is a lot of work.

This is just "stop crashing".

Test Plan: Changed limits to 0.01 seconds and 8 bytes and saw reasonable errors. Changed them back and got normal beahvior.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8597

Differential Revision: https://secure.phabricator.com/D13348
2015-06-18 13:06:01 -07:00
epriestley
90078fe06e Clarify that 'order' is an optional parameter in Conduit API methods
Summary: Fixes T8603. For automatic 'order' parameters provided by infrastructure en route to T7715, clarify that they are optional (we will use the default builtin order for the underlying Query if an order is not provided).

Test Plan: Used web UI to see "optional" hint.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8603

Differential Revision: https://secure.phabricator.com/D13342
2015-06-18 13:05:44 -07:00
epriestley
2eb73619d1 Truncate large strings in DarkConsole
Summary:
Ref T8597.  If a page issues a large query (like inserting a blob into file storage), we may try to utf8ize the entire thing. This is slow and pointless.

Instead, truncate tab data after 4096 bytes before sanitizing.

Test Plan: Adjusted limit to 256 bytes, saw long queries get truncated reasonably.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8597

Differential Revision: https://secure.phabricator.com/D13347
2015-06-18 13:05:32 -07:00
lkassianik
e291b90641 Format Calendar list objects
Summary: Closes T8050, Format Calendar list objects

Test Plan: Open Calendar list, check that new formatting is true to mocks.

Reviewers: chad, #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8050

Differential Revision: https://secure.phabricator.com/D13318
2015-06-18 11:02:12 -07:00
lkassianik
9109cf62e4 More correct fix - set default value array() for getParameter call.
Summary: Ref T8577, More correct fix - set default value array() for `getParameter` call.

Test Plan: Make sure saved queries like Month View, Day View, and Upcoming Events, still work.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T8577

Differential Revision: https://secure.phabricator.com/D13330
2015-06-18 09:06:12 -07:00
Joshua Spence
7f6508af5a Add missing execution on archived task query
Summary: Fixes T8599. I'm not sure how to reproduce the original issue, but I'm fairly confident that the issue is that the issue is that `execute()` is not called on the query object.

Test Plan: Created a Harbormaster build plan with a single "Lease Host" step. Ran `./bin/harbormaster build --plan 1 D1` from the command line and hit the exception as described in T8599. Applied patch and hit a different exception (which I think is just because I don't know how to use #drydock and #harbormaster).

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: hach-que, epriestley, Korvin

Maniphest Tasks: T8599

Differential Revision: https://secure.phabricator.com/D13335
2015-06-18 22:40:05 +10:00
Joshua Spence
dad29171ff Add more languages to syntax highlighting options
Summary: Fixes T8589. Adds a bunch of new languages to the syntax highlighting config options so that they are supported by #paste.

Test Plan: Saw new filetypes in Paste.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8589

Differential Revision: https://secure.phabricator.com/D13337
2015-06-18 22:39:22 +10:00
Joshua Spence
e270157fcb Fix a broken class name
Auditors: epriestley
2015-06-18 07:25:41 +10:00
Joshua Spence
4761cb8d73 Use PhutilInvalidStateException
Summary: Use `PhutilInvalidStateException` where appropriate.

Test Plan: Eyeball it.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13327
2015-06-18 07:09:02 +10:00
epriestley
29ac80be5c Merge branch 'master' into redesign-2015 2015-06-17 11:27:12 -07:00
epriestley
b3038dcaea When showing policy hints, if the Space policy is strictly stronger, show it instead
Summary:
Ref T8449. Before we show a policy hint in the header of an object, compare it to the space policy (if one exists).

If the space policy is strictly stronger (more restrictive -- for example, the Space policy is 'members of X', and the object policy is 'public'), show the space policy instead.

See discussion on T8376.

Test Plan: {F509126}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8449

Differential Revision: https://secure.phabricator.com/D13328
2015-06-17 11:25:19 -07:00
epriestley
b3ae48d8ca Improve Differential query plans
Summary:
Ref T8575. We run a big "(A) UNION (B)" query on the home page and on the main Differential page.

"A" can always be improved by using `%Ls`, so it can use the second half of the `(authorPHID, status)` key.

"B" can sometimes be improved if the fraction of open revisions is smaller than the fraction of revisions you are reviewing. This is true for me on secure.phabricator.com (I'm a reviewer, either directly or via 'Blessed Reviewers', on about 80% of revisions, but <5% are open). In these cases, a `(status, phid)` key is more efficient.

Test Plan: Tweaked queries and added keys on this server, saw less derpy query plans and performance.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8575

Differential Revision: https://secure.phabricator.com/D13325
2015-06-17 11:25:01 -07:00
epriestley
7ddaadffab Merge branch 'master' into redesign-2015 2015-06-17 10:44:42 -07:00
epriestley
984976ce20 Cache viewer spaces
Summary:
Ref T8575. Although we cache spaces as a whole, we don't cache viewer spaces. This can still do a lot of work if they have complex policies.

Instead, cache them in the request cache.

Test Plan: Saw this account for 37% of a page in produciton (303ms on on 835ms).

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8575

Differential Revision: https://secure.phabricator.com/D13324
2015-06-17 10:43:44 -07:00
epriestley
af8ad58e6b Probably fix notifications not being properly marked as unread
Summary: Fixes T8586. This wasn't quite right in D13320.

Test Plan: iiam

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8586

Differential Revision: https://secure.phabricator.com/D13331
2015-06-17 10:43:25 -07:00
lkassianik
868ee3ef2f Only evaluate tokens if phids not null
Summary: Fixes T8577, Only evaluate tokens if phids not null

Test Plan: Open Upcoming Events in Calendar.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8577

Differential Revision: https://secure.phabricator.com/D13326
2015-06-17 08:12:01 -07:00
Joshua Spence
b10d128c59 Remove some unused properties
Summary: These class properties don't seem to be used.

Test Plan: Eyeball it.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13295
2015-06-17 20:41:52 +10:00
epriestley
f1b7fd483e Merge branch 'master' into redesign-2015 2015-06-16 19:34:36 -07:00
epriestley
6933ee5fb8 Don't spend ridiculous amounts of time rebuilding orderable columns
Summary:
Ref T8575. Because orderable columns need to build custom fields, they are relatively expensive to build. Use the request cache.

(The request cache is technically more correct than `static`, because configuration may change between requests and we may eventually reuse interpreters.)

Test Plan: Saw home page time drop 39% (from 462ms to 283ms).

Reviewers: btrahan, avivey

Reviewed By: avivey

Subscribers: avivey, epriestley

Maniphest Tasks: T8575

Differential Revision: https://secure.phabricator.com/D13322
2015-06-16 19:32:58 -07:00
epriestley
8484adcffd Cache application visibility in the request cache
Summary: Ref T8575. We check if users can see applications frequently, and caching on the Query isn't especially effective. Use the new Request cache instead.

Test Plan:
  - Saw `/feed/` drop 7% (from ~830ms to ~770ms) on profiles.

Reviewers: btrahan, avivey

Reviewed By: avivey

Subscribers: avivey, epriestley

Maniphest Tasks: T8575

Differential Revision: https://secure.phabricator.com/D13321
2015-06-16 19:32:37 -07:00
epriestley
30c4783c42 Dramatically limit the range of failures which can cause duplicate mail
Summary:
Ref T8574. Currently, failures during mail body construction, feed publishing, or search indexing could cause us to retry the publishing task and potentially send duplicate mail.

Instead, build (but do not send) the mail first, then send all the mail at the very end.

This isn't completley perfect, but should make it enormously harder for duplicate mail to be generated.

Test Plan: Sent some mail, ran the daemons, saw it show up normally in the outbound queue.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8574

Differential Revision: https://secure.phabricator.com/D13320
2015-06-16 16:43:24 -07:00
epriestley
bb7f2ea905 Fail gracefully on bad API call when building commit mail
Summary:
Ref T8574. This could fail because the target is disabled (as here), or doesn't have access to the API, or the API request needs to be satisfied by a different host which isn't available.

In any of these cases, just show the failure and continue generating the mail. This field isn't important enough to block the mail, and many of these errors are permanent.

(I'll follow up on T8574 with some more permanent ideas to address this class of issue.)

Test Plan: Faked API call failure, generated mail, saw clean generation of mail with a failure message.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8574

Differential Revision: https://secure.phabricator.com/D13319
2015-06-16 16:06:42 -07:00
Eitan Adler
42170ab151 Change text ADD_CC and REMOVE_CC actions
Summary: Fixes T8559

Test Plan: ran phab locally, saw text changes

Reviewers: lpriestley, #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley

Maniphest Tasks: T8559

Differential Revision: https://secure.phabricator.com/D13317
2015-06-16 15:32:52 -07:00
Bob Trahan
db9fc369ca Phriction - improve workflow for when user entered slug needs to be normalized.
Summary: Encountered this playing with T8402 on my test instance. I think warning the user about adding a trailing "/" is unnecessary so don't do it. I think its confusing to not call out spaces / to lump them in with special characters so call out the sapces.

Test Plan: moved a page around and verified no warning if the slug is missing a "/" as user specified and that a change to spaces is called out

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13316
2015-06-16 15:33:53 -07:00
Bob Trahan
ca8adac1eb Config - make "No auth providers configured" check use proper hyperlinking technology
Summary: Fixes T8346. Also gets rid of the air quotes on Auth and uses the "Appname Application" style we use elsewhere.

Test Plan: slapped an "|| true" in the checking logic and verified the link was rendered in a usable fashion just below the error message.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8346

Differential Revision: https://secure.phabricator.com/D13315
2015-06-16 14:49:52 -07:00
Bob Trahan
281082f4d7 Conpherence - fix a bug where users have no events
Summary: Fixes T8518. Defaulting $events to null creates carnage further down the stack. Instead, default it to array() so foreach, array_select_keys, etc. don't barf.

Test Plan: logic and will ask the reporting user to verify since they can repro 100%

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8518

Differential Revision: https://secure.phabricator.com/D13314
2015-06-16 14:38:29 -07:00
Joshua Spence
a3010148e2 Mark diviner atoms as closed in search index
Summary: Ref T4558. If a Diviner atom is a ghost (i.e. the underlying source code has been removed), mark it as closed in the search index.

Test Plan: Searched for a ghost atom in global searcn and saw the results show "Closed".

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T4558

Differential Revision: https://secure.phabricator.com/D13297
2015-06-17 07:28:48 +10:00
Joshua Spence
751162d363 Set icons for Diviner PHID types
Summary: Ref T4558. Give `DivinerAtomPHIDType` and `DivinerBookPHIDType` a font icon.

Test Plan: Saw icons in global search.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T4558

Differential Revision: https://secure.phabricator.com/D13304
2015-06-17 07:26:23 +10:00
Bob Trahan
8965c7ec9b Email Preferences - round out options for Projects and Phriction
Summary: Fixes T8524, T8550. These were both missing "subscribers" and Phriction was also the only application with no "other".

Test Plan:
 - Project
   - set user A to notify only for project subscriber changes
   - made a project with user A
   - subscribed user B to project
   - verified notification sent to user A
   - used ./bin/mail to make sure no mail was sent to user A because "This mail has tags which control which users receive it, and this recipient has not elected to receive mail with any of the tags on this message (Settings > Email Preferences)."
  - Phriction
   - set user A to notify only for phriction document subscriber changes
   - made a document with user A
   - subscribed user B to document
   - verified notification sent to user A
   - used ./bin/mail to make sure no mail was sent to user A because "This mail has tags which control which users receive it, and this recipient has not elected to receive mail with any of the tags on this message (Settings > Email Preferences)."
   - observed option for "other" in email preferences

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8524, T8550

Differential Revision: https://secure.phabricator.com/D13313
2015-06-16 14:25:13 -07:00
Joshua Spence
6b7d7401ca Modernize Diviner
Summary:
Ref T4558. This diff modernizes the #diviner application. Basically:

  - Add an edit controller, accessible at `/book/$BOOK/edit/`.
  - Add edit/view policies.
  - Added an action menu to the `DivinerBookController` to expose the edit interface.
  - Allows projects to be associated with books.
  - Implement edges and transactions.
  - Implemented `PhabricatorApplicationTransactionInterface` in `DivinerLiveBook`.

Test Plan:
  - Generated a Diviner book with `./bin/diviner generate`.
  - Added projects to a book and ensured that they persisted.
  - Changed the view policy on a book and made sure it was effective.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T4558

Differential Revision: https://secure.phabricator.com/D13091
2015-06-17 07:17:14 +10:00
epriestley
c5c5523c1f Add missing $mailer property to PhabricatorMailImplementationPHPMailerAdapter
Fixes T8541.

Auditors: joshuaspence
2015-06-16 13:55:17 -07:00
Paul Kassianik
9537f983f6 Added a Note Credential Type for Passphrase
Summary: Closes T8481.

Test Plan: Verify that in Passphrase > Create an option to create a Note credential exists and credentials of type Note are createable.

Reviewers: epriestley, #blessed_reviewers, eadler, lpriestley

Reviewed By: eadler

Subscribers: joshuaspence, epriestley, Korvin

Maniphest Tasks: T8481

Differential Revision: https://secure.phabricator.com/D13261
2015-06-16 13:44:51 -07:00
Paul Kassianik
5240ae8bd1 Added Instance Number to Ghost Events
Summary: Closes T8460.

Test Plan: In the Calendar application, create a recursive event. After editing a recursion of the event, verify that the "Recurrence of Event" property is of the form "<event sequence number> of <parent event>".

Reviewers: lpriestley, epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T8460

Differential Revision: https://secure.phabricator.com/D13307
2015-06-16 13:42:49 -07:00
lkassianik
667897639f First pass at event modal create options.
Summary: Ref T8568, First pass at event modal create options.

Test Plan: {nav Calendar > Create} should offer three options: Create Event, Create Public Event, Create Recurring Event.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T8568

Differential Revision: https://secure.phabricator.com/D13309
2015-06-16 13:38:48 -07:00
lkassianik
05066f649b Convert "Created By" and "Invited" inputs in Calendar search to use PhabricatorPeopleUserFunctionDatasource
Summary: Closes T8046, Convert "Created By" and "Invited" inputs in Calendar search to use `PhabricatorPeopleUserFunctionDatasource`

Test Plan: {nav Calendar > Advanced Search}, search for "members:Calendar", created by and invited. Should autofill and search correctly.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8046

Differential Revision: https://secure.phabricator.com/D13311
2015-06-16 13:38:11 -07:00
epriestley
b97d7dddc8 Merge branch 'master' into redesign-2015 2015-06-16 13:11:59 -07:00
Chad Little
13e959286c [Redesign] Persisent an open form when actively running queries
Summary: Ref T8099, Adds ability to set hidden form open, which leaves form open on searches and moves anchor point.

Test Plan: Run saved searches, advanced searches, and searches from main search ui.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13308
2015-06-16 13:10:25 -07:00
Chad Little
3846a00916 [Redesign] Fix alignment of icon/grip on ObjectList
Summary:
Ref T8099, these should sit in a 4px gutter.

Also:
- remove bad route on feed
- Fix issue with custom logos
- Fix unit error

Test Plan: Review on dashboards and on Maniphest homepage

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13310
2015-06-16 13:09:48 -07:00
Chad Little
69b30c5d53 [Redesign] Move to light header by default
Summary: This should default to light, also made the icons on the dark headers more transparent.

Test Plan: Tested light, dark, blue, blindigo, and default.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13306
2015-06-16 09:42:47 -07:00
epriestley
2a5cf5e1b7 Separate "Revision" and "Diff" fields in Differential
Summary:
Fixes T5138. Some of the "revision" properties are really "diff" properties, but we only show the properties for the most recent / current diff.

  - Immediately, this makes it hard or impossible to review, e.g., lint/unit results for older diffs.
  - Longer-term, these limits will become more problematic with more data on diffs after Harbormaster.

Instead, separate "revision" from "diff" properties.

(In the long term, it might make sense to show more diffs in this panel -- e.g., tabs for the 8 most recent updates or something -- but I went with the simplest approach for now since I don't have a clean way to deal with 100-update revisions offhand.)

Test Plan: {F500480}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: cburroughs, epriestley

Maniphest Tasks: T5138

Differential Revision: https://secure.phabricator.com/D13282
2015-06-16 08:53:40 -07:00
epriestley
c9be5fef27 Show spaces in policy explanation dialogs
Summary: Ref T8449. When an object is in a space, explain that clearly in the policy description dialog.

Test Plan: {F496126}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8449

Differential Revision: https://secure.phabricator.com/D13264
2015-06-16 08:53:28 -07:00
Chad Little
dc53d8a7f3 [Redesign] Misc Buggypoos
Summary:
- Give preference to Segoe on Windows
- Move to Lato headers except documents
- Fix diviner issues
- Fix feed overwriting line-height
- Fix apps launcher
- Fix infoview + listview
- Make tall headers less tall
- Legalpad, Diviner tweaks

Test Plan: Random surfing. @epriestley can you just commit this for me, connection generally shitty.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D13305
2015-06-16 06:46:53 -07:00
epriestley
6af1c02f06 Merge branch 'master' into redesign-2015 2015-06-15 14:06:59 -07:00
epriestley
c2a2933848 Add missing property on PhabricatorBot
Auditors: joshuaspence
2015-06-15 13:53:18 -07:00
Joshua Spence
600a3e3b7c Only index documentable atoms for search
Summary: Ref T7458. Only index documentable atoms in the search index. In particular, this prevents files and methods from being returned in search results (clicking on these search results doesn't actually work anyway).

Test Plan: Actually, to get this to work I had to destroy the search index and recreate it... is this expected?

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T7458

Differential Revision: https://secure.phabricator.com/D13298
2015-06-16 06:52:19 +10:00
epriestley
a1561a4d3a Fix a fatal in Diviner when atoms extend ghosts
Summary:
Fixes T8547. I wasn't immediately able to reproduce this locally (although I didn't try too hard), but I think the issue is that when atoms extend ghosts (probably they are usually ghosts themselves?), we try to check the ghost language and fatal.

Instead, don't match ghosts when figuring out what an atom extends.

This could maybe be a little cleaner (match the ghosts, at lower priority, and show that they're ghosts?) but I'm not sure there's a real product use case for it, and this looks like a safer way to stop the bleeding for now.

Test Plan: Poked around Diviner locally.

Reviewers: joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Maniphest Tasks: T8547

Differential Revision: https://secure.phabricator.com/D13300
2015-06-15 13:52:00 -07:00
epriestley
9f1235d875 Fix a fatal in Calendar widget in Conpherence
Summary:
Fixes T8548. This needs to be cleaned up more generally at some point, but stop the bleeding for now.

If a thread member is invited to an event with a non-thread-member host, we try to render the host but don't have their handle (this is a holdover from the bygone days of events as statuses).

For now, just don't render anything. In the future, it might be nice to render (some of?) the attendees who are thread members, but I suspect we may revisit this widget more generally.

Test Plan:
  - As a non thread-member, created an event and invited a thread member.
  - Viewed thread as thread-member.
  - Saw widget fatal.
  - Applied patch.
  - As thread-member, saw widget render with just "9AM-10AM", instead of "host, 9AM-10AM".

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8548

Differential Revision: https://secure.phabricator.com/D13299
2015-06-15 13:51:36 -07:00
epriestley
6aa494bd25 Fix missing property on HarbormasterBuildStepImplementation
Auditors: joshuaspence
2015-06-15 12:21:54 -07:00
lkassianik
30e6203d8c Creating a recurring event should save it as a recurring event.
Summary: Fixes T8551, Creating a recurring event should save it as a recurring event

Test Plan: Before patch: -create an event -flag as recurring -save -Result: event is not recurring -After patch Result: event saves as recurring.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8551

Differential Revision: https://secure.phabricator.com/D13302
2015-06-15 11:52:57 -07:00
lkassianik
86a908d3b9 Date controls should respect user time preferences
Summary: Ref T8362, Date controls should respect user time preferences

Test Plan: Set user time preference to 24-hour format, create an event, type 23 in time input, 23:00 should be suggested. Saveing a 24-hour format time should save correctly.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8362

Differential Revision: https://secure.phabricator.com/D13291
2015-06-15 10:11:10 -07:00
lkassianik
e6b6c42f76 Make event lists respect the user preference for time format.
Summary: Ref T8362, Make event lists respect the user preference for time format

Test Plan: Set time format preference to 24-hour format, open Calendar month view, all events should show time tips in 24-hour format.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T8362

Differential Revision: https://secure.phabricator.com/D13290
2015-06-15 10:02:43 -07:00
lkassianik
d3b7071e70 Add date format preference and respect it in date selection controls
Summary: Ref T8362, Add date format preference and respect it in date selection controls

Test Plan: Set date format preference in the user settings panels, create new event, select new start date in the correct format.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: jasonrumney, eadler, epriestley, Korvin

Maniphest Tasks: T8362

Differential Revision: https://secure.phabricator.com/D13262
2015-06-15 09:26:33 -07:00
epriestley
53ef057b1b Merge branch 'master' into redesign-2015 2015-06-15 08:06:23 -07:00
Joshua Spence
f87ffc41ce Fix another undeclared property
Summary: I think that I've caught the bulk of these issues now.

Test Plan: Eyeball it.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13296
2015-06-15 07:54:12 -07:00
epriestley
0fd0f171f1 Fix an undeclared property on AphrontPlainTextResponse
Auditors: joshuaspence
2015-06-15 07:05:03 -07:00
epriestley
0695687572 Fix an undefined property on HarbormasterBuildLogQuery
Fixes T8546.

Auditors: joshuaspence
2015-06-15 06:36:42 -07:00
epriestley
5878500e1f Fix missing property on PhabricatorYoutubeRemarkupRule
Fixes T8545.

Auditors: joshuaspence
2015-06-15 06:30:10 -07:00
Joshua Spence
62648237c2 Fix a few more undeclared properties
Summary: Ref T8538. Ref T8539. Ref T8541.

Test Plan: Eyeball it.

Reviewers: epriestley, de_jean_7777, benoittgt, #blessed_reviewers

Reviewed By: benoittgt

Subscribers: epriestley, Korvin

Maniphest Tasks: T8541, T8538, T8539

Differential Revision: https://secure.phabricator.com/D13293
2015-06-15 19:39:04 +10:00
Joshua Spence
b95fc8ba5d Fix another undeclared property
This was reported in IRC, see https://secure.phabricator.com/chatlog/channel/6/?at=204524.

Auditors: epriestley
2015-06-15 18:41:09 +10:00
Joshua Spence
1239cfdeaf Add a bunch of tests for subclass implementations
Summary: Add a bunch of tests to ensure that subclasses behave.

Test Plan: `arc unit`

Reviewers: eadler, #blessed_reviewers, epriestley

Reviewed By: eadler, #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13272
2015-06-15 18:13:27 +10:00
Joshua Spence
b6d745b666 Extend from Phobject
Summary: All classes should extend from some other class. See D13275 for some explanation.

Test Plan: `arc unit`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13283
2015-06-15 18:02:27 +10:00
Joshua Spence
2d5f3d9e5a Fix a pht string
Summary:
This translation string is wrong and causes the following warning when running unit tests:

```
[2015-06-15 16:03:41] ERROR 2: vsprintf(): Too few arguments at [/home/joshua/workspace/github.com/phacility/libphutil/src/internationalization/PhutilTranslator.php:95]
arcanist(head=master, ref.master=956bfa701c36), phabricator(head=master, ref.master=80f11427e576), phutil(head=master, ref.master=3ff84448a916)
  #0 vsprintf(string, array) called at [<phutil>/src/internationalization/PhutilTranslator.php:95]
  #1 PhutilTranslator::translate(string)
  #2 call_user_func_array(array, array) called at [<phutil>/src/internationalization/pht.php:17]
  #3 pht(string) called at [<phabricator>/src/applications/auth/controller/PhabricatorAuthStartController.php:75]
  #4 PhabricatorAuthStartController::handleRequest(AphrontRequest) called at [<phabricator>/src/aphront/AphrontController.php:69]
  #5 AphrontController::delegateToController(PhabricatorAuthStartController) called at [<phabricator>/src/applications/base/controller/PhabricatorController.php:213]
  #6 PhabricatorController::willBeginExecution() called at [<phabricator>/src/applications/base/controller/__tests__/PhabricatorAccessControlTestCase.php:270]
  #7 PhabricatorAccessControlTestCase::checkAccess(string, PhabricatorTestController, AphrontRequest, array, array) called at [<phabricator>/src/applications/base/controller/__tests__/PhabricatorAccessControlTestCase.php:112]
  #8 PhabricatorAccessControlTestCase::testControllerAccessControls()
  #9 call_user_func_array(array, array) called at [<arcanist>/src/unit/engine/phutil/PhutilTestCase.php:492]
  #10 PhutilTestCase::run() called at [<arcanist>/src/unit/engine/PhutilUnitTestEngine.php:65]
  #11 PhutilUnitTestEngine::run() called at [<arcanist>/src/workflow/ArcanistUnitWorkflow.php:186]
  #12 ArcanistUnitWorkflow::run() called at [<arcanist>/scripts/arcanist.php:382]
```

Test Plan: `arc lint`

Reviewers: epriestley, #blessed_reviewers, chad

Reviewed By: #blessed_reviewers, chad

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13292
2015-06-15 18:01:09 +10:00
epriestley
2fbc65e396 Call didRejectResult() in DiffusionCommitQuery properly
Summary:
Ref T4345. This error is per object-type in the query implementations, not a mail/permissions issue.

Without `didRejectResult()`, we can't distinguish between "restricted" and "unknown" for objects filtered by `willFilterPage()`.

  - Call `didRejectResult()` on commits.
  - Make `didRejectResult()` handle both existing policy exceptions and filtering.
  - Recover from partial objects (like commits) which are missing attached data required to figure out policies.

Test Plan: Saw "Restricted Diffusion Commit" instead of "Unknown Object (Diffusion Commit)" when viewing nonvisible commit handle in Maniphest.

Reviewers: btrahan, joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Maniphest Tasks: T4345

Differential Revision: https://secure.phabricator.com/D13289
2015-06-14 15:35:32 -07:00
Joshua Spence
175799fab9 Remove break from hunk migration
Summary: This `break` statement causes `./bin/hunks migrate` to only migrate one-hunk-at-a-time, which is unnecessary and slightly misleading. Instead, allow the script to migrate //all// legacy hunks to modern storage. In particular, this means that we can recommend that installs run this command sometime before D13222 is landed.

Test Plan: It's a pain to setup the data necessary to test this, but this is identical to the change that I made on our production install when I migrated our hunk storage.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13288
2015-06-15 08:32:08 +10:00
Joshua Spence
32f4c962fc Remove "@stable" annotations
Summary: See D13285.

Test Plan: N/A

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13287
2015-06-15 07:55:08 +10:00
Joshua Spence
070da82864 Remove backticks from SQL statements
Summary: Remove backticks from SQL statements for consistency. In //most// places, we don't use backticks around table/field names, so at least be consistent about this.

Test Plan: Learned what backticks are used for in MySQL.

Reviewers: eadler, epriestley, #blessed_reviewers

Reviewed By: eadler, epriestley, #blessed_reviewers

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D13267
2015-06-15 07:38:28 +10:00