1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-28 01:32:42 +01:00
phorge-phorge/src/applications/harbormaster
epriestley 6dc341be87 As Harbormaster logs are processed, build a sparse map of byte offsets to line numbers
Summary:
Depends on D19138. Ref T13088. When we want to read the last part of a logfile //and show accurate line numbers//, we need to be able to get from byte offsets to line numbers somehow.

Our fundamental unit must remain byte offsets, because a test can emit an arbitrarily long line, and we should accommodate it cleanly if a test emits 2GB of the letter "A".

To support going from byte offsets to line numbers, compute a map with periodic line markers throughout the offsets of the file. From here, we can figure out the line numbers for arbitrary positions in the file with only a constant amount of work.

Test Plan: Added unit tests; ran unit tests.

Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam

Maniphest Tasks: T13088

Differential Revision: https://secure.phabricator.com/D19139
2018-02-26 17:56:52 -08:00
..
__tests__ As Harbormaster logs are processed, build a sparse map of byte offsets to line numbers 2018-02-26 17:56:52 -08:00
application Add a very basic standalone view for build logs with a "Download Log" button 2018-02-26 17:53:10 -08:00
artifact Explicitly add rel="noreferrer" to all external links 2018-02-17 17:46:11 -08:00
autoplan Give "Arcanist Client Results" a more clear name 2015-09-09 19:18:08 -07:00
capability Add spelling TODOs 2017-10-09 11:56:53 -07:00
conduit Make Harbormaster buildable status more of a nice flexible map and less of a bunch of switch statements 2018-02-12 12:18:06 -08:00
constants Start buildables in "PREPARING", move them to "BUILDING" after builds queue 2018-02-12 12:18:29 -08:00
controller Add a very basic standalone view for build logs with a "Download Log" button 2018-02-26 17:53:10 -08:00
customfield Allow "Wait for Message" to be unset on build plans 2016-11-22 14:02:37 -08:00
editor Update EditEngine for two column 2016-03-28 09:18:55 -07:00
engine Update buildable containerPHIDs in a proper way via BuildWorker rather than via sneaky uncoordinated write 2018-02-12 12:18:52 -08:00
engineextension Subsume 'harbormaster.querybuilds' with a modern search API method 2016-07-31 21:44:22 +00:00
event Make Harbormaster buildable status more of a nice flexible map and less of a bunch of switch statements 2018-02-12 12:18:06 -08:00
exception Apply some autofix linter rules 2014-09-10 06:55:05 +10:00
future Allow Harbormaster to run commands on Drydock working copies 2015-09-25 10:43:32 -07:00
herald Don't run Herald build and mail rules when they don't make sense 2017-10-27 08:44:12 -07:00
interface Navigage Buildkite builds with more nuance 2017-01-31 17:26:45 -08:00
management Add "--all" and an explicit "--force" flag to bin/harbormaster rebuild-log 2018-02-26 17:55:38 -08:00
phid Add a very basic standalone view for build logs with a "Download Log" button 2018-02-26 17:53:10 -08:00
query Make Harbormaster buildable status more of a nice flexible map and less of a bunch of switch statements 2018-02-12 12:18:06 -08:00
remarkup Rename PhutilRemarkupRule subclasses 2014-08-05 00:55:43 +10:00
step Make "phabricator.silent" disable build steps which rely on external services 2018-02-14 11:41:47 -08:00
stepgroup Fix 4 typos in code 2017-04-07 04:09:56 -07:00
storage As Harbormaster logs are processed, build a sparse map of byte offsets to line numbers 2018-02-26 17:56:52 -08:00
typeahead Search builds based on who kicked them off 2016-07-31 20:54:44 +00:00
view Add a very basic standalone view for build logs with a "Download Log" button 2018-02-26 17:53:10 -08:00
worker As Harbormaster logs are processed, build a sparse map of byte offsets to line numbers 2018-02-26 17:56:52 -08:00