Page MenuHomePhabricator

Build a tool to provide instrumentation development timelines
Closed, ResolvedPublic8 Estimated Story Points

Assigned To
Authored By
cjming
Feb 4 2024, 10:08 PM
Referenced Files
Restricted File
Mar 7 2024, 3:19 AM
Restricted File
Mar 7 2024, 3:19 AM
Restricted File
Mar 7 2024, 3:19 AM
Restricted File
Mar 6 2024, 11:08 PM
Restricted File
Mar 6 2024, 11:08 PM
Restricted File
Mar 6 2024, 11:08 PM
F42407192: MetricsPlatform_tag-data-products_2024-2-5.csv
Mar 6 2024, 2:02 AM
F42407168: wmf-phabricator-task-dates.png
Mar 6 2024, 2:02 AM

Description

Implementation task coming out of spike T354952

Description

Build a tool/interface to provide instrumentation development timelines based on tags or task ids as search parameters.

Use Case

To establish Metrics Platform baseline of measuring time to data given the following success criteria:

decrease the time to data by X%

User Story

As a product manager, I want to be able to see how long development took for building a given instrument (or any project/task) so that I can compare expediency of technical approaches.

Outcome

We know how long an effort takes from start to finish to build an instrument (applicable to any project) as long as we know the right tags or task ids.

Acceptance Criteria

  • Tool is publicly accessible
  • Tool uses available APIs to extract relevant data
  • Tool provides a simple form wherein a user can enter custom tags and/or task ids as inputs
  • Tool renders a timeline or table that shows start and end dates upon submit

Required

  • Testing Instructions
  • Documentation

Technical Notes

In T354952#9497421, example curl commands make API calls to Phabricator's Conduit API and Gerrit's Rest API. Using these chained API methods, start and end dates can be pulled from Phabricator and code APIs (Gerrit, GitLab, GitHub) based on custom tags and/or Phab task ids.

We can use Toolforge and/or Cloud VPS for hosting this interface. See example projects like:

Dependencies

Depending on how we stand up the tool, we may need to request a new Cloud VPS project

Event Timeline

cjming updated the task description. (Show Details)
cjming set the point value for this task to 8.

First pass -- i built a dockerized Vite app to create a form that takes a task id and/or a tag and returns a table of linked Phabricator tasks, their start, modified, and end dates as well as their status.

https://gitlab.wikimedia.org/cjming/wmf-phabricator-task-dates

There are many more optimizations I'd like to add (using a proxy server, single install command, data visualizations, associated Gerrit patches, export capability, sorting, multiple parameters, better date formatting, form validation, etc) but as an initial MVP, it provides a basic idea of what's possible for capturing the time spans (and other associated data if desired) of a give task or a set of tasks grouped by custom tags.

If this is a tool we'd like to stand up somewhere, it can be deployed so that non-technical users can just access the form without having to spin up docker containers to use the app.

Notable limitations:

  • Getting started instructions are in the readme wherein I mention that because the app is accessed via localhost, CORS errors prevent making calls to the Phab API. The simplest workaround is to install a browser extension before submitting the form. Not ideal by any stretch but for the sake of expediency, I err'd on this approach.
  • In another branch of the project, I am trying to use Express to create a proxy server for sending the http requests - I couldn't quite get it working so shipped this instead for now.

Pending how we want to make this tool available, I can move the repo from my personal projects to a WMF repo.

Screenshot 2024-02-26 at 10.42.11 PM.png (1×1 px, 98 KB)

Screenshot 2024-02-26 at 10.42.46 PM.png (1×2 px, 237 KB)

Screenshot 2024-02-26 at 10.42.24 PM.png (1×1 px, 99 KB)

Screenshot 2024-02-26 at 10.41.15 PM.png (1×2 px, 419 KB)

After demo-ing for @WDoranWMF and @phuedx, immediate next steps will be to provide some kind of data visualization for the task dates -- I will demo for @VirginiaPoundstone at our 1:1 tomorrow to get initial feedback from our primary stakeholder.

Per discussion with @phuedx, the most expedient fix to the CORS issue is to use something like https://ngrok.com/ for the proxy server rather than building it myself with Express so I will include this as well in the next round of updates.

Per demo with @VirginiaPoundstone, additional functionality to be added:

  • Exporting the data for comparison in csv ***
  • More dimensions
    • Number of comments
    • Number of commenters
    • Number of gerrit bot interactions
  • Nice to have
    • Search & filter by text string example: “instrument” “a/b test”

@cjming just saw this task and related spike, and wondered if you were aware of tasks with the Type "Deadline"? Here's the form for that: https://phabricator.wikimedia.org/maniphest/task/edit/form/54/

Here's an example (slightly meta) task that shows what it looks like: https://phabricator.wikimedia.org/T355307

The "Due Date" option appears when editing a task that uses this form, and when active it should show a stamp with that date on the card when viewing a board.

There is also https://www.mediawiki.org/wiki/Data%C2%B3, a working group that used to meet to talk about a tool that used Phab data.

I'm not sure if and of this is relevant to your use-case, but FYI in case it is! You may also find it useful to chat with @Mhurd , who has frequently worked on Phab tooling and improvements, and may have some ideas to make your work easier. :)

hi @MBinder_WMF - thanks for the info! the form link is restricted access so i couldn't look at that -- but the example task shows the due date which is an interesting data point that i didn't know existed.

I met with both Tyler and Monte which was super helpful in building out a prototype for this effort. I based my initial app off of Monte's demo of one of his Phab projects and if/when the time comes to stand it up somewhere, I'll likely try to do something similar to Tyler's work on RE's dashboards and data visualization tool.

Also happy to know this Data³ group exists - while the scope of this particular tool is dialed into Metrics Platform's specific needs, I can see how it could be useful for any team, PM, EM, etc. Hopefully the MVP could provide a basis for anyone interested in tracking tasks by date and other dimensions.

Sounds good!

the form link is restricted access so i couldn't look at that

Odd, I've never heard of a form link being restricted. Perhaps when @Aklapper returns he could help us figure that out (low priority)!

Moving this back into review -- I added more dimensions, data visualization, and export functionality per feedback
https://gitlab.wikimedia.org/cjming/wmf-phabricator-task-dates

Example screenshot of chart showing cumulative days per task id when querying for data-products tag:

wmf-phabricator-task-dates.png (1×1 px, 319 KB)

Here is example spreadsheet generated from above query when the export button is clicked:

@VirginiaPoundstone @WDoranWMF I added pagination, fulltext search, ability to query for multiple parameters, urls to exports. Happy to demo again.

{F42431783}
{F42431784}

and some example spreadsheets:

query tag data-products returned 501 rows
{F42426874}

query text search a/b test and tag desktop_improvements_vector_2022 returned 141 rows
{F42431848}

Demo'd for @VirginiaPoundstone and @WDoranWMF -- at the offsite, we will get Virginia set up to run the tool locally

There are still a number of improvements that can be made:

  • results filtering/sorting - by date, status, etc
  • form validation
  • single-step installation
  • data visualization optimizations
  • better pagination
  • etc

all of which we could spin off into other tickets but for now, this is MVP/MLP -- moving this task over to sign off

Odd, I've never heard of a form link being restricted. Perhaps when @Aklapper returns he could help us figure that out (low priority)!

@MBinder_WMF: Hmm https://phabricator.wikimedia.org/transactions/editengine/maniphest.task/edit/54/ has a pretty strict View Policy - could you file a separate ticket?

@cjming please create 3 next step tasks:

  1. [epic] enhancements to this tool that you mention above in a comment and add it to the Data Products backlog.
  2. [epic] analysis of this data in order to answer:

a. how many engineering steps are currently required, on average, to implement and QA and deploy/configure instruments?
c. how long does it take to start collecting data once instruments are implemented?
d. how long does it take to get analysis ready data from instruments?

  1. [epic] use of an LLM to create summaries based on the hackathon project.

Once these tickets are created, let's move this task to done!

Nice work :)

Odd, I've never heard of a form link being restricted. Perhaps when @Aklapper returns he could help us figure that out (low priority)!

@MBinder_WMF: Hmm https://phabricator.wikimedia.org/transactions/editengine/maniphest.task/edit/54/ has a pretty strict View Policy - could you file a separate ticket?

Done: T360463: Form 54 has a restricted view policy, but not sure it should

@cjming please create 3 next step tasks:

  1. [epic] enhancements to this tool that you mention above in a comment and add it to the Data Products backlog.

done T360819

  1. [epic] analysis of this data in order to answer:

done T360820

  1. [epic] use of an LLM to create summaries based on the hackathon project.

done T360822