Homec4science

Write an explicit edge for commit membership in packages

Authored by epriestley <git@epriestley.com> on Jan 30 2017, 19:39.

Description

Write an explicit edge for commit membership in packages

Summary:
Ref T10978. Currently, during commit import, we write an "Audit Not Required" auditor for commits which don't require an audit.

This auditor is used to power the "Commits in this package" query in Owners.

This conflates audits and commit/package membership. I think it might even predate edges. Code needs to dance around this mess and we get the wrong result in some cases, since auditors are now editable.

Instead, write an explicit edge which just says "this commit is part of such-and-such packages". Then use that to run the query. Logical!

I'll issue guidance on this but I'm not migrating it, since it fixes itself going forward and only really affects the UI in Owners.

Test Plan:

  • Ran bin/audit update-owners with various arguments.
  • Viewed packages in web UI, saw them load the proper commits.
  • Queried by packages in Diffusion explicitly.
  • Clicked the "View All" link in Owners and got to the right search UI.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10978

Differential Revision: https://secure.phabricator.com/D17264

Details

Committed
epriestley <git@epriestley.com>Jan 31 2017, 00:23
Pushed
aubortJan 31 2017, 17:16
Parents
rPH4b248e354587: Make the "Add Auditors" Herald rules use modern transactions
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH5e7a0917372a: Write an explicit edge for commit membership in packages (authored by epriestley <git@epriestley.com>).Jan 31 2017, 00:23