Page MenuHomePhabricator
Feed All Stories

Sep 5 2021

cspeckmim updated the diff for D21718: Update "arc liberate" to fix error with PHP 8, remove logging, modify error handling.

Update error handling of ArcanistLiberateWorkflow to detect failure from running rebuild-map.php in a separate process.

Sep 5 2021, 1:02 AM
epriestley requested review of D21722: Correct a parameter order swap in "diffusion.historyquery" for Mercurial.
Sep 5 2021, 12:48 AM
epriestley added a revision to T13666: Improve error-handling behavior of Diffusion repository landing page on non-clustered installations: D21722: Correct a parameter order swap in "diffusion.historyquery" for Mercurial.
Sep 5 2021, 12:47 AM · Diffusion
epriestley accepted D21718: Update "arc liberate" to fix error with PHP 8, remove logging, modify error handling.

Thanks!

Sep 5 2021, 12:45 AM
cspeckmim updated the diff for D21718: Update "arc liberate" to fix error with PHP 8, remove logging, modify error handling.

Remove log() entirely, let filesystem errors escape outwardly.

Sep 5 2021, 12:40 AM
epriestley added a comment to D21718: Update "arc liberate" to fix error with PHP 8, remove logging, modify error handling.

I think it's reasonable to remove the try/catch and just let the exception escape. It (the try-catch + log) isn't consistent with the approach to error handling in the rest of the codebase, and I can't think of any valid reason to continue here after a write failure.

Sep 5 2021, 12:38 AM
cspeckmim closed D21719: Fix searching legalpad documents by contributors.
Sep 5 2021, 12:37 AM
cspeckmim committed rP3b2868e15553: Fix searching legalpad documents by contributors (authored by cspeckmim).
Fix searching legalpad documents by contributors
Sep 5 2021, 12:37 AM
cspeckmim requested review of D21718: Update "arc liberate" to fix error with PHP 8, remove logging, modify error handling.
Sep 5 2021, 12:36 AM
cspeckmim updated the summary of D21718: Update "arc liberate" to fix error with PHP 8, remove logging, modify error handling.
Sep 5 2021, 12:36 AM
cspeckmim added inline comments to D21718: Update "arc liberate" to fix error with PHP 8, remove logging, modify error handling.
Sep 5 2021, 12:32 AM
epriestley added a comment to T13666: Improve error-handling behavior of Diffusion repository landing page on non-clustered installations.

Good catch!

Sep 5 2021, 12:30 AM · Diffusion
cspeckmim updated the diff for D21718: Update "arc liberate" to fix error with PHP 8, remove logging, modify error handling.

Change approach - remove --verbose, remove --quiet, remove most instances of log() being used, keep the instance when an error is encountered.

Sep 5 2021, 12:29 AM
epriestley accepted D21719: Fix searching legalpad documents by contributors.

Thanks!

Sep 5 2021, 12:17 AM

Sep 4 2021

cspeckmim closed T13634: Support marking commits as UNREACHABLE in Mercurial as Resolved.
Sep 4 2021, 11:55 PM · Diffusion
cspeckmim retitled D21719: Fix searching legalpad documents by contributors from Fix typo in legalpad search engine to Fix searching legalpad documents by contributors.
Sep 4 2021, 11:51 PM
cspeckmim published D21719: Fix searching legalpad documents by contributors for review.

I didn't make a task for this as it's a fairly small change and the reproduction/test case is also fairly simple.

Sep 4 2021, 11:11 PM
cspeckmim committed rP09c3c7d87931: Add support to marking commits as UNREACHABLE for Mercurial (authored by cspeckmim).
Add support to marking commits as UNREACHABLE for Mercurial
Sep 4 2021, 11:05 PM
cspeckmim closed D21715: Add support to marking commits as UNREACHABLE for Mercurial.
Sep 4 2021, 11:05 PM
cspeckmim added a comment to T13666: Improve error-handling behavior of Diffusion repository landing page on non-clustered installations.

One tangential thing I noticed from the error messages in these cases, in DiffusionHistoryQueryConduitAPIMethod the getMercurialResult() function executes this hg command

$path_args = array();
if (strlen($path)) {
  $path_args[] = $path;
  $revset_arg = hgsprintf(
    'reverse(ancestors(%s))',
    $commit_hash);
} else {
  $revset_arg = hgsprintf(
    'reverse(ancestors(%s)) and branch(%s)',
    $drequest->getBranch(),
    $commit_hash);
}
Sep 4 2021, 11:03 PM · Diffusion
cspeckmim closed T13666: Improve error-handling behavior of Diffusion repository landing page on non-clustered installations as Resolved.
Sep 4 2021, 10:51 PM · Diffusion
cspeckmim committed rP458ad4a8617a: Remove history query from DiffusionRepositoryController as it is unused (authored by cspeckmim).
Remove history query from DiffusionRepositoryController as it is unused
Sep 4 2021, 10:51 PM
cspeckmim closed D21717: Remove history query from DiffusionRepositoryController as it is unused.
Sep 4 2021, 10:50 PM
cspeckmim added a comment to T13666: Improve error-handling behavior of Diffusion repository landing page on non-clustered installations.

With just the updates to the future handling this is now the landing page I see with missing commits:

Screen Shot 2021-09-04 at 6.33.54 PM.png (948×3 px, 180 KB)

Sep 4 2021, 10:50 PM · Diffusion
cspeckmim added a comment to D21717: Remove history query from DiffusionRepositoryController as it is unused.

I tested this out and it works properly, in that there's no noticeable difference between the behavior with this change and without but including the new future updates

Sep 4 2021, 10:48 PM
cspeckmim updated the diff for D21717: Remove history query from DiffusionRepositoryController as it is unused.

Sigh maybe update arcanist too. I ran arc lint before arc diff and it said no lints...

Sep 4 2021, 10:47 PM
cspeckmim updated the diff for D21717: Remove history query from DiffusionRepositoryController as it is unused.

Try again but with arcanist on master

Sep 4 2021, 10:44 PM
cspeckmim updated the diff for D21717: Remove history query from DiffusionRepositoryController as it is unused.

Rebased onto changes (no merge needed tho)

Sep 4 2021, 10:42 PM
cspeckmim retitled D21717: Remove history query from DiffusionRepositoryController as it is unused from Update DiffusionRepositoryController to use appropriate error handling, remove history query to Remove history query from DiffusionRepositoryController as it is unused.
Sep 4 2021, 10:41 PM
cspeckmim added a comment to D21717: Remove history query from DiffusionRepositoryController as it is unused.

I'm working on testing out the issue before/after this change

Sep 4 2021, 10:23 PM
cspeckmim planned changes to D21718: Update "arc liberate" to fix error with PHP 8, remove logging, modify error handling.

I'll do that

Sep 4 2021, 9:38 PM
epriestley accepted D21717: Remove history query from DiffusionRepositoryController as it is unused.

This looks great to me now, as long as I didn't miss anything with the Future stuff and it does what it's supposed to on top of D21720 + D21721.

Sep 4 2021, 9:38 PM
epriestley committed rPb757e5c30249: Use "MethodCallFuture" to move Diffusion Conduit exceptions to resolution time (authored by epriestley).
Use "MethodCallFuture" to move Diffusion Conduit exceptions to resolution time
Sep 4 2021, 9:36 PM
epriestley closed D21721: Use "MethodCallFuture" to move Diffusion Conduit exceptions to resolution time.
Sep 4 2021, 9:36 PM
epriestley accepted D21718: Update "arc liberate" to fix error with PHP 8, remove logging, modify error handling.

I'd favor this change:

Sep 4 2021, 9:35 PM
cspeckmim accepted D21721: Use "MethodCallFuture" to move Diffusion Conduit exceptions to resolution time.

I hadn't considered that having this still use http requests could be done in parallel vs. the clustered running them in serial being faster (theoretically)

Sep 4 2021, 9:34 PM
cspeckmim renamed T13666: Improve error-handling behavior of Diffusion repository landing page on non-clustered installations from Improve error-handling behavior of Diffusion repository landing page to Improve error-handling behavior of Diffusion repository landing page on non-clustered installations.
Sep 4 2021, 9:29 PM · Diffusion
epriestley requested review of D21721: Use "MethodCallFuture" to move Diffusion Conduit exceptions to resolution time.
Sep 4 2021, 9:21 PM
epriestley committed rARCf993b1fbda71: Provide "MethodCallFuture" to fix exception semantics in mixed-future contexts (authored by epriestley).
Provide "MethodCallFuture" to fix exception semantics in mixed-future contexts
Sep 4 2021, 9:19 PM
epriestley closed D21720: Provide "MethodCallFuture" to fix exception semantics in mixed-future contexts.
Sep 4 2021, 9:19 PM
epriestley added a revision to T13666: Improve error-handling behavior of Diffusion repository landing page on non-clustered installations: D21721: Use "MethodCallFuture" to move Diffusion Conduit exceptions to resolution time.
Sep 4 2021, 9:13 PM · Diffusion
epriestley added a comment to D21720: Provide "MethodCallFuture" to fix exception semantics in mixed-future contexts.

Yeah -- isReady() should really be called something else nowadays (it's, uh, "doTheThingThisFutureDoes()" pretty much), but it would be a backward-compatibility break and I shuffled enough stuff around in T11968 that I didn't want to press my luck.

Sep 4 2021, 9:05 PM
cspeckmim added a comment to D21717: Remove history query from DiffusionRepositoryController as it is unused.

Does that mean the ConduitClientFuture doesn't begin execution until resolve() is called or some other internal mechanism triggered by iterating a FutureIterator?

Right: creating a future doesn't start it (it doesn't make any network connections, launch any subprocesses, etc). Technically, you can start a future explicitly by calling $future->start(), but there's little/no reason to ever do so.

Even if we started futures on creation, the process is ultimately still single-threaded and we don't get any kind of I/O handling "for free" in PHP, so execution must pass into most Futures regularly to make meaningful progress on them: for example, if you just start() an HTTP future and don't return to it, it will probably get about as far as opening a network connection but not actually send any bytes over the wire, so it isn't really executing fully in parallel. Subprocess futures usually don't need as much upkeep as network futures, but they can still stall if the stderr buffer on the child process fills up and the parent process hasn't returned execution into the Future to read the buffer.

Sep 4 2021, 9:04 PM
epriestley added a comment to D21716: Update ArcanistMercurialAPI to support getting the current commit ref.

This might or might not be helpful, but the rough model here is that "hardpoints" are an open slot that some particular data may be loaded into. The physical analogy is a "hardpoint" on fighter aircraft where a particular missile or bomb may be attached.

Sep 4 2021, 9:00 PM
cspeckmim accepted D21720: Provide "MethodCallFuture" to fix exception semantics in mixed-future contexts.

oops

Sep 4 2021, 9:00 PM
cspeckmim added a comment to D21720: Provide "MethodCallFuture" to fix exception semantics in mixed-future contexts.

I looked at Future to see how isReady() plays into other parts and this looks good! Thank you!

Sep 4 2021, 8:59 PM
epriestley requested review of D21720: Provide "MethodCallFuture" to fix exception semantics in mixed-future contexts.
Sep 4 2021, 8:40 PM
epriestley added a revision to T13666: Improve error-handling behavior of Diffusion repository landing page on non-clustered installations: D21720: Provide "MethodCallFuture" to fix exception semantics in mixed-future contexts.
Sep 4 2021, 8:40 PM · Diffusion
cspeckmim planned changes to D21717: Remove history query from DiffusionRepositoryController as it is unused.
Sep 4 2021, 8:22 PM
cspeckmim updated the diff for D21717: Remove history query from DiffusionRepositoryController as it is unused.

Restore parallel future resolution

Sep 4 2021, 8:21 PM
epriestley added a comment to D21717: Remove history query from DiffusionRepositoryController as it is unused.

Does that mean the ConduitClientFuture doesn't begin execution until resolve() is called or some other internal mechanism triggered by iterating a FutureIterator?

Sep 4 2021, 8:13 PM
cspeckmim planned changes to D21716: Update ArcanistMercurialAPI to support getting the current commit ref.

The desired/intended approach is to implement ArcanistMercurialCommitSymbolCommitHardpointQuery, following ArcanistGitCommitSymbolCommitHardpointQuery. Alas, this is a significantly more complicated change (but might make life easier down the road).

I did have a suspicion about a missing hardpoint query for Mercurial but the only one I was tracing through was HARDPOINT_REVISIONREFS which I think maps to (or, I mapped to) ArcanistMercurialWorkingCopyRevisionHardpointQuery which looks to be appropriately implemented and mostly matches the Git variant. Though I don't have a solid mental model of "hardpoints".

Sep 4 2021, 7:59 PM
cspeckmim planned changes to D21717: Remove history query from DiffusionRepositoryController as it is unused.
Sep 4 2021, 7:52 PM
epriestley added a comment to T13666: Improve error-handling behavior of Diffusion repository landing page on non-clustered installations.

Ah, that's helpful. I found a repro, it's specific to the behavior of the ImmediateFuture pathway for non-clustered resolution of Conduit "calls". This should force it from any configuration/state, I think:

Sep 4 2021, 7:46 PM · Diffusion
cspeckmim added a comment to D21717: Remove history query from DiffusionRepositoryController as it is unused.

When implemented correctly, a Future should not throw until it is resolved (at least, for any kind of "result of trying to resolve the future" error), so the Iterator loop should never throw. Some older Futures were less careful about this, but I believe major futures were pulled in line after T11968. From cursory inspection, I think the behavior of ConduitClientFuture is correct, and I can't immediately get the iterator loop to throw an exception (see T13666#256232 for my test case and observed behavior).

Does that mean the ConduitClientFuture doesn't begin execution until resolve() is called or some other internal mechanism triggered by iterating a FutureIterator? I will definitely add this back in.

Sep 4 2021, 7:45 PM
cspeckmim added a comment to T13666: Improve error-handling behavior of Diffusion repository landing page on non-clustered installations.

I'm able to reproduce this but I'll investigate further

Sep 4 2021, 7:40 PM · Diffusion
epriestley requested changes to D21716: Update ArcanistMercurialAPI to support getting the current commit ref.

The desired/intended approach is to implement ArcanistMercurialCommitSymbolCommitHardpointQuery, following ArcanistGitCommitSymbolCommitHardpointQuery. Alas, this is a significantly more complicated change (but might make life easier down the road).

Sep 4 2021, 7:39 PM
cspeckmim added a comment to T13666: Improve error-handling behavior of Diffusion repository landing page on non-clustered installations.

I think I did conflate this partially - namely that this isn't directly caused by the issue discussed in T13365. Where this issue came up for me is while testing out D21715, I removed the head commit from the on-disk repo which caused the landing page to not render properly:

Sep 4 2021, 7:20 PM · Diffusion
epriestley accepted D21715: Add support to marking commits as UNREACHABLE for Mercurial.

Thanks!

Sep 4 2021, 7:18 PM
epriestley requested changes to D21717: Remove history query from DiffusionRepositoryController as it is unused.

This construction:

Sep 4 2021, 7:16 PM
epriestley added a comment to T13666: Improve error-handling behavior of Diffusion repository landing page on non-clustered installations.

I'll have some more detail in D21717 in a minute, but I can't immediately reproduce this, I think? If I intentionally break diffusion.historyquery like this:

Sep 4 2021, 7:06 PM · Diffusion
cspeckmim retitled D21718: Update "arc liberate" to fix error with PHP 8, remove logging, modify error handling from Update "arc liberate" logging and add "--verbose" argument to adjust it to Update "arc liberate" to fix error with PHP 8 and add "--verbose" argument to adjust it.
Sep 4 2021, 5:23 PM
cspeckmim requested review of D21718: Update "arc liberate" to fix error with PHP 8, remove logging, modify error handling.
Sep 4 2021, 5:22 PM
cspeckmim updated the summary of D21717: Remove history query from DiffusionRepositoryController as it is unused.
Sep 4 2021, 6:07 AM
cspeckmim added a revision to T13666: Improve error-handling behavior of Diffusion repository landing page on non-clustered installations: D21717: Remove history query from DiffusionRepositoryController as it is unused.
Sep 4 2021, 6:07 AM · Diffusion
cspeckmim updated the summary of D21717: Remove history query from DiffusionRepositoryController as it is unused.
Sep 4 2021, 6:07 AM
cspeckmim requested review of D21717: Remove history query from DiffusionRepositoryController as it is unused.
Sep 4 2021, 5:56 AM
cspeckmim updated the task description for T13666: Improve error-handling behavior of Diffusion repository landing page on non-clustered installations.
Sep 4 2021, 5:49 AM · Diffusion
cspeckmim requested review of D21716: Update ArcanistMercurialAPI to support getting the current commit ref.
Sep 4 2021, 4:56 AM
cspeckmim added a revision to T13665: The "arc amend" workflow does not work on Mercurial repositories: D21716: Update ArcanistMercurialAPI to support getting the current commit ref.
Sep 4 2021, 4:56 AM · Mercurial, Arcanist

Sep 3 2021

cspeckmim claimed T13666: Improve error-handling behavior of Diffusion repository landing page on non-clustered installations.
Sep 3 2021, 10:26 PM · Diffusion
cspeckmim added a comment to D21715: Add support to marking commits as UNREACHABLE for Mercurial.

I attempted to load the repository page and saw an exception due to a missing commit.

I don't think this is expected behavior but I'll make a new task for it since it's outside the scope of this change.

Created T13666

Sep 3 2021, 10:26 PM
cspeckmim updated the task description for T13666: Improve error-handling behavior of Diffusion repository landing page on non-clustered installations.
Sep 3 2021, 10:26 PM · Diffusion
cspeckmim renamed T13365: Conduit API method "diffusion.historyquery" fatals under Git/Mercurial if passed a bad "commit" from Conduit API method "diffusion.historyquery" fatals if passed a bad "commit" to Conduit API method "diffusion.historyquery" fatals under Git/Mercurial if passed a bad "commit".
Sep 3 2021, 10:24 PM · Diffusion
cspeckmim renamed T13365: Conduit API method "diffusion.historyquery" fatals under Git/Mercurial if passed a bad "commit" from Conduit API method "diffusion.historyquery" fatals under Git if passed a bad "commit" to Conduit API method "diffusion.historyquery" fatals if passed a bad "commit".
Sep 3 2021, 10:24 PM · Diffusion
cspeckmim triaged T13666: Improve error-handling behavior of Diffusion repository landing page on non-clustered installations as Low priority.
Sep 3 2021, 10:23 PM · Diffusion
cspeckmim added a comment to D21715: Add support to marking commits as UNREACHABLE for Mercurial.

I attempted to load the repository page and saw an exception due to a missing commit.

I don't think this is expected behavior but I'll make a new task for it since it's outside the scope of this change.

Sep 3 2021, 10:08 PM
cspeckmim updated the task description for T13665: The "arc amend" workflow does not work on Mercurial repositories.
Sep 3 2021, 9:47 PM · Mercurial, Arcanist
cspeckmim updated the test plan for D21715: Add support to marking commits as UNREACHABLE for Mercurial.
Sep 3 2021, 9:45 PM
cspeckmim published D21715: Add support to marking commits as UNREACHABLE for Mercurial for review.
Sep 3 2021, 9:44 PM
cspeckmim added a project to T13665: The "arc amend" workflow does not work on Mercurial repositories: Mercurial.
Sep 3 2021, 2:25 PM · Mercurial, Arcanist
cspeckmim added a project to T13665: The "arc amend" workflow does not work on Mercurial repositories: Arcanist.
Sep 3 2021, 2:25 PM · Mercurial, Arcanist
cspeckmim triaged T13665: The "arc amend" workflow does not work on Mercurial repositories as Wishlist priority.
Sep 3 2021, 2:24 PM · Mercurial, Arcanist
cspeckmim added a comment to T13634: Support marking commits as UNREACHABLE in Mercurial.

In Mercurial, I'm not exactly sure how wide this window is. Since you normally can't strip commits in the remote by pushing (AFAIK?)

This is true, though it does change a bit if we enable evolve server-side. Then when commits/branches are pruned when pushing/pulling those obsolete markers will also be transferred, allowing similar disappearing commits (retrievable via —hidden). However I believe by default mercurial does not allow pruning public changesets (would require forcibly changing phases on client/server, or running a server/branch in non-publishing mode). Supporting evolve/topics server-side is probably large enough that it would be its own big project. So I think this assumption holds up well.

Sep 3 2021, 3:57 AM · Diffusion
epriestley added a comment to T13634: Support marking commits as UNREACHABLE in Mercurial.

(D21715 is still a draft, but I left a couple of more specific comments there.)

Sep 3 2021, 3:39 AM · Diffusion
epriestley added a comment to T13634: Support marking commits as UNREACHABLE in Mercurial.

Does this refer to when multiple dependent commits are pushed and then stripped from the on-disk state?

Sep 3 2021, 3:35 AM · Diffusion
cspeckmim added a comment to T13634: Support marking commits as UNREACHABLE in Mercurial.

Another caveat here is that if you destroy commits directly in Phabricator's working copy in certain states, it's possible it won't be able to trace ancestry to find all the commits you destroyed in order to mark them unreachable. However, this window is narrow. For Git, you can bin/repository mark-reachable to rebuild reachability if you know you've done a bunch of dangerous mutations to the on-disk state.

Sep 3 2021, 3:02 AM · Diffusion
cspeckmim updated the task description for T13634: Support marking commits as UNREACHABLE in Mercurial.
Sep 3 2021, 2:58 AM · Diffusion
cspeckmim added a revision to T13634: Support marking commits as UNREACHABLE in Mercurial: D21715: Add support to marking commits as UNREACHABLE for Mercurial.
Sep 3 2021, 2:55 AM · Diffusion

Aug 20 2021

0 added a comment to D21714: Fix subtype extension support check.

Thank you for figuring out the appropriate change!

Aug 20 2021, 10:51 PM
0 closed T13663: TypeError when editing calendar import as Resolved by committing rP1965b78b34f1: Fix subtype extension support check.
Aug 20 2021, 10:49 PM · Calendar
0 closed D21714: Fix subtype extension support check.
Aug 20 2021, 10:49 PM
0 committed rP1965b78b34f1: Fix subtype extension support check (authored by 0).
Fix subtype extension support check
Aug 20 2021, 10:49 PM
epriestley accepted D21714: Fix subtype extension support check.

Thanks!

Aug 20 2021, 1:52 PM
0 published D21714: Fix subtype extension support check for review.
Aug 20 2021, 6:15 AM
0 added a revision to T13663: TypeError when editing calendar import: D21714: Fix subtype extension support check.
Aug 20 2021, 6:12 AM · Calendar

Aug 19 2021

epriestley updated the task description for T13664: SSRF and Phabricator.
Aug 19 2021, 5:07 PM · Security, Guides
epriestley triaged T13664: SSRF and Phabricator as Low priority.
Aug 19 2021, 4:41 PM · Security, Guides
epriestley added a comment to T13663: TypeError when editing calendar import.

I think this is probably the cleanest fix, but I only tested event imports (which now appear to work). If you want to test Maniphest with subtypes configured (to make sure it doesn't break) and send me a revision with this change, I'll review it. Otherwise, I'll do that testing when I get a chance and land this if nothing crops up.

Aug 19 2021, 4:07 PM · Calendar
0 updated subscribers of T13663: TypeError when editing calendar import.
Aug 19 2021, 2:31 AM · Calendar