@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Make Diffusion "Last Modified" rendering less fragile

Summary:
Ref T9524. Because fetching the last time files were modified in Diffusion can be slow, we bring it in over Ajax.

The logic to fetch and paint the table is kind of fragile because there are two different definitions of the columns right now and we break in a bad way if they differ.

In particular, calling `diffusion.updatecoverage` can populate a "lint commit" for a repository, which tries to generate lint information in one of the views (but not the other one).

In the longer run I think we're removing some of the concepts here and this rendering should be rebuilt to not have two separate column definitions, but just make it degrade gracefully for now since those are larger changes.

Test Plan:
Reproduced the issue in T9524 by calling `diffusion.updatecoverage` on a repostiory. Specifically, this has a side effect of creating a "lint commit" which triggers a "lint" column in this table, sort of.

Applied this patch, got a clean render.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9524

Differential Revision: https://secure.phabricator.com/D14243

+20 -11
+10 -10
resources/celerity/map.php
··· 13 13 'differential.pkg.css' => '2de124c9', 14 14 'differential.pkg.js' => '6223dd9d', 15 15 'diffusion.pkg.css' => 'f45955ed', 16 - 'diffusion.pkg.js' => '0115b37c', 16 + 'diffusion.pkg.js' => 'ca1c8b5a', 17 17 'maniphest.pkg.css' => '4845691a', 18 18 'maniphest.pkg.js' => '3ec6a6d5', 19 19 'rsrc/css/aphront/aphront-bars.css' => '231ac33c', ··· 371 371 'rsrc/js/application/diffusion/behavior-jump-to.js' => '73d09eef', 372 372 'rsrc/js/application/diffusion/behavior-load-blame.js' => '42126667', 373 373 'rsrc/js/application/diffusion/behavior-locate-file.js' => '6d3e1947', 374 - 'rsrc/js/application/diffusion/behavior-pull-lastmodified.js' => '2b228192', 374 + 'rsrc/js/application/diffusion/behavior-pull-lastmodified.js' => 'f01586dc', 375 375 'rsrc/js/application/doorkeeper/behavior-doorkeeper-tag.js' => 'e5822781', 376 376 'rsrc/js/application/files/behavior-icon-composer.js' => '8ef9ab58', 377 377 'rsrc/js/application/files/behavior-launch-icon-composer.js' => '48086888', ··· 574 574 'javelin-behavior-diffusion-commit-graph' => '9007c197', 575 575 'javelin-behavior-diffusion-jump-to' => '73d09eef', 576 576 'javelin-behavior-diffusion-locate-file' => '6d3e1947', 577 - 'javelin-behavior-diffusion-pull-lastmodified' => '2b228192', 577 + 'javelin-behavior-diffusion-pull-lastmodified' => 'f01586dc', 578 578 'javelin-behavior-doorkeeper-tag' => 'e5822781', 579 579 'javelin-behavior-durable-column' => 'c72aa091', 580 580 'javelin-behavior-error-log' => '6882e80a', ··· 998 998 'javelin-install', 999 999 'javelin-util', 1000 1000 ), 1001 - '2b228192' => array( 1002 - 'javelin-behavior', 1003 - 'javelin-dom', 1004 - 'javelin-util', 1005 - 'javelin-workflow', 1006 - 'javelin-json', 1007 - ), 1008 1001 '2b8de964' => array( 1009 1002 'javelin-install', 1010 1003 'javelin-util', ··· 1938 1931 'efe49472' => array( 1939 1932 'javelin-install', 1940 1933 'javelin-util', 1934 + ), 1935 + 'f01586dc' => array( 1936 + 'javelin-behavior', 1937 + 'javelin-dom', 1938 + 'javelin-util', 1939 + 'javelin-workflow', 1940 + 'javelin-json', 1941 1941 ), 1942 1942 'f24a53cb' => array( 1943 1943 'phui-fontkit-css',
+10 -1
webroot/rsrc/js/application/diffusion/behavior-pull-lastmodified.js
··· 16 16 if (!config.map[k][l]) { 17 17 continue; 18 18 } 19 - JX.DOM.setContent(JX.$(config.map[k][l]), JX.$H(r[k][l])); 19 + try { 20 + JX.DOM.setContent(JX.$(config.map[k][l]), JX.$H(r[k][l])); 21 + } catch (ex) { 22 + // The way this works is weird and sometimes the components get 23 + // out of sync. Fail gently until we can eventually improve the 24 + // underlying mechanism. 25 + 26 + // In particular, we currently may generate lint information 27 + // without generating a lint column. See T9524. 28 + } 20 29 } 21 30 } 22 31 })