Page MenuHomePhabricator

Make some Audit status comparisons more lax, so state transactions only post once
ClosedPublic

Authored by epriestley on Jan 27 2017, 7:06 PM.
Tags
None
Referenced Files
F14116227: D17258.diff
Thu, Nov 28, 2:21 PM
Unknown Object (File)
Tue, Nov 19, 8:24 PM
Unknown Object (File)
Sat, Nov 16, 12:35 PM
Unknown Object (File)
Wed, Nov 13, 3:41 PM
Unknown Object (File)
Tue, Nov 12, 7:46 PM
Unknown Object (File)
Tue, Nov 12, 7:24 PM
Unknown Object (File)
Tue, Nov 12, 6:56 PM
Unknown Object (File)
Tue, Nov 12, 3:17 PM
Subscribers
None

Details

Summary

Ref T10978. Currently, too many "This audit now <something something>" transactions are posting, because this strict === check is failing to detect that the audit is already in the same state.

This is because audit states are currently integers, and saving an integer to the database and then reading it back turns it into a string. This is a whole separate can of worms. For now, just weaken the comparison. I'd eventually like to use string constants here instead of integer constants.

Test Plan

Commented on a "no audit required" commit, didn't see a double "this doesn't need audit" transaction anymore.

Also made a legit state change and did see a state transaction.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Jan 27 2017, 7:07 PM
This revision was automatically updated to reflect the committed changes.