andymeneely / chromium-history

Scripts and data related Chromium's history
11 stars 4 forks source link

Was this developer a sheriff as of X date? #106

Closed andymeneely closed 10 years ago

andymeneely commented 10 years ago

Do we have this data anywhere? IRC logs? Trybot logs?

If so, do we have timestamps? If we have a timestamp, we can say "this reviewer on this code review had the experience of being a sheriff".

This would make for a neat metric: number of past sheriffs on the code review.

dani5447 commented 10 years ago

In short, Chromium has a few areas where they list sheriffs, but they aren't comprehensive or up to date. In case we want to look at them anyways, here are some links:

In order to get the full, authoritative list of sheriffs, we need to be members of their google calendar. *NOTE: It seems like I can see that information off of the Google calendar! Not sure if it's open to public, or if I had requested to be added earlier in the year and they actually added me.. Here is the information for that on the developer information website:

Sign in to Google Calendar.
Where it says "Other calendars - Add a friend's calendar" add the address for the calendar you want:
    Chromium: google.com_r6oah4kurfoe0i3kee16kaitq0@group.calendar.google.com
    Chromium OS: google.com_69d79f055f0a14nuulm9kse60c@group.calendar.google.com
    Chromium OS (non-US West Coast group): google.com_qvc0pmmoql1n9g73scnubmmh6c@group.calendar.google.com
    WebKit: google.com_h1kjbmjo6p29ta0rluu8eh5qjo@group.calendar.google.com
    Memory: google.com_fv7snsgnk3hgem50fb952aug44@group.calendar.google.com
    NaCl: TBD
    Skia: google.com_8clojmi0ktf75e95e6v9gijrq0@group.calendar.google.com
    GPU: google.com_0eerjipjjbhlrbgf323lg2mb9o@group.calendar.google.com
    Troopers: google.com_iqfka4i9asiva67vlqqf1es094@group.calendar.google.com
    Chromium Perf: google.com_2fpmo740pd1unrui9d7cgpbg2k@group.calendar.google.com

To see who the sheriff is, click an event and look at the guest list. (Yes, it would be nice if it showed the people in the event title, but then there's the issue of the event title and the guest list getting out of sync -- no easy answer.)  To find when a specific person is going to be sheriff, use google calendar's advanced search box (click the down-triangle in the main search box), select the appropriate sheriff calendar, and type the person's username into the "Who" box.
The script/process that updates the calendars can be found in svn://svn.chromium.org/chrome-internal/trunk/tools/build/scripts/tools/sheriff."

This link is for the calendar for Chromium trooper rotations (remember, trooper != sheriff) : https://www.google.com/calendar/b/0/embed?src=google.com_iqfka4i9asiva67vlqqf1es094@group.calendar.google.com&ctz=America/Los_Angeles&gsessionid=3aRmNWf_6W2tl9jRTQ3T-Q

andymeneely commented 10 years ago

Great start! A few questions:

dani5447 commented 10 years ago

As far as the IRC chat logs, if you're talking about the ones here, http://echelog.com/logs/browse/chromium/1395702000, then they don't seem to specifically list out who the sheriffs are in the chat.

I'll look into the calendar and its script next for this task and comment here with findings!

andymeneely commented 10 years ago

Any updates on this? I do see from this page that the calendar is supposed to be authoritative so I'm more willing to trust it now.

andymeneely commented 10 years ago

We might need to scrape using the Google Calendar API. It does appear to be a RESTful interface, so that's nice:

https://developers.google.com/google-apps/calendar/

dani5447 commented 10 years ago

Right, yeah I've been looking at that API. I have a script I've been writing but it's not quite functional yet. I added it in a separate GitHub repo on my account while I work on it- see https://github.com/dani5447/GoogleCalendarScraper. As of right now if you run 'ruby calendarScraper2.rb' and then go to http://localhost:4567/ it gets the calendar access but there's a callback error I've been trying to figure out. -well, you'd have to generate your own client_secret.json to test running it though

andymeneely commented 10 years ago

Any updates? Sorry we didn't get to this in the meeting...

dani5447 commented 10 years ago

No problem. Right so I had the scraper but I was running into issues with their OAuth system, specifically the callback function. Then I realized, we have a few other options that might be more viable if I can't figure OAuth out:

  1. We could write a script in Google Apps Script to scrape the calendars, which would take care of the OAuth stuff because the script is already from inside the google apps
  2. We could export the calendars. For instance, Google Calendar already allows you to export to an ICS file.
  3. A third option is I found a sort of scraper that someone else made http://www.gcal2excel.com/exporter which we could use. It can conveniently export to .xls/.xlsx This third option is the most promising. I already tested it and I was able to download a very detailed excel sheet with all of the 'attendees'- the people being rotated in as sheriff. We just need to determine a time range now that we want to get information for. :)
andymeneely commented 10 years ago

Ah - great! For a time range I think going back to 2008 would be best. More data the better. And either the ICS or Excel file is fine. Can you write up some instructions on how to do this in a GoogleDoc?

dani5447 commented 10 years ago

Alright I decided to go with the gcal2excel scraper and I uploaded the results from 1/1/2008 to 4/1/2014 into the Chromium drive, called chromiumSheriffCalendarRotations.xls. To view the data, you'll want to download and view it. I can write up some quick instructions how to use the gcal2excel tool I'd found this weekend.

andymeneely commented 10 years ago

Beautiful! This is exactly what I was hoping for. Ok I'll sketch up what to do next this weekend.