Page MenuHomePhabricator

Upgrading: Owners Packages/Commits now use edges
Closed, ResolvedPublic

Description

Summary

If you use Owners packages, run this command after upgrading to 2017 Week 5:

$ ./bin/audit update-owners --all

This command can safely be run while Phabricator is serving requests, and can be safely aborted and restarted later.

Details

Phabricator keeps track of which commits are in which Owners packages so you can query for commits by package. Phabricator itself queries for commits by package on the package detail screen in Owners, to show recent commits in the current package and commits in the package with outstanding concerns.

Prior to D17264, this relationship was stored as an audit relationship between the commit and package. In many cases, this was a made-up "no audit required" relationship. This mechanism was complicated and added significant complexity to the code because it conflated two orthogonal things (audit state vs paths affected by the commit). After recent changes to audit connected to T10978, which allow auditors to be freely added and removed, this relationship was also sometimes inaccurate: you can add a package as an auditor to any commit, and remove it from commits which are legitimately part of the package.

D17264 changes this relationship to use a dedicated edge instead, and the UI to query using the edge. This is simpler and unambiguous. However, these edges won't exist yet for historical commits.

At the present time, we aren't running an automatic migration to write these edges for historical commits. This migration could take a while, and not all installs use Owners, and those that do may not care much about historical data. If you do use Owners and want accurate historical data, you can update the data by running bin/audit update-owners:

$ ./bin/audit update-owners --all        # Update every commit in every repository.
$ ./bin/audit update-owners rXYZ         # Update an entire repository.
$ ./bin/audit update-owners rXYZabcd1234 # Update a specific commit.

This is safe to run while Phabricator is serving requests, and safe to abort (with ^C) and re-run later. The script iterates over specified commits and writes appropriate edges to give them the right membership in packages.

Regardless of whether you run this migration or not, commits discovered after the upgrade will have edges written correctly.

Event Timeline

epriestley triaged this task as Normal priority.Jan 30 2017, 7:51 PM
epriestley updated the task description. (Show Details)Jan 30 2017, 7:53 PM
epriestley moved this task from Backlog to v3 on the Diffusion board.Feb 2 2017, 3:20 PM
epriestley edited projects, added Diffusion (v3); removed Diffusion.
epriestley moved this task from Backlog to Meta on the Diffusion (v3) board.Feb 2 2017, 3:49 PM
epriestley closed this task as Resolved.Feb 10 2017, 5:05 PM
epriestley claimed this task.

Presuming this is resolved since it's extremely boring and I ran it here and on every instance in the production cluster last week without any issues, but yell if you run into problems.