Page MenuHomePhabricator

[keyserver] Add num revisions landed to monthly Phabricator leaderboard
ClosedPublic

Authored by ashoat on Dec 28 2023, 7:55 AM.
Tags
None
Referenced Files
Unknown Object (File)
Apr 11 2024, 8:07 AM
Unknown Object (File)
Apr 4 2024, 12:31 PM
Unknown Object (File)
Apr 4 2024, 12:31 PM
Unknown Object (File)
Apr 4 2024, 12:31 PM
Unknown Object (File)
Apr 4 2024, 12:29 PM
Unknown Object (File)
Apr 4 2024, 12:28 PM
Unknown Object (File)
Feb 22 2024, 6:29 AM
Unknown Object (File)
Feb 22 2024, 5:17 AM
Subscribers

Details

Summary

This adds a query for the number of revisions landed. It's there for both the monthly stats and the yearly stats.

Linear task: ENG-6306

Depends on D10468

Test Plan
  1. I created a Phabricator leaderboard thread in my local environment
  2. I changed phabLeaderboardChannel with the value of that thread ID
  3. I patched postLeaderboard to test the behavior on January 2024
  4. yarn script dist/scripts/phab-leaderboard.js

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

keyserver/src/cron/phab-leaderboard.js
107 ↗(On Diff #35046)

This table has one entry for every "diff" (eg. D10468). Technically they are called "revisions"

108–109 ↗(On Diff #35046)

This is where we get the author of the revision

110–112 ↗(On Diff #35046)
113 ↗(On Diff #35046)

If I'm understanding this query correctly, we're counting the number of differential.revision.close transactions. Not sure if this is a big deal, but I believe if someone were to

  1. Land a diff
  2. Revert that diff
  3. Re-open that diff
  4. Re-land that diff

We would see two differential.revision.close?

Could we change COUNT(r.id) to COUNT(DISTINCT r.id) to handle this so that each diff (differential.revision) is only counted once?

(Didn't read the query too carefully, so apologize if I'm missing something.)

This revision is now accepted and ready to land.Dec 28 2023, 5:12 PM
This revision was landed with ongoing or failed builds.Dec 28 2023, 6:40 PM
This revision was automatically updated to reflect the committed changes.