Page MenuHomePhabricator

Aggregate lint, unit information in HarbormasterBuildable
AbandonedPublic

Authored by avivey on Aug 17 2016, 10:55 PM.
Tags
None
Referenced Files
F13062478: D16417.diff
Sat, Apr 20, 12:13 AM
F13060041: D16417.diff
Fri, Apr 19, 5:13 PM
Unknown Object (File)
Fri, Apr 19, 11:31 AM
Unknown Object (File)
Wed, Apr 17, 2:09 AM
Unknown Object (File)
Wed, Apr 17, 1:59 AM
Unknown Object (File)
Sat, Apr 13, 6:19 AM
Unknown Object (File)
Sat, Apr 6, 11:38 PM
Unknown Object (File)
Sun, Mar 31, 3:19 PM
Subscribers
Restricted Owners Package

Details

Summary

We currently store each test/lint as Message, and then calculate the sum of this when loading a revision; This change moves the calculations into the Engine, running it in a daemon when there's a change, instead of in the web tier when a user is waiting.

This isn't making it all the way to "don't load all unit results when displaying revision," but does go a long way towards making that easy (And marks most places that will need to change for that).

In terms of user-facing-changes, this change shows the correct stars for lint/unit in the Revision History tab, and shows more correct/less confusing information in the Diff Details Section. It also shows 2 items under "Unit" and "Lint" in the Details pane - one only shown if the user skipped, and the other shows HM status. Also showing unit excuse + count.

pasted_file (93×434 px, 13 KB)

Next steps / revisions:

  • Add "Summary" or "Meta" Harbormaster Lint/Unit messages - important for Lints to show "Lint OK", and useful for saying "100K unit tests passed" without actually storing the details. Maybe also get the Excuse in there.
  • Migration: This basically boils down to running ./bin/harbormaster update --force lots of times, which is slow, but safe to run while the system is up. Also possibly not very interesting for old diffs, so some installs might want to skip it.

    Alternatively, restarting a remote build from the revision page will also update the Build to be displayed correctly.

See T9365, T10635.

Test Plan

Built "remote CI" jobs that wait for messages, and send messages with all sorts of conditions.
Look at details, history stars, harbormaster_buildable.details in the db.

Diff Detail

Repository
rP Phabricator
Branch
stars-no-api
Lint
Lint Warnings
SeverityLocationCodeMessage
Warningsrc/applications/differential/customfield/DifferentialLintField.php:98TXT3Line Too Long
Warningsrc/applications/differential/customfield/DifferentialLintField.php:100TXT3Line Too Long
Warningsrc/applications/differential/customfield/DifferentialUnitField.php:57TXT3Line Too Long
Warningsrc/applications/differential/customfield/DifferentialUnitField.php:58TXT3Line Too Long
Warningsrc/applications/differential/customfield/DifferentialUnitField.php:75TXT3Line Too Long
Warningsrc/applications/differential/customfield/DifferentialUnitField.php:82TXT3Line Too Long
Warningsrc/applications/differential/customfield/DifferentialUnitField.php:83TXT3Line Too Long
Warningsrc/applications/differential/customfield/DifferentialUnitField.php:86TXT3Line Too Long
Warningsrc/applications/differential/view/DifferentialRevisionUpdateHistoryView.php:325TXT3Line Too Long
Warningsrc/applications/differential/view/DifferentialRevisionUpdateHistoryView.php:326TXT3Line Too Long
Warningsrc/applications/differential/view/DifferentialRevisionUpdateHistoryView.php:343TXT3Line Too Long
Warningsrc/applications/harbormaster/constants/HarbormasterUnitStatus.php:31TXT3Line Too Long
Warningsrc/applications/harbormaster/constants/HarbormasterUnitStatus.php:82TXT3Line Too Long
Advicesrc/applications/differential/controller/DifferentialChangesetViewController.php:406XHP16TODO Comment
Advicesrc/applications/differential/controller/DifferentialChangesetViewController.php:407XHP16TODO Comment
Advicesrc/applications/differential/customfield/DifferentialLintField.php:98XHP16TODO Comment
Advicesrc/applications/differential/customfield/DifferentialUnitField.php:83XHP16TODO Comment
Advicesrc/applications/differential/storage/DifferentialDiff.php:363XHP16TODO Comment
Advicesrc/applications/differential/storage/DifferentialDiff.php:385XHP16TODO Comment
Advicesrc/applications/differential/storage/DifferentialDiff.php:418XHP16TODO Comment
Advicesrc/applications/differential/view/DifferentialRevisionUpdateHistoryView.php:319XHP16TODO Comment
Advicesrc/applications/differential/view/DifferentialRevisionUpdateHistoryView.php:331XHP16TODO Comment
Advicesrc/applications/differential/view/DifferentialRevisionUpdateHistoryView.php:345XHP16TODO Comment
Advicesrc/applications/harbormaster/constants/HarbormasterUnitStatus.php:31XHP16TODO Comment
Advicesrc/applications/harbormaster/engine/HarbormasterBuildEngine.php:558XHP16TODO Comment
Unit
Tests Passed
Build Status
Buildable 13421
Build 17238: Run Core Tests
Build 17237: arc lint + arc unit

Unit TestsFailed

TimeTest
190 msPhabricatorCelerityTestCase::Unknown Unit Message ("")
Assertion failed, expected 'true' (at PhabricatorCelerityTestCase.php:32): When this test fails, it means the Celerity resource map is out of date. Run `bin/celerity map` to rebuild it. ACTUAL VALUE
0 msAlmanacNamesTestCase::Unknown Unit Message ("")
30 assertions passed.
0 msAlmanacServiceTypeTestCase::Unknown Unit Message ("")
1 assertion passed.
0 msAphrontHTTPSinkTestCase::Unknown Unit Message ("")
6 assertions passed.
0 msAphrontHTTPSinkTestCase::Unknown Unit Message ("")
3 assertions passed.
View Full Test Results (1 Failed · 343 Passed)

Event Timeline

avivey retitled this revision from to WIP: Aggregate lint, unit information in buildTarget.
avivey edited the test plan for this revision. (Show Details)
Owners added a subscriber: Restricted Owners Package.Aug 17 2016, 10:55 PM
avivey removed subscribers: epriestley, Restricted Owners Package.
Owners added a subscriber: Restricted Owners Package.Aug 19 2016, 12:01 AM

I almost want to use HarbormasterBuildLintMessage to also "send message" about "lint status": "lint skipped (by user)" or "lint ok". Calling it "message" kinda makes it reasonable...

avivey removed a subscriber: Restricted Owners Package.Aug 24 2016, 5:59 PM
  • aggregate in Buildable instead of BuildTarget
Owners added a subscriber: Restricted Owners Package.Aug 24 2016, 5:59 PM
avivey removed a subscriber: Restricted Owners Package.Aug 25 2016, 1:09 AM
  • move getSummaryUnitStatus to DifferntialDiff
  • Show count of tests in Details
  • remove unused param
Owners added a subscriber: Restricted Owners Package.Aug 25 2016, 1:11 AM
avivey retitled this revision from WIP: Aggregate lint, unit information in buildTarget to Aggregate lint, unit information in HarbormasterBuildable.Aug 25 2016, 6:50 PM
avivey updated this object.
avivey edited the test plan for this revision. (Show Details)
avivey removed a subscriber: Restricted Owners Package.
Owners added a subscriber: Restricted Owners Package.Aug 25 2016, 6:51 PM

See D16483; It will take a while before T9365 is ready for fixing, so abandoning this revision for now.